public void DynamicGUI_Display(IZeusGuiControl gui, IZeusFunctionExecutioner executioner) { try { DynamicForm df = new DynamicForm(gui as GuiController, executioner); DialogResult result = df.ShowDialog(); if (result == DialogResult.Cancel) { gui.IsCanceled = true; } } catch (Exception ex) { _log.Write(ex); } }
public DynamicForm(GuiController gui, IZeusFunctionExecutioner executioner) { // // Required for Windows Form Designer support // InitializeComponent(); this.guiController = gui; this.executioner = executioner; if (gui.TabNames.Count > 0) { buttonOk = new Button(); buttonOk.Dock = DockStyle.Bottom; buttonOk.Text = "OK"; buttonOk.Click += new EventHandler(ButtonOk_Click); this.Controls.Add(buttonOk); this.tabs = new TabControl(); this.tabs.Dock = DockStyle.Fill; foreach (string name in gui.TabNames) { this.tabs.TabPages.Add(new TabPage(name)); } this.Controls.Add(tabs); builder = new FormBuilder(this, tabs); } else { builder = new FormBuilder(this); } builder.CheckedListBoxChange += new EventHandler(checkedListBoxChanged); builder.ListBoxChange += new EventHandler(listBoxChanged); builder.ComboBoxChange += new EventHandler(comboBoxChanged); builder.ButtonClick += new EventHandler(buttonClicked); builder.CheckBoxClick += new EventHandler(checkBoxClicked); builder.FormClosing += new EventHandler(formClosing); builder.FileSelectorSelect += new EventHandler(fileSelectorSelect); builder.TextBoxKeyPress += new EventHandler(textBoxKeyPress); builder.ControlOnBlur += new EventHandler(controlOnBlur); builder.ControlOnFocus += new EventHandler(controlOnFocus); }
public DynamicForm(GuiController gui, IZeusFunctionExecutioner executioner) { // // Required for Windows Form Designer support // InitializeComponent(); this.guiController = gui; this.executioner = executioner; if (gui.TabNames.Count > 0) { buttonOk = new Button(); buttonOk.Dock = DockStyle.Bottom; buttonOk.Text = "OK"; buttonOk.Click += new EventHandler(ButtonOk_Click); this.Controls.Add(buttonOk); this.tabs = new TabControl(); this.tabs.Dock = DockStyle.Fill; foreach (string name in gui.TabNames) { this.tabs.TabPages.Add( new TabPage(name) ); } this.Controls.Add(tabs); builder = new FormBuilder(this, tabs); } else { builder = new FormBuilder(this); } builder.CheckedListBoxChange += new EventHandler(checkedListBoxChanged); builder.ListBoxChange += new EventHandler(listBoxChanged); builder.ComboBoxChange += new EventHandler(comboBoxChanged); builder.ButtonClick += new EventHandler(buttonClicked); builder.CheckBoxClick += new EventHandler(checkBoxClicked); builder.FormClosing += new EventHandler(formClosing); builder.FileSelectorSelect += new EventHandler(fileSelectorSelect); builder.TextBoxKeyPress += new EventHandler(textBoxKeyPress); builder.ControlOnBlur += new EventHandler(controlOnBlur); builder.ControlOnFocus += new EventHandler(controlOnFocus); }
public void DynamicGUI_Display(IZeusGuiControl gui, IZeusFunctionExecutioner executioner) { this.Cursor = Cursors.Default; try { DynamicForm df = new DynamicForm(gui as GuiController, executioner); DialogResult result = df.ShowDialog(this); if (result == DialogResult.Cancel) { gui.IsCanceled = true; } } catch (Exception ex) { OnErrorsOccurred(ex); } Cursor.Current = Cursors.Default; }
public void DynamicGUI_Display(GuiController gui, IZeusFunctionExecutioner executioner) { this.Cursor = Cursors.Default; try { DynamicForm df = new DynamicForm(gui, executioner); DialogResult result = df.ShowDialog(this); if (result == DialogResult.Cancel) { gui.IsCanceled = true; } } catch (Exception ex) { ZeusDisplayError formError = new ZeusDisplayError(ex); formError.SetControlsFromException(); formError.ShowDialog(this); } this.Cursor = Cursors.WaitCursor; }
public void DynamicGUI_Display(IZeusGuiControl gui, IZeusFunctionExecutioner executioner) { this.Cursor = Cursors.Default; try { DynamicForm df = new DynamicForm(gui as GuiController, executioner); DialogResult result = df.ShowDialog(this); if(result == DialogResult.Cancel) { gui.IsCanceled = true; } } catch (Exception ex) { ZeusDisplayError formError = new ZeusDisplayError(ex); formError.SetControlsFromException(); formError.ShowDialog(this); } Cursor.Current = Cursors.Default; }
public void DynamicGUI_Display(IZeusGuiControl gui, IZeusFunctionExecutioner executioner) { this.Cursor = Cursors.Default; try { DynamicForm df = new DynamicForm(gui as GuiController, executioner); df.Logger = this; DialogResult result = df.ShowDialog(this); if (result == DialogResult.Cancel) { gui.IsCanceled = true; } } catch (Exception x) { HandleExecuteException(x); } this.Cursor = Cursors.WaitCursor; }
public void DynamicGUI_Display(IZeusGuiControl gui, IZeusFunctionExecutioner executioner) { try { DynamicForm df = new DynamicForm(gui as GuiController, executioner); DialogResult result = df.ShowDialog(); if(result == DialogResult.Cancel) { gui.IsCanceled = true; } } catch (Exception ex) { _log.Write(ex); } }