public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) { return; } m_ActiveView = app.Current2DMapControl.ActiveView; m_Display = app.Current2DMapControl.ActiveView.ScreenDisplay; app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null || app.Workbench == null) { return; } app.Workbench.SetMenuEnable(false); app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; //FrmCompoundConditionStats2D dialog = new FrmCompoundConditionStats2D(); //dialog.SetData(LogicDataStructureManage2D.Instance.RootLogicGroups, LogicDataStructureManage2D.Instance.RootMajorClasses, null); //dialog.ShowDialog(); }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_MapControl = m_App.Current2DMapControl; m_FocusMap = m_MapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; m_dblTolerance = Class.Common.ConvertPixelsToMapUnits(m_MapControl.ActiveView, 4); Class.Common.MapRefresh(m_pActiveView); m_App.Workbench.SetStatusInfo("提示:依次指定1.圆心;2.圆周上的一点。(A:绝对XY/ESC:取消/ENTER:结束)");//向状态栏传送提示信息 }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) { return; } FrmCertainLoc frmCertainLoc = new FrmCertainLoc(); frmCertainLoc.Show(); }
public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; bool bBind = mapView.Bind(this); if (!bBind) { return; } app = (DF2DApplication)this.Hook; if (app == null || app.Current2DMapControl == null) { return; } m_pMapControl = app.Current2DMapControl; m_pMap = m_pMapControl.Map; m_pActiveView = m_pMapControl.ActiveView; if (mapView == null) { return; } else { m_arrPntLayer = new ArrayList(); GetPointLayer(); } }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_MapControl = m_App.Current2DMapControl; this.m_ActiveView = m_MapControl.ActiveView; this.m_Display = m_ActiveView.ScreenDisplay; this.m_pCurEditLayer = Class.Common.CurEditLayer as IFeatureLayer; }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_MapControl = m_App.Current2DMapControl; m_FocusMap = m_App.Current2DMapControl.ActiveView.FocusMap; SaveEditing(m_FocusMap); }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_MapControl = m_App.Current2DMapControl; m_FocusMap = m_MapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; m_MapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; Class.Common.MapRefresh(m_pActiveView); m_App.Workbench.SetStatusInfo("快捷键提示:A:输入绝对XY坐标"); }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } Layer2DTreePad wsPad = (Layer2DTreePad)UCService.GetContent(typeof(Layer2DTreePad)); this.treelist = wsPad.TreeList; bool bBind = mapView.Bind(this); if (!bBind) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null || app.Workbench == null) { return; } app.Workbench.SetMenuEnable(false); app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; FrmMajorClass.Instance.Show(); }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_pActiveView = m_App.Current2DMapControl.ActiveView; m_FocusMap = m_App.Current2DMapControl.ActiveView.FocusMap; Class.Common.MapRefresh(m_pActiveView); RedoEditing(m_FocusMap); m_App.Workbench.UpdateMenu(); }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null || app.Workbench == null) { return; } //app.Workbench.SetMenuEnable(false); app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; _bFinished = true; }
public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null || app.Workbench == null) { return; } //app.Workbench.SetMenuEnable(false); m_ActiveView = app.Current2DMapControl.ActiveView; m_Display = app.Current2DMapControl.ActiveView.ScreenDisplay; pGraphicsContainer = app.Current2DMapControl.ActiveView.GraphicsContainer; app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) { return; } if (Class.Common.CurEditLayer != null) { System.Windows.Forms.Form mainForm = (System.Windows.Forms.Form)app.Workbench; Form.frmLayerProperty frm = new Form.frmLayerProperty(); frm.FeatureLayer = Class.Common.CurEditLayer as IFeatureLayer; frm.MapControl = app.Current2DMapControl; if (frm.ShowDialog(mainForm) == System.Windows.Forms.DialogResult.OK) { app.Current2DMapControl.ActiveView.Refresh(); } } }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_MapControl = m_App.Current2DMapControl; Class.Common.CutObjects(m_MapControl); m_App.Workbench.UpdateMenu(); }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_MapControl = m_App.Current2DMapControl; m_MapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; m_ActiveView = m_MapControl.ActiveView; m_Display = m_ActiveView.ScreenDisplay; this.m_pCurEditLayer = Class.Common.CurEditLayer as IFeatureLayer; if (Class.Common.System_ModifyFeature_Form == null) { Class.Common.System_ModifyFeature_Form = new Form.frmModifyFeaturePro(); Class.Common.System_ModifyFeature_Form.MapControl = m_MapControl; Class.Common.System_ModifyFeature_Form.Show(); } }
public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) return; bool bBind = mapView.Bind(this); if (!bBind) return; DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) return; app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerZoomIn; }
public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) return; bool bBind = mapView.Bind(this); if (!bBind) return; app = (DF2DApplication)this.Hook; if (app == null || app.Current2DMapControl == null) return; m_pMapControl = app.Current2DMapControl; m_FocusMap = m_pMapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; }
private IEnvelope m_pEnvelope;//视图刷新的最小范围 public override void Run(object sender, System.EventArgs e) { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } m_App = DF2DApplication.Application; if (m_App == null || m_App.Current2DMapControl == null) { return; } m_MapControl = m_App.Current2DMapControl; m_FocusMap = m_MapControl.ActiveView.FocusMap; m_pActiveView = (IActiveView)this.m_FocusMap; m_CurrentLayer = Class.Common.CurEditLayer; m_OriginFeatureArray.RemoveAll(); m_dblTolerance = Class.Common.ConvertPixelsToMapUnits(m_MapControl.ActiveView, 4); bBegineRotate = true; bRotating = false; IArray tempArray = Class.Common.GetSelectFeatureSaveToArray_2(m_FocusMap); for (int i = 0; i < tempArray.Count; i++) { m_OriginFeatureArray.Add((IFeature)tempArray.get_Element(i)); } tempArray.RemoveAll(); Class.Common.MadeFeatureArrayOnlyAloneOID(m_OriginFeatureArray);//保证数组元素的唯一性 m_pEnvelope = Class.Common.GetMinEnvelopeOfTheFeatures(m_OriginFeatureArray); if (m_pEnvelope != null && !m_pEnvelope.IsEmpty) { m_pEnvelope.Expand(1, 1, false); } }
public override void Run(object sender, System.EventArgs e) { try { Map2DCommandManager.Push(this); IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null || app.Workbench == null) { return; } //app.Workbench.SetMenuEnable(false); m_ActiveView = app.Current2DMapControl.ActiveView; m_Display = app.Current2DMapControl.ActiveView.ScreenDisplay; _gc = app.Current2DMapControl.ActiveView.GraphicsContainer; _gc.DeleteAllElements(); app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; this._uPanel = new UIDockPanel("开挖分析", "开挖分析", this.Location, this._width, this._height); this._dockPanel = FloatPanelManager.Instance.Add(ref this._uPanel, DockingStyle.Right); this._dockPanel.Visibility = DockVisibility.Visible; this._dockPanel.FloatSize = new System.Drawing.Size(this._width, this._height); this._dockPanel.Width = this._width; this._dockPanel.Height = this._height; this._uc = new UCEarthworkCalculation(); this._uc.Dock = System.Windows.Forms.DockStyle.Top; this._uPanel.RegisterEvent(new PanelClose(this.Close)); this._dockPanel.Controls.Add(this._uc); } catch (System.Exception ex) { } }
public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); FrmSimpleConditionQuery dialog = new FrmSimpleConditionQuery(); if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } this._uPanel = new UIDockPanel("查询结果", "查询结果", this.Location, this._width, this._height); this._dockPanel = FloatPanelManager.Instance.Add(ref this._uPanel, DockingStyle.Right); this._dockPanel.Visibility = DockVisibility.Visible; this._dockPanel.FloatSize = new System.Drawing.Size(this._width, this._height); this._dockPanel.Width = this._width; this._dockPanel.Height = this._height; this._uc = new UCPropertyInfo2D(); this._uc.Dock = System.Windows.Forms.DockStyle.Fill; this._uPanel.RegisterEvent(new PanelClose(this.Close)); this._dockPanel.Controls.Add(this._uc); this._uc.SetPropertyInfo(dialog.Dict); }
public override void Run(object sender, System.EventArgs e) { try { Map2DCommandManager.Push(this); this._uPanel = new UIDockPanel("测试", "测试", this.Location, this._width, this._height); this._dockPanel = FloatPanelManager.Instance.Add(ref this._uPanel, DockingStyle.Top); this._dockPanel.Visibility = DockVisibility.Visible; this._dockPanel.FloatSize = new System.Drawing.Size(this._width, this._height); this._dockPanel.Width = this._width; this._dockPanel.Height = this._height; this._ucTest = new UCTest(); this._ucTest.Dock = System.Windows.Forms.DockStyle.Fill; this._uPanel.RegisterEvent(new PanelClose(this.Close)); this._dockPanel.Controls.Add(this._ucTest); } catch (Exception ex) { LoggingService.Error(ex.Message + "\r\n" + ex.StackTrace); } }
public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } app = (DF2DApplication)this.Hook; if (app == null || app.Current2DMapControl == null) { return; } m_pMapControl = app.Current2DMapControl; m_pMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; }
public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } //bool bBind = mapView.Bind(this); //if (!bBind) return; app = (DF2DApplication)this.Hook; if (app == null || app.Current2DMapControl == null) { return; } m_pMapControl = app.Current2DMapControl; m_pMapControl.MousePointer = esriControlsMousePointer.esriPointerArrow; map2DCommand = this as IMap2DCommand; mapControlEvents = m_pMapControl as IMapControlEvents2_Event; mapControlEvents.OnMouseDown += new IMapControlEvents2_OnMouseDownEventHandler(map2DCommand.OnMouseDown); mapControlEvents.OnMouseMove += new IMapControlEvents2_OnMouseMoveEventHandler(map2DCommand.OnMouseMove); }
DFDataConfig.Class.FieldInfo fi, fi1, fi2, fi3, fi4, fi5, fi6;//管点属性字段 public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } app = (DF2DApplication)this.Hook; if (app == null || app.Current2DMapControl == null) { return; } m_pMapControl = app.Current2DMapControl; m_pActiveView = this.m_pMapControl.ActiveView; m_pMap = m_pMapControl.ActiveView.FocusMap; List <DF2DFeatureClass> st = Dictionary2DTable.Instance.GetFeatureClassByFacilityClassName("PipeNode"); if (st == null) { return; } foreach (DF2DFeatureClass dfcc in st) { IFeatureClass fc = dfcc.GetFeatureClass(); if (fc == null) { continue; } FacilityClass fac = dfcc.GetFacilityClass(); if (fac == null) { continue; } List <DFDataConfig.Class.FieldInfo> listField = fac.FieldInfoCollection; fi = fac.GetFieldInfoBySystemName("Classify"); if (fi == null) { continue; } fi1 = fac.GetFieldInfoBySystemName("x"); if (fi1 == null) { continue; } fi2 = fac.GetFieldInfoBySystemName("y"); if (fi2 == null) { continue; } fi3 = fac.GetFieldInfoBySystemName("DetectNo"); if (fi3 == null) { continue; } fi4 = fac.GetFieldInfoBySystemName("Additional"); if (fi4 == null) { continue; } fi5 = fac.GetFieldInfoBySystemName("Standard"); if (fi5 == null) { continue; } fi6 = fac.GetFieldInfoBySystemName("Road"); if (fi6 == null) { continue; } } }
DFDataConfig.Class.FieldInfo fi, fi1, fi2, fi3, fi4, fi5, fi6;//管线字段信息 public override void Run(object sender, EventArgs e) { Map2DCommandManager.Push(this); mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } bool bBind = mapView.Bind(this); if (!bBind) { return; } app = (DF2DApplication)this.Hook; if (app == null || app.Current2DMapControl == null) { return; } m_pMapControl = app.Current2DMapControl; m_pActiveView = this.m_pMapControl.ActiveView; m_pMap = m_pMapControl.ActiveView.FocusMap; List <DF2DFeatureClass> st = Dictionary2DTable.Instance.GetFeatureClassByFacilityClassName("PipeLine"); if (st == null) { return; } foreach (DF2DFeatureClass dfcc in st) { IFeatureClass fc = dfcc.GetFeatureClass(); if (fc == null) { continue; } FacilityClass fac = dfcc.GetFacilityClass(); if (fac == null) { continue; } List <DFDataConfig.Class.FieldInfo> listField = fac.FieldInfoCollection; fi = fac.GetFieldInfoBySystemName("classify"); if (fi == null || fi.CanQuery == false) { continue; } fi1 = fac.GetFieldInfoBySystemName("snodeid"); if (fi1 == null || fi1.CanQuery == false) { continue; } fi2 = fac.GetFieldInfoBySystemName("enodeid"); if (fi2 == null || fi2.CanQuery == false) { continue; } fi3 = fac.GetFieldInfoBySystemName("matter"); if (fi3 == null || fi3.CanQuery == false) { continue; } fi4 = fac.GetFieldInfoBySystemName("coverstsle"); if (fi4 == null || fi4.CanQuery == false) { continue; } fi5 = fac.GetFieldInfoBySystemName("standard"); if (fi5 == null || fi5.CanQuery == false) { continue; } fi6 = fac.GetFieldInfoBySystemName("proad"); if (fi6 == null || fi6.CanQuery == false) { continue; } } m_pMapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; }