예제 #1
0
        private void MessageBoxEx_Load(object sender, EventArgs e)
        {
            Text = label_title.Text; //将标题与label_title绑定
            InitLoad();

            FontManager.Instance.InitControlFont(label_icon, FontManager.FontType.IconFont, NotifyIconTitle, 20);
            FontManager.Instance.InitControlFont(label_image, FontManager.FontType.IconFont, label_image.Text, _labelImgFont);
            ControlTool.SetControlEnabled(label_icon, false);
            ControlTool.SetControlEnabled(label_title, false);

            if (!btn_ok.Visible)
            {
                btn_cancel.Left = (Width - btn_cancel.Width) / 2;
            }
            else if (!btn_cancel.Visible)
            {
                btn_ok.Left = (Width - btn_ok.Width) / 2;
            }

            if (Owner == null || !Owner.Visible || Owner.WindowState == FormWindowState.Minimized)
            {
                CenterToScreen();
            }
            else
            {
                Left = Owner.Left + (Owner.Width - Width) / 2;
                Top  = Owner.Top + (Owner.Height - Height) / 2;
            }
        }
예제 #2
0
        private void SkinMainForm_Load(object sender, EventArgs e)
        {
            //最大化时不会遮盖任务栏
            MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);

            //鼠标点击穿透控件
            ControlTool.SetControlEnabled(pictureBox_icon, false);
            ControlTool.SetControlEnabled(label_title, false);

            //默认次世代
            ChangeSkin("next_gen");

            if (LoadMax)
            {
                WindowState = FormWindowState.Maximized;
                ImageSwitch(pictureBox_max, 1);
            }

            if (FormIcon != null)
            {
                pictureBox_icon.Image = FormIcon;
            }
        }
예제 #3
0
 private void PopupForm_Load(object sender, EventArgs e)
 {
     Text = label_title.Text;
     ControlTool.SetControlEnabled(label_title, false);
     InitLoad();
 }