예제 #1
0
        // Dạng danh sách: Đọc File
        private void btnReadFile_Click(object sender, EventArgs e)
        {
            frmRead read = new frmRead(ref fileM, int.Parse(this.dataFileM.CurrentRow.Cells[0].Value.ToString()), darkmode);

            read.Text = this.dataFileM.CurrentRow.Cells[1].Value.ToString();
            read.ShowDialog();
            if (read.exit == true)
            {
                loadData();
            }
        }
예제 #2
0
        // Đọc trực tiếp bằng ứng dụng
        private void toolReadWithReaderriver_Click(object sender, EventArgs e)
        {
            frmRead read = new frmRead(ref fileM, int.Parse(this.FileCode), DarkMode);

            read.Text = this.Title;
            read.ShowDialog();
            if (read.exit == true)
            {
                MessageBox.Show("Nhấn Ctrl+R để làm mới chương trình!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
예제 #3
0
 // Đọc file gần nhất bằng Double Click
 private void pnlLastRead_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (lbFileCode.Text != "")
     {
         FileM   file = FileController.getFileM(int.Parse(lbFileCode.Text.ToString()));
         frmRead read = new frmRead(ref fileM, file.iFileCode, darkmode);
         read.Text = this.dataFileM.CurrentRow.Cells[1].Value.ToString();
         read.ShowDialog();
         if (read.exit == true)
         {
             loadData();
         }
     }
 }
예제 #4
0
 // Đọc file gần nhất bằng Button
 private void btnReadLastFile_Click(object sender, EventArgs e)
 {
     if (lbFileCode.Text != "")
     {
         FileM file = FileController.getFileM(int.Parse(lbFileCode.Text.ToString()));
         if (file is null)
         {
             return;
         }
         frmRead read = new frmRead(ref fileM, file.iFileCode, darkmode);
         read.Text = file.sTitle;
         read.ShowDialog();
         if (read.exit == true)
         {
             loadData();
         }
     }
 }