예제 #1
0
        public void Save(object sender, System.EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            saveFileDialog1.ShowDialog();
            frm.Save(saveFileDialog1.FileName);
        }
예제 #2
0
        private void mnuNew_Click(object sender, EventArgs e)
        {
            blank frm = new blank();

            frm.DocName   = "Untitled " + ++openDocuments;
            frm.Text      = frm.DocName;
            frm.MdiParent = this;
            frm.Show();
        }
예제 #3
0
        private void mnuColor_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.MdiParent      = this;
            colorDialog1.Color = frm.richTextBox1.SelectionColor;
            if (colorDialog1.ShowDialog() == DialogResult.OK)
            {
                frm.richTextBox1.SelectionColor = colorDialog1.Color;
            }
            frm.Show();
        }
예제 #4
0
        private void Frmmain_FormClosing(object sender, FormClosingEventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.Close();
            if (frm.IsSaved == true)
            {
                if (MessageBox.Show(resourceManager.GetString("MessageText"), "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    this.Save(frm.DocName, e);
                }
            }
        }
예제 #5
0
 public void cmnuSaveAs_Click(object sender, EventArgs e)
 {
     if (saveFileDialog1.ShowDialog() == DialogResult.OK)
     {
         blank frm = (blank)this.ActiveMdiChild;
         frm.Save(saveFileDialog1.FileName);
         frm.MdiParent      = this;
         frm.DocName        = saveFileDialog1.FileName;
         frm.Text           = frm.DocName;
         cmnuSaveAs.Enabled = true;
         frm.IsSaved        = true;
     }
 }
예제 #6
0
 private void mnuOpen_Click(object sender, EventArgs e)
 {
     cmnuSaveAs.Enabled     = true;
     openFileDialog1.Filter = "Text Files (*.txt)|*.txt|All Files(*.*)|*.*";
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         blank frm = new blank();
         frm.Open(openFileDialog1.FileName);
         frm.MdiParent = this;
         frm.DocName   = openFileDialog1.FileName;
         frm.Text      = frm.DocName;
         frm.Show();
     }
 }
예제 #7
0
        private void mnuFont_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            frm.MdiParent         = this;
            fontDialog1.ShowColor = true;
            fontDialog1.Font      = frm.richTextBox1.SelectionFont;
            fontDialog1.Color     = frm.richTextBox1.SelectionColor;
            if (fontDialog1.ShowDialog() == DialogResult.OK)
            {
                frm.richTextBox1.SelectionFont  = fontDialog1.Font;
                frm.richTextBox1.SelectionColor = fontDialog1.Color;
            }
            frm.Show();
        }
예제 #8
0
 private void mnuDelete_Click(object sender, EventArgs e)
 {
     blank frm = (blank)this.ActiveMdiChild; frm.Delete();
 }
예제 #9
0
 private void mnuCopy_Click(object sender, EventArgs e)
 {
     blank frm = (blank)this.ActiveMdiChild; frm.Copy();
 }
예제 #10
0
        private void mnuSave_Click(object sender, EventArgs e)
        {
            blank frm = (blank)this.ActiveMdiChild;

            this.Save(frm.DocName, e);
        }
예제 #11
0
 private void mnuSelectAll_Click(object sender, EventArgs e)
 {
     blank frm = (blank)this.ActiveMdiChild; frm.SelectAll();
 }