/// <summary> /// 根据控件初始化窗口 /// </summary> /// <param Name="control"></param> public SVControlWindow(Control control) { //DockAreas = (DockAreas.Document | DockAreas.Float | DockAreas.DockLeft | DockAreas.DockRight | DockAreas.DockTop | DockAreas.DockBottom); //ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document; //HideOnClose = false; control.Dock = System.Windows.Forms.DockStyle.Fill; this.Controls.Add(control); this._control = control; this.AutoScroll = true; this.KeyPreview = true; ///注册快捷键方式,只有页面控件才有 if (control is SVPageWidget) { initShortKey(); ///当单击当前窗体,也要使得页面控件被反选 this.MouseDown += new MouseEventHandler((sender, e) => { SVPageWidget widget = this._control as SVPageWidget; widget.selectAll(false); SVSelectPanelObjs._VK_Ctrl = false; }); } }
public void selectAllMethod() { SVPageWidget widget = this._control as SVPageWidget; if (widget != null) { widget.selectAll(true); } }