Esempio n. 1
0
 private void ManageForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         DoLogout_d d = new DoLogout_d(DoLogout);
         d.BeginInvoke(new AsyncCallback(Closeingcall), null);
         Hide();
     }
     catch (Exception ex)
     {
         Log.Error("[" + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "][" + System.Reflection.MethodBase.GetCurrentMethod().Name + "] err" + ex);
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
        private void btnLogout_Click(object sender, EventArgs e)
        {
            try
            {
                ClearAllControl();

                DoLogout_d d = new DoLogout_d(DoLogout);
                d.BeginInvoke(new AsyncCallback(Logoutcall), null);
                Hide();
            }
            catch (Exception ex)
            {
                Log.Error("[" + System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name + "][" + System.Reflection.MethodBase.GetCurrentMethod().Name + "] err" + ex);
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 3
0
        public MainForm(LoginForm father)
        {
            InitializeComponent();
            this.Text = Global.MainFormTitle != null ? Global.MainFormTitle : "维修秘籍";
            myFather  = father;
            int ret = InitContrl();

            if (ret != 0)
            {
                if (MessageBox.Show("加载控件出错,退出程序!") == DialogResult.OK)
                {
                    ClearAllControl();
                    DoLogout_d d = new DoLogout_d(DoLogout);
                    d.BeginInvoke(new AsyncCallback(Logoutcall), null);
                    Hide();
                }
            }
            this.WindowState = FormWindowState.Maximized;
        }