|
|
Here are the two files in question. Note that each are in their own project and hence library. The first has a reference to the Pluggins project.
Calling Exe
Pluggins Class
I would like to mention a really bad thing though. ((SourceControl.SourceSafe)pluggin) is invalid as well!!! I hate to say it, but I can't think that this is anything but a bug, which I'm slow to assume but either the debugger watch window lies or the code doesn't compile.
|
|
|
|
|
The 1st thing i notice is that you are placing the plugins in a directory. I had lotsa problems with this, too many to think of now.
Secondly , I still do not see the definition of the interface.
From Pluggins.cs:
if( type.GetInterface(Interface.FullName) != null)
Should be:
if( type.GetInterface(typeof(ISourceControlPluggin).FullName) != null)
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
Why is that wrong. Its the same thing... instead of getting the typeof(ISourceControlPluggin) type object in the method, i'm passing it in.
here is the interface def file -- sorry 'bout that
I actually posted this same problem friday but since it was friday I didn't get much feedback. One response I did get was from someone saying that he had lots of problems loading assemblies because of version issues; even if signatures didn't change. In following that path, I realized I hadn't removed the auto-version increment in some of the assemblies including the Pluggins and Interface one files. I will let you know if I find anything.
|
|
|
|
|
I found out what the problem was everyone. Russell Morris mentioned he had similar issues and he tracked it down to version issues with the loaded version vs. the linked version. What I did is 1) cleaned out my debug directories to start fresh. 2) Removed all auto-increment versions in assemblies files (not really necessary, but less confusing) 3) made sure that the assemblies being built and linked during debug where the same version being loaded dynamically. More specifically, had the same signature.
I want to thank Russell Morris from a duplicate post from friday for the solution to my problem. leppie thanks a ton for all your time, I really appreciate it. By the way, everything is running in different directories and, if you believe this, on network shares which was my hope because I'd like to store the pluggins and configuration files on a server for centralization.
|
|
|
|
|
I had a look, and will see if i can load my files similary (Brain.VocabularyOutOfRangeException)
I think the reason why i didnt have issues, is that im rebuilding main app, plus interface assembly, and allmost all plugins with every build.
I shall get back to you if that is the case
MYrc : A .NET IRC client with C# Plugin Capabilities. See
http://sourceforge.net/projects/myrc for more info.
|
|
|
|
|
WM_CTLCOLOREDIT is sent to an edit control's parent window. Now assume I have a System.Windows.Forms.TextBox derived class. And assume I wanted to handle WM_CTLCOLOREDIT from within the class. I am unable to do so currently. How do people handle WM_CTLCOLOREDIT from their derived edit classes?
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
When I was fooling around with implementing a new wrapper for the SysTreeView32 I noticed that most messages like these were reflected back to your class. So in your WndProc for your derived edit control look for messages as:
#define WM_REFLECT WM_USER + 0x400
...
case WM_REFLECT + WM_CTLCOLOREDIT
...
I'm not 100% positive that is the right definition for WM_REFLECT. I remember first seeing this (and copying it) from Lutz Roeder's code for the enhanced toolbar, so check there if the above doesn't seem to work.
--
Russell Morris
"Have you gone mad Frink? Put down that science pole!"
|
|
|
|
|
I understand your Q. now
The Control class handles WM_CTLCOLOR for you and sets the background color and the text color of the dc to that specified in the properties of the Control. So you don't need to handle it.
|
|
|
|
|
Rama Krishna wrote:
The Control class handles WM_CTLCOLOR for you and sets the background color and the text color of the dc to that specified in the properties of the Control. So you don't need to handle it.
Usually we dont need to. But if you handle WM_PAINT yourself, and draw a different color background, then you have a problem. Now when the user types something in, the bgcolor of the text is not your back color
Even specifying the backColor property is useless here. I wasted half an hr over this today. Also discussed with James. He feels that when you handle WM_PAINT yourself somehow WM_CTLCOLOR is handled by the OS
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Follow Russel Morris's idea. WM_REFLECT is 8192.
|
|
|
|
|
|
|
In the controls constructor add the following line
SetStyle(ControlStyles::UserPaint, true);
|
|
|
|
|
|
|
Hi,
Is there a way to attach a Tag value to each item in a ComboBox (like the Tag property of ListViewItem)?? I need to know the ID of the record in the database while displaying the readable name.
Thanks in advance,
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
The value displayed in a combobox (by default) is obtained by calling ToString() on the item in question.
So the simple answer is to write a class that has your two values and make the ToString() method return the string value.
The better answer is to make the ID and readable name values into properties. Then you can set the DisplayMember and ValueMember properties on the ComboBox to the names of the properties in your class and retreive the value by examining the SelectedValue property to tell which value is selected.
HTH,
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
About the better way, are the DisplayMemeber and ValueMember and all those properties of the ComboBox itself, or of each item??
So it would be something like cmb.Items.Add(1, "Item #1")??
-- LuisR
──────────────
Luis Alonso Ramos
Chihuahua, Mexico
www.luisalonsoramos.com
"Do not worry about your difficulties in mathematics, I assure you that mine are greater." -- Albert Einstein
|
|
|
|
|
How do I filter out non-standard foreign language fonts like gautami, latha, mangal, shruti and raavi? These fonts are a puzzle. They don't render at all [not even in Word XP]. They show black boxes when you dbl clk them. Rama says they are Indian language fonts. I say they suck!!! Cause they won't render and they return wrong values when you MeasureItem them. Anyone's got any ideas on filtering theme out.
Nish
p.s. Right now I am gonna have to hardcode these 5 fonts into a filter list I think
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
|
Can someone point me to the differences between OT and TT? I just noticed OT in Windows XP and for all intents and purposes it seems the same as TT. What's the difference?
-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations
"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."
|
|
|
|
|
Background:
C# Windows Forms project. I've make a control based on the DataGrid for logging the "progress" of an applications.
I'm looking for a way to have the DataGrid keep up with new items beeing added, by forcing a scoll to the last item after each addition.
Any suggestions would be appreciated.
TIA.
Mike Stanbrook
mstanbrook@yahoo.com
|
|
|
|
|
Use the CurrentCell property to change which cell is visible (ie, set it to the first column in the last row).
It looks really stupid this way; but here is the code to do that
myGrid.CurrentCell = new DataGridCell(rowIndex, 1);
[rant]
Who ever thought it would make sense to assign a cell to the current cell property must've been smoking something at the time. To me this says replace the contents of the current cell with this new cell. Its not until you look at the documentation for DataGridCell that you realize it is used only to identify a cell by location and not to hold the actual contents of it.
[/rant]
James
"Java is free - and worth every penny." - Christian Graus
|
|
|
|
|
Thanks.
I do agree that it doesn't look "elegant".
I also agree it would seem there is "something" missing, but could just be the 'ol VB6er in me..
|
|
|
|