/// <summary> /// Constructor /// </summary> /// <param name="mainForm"></param> public CommandBlock(AnalysisMainForm mainForm) { this.mainForm = mainForm; this.module = (AnalysisWindowsModule) mainForm.Module; InitializeComponent(); Construct(); }
/// <summary> /// Constructor for If Dialog /// </summary> /// <param name="frm"></param> public IfDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm) : base(frm) { InitializeComponent(); Construct(); amf = frm; }
/// <summary> /// Constructor /// </summary> /// <param name="mainForm"></param> public CommandBlock(AnalysisMainForm mainForm) { this.mainForm = mainForm; this.module = (AnalysisWindowsModule)mainForm.Module; InitializeComponent(); Construct(); }
// private CommandContextMenuType CurrentContextMenuType; #region Constructors /// <summary> /// Constructor for dialog /// </summary> /// <param name="frm"></param> public DefineUserCommandDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm) : base(frm) { InitializeComponent(); construct(); CheckForInputSufficiency(); amf = frm; }
/// <summary> /// Constructor for dialog /// </summary> /// <param name="frm"></param> public DefineUserCommandDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm) : base(frm) { InitializeComponent(); construct(); CheckForInputSufficiency(); amf = frm; }
/// <summary> /// Dispose of the container /// </summary> public override void Dispose() { // trash container and any components this.container.Dispose(); //if (this.engine != null) //{ // this.engine.Dispose(); //} form = null; // base class will finish the job base.Dispose(); }
/// <summary> /// Constructor /// </summary> /// <param name="mainForm">The main form</param> public ProgramEditor(AnalysisMainForm mainForm) { this.mainForm = mainForm; InitializeComponent(); }
/// <summary> /// Attach the current project with module loading /// </summary> protected override void Load(IModuleManager moduleManager, ICommandLine commandLine) { // create a new instance of the analysis engine module. Module will be isolated from Windows // ApplicationManager GetService chain. // engine = new AnalysisEngine(moduleManager, null); base.Load(moduleManager, commandLine); try { //Attach CurrentProject Configuration config = Configuration.GetNewInstance(); string filePath = config.CurrentProjectFilePath; if (!string.IsNullOrEmpty(filePath)) { // Try to open the current project in the configuration file. // If the project can't be opened, recover from the error and update the configuration file. try { CurrentProject = new Project(filePath); } catch (Exception ex) { MsgBox.ShowException(ex); config.CurrentProjectFilePath = string.Empty; Configuration.Save(config); } } if (form == null) { base.OnLoaded(); form = new Forms.AnalysisMainForm(this); container.Add(form); form.Closed += new EventHandler(MainForm_Closed); form.Disposed += new EventHandler(MainForm_Disposed); form.Show(); if (!Util.IsEmpty(form)) { form.Activate(); // assure handle creation System.IntPtr handle = form.Handle; // read the command line if (commandLine != null) { string titleArgument = commandLine.GetArgument("title"); if (titleArgument != null) { form.Text = titleArgument; } } } } else { if (!form.IsDisposed) { form.Show(); if (form.WindowState == FormWindowState.Minimized) { form.WindowState = FormWindowState.Normal; } form.Activate(); } } //zack 1/2/08 //Processor.CommunicateUI += new CommunicateUIEventHandler(MsgResponse); // KKM4 Commented this out since HandleDialogEvent is never raised. // Processor.HandleDialogEvent += new DialogBoxUIEventHandler(DialogResponse); //dcs0 4/23/08 } catch (Exception ex) { throw new GeneralException(SharedStrings.MODULE_NOT_LOADED + ": \n" + ex.Message, ex); } finally { if (Util.IsEmpty(form)) { this.Dispose(); Application.ExitThread(); } } }