Example #1
0
        private void đăngNhậpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmDangnhap dangnhap = new frmDangnhap();

            dangnhap.MdiParent = this;
            dangnhap.Show();
        }
        private void đangXuấtToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Close();
            frmDangnhap tp = new frmDangnhap();

            tp.Show();
            //Ghi file
            try
            {
                FileStream   fs = new FileStream(@"D:\Project_UD\Project LTUD\account.txt", FileMode.Create, FileAccess.Write, FileShare.None);
                StreamWriter sw = new StreamWriter(fs);
                sw.WriteLine("không");
                sw.WriteLine("dont login");
                sw.Flush();
                fs.Close();
                //sw.Close();
            }
            catch (Exception ex)
            {
                MessageBox.Show(" " + ex);
            }
        }