|
Yay thanks for your quick reply!
So, if my application 'knows' about plugins that conform to a particular interface for example a "Drawing Interface"...? I could create plugins that enable the user to View a photo and another to Edit a photo..? I mean, my application only needs to know what "type" of plugin it will be, correct? Not "exactly" what it will do?
Thanks for yout time
|
|
|
|
|
Yes thats pretty much it.
I think this article might help: Plug-ins in C#[^]
|
|
|
|
|
Thanks for your help HuntingWabbits That article was very helpful. Much appreciated.
jase
|
|
|
|
|
schizophrenic.prOgrAmmEr wrote: C# Plugin Architecture
You might also want to take a look at the Managed Extensibility Framework http://www.codeplex.com/MEF[^]
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
Hmmm... That's very interesting. I'm always on CodePlex, I'm surprised I haven't already found it. Thanks for that Wes Aday!
I'm reading about it now and will check it out. Oh the excitement!!
|
|
|
|
|
You are welcome. Hope you find it useful.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
Hello,
I am using PhilipSoft Control of datalist to show the images.But i am having checkboxes along with each image. I want to get the Ids of checked images.I have bound the datalist by assigning a dataset to it.
How can i get it?.
Please help me as early as possible.
<ASP:DataList id="MyThumbList" RepeatDirection="Horizontal" RepeatColumns="4" CellSpacing="3" runat="server" EnableViewState="true" OnItemDataBound="Item_DataBound"
OnEditCommand="ThumbList_EditCommand" OnUpdateCommand="ThumbList_UpdateCommand"
OnCancelCommand="ThumbList_CancelCommand">
<ItemStyle font-size="8pt" horizontalalign="Center" borderwidth="1px" borderstyle="Solid" backcolor="White"></ItemStyle>
<FooterStyle font-size="8pt" horizontalalign="Center" backcolor="#FFFFC0"></FooterStyle>
<HeaderStyle font-size="11pt" font-bold="True" horizontalalign="Center"></HeaderStyle>
<SelectedItemStyle backcolor="#E0E0E0"></SelectedItemStyle>
<EditItemStyle borderwidth="1px" borderstyle="Groove"></EditItemStyle>
<ItemTemplate>
<asp:CheckBox ID="chkImage" runat="server" ValidationGroup='<%# AltString((String)((DataRowView)Container.DataItem)["Filename"]) %>' /><%--ValidationGroup='<%# AltString((String)((DataRowView)Container.DataItem)["Filename"]) %>'--%>
<a target="_blank" onmouseout="deleteImage()" onmouseover="callImage('<%# ThumbUrl((String)((DataRowView)Container.DataItem)["Filename"]) %>',event)" href="<%# String.Format("{0}/{1}",_vpath,
((DataRowView)Container.DataItem)["Filename"]) %>" >
<img border="0" src="<%# ThumbUrl((String)((DataRowView)Container.DataItem)["Filename"]) %>"
alt="<%# AltString((String)((DataRowView)Container.DataItem)["Filename"]) %>" /></a>
<%# _bShowFilenames?"<br/>"+((DataRowView)Container.DataItem)["Filename"]:"" %>
<%# ShowComments?"<br/>"+((DataRowView)Container.DataItem)["Comment"]:"" %>
<br/>
<%-- <asp:LinkButton id="button1" Visible='<%# AllowEdit ? true:false %>'
Text="Edit" CommandName="Edit" runat="server"/>--%>
</ItemTemplate>
<EditItemTemplate>
<a href="<%# String.Format("{0}/{1}",_vpath,
((DataRowView)Container.DataItem)["Filename"]) %>" >
<img border="0" src="<%# ThumbUrl((String)((DataRowView)Container.DataItem)["Filename"]) %>"
alt="<%# AltString((String)((DataRowView)Container.DataItem)["Filename"]) %>"
/></a>
<%# _bShowFilenames?"<br/>"+((DataRowView)Container.DataItem)["Filename"]:"" %>
<ASP:TextBox id="txtFilename" Visible='false'
Text='<%# ((DataRowView)Container.DataItem)["Filename"] %>' runat="server"/>
<br/><ASP:TextBox id="txtComment" Multiline='true' size='30' Rows='4' TextMode="MultiLine"
Text='<%# ((DataRowView)Container.DataItem)["Comment"] %>' runat="server"/>
<br/><asp:LinkButton id="button2" Text="Save" CommandName="Update" runat="server"/>
<asp:LinkButton id="button3" Text="Cancel" CommandName="Cancel" runat="server"/>
</EditItemTemplate>
<HeaderTemplate>
<%# HeaderTitle %>
</HeaderTemplate>
<FooterTemplate>
<%# NumImagesDisplayed() %>
<tr style="font-size: 8pt;" align="center">
<td colspan="<%# Columns %>">
<p >
<asp:PlaceHolder id="plLinks" runat="server"></asp:PlaceHolder>
</p>
</td>
</tr>
</FooterTemplate>
</ASP:DataList>
|
|
|
|
|
I nearly posted this in the Lounge as I think it's far enough from a Programming QuestionTM but decided last minute to put it here:
Is the C# keyword var a good thing or not? Was it added just to make C# closer to VB.NET or is it actually a good thing in its own right? Does it make it easier to write programs or are the actually harder to maintain because the code doesn't make it clear what type the variable is?
I hope you realise that hamsters are very creative when it comes to revenge. - Elaine
|
|
|
|
|
I think it's good. It allows me to use anonymous types in queries. And they get converted to normal variables at compile-time, so there's no runtime overhead. As for the variable types, most good IDEs will tell you what type a variable is by hovering the cursor over it.
So I think it's good. 'dynamic' on the other hand -
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
It still generates a strong type internally, and without it Linq wouldn't really work - so, it's a good thing. It's not really akin to a variant.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Linq is new to me but I can see its advantages in anonymous queries.
I hope you realise that hamsters are very creative when it comes to revenge. - Elaine
|
|
|
|
|
Hi,
in my view it is as good as "continue" (or even "goto"): you can use it to your advantage and be fortunate to have it; and you can easily abuse it, it is all up to you.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
It was added for Linq.
It gets abused too much.
Only weak programmers use it.
|
|
|
|
|
i want to delete a string from right of 10 places
Eg..
String = http://www.bharathretail.com/cyberwing/update_ip.php?gid=4274725472424242
but i want
string = http://www.bharathretail.com/cyberwing/update_ip.php
plz help..
Elizabeth...
|
|
|
|
|
string = string.substring(0,string.length -11)
|
|
|
|
|
Instead of removing 10 char from right you can use split function
Because not necessary that always you have 10 characters after “?”,
string path = "http://www.bharathretail.com/cyberwing/update_ip.php?gid=4274725472424242";
string[] ar = path.Split('?');
MessageBox.Show(ar[0]);
Amit
|
|
|
|
|
either you count in base 21 (that would be unumvigintal), or your example is wrong.
if you want to get rid of the querystring in string s, use s=s.Split('?')[0];
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi,
I am working on Windows application and I created the validation for English language by using “RegularExpressions”. Now my application need to support Spanish language and my English validations are not working in Spanish.
Please help me what should I do.
Thanks in Advance
Amit
Amit
|
|
|
|
|
If you're just using regexes, then you simply add Spanish-validating regexes to your Resources. Then use something like this:
if(Spanish)
RegexValidate(SpanishRegex);
else if(English)
RegexValidate(EnglishRegex);
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Hi
Thanks for reply, but how to write "Spanish-validating regexes".
Because in English we use
"Regex objAlphaPattern = new Regex("[^a-zA-Z]");"
But what I need to write for Spanish.
Thanks
Amit
Amit
|
|
|
|
|
To be honest, I've not gone into regexes in detail. Spanish seems to use the same alphabet, plus some, so you could in theory use the same regex. I just don't know how to include the vowels with an acute accent and diaeresis. Perhaps this link may help
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
I don't think so. Rather than having lots of conditionals, just pull the regex expressions from a string resource, same as the GUI stuff.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
I hadn't thought of that. Thanks for the tip. But how would you handle the case that a user wanted to change languages on the fly, apart from recompiling the application with the correct regex expressions?
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
I don't know the details and have no experience with the subject, however I do vaguely remember an article showing how a GUI language can be changed on the fly; it was based on those regional DLLs Visual Studio and/or .NET support for internationalization.
One probably would have to come up with another solution if one needed multiple languages on a Form, independent of the GUI language itself. Say a translator app.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
pls help me to read a text file from other machine....
|
|
|
|