public override void Run(object sender, System.EventArgs e) { if (!Authority3DService.Instance.IsAuthorized) { XtraMessageBox.Show("该功能需要高级授权!", "提示"); return; } try { Map3DCommandManager.Push(this); 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 UCAlongRoadVisibility(); this._uc.Dock = System.Windows.Forms.DockStyle.Fill; this._uPanel.RegisterEvent(new PanelClose(this.Close)); this._dockPanel.Controls.Add(this._uc); } catch (Exception ex) { LoggingService.Error(ex.Message + "\r\n" + ex.StackTrace); } }
public override void RestoreEnv() { if (!Authority3DService.Instance.IsAuthorized) { return; } if (this._uc != null) { this._uc.RestoreEnv(); this._uc.Dispose(); this._uc = null; } if (this._uPanel != null) { this._uPanel.GetControlContainer().Controls.Clear(); this._uPanel.Close(); this._uPanel = null; } Map3DCommandManager.Pop(); }