private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case ResourceId.ID_CONFIG_FORM2_DELETE: if (this.ListViewScan.SelectedIndices.Count <= 0) { break; } int iIndex = 0; foreach (int indexListView in this.ListViewScan.SelectedIndices) { ListViewItem listViewItem = this.ListViewScan.Items[indexListView]; m_DeleteTriggerInfos.Add(listViewItem, m_TriggerInfos[listViewItem]); m_TriggerInfos.Remove(listViewItem); this.ListViewScan.Items.RemoveAt(indexListView - iIndex); iIndex++; } if (ButtonSaveChanged != null) { ButtonSaveChanged(this, EventArgs.Empty); } break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent e) { switch (e.control.Id) { case ID.ID_VIEW_OPTIONS: m_KLineViewOptionForm.ShowDialog(); break; case ID.ID_VIEW_SEARCH_U50: //if ( this.ActiveMdiChild == null ) // break; KLineU50ConfigForm klineU50ConfigForm = new KLineU50ConfigForm(); if (klineU50ConfigForm.ShowDialog() == DialogResult.OK) { } break; case ID.ID_VIEW_SEARCH_D50: if (this.ActiveMdiChild == null) { break; } KLineD50ConfigForm klineD50ConfigForm = new KLineD50ConfigForm(); if (klineD50ConfigForm.ShowDialog() == DialogResult.OK) { } break; case ID.ID_FILE_OPEN: LoadNewDocument(); break; case ID.ID_FILE_CLOSE: if (this.ActiveMdiChild != null) { this.ActiveMdiChild.Close(); } break; case ID.ID_VIEW_CURVE: break; case ID.ID_VIEW_INFO: break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case ResourceId.ID_CONFIG_FORM_DELETE: if (this.ListViewStock.SelectedIndices.Count <= 0) { break; } int iIndex = 0; foreach (int indexListView in this.ListViewStock.SelectedIndices) { m_ListDelete.Add(this.ListViewStock.Items[indexListView - iIndex]); this.ListViewStock.Items.RemoveAt(indexListView - iIndex); iIndex++; } if (ButtonSaveChanged != null) { ButtonSaveChanged(this, EventArgs.Empty); } break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case (int)XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_RIBBONCUSTOMIZE: axCommandBars.ShowCustomizeDialog(3); break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case (int)XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_RIBBONCUSTOMIZE: axCommandBars.ShowCustomizeDialog(3); break; case ResourceId.ID_CONFIG_UTMR_DTMS: m_UTMR_DTMS_OptionForm.Show(this); break; case ResourceId.ID_BUILD_UTMR_DTMS: break; case ResourceId.ID_REPORT_UTMR: break; case ResourceId.ID_REPORT_DTMS: break; case ResourceId.ID_SHOW_STATUS: axCommandBars.StatusBar.Visible = !axCommandBars.StatusBar.Visible; break; case ResourceId.ID_SHOW_WORKSPACE: eventArgs.control.Checked = !eventArgs.control.Checked; axCommandBars.ShowTabWorkspace(eventArgs.control.Checked); break; case ResourceId.ID_APP_HIDE: break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent e) { switch (e.control.Id) { case ResourceId.ID_TASK_FORM_DELETE: if (m_CurrentDelTreeNode != null) { this.TreeView.Nodes.Remove(m_CurrentDelTreeNode); m_DeleteTreeNode.Add(m_CurrentDelTreeNode); m_CurrentDelTreeNode = null; } break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case ResourceId.ID_CONFIG_FORM_TREEVIEW_DELETE: if (m_CurrentDeleteTreeNode == null) { break; } if (m_CurrentDeleteTreeNode.Parent != null) { TreeNodePlateName outPlateName = null; if (m_PlateName.TryGetValue(m_CurrentDeleteTreeNode.Parent, out outPlateName) == true) { outPlateName.VarietyName.Remove(m_CurrentDeleteTreeNode); } } else { m_PlateName.Remove(m_CurrentDeleteTreeNode); } this.TreeView.Nodes.Remove(m_CurrentDeleteTreeNode); m_AllConfigControlInfo.Remove(m_CurrentDeleteTreeNode); foreach (TreeNode item in m_CurrentDeleteTreeNode.Nodes) { m_AllConfigControlInfo.Remove(item); } m_CurrentDeleteTreeNode = null; this.ButtonSave.Enabled = true; break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case (int)XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_RIBBONCUSTOMIZE: axCommandBars.ShowCustomizeDialog(3); break; case ResourceId.ID_CONFIG_SR: m_PrimaryScanOptionForm.Show(this); { } break; case ResourceId.ID_BUILD_SR: break; case ResourceId.ID_NEW_UTMR_DTMS: UTMR_DTMS_MainFrom utmr_dtms_MainFrom = new UTMR_DTMS_MainFrom(); utmr_dtms_MainFrom.Show(); break; case ResourceId.ID_LOAD_UTMR_DTMS_FILE: if (this.openFileDialogReport.ShowDialog() == DialogResult.OK) { UTMR_DTMS_MainFrom utmr_dtms_MainFromB = new UTMR_DTMS_MainFrom(); utmr_dtms_MainFromB.Show(); } break; case ResourceId.ID_LOAD_UTMR_DTMS_CONFIG: if (this.openFileDialogStrategy.ShowDialog() == DialogResult.OK) { UTMR_DTMS_MainFrom utmr_dtms_MainFromA = new UTMR_DTMS_MainFrom(); utmr_dtms_MainFromA.Show(); } break; case ResourceId.ID_REPORT_SR: LoadNewFile_SR(); break; case ResourceId.ID_REPORT_MSRK: LoadNewFile_MSRK(); break; case ResourceId.ID_SHOW_STATUS: axCommandBars.StatusBar.Visible = !axCommandBars.StatusBar.Visible; break; case ResourceId.ID_SHOW_WORKSPACE: eventArgs.control.Checked = !eventArgs.control.Checked; axCommandBars.ShowTabWorkspace(eventArgs.control.Checked); break; case ResourceId.ID_APP_HIDE: this.Close(); break; default: break; } }
private void axCommandBars1_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent e) { EngineFuntions.SetToolNull(); switch (e.control.Id) { //case ForAR.BusInfo_Help: // System.Diagnostics.Process.Start(Winapp.StartupPath + @"\用户手册.doc"); // break; //case ForAR.BusInfo_ParaSet: // System.Diagnostics.Process.Start(Winapp.StartupPath + @"\Businfo.ini"); // break; case ForAR.Map3D_ZoomIn: m_ToolStatus = ForAR.Map3D_ZoomIn; if (axMapControl1.Visible == true) { ICommand pCommand; pCommand = new ControlsMapZoomInTool(); pCommand.OnCreate(axMapControl1.Object); axMapControl1.CurrentTool = (ITool)pCommand; } break; case ForAR.Map3D_ZoomOut: m_ToolStatus = ForAR.Map3D_ZoomOut; if (axMapControl1.Visible == true) { ICommand pCommand; pCommand = new ControlsMapZoomOutTool(); pCommand.OnCreate(axMapControl1.Object); axMapControl1.CurrentTool = (ITool)pCommand; } break; case ForAR.Map3D_Pan: m_ToolStatus = ForAR.Map3D_Pan; if (axMapControl1.Visible == true) { ICommand pCommand; pCommand = new ControlsMapPanTool(); pCommand.OnCreate(axMapControl1.Object); axMapControl1.CurrentTool = (ITool)pCommand; } break; case ForAR.Map3D_Reflash: m_ToolStatus = ForAR.Map3D_Reflash; if (axMapControl1.Visible == true) { axMapControl1.Map.ClearSelection(); axMapControl1.ActiveView.GraphicsContainer.DeleteAllElements(); EngineFuntions.MapRefresh(); } break; //前一屏 case ForAR.Map3D_PreView: m_ToolStatus = ForAR.Map3D_PreView; if (axMapControl1.Visible == true) { EngineFuntions.GoBack(); } break; //后一屏 case ForAR.Map3D_NextView: m_ToolStatus = ForAR.Map3D_NextView; if (axMapControl1.Visible == true) { EngineFuntions.GoNext(); } break; case ForAR.Map3D_Distance: //计算长度 break; case ForAR.Map3D_Area: //计算面积 break; case ForAR.Map3D_Select: //拉框选择 m_ToolStatus = ForAR.Map3D_Select; axMapControl1.MousePointer = esriControlsMousePointer.esriPointerPencil; break; case ForAR.Map3D_PointSelect: //点击选择 m_ToolStatus = ForAR.Map3D_PointSelect; axMapControl1.MousePointer = esriControlsMousePointer.esriPointerPencil; break; case ForAR.Map3D_PolySelect: //多边形选择 m_ToolStatus = ForAR.Map3D_PolySelect; axMapControl1.MousePointer = esriControlsMousePointer.esriPointerPencil; break; case ForAR.Map3D_CircleSelect: //圆形选择 m_ToolStatus = ForAR.Map3D_CircleSelect; axMapControl1.MousePointer = esriControlsMousePointer.esriPointerPencil; break; case ForAR.Record_Input: //工程入库 m_ToolStatus = ForAR.Record_Input; axMapControl1.MousePointer = esriControlsMousePointer.esriPointerPencil; try { RegistryKey testKey = Registry.CurrentUser.OpenSubKey("TestKey"); if (testKey == null) { testKey = Registry.CurrentUser.CreateSubKey("TestKey"); testKey.SetValue("OpenFolderDir", ""); testKey.Close(); Registry.CurrentUser.Close(); } else { folderBrowserDialog1.SelectedPath = testKey.GetValue("OpenFolderDir").ToString(); testKey.Close(); Registry.CurrentUser.Close(); } } catch (Exception ee) { } if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) { string folderName = folderBrowserDialog1.SelectedPath; m_frmArchivePane.m_FilePath.Clear(); m_frmArchivePane.m_strFolder = folderName; ForAR.FindFile(folderName + "\\", ref m_frmArchivePane.m_FilePath, folderName.LastIndexOf("\\") + 1); m_frmArchivePane.ReflashGrid(); axDockingPane1.FindPane(ForAR.Pan_Archive).Selected = true; RegistryKey testKey = Registry.CurrentUser.OpenSubKey("TestKey", true); //true表示可写,false表示只读 testKey.SetValue("OpenFolderDir", folderName); testKey.Close(); Registry.CurrentUser.Close(); } break; case ForAR.Map3D_Full: m_ToolStatus = ForAR.Map3D_Full; if (axMapControl1.Visible == true) { axMapControl1.Extent = axMapControl1.FullExtent; } break; default: break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case (int)XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_RIBBONCUSTOMIZE: axCommandBars.ShowCustomizeDialog(3); break; case ResourceId.ID_FILE_CONFIG_POLICY: m_PolicyForm.ShowDialog(); break; case ResourceId.ID_FILE_CONFIG_NEW_POLICY: m_PolicyForm.NewPolicy(); m_PolicyForm.ShowDialog(); break; case ResourceId.ID_FILE_CONFIG_TASK: m_TaskForm.ShowDialog(); break; case ResourceId.ID_FILE_CONFIG_NEW_TASK: m_TaskForm.NewTask(); m_TaskForm.ShowDialog(); break; case ResourceId.ID_FILE_OPEN: case ResourceId.ID_FILE_OPEN_ALL: break; case ResourceId.ID_FILE_OPEN_SCAN_POLICY: if (m_ScanNowDocumentForm == null) { m_ScanNowDocumentForm = LoadNewFileFromScanNow("扫描中的报表"); } else if (m_ScanNowDocumentForm.Visible == false) { m_ScanNowDocumentForm = LoadNewFileFromScanNow("扫描中的报表"); } else { m_ScanNowDocumentForm.Activate(); } break; case ResourceId.ID_FILE_CLOSE: case ResourceId.ID_FILE_CLOSE_ALL: break; case ResourceId.ID_SHOW_STATUS: axCommandBars.StatusBar.Visible = !axCommandBars.StatusBar.Visible; break; case ResourceId.ID_SHOW_WORKSPACE: eventArgs.control.Checked = !eventArgs.control.Checked; axCommandBars.ShowTabWorkspace(eventArgs.control.Checked); break; case ResourceId.ID_APP_HIDE: this.Close(); break; default: ControlCommandInfo outCommandInfo = null; if (m_ControlCommandInfoDictionary.TryGetValue(eventArgs.control.Id, out outCommandInfo) == true) { if (outCommandInfo.IsOpen == true) { if (outCommandInfo.Form == null) { outCommandInfo.Form = LoadNewFile(outCommandInfo.Name); } else { if (outCommandInfo.Form.Visible == true) { outCommandInfo.Form.Activate(); } else { outCommandInfo.Form = LoadNewFile(outCommandInfo.Name); } } outCommandInfo.Form.m_OpenCommandInfo = outCommandInfo; ControlCommandInfo outCommandInfoClose = null; if (m_ControlCommandInfoDictionary.TryGetValue(outCommandInfo.CloseID, out outCommandInfoClose) == true) { outCommandInfoClose.Form = outCommandInfo.Form; outCommandInfoClose.IsShowOK = true; outCommandInfoClose.Form.m_CloseCommandInfo = outCommandInfoClose; } } else { if (outCommandInfo.Form != null) { outCommandInfo.Form.Close(); outCommandInfo.Form = null; outCommandInfo.IsShowOK = false; outCommandInfo.Form.m_CloseCommandInfo = null; ControlCommandInfo outBoolOpen = null; if (m_ControlCommandInfoDictionary.TryGetValue(outCommandInfo.OpenID, out outBoolOpen) == true) { outBoolOpen.Form = null; outBoolOpen.Form.m_OpenCommandInfo = null; } } else { } } } break; } }
private void axCommandBars_Execute(object sender, AxXtremeCommandBars._DCommandBarsEvents_ExecuteEvent eventArgs) { switch (eventArgs.control.Id) { case (int)XtremeCommandBars.XTPCommandBarsSpecialCommands.XTP_ID_RIBBONCUSTOMIZE: axCommandBars.ShowCustomizeDialog(3); break; case ResourceId.ID_WELCOME: LoadNewHomeDocument(); break; case ResourceId.ID_CONFIG_STOCK: m_MainOptionForm.Show(this); { } break; case ResourceId.ID_NEW_SR: SR_MainForm srMainForm = new SR_MainForm(); srMainForm.Show(); break; case ResourceId.ID_LOAD_SR_FILE: if (this.openFileDialogSRReport.ShowDialog() == DialogResult.OK) { SR_MainForm srMainFormReport = new SR_MainForm(); srMainFormReport.Show(); } break; case ResourceId.ID_LOAD_SR_CONFIG: if (this.openFileDialogSRStrategy.ShowDialog() == DialogResult.OK) { SR_MainForm srMainFormStrategy = new SR_MainForm(); srMainFormStrategy.Show(); } break; case ResourceId.ID_SHOW_STATUS: axCommandBars.StatusBar.Visible = !axCommandBars.StatusBar.Visible; break; case ResourceId.ID_SHOW_WORKSPACE: eventArgs.control.Checked = !eventArgs.control.Checked; axCommandBars.ShowTabWorkspace(eventArgs.control.Checked); break; case ResourceId.ID_APP_HIDE: this.Close(); break; default: break; } }