public override void RestoreEnv() { IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null || app.Workbench == null) { return; } //app.Workbench.SetMenuEnable(true); app.Current2DMapControl.ActiveView.FocusMap.ClearSelection(); if (mapView == null) { return; } mapView.UnBind(this); Map2DCommandManager.Pop(); }
public override void RestoreEnv() { IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } mapView.UnBind(this); DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) { return; } app.Current2DMapControl.MousePointer = esriControlsMousePointer.esriPointerDefault; Map2DCommandManager.Pop(); }
public override void RestoreEnv() { IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) { return; } app.Current2DMapControl.ActiveView.Refresh(); mapView.UnBind(this); Map2DCommandManager.Pop(); }
public override void RestoreEnv() { try { IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) return; if (app == null || app.Current2DMapControl == null || app.Workbench == null) return; pGraphicsContainer.DeleteAllElements(); app.Current2DMapControl.ActiveView.Refresh(); mapView.UnBind(this); Map2DCommandManager.Pop(); } catch (System.Exception ex) { } }
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); 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; }
public override void RestoreEnv() { IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; if (mapView == null) { return; } DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) { return; } IGraphicsContainer gc = app.Current2DMapControl.Map as IGraphicsContainer; gc.DeleteAllElements(); app.Current2DMapControl.ActiveView.Refresh(); mapView.UnBind(this); Map2DCommandManager.Pop(); }
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); 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 RestoreEnv() { if (this._uPanel != null) { this._uPanel.GetControlContainer().Controls.Clear(); this._uPanel.Close(); this._uPanel = null; } IMap2DView mapView = UCService.GetContent(typeof(Map2DView)) as Map2DView; DF2DApplication app = DF2DApplication.Application; if (app == null || app.Current2DMapControl == null) { return; } app.Current2DMapControl.ActiveView.FocusMap.ClearSelection(); if (mapView == null) { return; } mapView.UnBind(this); Map2DCommandManager.Pop(); }
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.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); }
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; m_pMapControl.MousePointer = esriControlsMousePointer.esriPointerCrosshair; }
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; }
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; } } }