static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //if (AppUpdatesAvailableInternal()) //{ // MessageBox.Show("New version of Inferno available.", // "New version!", MessageBoxButtons.OK, MessageBoxIcon.Information); //} //Splasher.Show(typeof(frmSplash)); mDanteFilePath = string.Empty; mLogFilePath = string.Empty; try { var objParseCommandLine = new clsParseCommandLine(); var success = false; if (objParseCommandLine.ParseCommandLine()) { if (SetOptionsUsingCommandLineParameters(objParseCommandLine)) { success = true; } } if (!success || objParseCommandLine.NeedToShowHelp || objParseCommandLine.ParameterCount + objParseCommandLine.NonSwitchParameterCount == 0) { var syntaxMessage = "Supported command line switches are /F and /L \n" + "Use '/F FilePath.dnt' to load a data file \n" + "Use '/L LogFilePath' to specify a custom log file path"; MessageBox.Show(syntaxMessage, "InfernoRDN Syntax", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } catch (Exception ex) { MessageBox.Show("Exception parsing the command line arguments: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } var mfrmDAnTEmdi = new frmDAnTEmdi(mDanteFilePath, mLogFilePath); if (!mfrmDAnTEmdi.IsDisposed) { Application.Run(mfrmDAnTEmdi); } }
private void frmPlotDisplay_Activated(object sender, EventArgs e) { if (IsMdiChild) { menuStrip2.Visible = false; mToolStripPlot.Visible = false; frmDAnTEmdi mp = (frmDAnTEmdi)Application.OpenForms["frmDAnTEmdi"]; ToolStripManager.RevertMerge(mp.mtoolStripMDI); //toolstrip refers to parent toolstrip ToolStripManager.Merge(this.mToolStripPlot, mp.mtoolStripMDI); } }
static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //if (AppUpdatesAvailableInternal()) //{ // MessageBox.Show("New version of Inferno available.", // "New version!", MessageBoxButtons.OK, MessageBoxIcon.Information); //} //Splasher.Show(typeof(frmSplash)); mDanteFilePath = string.Empty; mLogFilePath = string.Empty; try { var objParseCommandLine = new clsParseCommandLine(); var success = false; if (objParseCommandLine.ParseCommandLine()) { if (SetOptionsUsingCommandLineParameters(objParseCommandLine)) success = true; } if (!success || objParseCommandLine.NeedToShowHelp || objParseCommandLine.ParameterCount + objParseCommandLine.NonSwitchParameterCount == 0) { var syntaxMessage = "Supported command line switches are /F and /L \n" + "Use '/F FilePath.dnt' to load a data file \n" + "Use '/L LogFilePath' to specify a custom log file path"; MessageBox.Show(syntaxMessage, "InfernoRDN Syntax", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } catch (Exception ex) { MessageBox.Show("Exception parsing the command line arguments: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } var mfrmDAnTEmdi = new frmDAnTEmdi(mDanteFilePath, mLogFilePath); if (!mfrmDAnTEmdi.IsDisposed) Application.Run(mfrmDAnTEmdi); }