private void o2MessageQueue_onMessages(IO2Message o2Message) { //first thing to do is to make sure we are on the correct thread if (InvokeRequired) { Invoke(new EventHandler(delegate { o2MessageQueue_onMessages(o2Message); })); } else { if (o2Message is IM_GUIAction) { var mGuiAction = (IM_GUIAction)o2Message; PublicDI.log.info("O2GuiWithDockPanel received IM_GUIAction of action: {0}", mGuiAction.GuiAction); switch (mGuiAction.GuiAction) { case (IM_GUIActions.openControlInGui): O2DockPanel.loadControl(mGuiAction.controlType, mGuiAction.o2DockState, mGuiAction.controlName); break; case (IM_GUIActions.setAscxDockStateAndOpenIfNotAvailable): // if setDockState fails is because the control is not loaded if (false == O2DockUtils.setDockState(mGuiAction.controlName, mGuiAction.o2DockState)) { O2AscxGUI.openAscxASync(mGuiAction.controlTypeString, mGuiAction.o2DockState, mGuiAction.controlName); } break; } return; } } }
private void loadedO2ModuleToolStripMenuItem_Click(object sender, EventArgs e) { if (sender is ToolStripMenuItem) { var toolStripItem = (ToolStripMenuItem)sender; if (toolStripItem.Tag is O2DockContent) { var o2DockPanel = (O2DockContent)toolStripItem.Tag; var uniqueControlName = o2DockPanel.name; if (O2AscxGUI.isAscxLoaded(o2DockPanel.name)) { uniqueControlName += " " + Guid.NewGuid(); } O2AscxGUI.openAscxASync(o2DockPanel.type, O2DockState.Float, uniqueControlName); } } }
private void whichDirectoryIsThisO2ModuleRunningFromToolStripMenuItem_Click(object sender, EventArgs e) { //PublicDI.log.showMessageBox(PublicDI.config.CurrentExecutableDirectory, "This O2 module is running from:", // MessageBoxButtons.OK); O2AscxGUI.openAscxASync(typeof(ascx_O2InstallAndTempDirectories), O2DockState.Float, "O2 Install and Temp Directories"); }