/// <summary> /// 获取当前显示窗口的位置 /// <para>子类根据实际需求设定显示的位置</para> /// </summary> /// <returns></returns> private Point getLocation(XBaseControl xBaseCtrl) { if (xBaseCtrl != null) { return(xBaseCtrl.PointToScreen(new Point(0, 0))); } else { int width = SystemInformation.WorkingArea.Width; int height = SystemInformation.WorkingArea.Height; return(new Point(width / 2, 80)); } }
/// <summary> /// 获取当前显示窗口的位置 /// <para>子类根据实际需求设定显示的位置</para> /// </summary> /// <returns></returns> protected virtual Point getLocation() { if (xBaseCtrl != null) { return(xBaseCtrl.PointToScreen(new Point(0, 0))); } else { int width = SystemInformation.WorkingArea.Width; int height = SystemInformation.WorkingArea.Height; return(new Point(width / 2, 80)); } }