|
|
|
You're right, thanks Greeeg!
|
|
|
|
|
As Greeeg said, you should search CP first. There are many articles.
But I would do it like this:
1. Design a main interface that will allow your app to interact with plugins and viceversa.
2. Add a way for the plugins to be registered with your app (register them using the UI, drop the DLLs in a special folder)
3. Create an attribute (in the .NET way) and use it to mark the main class (which implements the interface from step 1) in the plugin
4. In your app, load all DLLs registered in step 2 and enumerate its types. If any of the types has the attribute from step 3, create an object from it and call the plugin's methods (maybe one to initialize, another to get menu commands, and so on).
I hope this helps,
|
|
|
|
|
It is great! Thanks Luis.
|
|
|
|
|
Hi all,
I am developing an windows applcation using C# .net 2003. I have a list view in my application.I am loading my list view with two columns from the database.
Now in the list view if I press 'A' the appropriate item in the list view starts with 'A' gets highlighted.This highlighting is being done based on the first column but I want it to happen based on the second column.
Its urgent.Please help me out
With Regards,
B.Ananthvivek
|
|
|
|
|
Hi all,
I have written this code in the list view keypress and its now selecting based on the second column but the selection based on the first column also works and it results in multi select i need to supress it. Can any one help me out
for(int i= 0; i < listview1.Items.Count; i++)
{
if(listview1.Items[i].SubItems[1].Text.StartsWith(e.KeyChar.ToString().ToUpper()))
{
RemoveBackColor(listview1); /* Removing back color of previous selecion */
listview1.Items[i].Selected = true;
listview1.Items[i].Focused = true;
listview1.Items[i].BackColor = SystemColors.Highlight;
listview1.Items[i].ForeColor = SystemColors.HighlightText;
break;
}
}
With Regards
B.Ananthvivek
|
|
|
|
|
So the problem is the multiselect?
Have you set: ListView.MultiSelect Property [^] Also before setting the Selected property to true, you can use Clear method on SelectedItems.
|
|
|
|
|
Do you mean that only the first column is selected (highlighted) for a row? You can't make it select the second column, but you can select the whole row by setting FullRowSelect to true .
|
|
|
|
|
I have written this code in the list view keypress and its now selecting based on the second column
private void listview1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
for(int i= 0; i < listview1.Items.Count; i++)
{
if(listview1.Items[i].SubItems[1].Text.StartsWith(e.KeyChar.ToString().ToUpper()))
{
RemoveBackColor(listview1); /* Removing back color of previous selecion */
listview1.Items[i].Selected = true;
listview1.Items[i].Focused = true;
listview1.Items[i].EnsureVisible();
listview1.Items[i].BackColor = SystemColors.Highlight;
listview1.Items[i].ForeColor = SystemColors.HighlightText;
break;
}
}
e.handled = true;
}
/*Remove Back Color*/
private void RemoveBackColor(ListView LlistView)
{
int lintSelIndex = LlistView.SelectedItems.Count;
for(int lintCountIndex =0;lintCountIndex<lintSelIndex;)
{
try
{
LlistView.SelectedItems[lintCountIndex].BackColor = Color.White;
LlistView.SelectedItems[lintCountIndex].ForeColor = Color.Black;
LlistView.SelectedItems[lintCountIndex].Selected = false;
}
catch(Exception lobjException)
{
return;
}
}
}
its works and suppressed the selection based on the first column at all. But the problem now is that When I moved to the new item (based on the typing in the listview) and press Shift and Down key together,all the items from the first item are getting highlighted.
May be dotnet still thinks that the control is in the first item(so it selects from the first item).
how to overcome this one?
|
|
|
|
|
Hello,
What I would do would be to set FullRowSelect to true (so that all the columns are highlighted when an item is selected) and to just select the item (Selected property set to true) when its second column starts with the key pressed:
private void listview1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
for(int i= 0; i < listview1.Items.Count; i++)
{
if(listview1.Items[i].SubItems[1].Text.StartsWith(e.KeyChar.ToString().ToUpper()))
{
listview1.Items[i].Selected = true;
listview1.Items[i].Focused = true;
listview1.Items[i].EnsureVisible();
break;
}
}
e.handled = true;
} One thing you haven't considered is that if an item that starts with L is selected, and you press L again, the next item would be selected, and so on. Your code, like above, will always select the first item that starts with L.
It is not hard to do that. You just have to start at the item after the currently selected one, and wrap around to the first when you get to the end.
|
|
|
|
|
Hi all!
Im using VS 2008 C# . I was make a site E commercer(CC). Now , I have a new site diffrent from other company. My work, I need intergrate 2 site. , Now i need a webservice for check user from that site. If user login from my site . They don't must login on that site.
Thank you
Hello
|
|
|
|
|
Where these databases located? are there on same host?
do you use aspnet authentication builtin of .NET?
if you use aspnet authentication that microsoft implement it on .net, and you can access second site's database in first site,all you must do is that give the address of your sqlprovider to another databases and there is no need to web service.
Human knowledge belongs to the world
|
|
|
|
|
No 2 Database not in same host. a DB is SQL 2000. a DB Oracle 10G.
Hello
|
|
|
|
|
with this circumstances i think you can write a webservice on one of these hosts ,which check users and login them,logout them, and all tasks about user management with one of these databases. with this webservice you must only do your usermanagement tasks from first application with webservice of second databases. if there is problems on writing this webservice i can help you.
Human knowledge belongs to the world
|
|
|
|
|
Okie .Plase help me write this web service . I don't have exprience for web services .
Thank you very much
Hello
|
|
|
|
|
Hi Guys,
I just want to get an opinion, I only started web programming last year and am 28 years old. So far I enjoy it , although would my age make it difficult for me to get a job in the industry and is it somewhat too late to make that change?
Cheers
|
|
|
|
|
No, I think 28 is fine. The crux is that you enjoy it and enjoy learning more. The latest languages and tools and platforms changes every few years, so it really requires a continual learning process to keep relevant.
|
|
|
|
|
CrimeanTurtle2008 wrote: I only started web programming last year and am 28 years old. So far I enjoy it , although would my age make it difficult for me to get a job in the industry and is it somewhat too late to make that change?
No, a couple of years ago I hired a guy who had only been professionally developing since his late twenties. (He had a law degree originally and decided he wasn't enough of a bastard to be a lawyer).
The only thing you have to remember is that technology moves on increadibly quickly (and it seems to be getting faster, although that could be just because I'm getting older) so you have to keep learning. If you are interested in live long learning (and I really mean that, if you want to be a good to great developer you will have to keep your skills up constantly) then welcome to the club.
|
|
|
|
|
Thats encouraging I guess, but since im a late starter what would I have to do to be more appealing than say the fresh 18 year old out of high school ready to go. Other than for reasons of having better coding skills, for what reasons would a company hire an older guy that is not as fast-paced learner as a young guy with enormous potential.
|
|
|
|
|
For one thing, you would (or should) have a proven track record of work experience, though not necessarily in the industry, it still beats part-time work as the McDonalds fry guy.
only two letters away from being an asset
|
|
|
|
|
CrimeanTurtle2008 wrote: since im a late starter what would I have to do to be more appealing than say the fresh 18 year old out of high school ready to go
I wouldn't hire a fresh 18 year old unless they could prove they had the skills (and I don't mean "1337 Skillz"). Most don't, although a few do. That's what university is for, so they can get the skills. When they get out at 22 I would then look seriously at them.
CrimeanTurtle2008 wrote: for what reasons would a company hire an older guy that is not as fast-paced learner as a young guy with enormous potential
I wouldn't be too down on yourself. Of all the people that I've interviewed the worst are those that think they don't have anything more they need to learn. You realise you have a lot to learn. Hell, I have a lot to learn and I consider myself to by fairly well above average - and it is the only way I'll stay at that level.
A lot of young guys come out of university and they don't know as much as they should. They come out with "passing" grades of 40-50% and they think that because they have a nice framed certificate that says Bachelor of Science (or Bachelor of Engineering) that they now know it all. Have a look around at the forums here. It is littered with posts from people asking increadibly basic questions because they can't be arsed to do their homework, or they've graduated and got a job in the real world and suddenly reaslise they can't actually do the basics what is expected of them.
As I already said, at least you recognise that you have a lot to learn. Those younger guys who could learn faster often just don't actually put in the effort.
|
|
|
|
|
In my last year of study I got pretty good grades.
But I still am not satisfied and feel that I dont know enough and feel that I am always behind the eight ball because I havent been in a real work environment (in IT) and that the guys that have been doing it since they were young are just always streets ahead.
I guess I have posted a few times on here if Im stuck on something I dont understand or cant figure out, but Im always willing to give something a try before giving up and asking for someones help.
|
|
|
|
|
CrimeanTurtle2008 wrote: But I still am not satisfied and feel that I dont know enough
If you ever lose that feeling then that's they day you should change career. Don't worry about it, but don't let it show to a potential employer.
CrimeanTurtle2008 wrote: Im always willing to give something a try before giving up and asking for someones help.
Another very positive trait. You learn much more by doing.
CrimeanTurtle2008 wrote: [I] feel that I am always behind the eight ball because I havent been in a real work environment and that the guys that have been doing it since they were young are just always streets ahead.
I can understand that, and you have to show a potential employer that you are worth hiring.
There are a number of things you can do to show you are capable. Writing about software development is one. Start a blog, write articles. If there is an open source project you like and feel you could contribute to then get involved.
|
|
|
|
|
CrimeanTurtle2008 wrote: but since im a late starter what would I have to do to be more appealing than say the fresh 18 year old out of high school ready to go.
Both are appealing, given the right circumstances. The early starter and the late starter both lack in experience, that's true. The late starter has made an active move to this territory, the early starter might have 'just rolled in'. The late starter might be more ambitious, since he is there to prove himself.
Software-Development isn't comparable to working at a cash-register. At a cash-register, you'll want the cheapest (=youngest) labor possible. In Development, recruiters emphasize on quality, not on age. And there is no way that you can have +20 years of programming experience in C#
CrimeanTurtle2008 wrote: Other than for reasons of having better coding skills, for what reasons would a company hire an older guy that is not as fast-paced learner as a young guy with enormous potential.
We are hired because of those coding-skills. "Enourmous potential" is something that needs to be proven at work - one who looks promising in a classroom will not always survive outside that classroom. Your local shoe-store isn't looking for the next Bill Gates, they want someone to repair their stock-system, before the store opens!
You are not an "older guy that is not a fast-paced learner" - you're an enthousiastic and balanced programmer, who doesn't run after every new technology just for kicks.
I are troll
|
|
|
|