private void AccountManager_FormClosed(object sender, FormClosedEventArgs e) { if (Config.Username != "") // dang nhap thanh cong { SpendUI spendUI = new SpendUI(); showControl(spendUI); } else { Application.Exit(); } }
public MainProgram() { InitializeComponent(); if (Config.Username == "") { Account accountManager = new Account(); accountManager.FormClosed += AccountManager_FormClosed; accountManager.ShowDialog(); } else { SpendUI spendUI = new SpendUI(); showControl(spendUI); } }
private void btnSpend_Click(object sender, EventArgs e) { SpendUI spendUI = new SpendUI(); showControl(spendUI); }