I was just hired on with this company to help them make some c# code for a cnc machine they're devving. The part I'm currently working on is to have a plugin run that will run on this software made by a third-party company they got parts of their machine from. The plugin has two windows forms, a primary form that will do most of the things needed for the GUI and a debug form to help test things. They recently had to update the shell used that will run the plugin and now only the debug form will actually load when it runs.
In the "PrimaryForm.cs"
public partial class PrimaryForm : Form
{
//...
//the debug form is declared here
DebugForm DebugForm = new DebugForm();
//...
}
I have a breakpoint here but it's never hit
The only breakpoint that does hit however is in the "DebugForm.cs" file
public partial class DebugForm: Form
{
public DebugForm()
{
//the following method is called in the DebugForm.Desiger.cs file
InitializeCompnent();
}
//...
}
(Keep in mind nobody CS has actually worked on any of this yet, its all been either EE or CE people so zero convention can be seen anywhere)
I guessing from this that the dll is for some reason only telling the application running the plugin to load the debugForm. Both form classes are public as well so I'm not sure why the primaryForm isn't being loaded at all. In visual studio the whole project, which inlcudes both form files and everything, is output as a dll so I would think they should be in the same file.
Edit: To explain a little more, the issue isn't even necessarily that the dll is running the DebugForm load_event() first, but that it is running the constructor for the DebugForm first and only that constructor, then it runs the load_event().
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…