12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using CCWin;
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace MOKA_Factory_Tools
- {
- public partial class Verify : Skin_Color
- {
- private string _Msg = "";
- public Verify(string strMsg)
- {
- _Msg = strMsg;
- 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)
- {
- this.Close();
- }
- }
- }
|