Ejemplo n.º 1
0
        private void MnuOpen_Click(object sender, EventArgs e)
        {
            ProcessSaveFileBeforeClose();
            DlgOpenText.ShowDialog();

            curFileName = DlgOpenText.FileName;
            this.Text   = $"{curFileName}* - 내메모장";

            try
            {
                StreamReader sr = File.OpenText(curFileName);
                TxtMain.Text = sr.ReadToEnd();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void MnuOpenFile_Click(object sender, EventArgs e)
        {
            ProcessSaveBeforeClose();

            DlgOpenText.ShowDialog();
            currfileName = DlgOpenText.FileName;
            this.Text    = $"{currfileName} = 내 메모장";

            try
            {
                StreamReader sr = File.OpenText(currfileName);
                TxtMain.Text = sr.ReadToEnd();

                IsModify = false;
                sr.Close();
            }
            catch (Exception)
            {
                throw;
            }
        }