made Particles Plugin working in tabbed mode
git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@19 3f4676ac-adda-40fd-8265-58d1435b1672
This commit is contained in:
parent
92abb71664
commit
01f9093543
1 changed files with 11 additions and 10 deletions
|
@ -52,22 +52,23 @@ namespace LSLEditor.Plugins
|
||||||
{
|
{
|
||||||
public Particles(LSLEditorForm parent)
|
public Particles(LSLEditorForm parent)
|
||||||
{
|
{
|
||||||
|
string strPluginName = "Particles";
|
||||||
|
|
||||||
|
string strDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||||
|
string strPluginsDirectory = Path.Combine(strDirectory, "Plugins");
|
||||||
|
string strProgram = Path.Combine(strPluginsDirectory, strPluginName + ".exe");
|
||||||
|
|
||||||
|
Assembly assembly = Assembly.LoadFrom(strProgram);
|
||||||
|
Form frmMain = assembly.CreateInstance("Particles.frmMain") as Form;
|
||||||
|
|
||||||
if (parent.IsMdiContainer)
|
if (parent.IsMdiContainer)
|
||||||
{
|
{
|
||||||
string strPluginName = "Particles";
|
|
||||||
//string strArguments = "";
|
|
||||||
|
|
||||||
string strDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
|
||||||
string strPluginsDirectory = Path.Combine(strDirectory, "Plugins");
|
|
||||||
string strProgram = Path.Combine(strPluginsDirectory, strPluginName + ".exe");
|
|
||||||
|
|
||||||
Assembly assembly = Assembly.LoadFrom(strProgram);
|
|
||||||
Form frmMain = assembly.CreateInstance("Particles.frmMain") as Form;
|
|
||||||
parent.AddForm(frmMain);
|
parent.AddForm(frmMain);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MessageBox.Show("This plugin does not run in tabbed mode", "Particles plugin", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
//MessageBox.Show("This plugin does not run in tabbed mode", "Particles plugin", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
frmMain.Show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue