示例#1
0
 public FrmLogin()
 {
     InitializeComponent();
     PopuUIHelper.PictureBoxMouseEnterAndLeaveEnvent(this.picClose);
     PopuUIHelper.PictureBoxMouseEnterAndLeaveEnvent(this.picLogin);
     PopuUIHelper.PictureBoxMouseEnterAndLeaveEnvent(this.picLoginState);
     SystemCommon.LoginState = LoginStateEnum.Default;
 }
示例#2
0
        public FrmTipsMsg()
        {
            InitializeComponent();
            PopuUIHelper.CloseButtonMouseEnterAndLeaveEvent(this.picBoxClose);

            this.lbTime.Text    = string.Empty;
            this.lbTitle.Text   = string.Empty;
            this.tbContent.Text = string.Empty;
            this.lbUnit.Text    = string.Empty;
            this.lbLink.Text    = string.Empty;

            #region 关闭窗体特效
            CloseBox.MouseClick += (s, e) =>
            {
                if (this.WindowState == FormWindowState.Maximized)
                {
                    this.WindowState = FormWindowState.Normal;
                }
                e.Handled  = true;
                ShowShadow = false;
                //窗体关闭特效
                int left = Left;
                DoEffect(() =>
                {
                    if (Left > 4)
                    {
                        Opacity = 1.0 * Left / left;
                        Left   -= Left / 5;
                        return(true);
                    }
                    Close();

                    return(false);
                });
            };

            #endregion
        }