BTW I also noticed a bit of a bug, in your closeRenderer method on the UI form (which I would HIGHLY suggest renaming to something like 'MainForm' as there is also a plugin DLL called UI and that is a bit confusing)
The method initially was setup to check to see if we needed to do a control.invoke, and if so it called itself recursively using the invoke, which then would not need the invoke anymore and go down the other branch of the if tree. The only problem here is this is done inside of a for loop, meaning you sort of get some runaway recursion. Watch what happens in the debugger if you set some breakpoints, the function calls itself like 5-6 times even when only 2 forms are open (2 monitors on my system).
I suggest the function be changed so it looks like this:
Note how we are just directly firing the other thread forms' timer directly, instead of re-calling the method. In a quick and cursory examination it didn't look like it was necessary (for something else) to be doing a recursive method call like that.Code:public static void closeRenderer() { for (int i = 0; i < Core.UICollection.Count; i++) { if (Core.UICollection[i].InvokeRequired) { Core.UICollection[i].Invoke(new MethodInvoker(delegate() { Core.UICollection[i].tmrClosing.Enabled = true; })); } else { Core.UICollection[i].tmrClosing.Enabled = true; } } }
BTW Keep up the good work, I really like the direction this app is going.
Justin you mentioned that you wanted me to start working on a plugin, what did you have in mind?



LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks