|
@@ -20,10 +20,25 @@ namespace MOKA_Factory_Tools
|
|
|
InitializeComponent();
|
|
|
}
|
|
|
|
|
|
+ /// <summary>
|
|
|
+ /// 设置控件居中显示;
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="ctrl"></param>
|
|
|
+ private void SetControlCenter(Control ctrl)
|
|
|
+ {
|
|
|
+ // 注:由于CSkin控件的标准栏是自定义的,所以整个工作区与系统的对话框是有差别的。
|
|
|
+ int x = (this.Width-ctrl.Width)/2;
|
|
|
+ int y = (this.Height - ctrl.Height)/2;
|
|
|
+ ctrl.Location = new Point(x, y);
|
|
|
+ }
|
|
|
+
|
|
|
private void Verify_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
LB_MSG.Text = _Msg;
|
|
|
LB_MSG.AutoSize = true;
|
|
|
+
|
|
|
+ // 使控件居中显示;
|
|
|
+ SetControlCenter(LB_MSG);
|
|
|
}
|
|
|
|
|
|
private void BT_OK_Click(object sender, EventArgs e)
|