示例#1
0
        private void ChangeCompany_Button_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            // lưu config data
            ClientCommon.WriteConfig();

            Login login = new Login(LoginMode.ChangeCompany);

            this.Hide();
            DialogResult result = login.ShowDialog();

            if (result == DialogResult.Yes)
            {
                MainForm_Load(null, null);
                this.Show();
            }
            else if (result == DialogResult.No)
            {
                Application.Exit();
            }
            else
            {
                // Nothing
                this.Show();
            }
        }
示例#2
0
 private void BaseForm_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e)
 {
     if (IsWriteConfig)
     {
         ClientCommon.WriteConfig();
     }
 }
 private void BaseFluentDesignForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     ClientCommon.WriteConfig();
 }