Пример #1
0
        private void newProektToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Redactor form = new Redactor(false);

            form.MdiParent = this;
            form.Show();
        }
Пример #2
0
 private void redactToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (is_delo)
     {
         if (clbDela.SelectedIndex != -1)
         {
             Redactor form = new Redactor((this.MdiParent as Form1).dela[clbDela.SelectedIndex]);
             if (form.ShowDialog() == DialogResult.OK)
             {
                 (this.MdiParent as Form1).dela[clbDela.SelectedIndex] = form.del;
                 clbDela.Items[clbDela.SelectedIndex] = form.del.Name;
             }
         }
     }
     else
     {
         if (lsbProekti.SelectedIndex != -1)
         {
             Redactor form = new Redactor((this.MdiParent as Form1).proekti[lsbProekti.SelectedIndex]);
             if (form.ShowDialog() == DialogResult.OK)
             {
                 (this.MdiParent as Form1).proekti[lsbProekti.SelectedIndex] = form.proek;
                 lsbProekti.Items[lsbProekti.SelectedIndex] = form.proek.Name;
                 lsbProekti.SelectedIndex = -1;
             }
         }
     }
 }
Пример #3
0
        private void btnAddDelo_Click(object sender, EventArgs e)
        {
            Redactor form = new Redactor(true);

            if (form.ShowDialog() == DialogResult.OK)
            {
                lsbSpisokDel.Items.Add(form.del.Name);
                dels.Add(form.del);
            }
        }
Пример #4
0
 private void redactToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (lsbSpisokDel.SelectedIndex != -1)
     {
         Redactor form = new Redactor(dels[lsbSpisokDel.SelectedIndex]);
         if (form.ShowDialog() == DialogResult.OK)
         {
             dels[lsbSpisokDel.SelectedIndex] = form.del;
             lsbSpisokDel.Items[lsbSpisokDel.SelectedIndex] = form.del.Name;
         }
     }
 }
Пример #5
0
 private void redactToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (checkedListBox1.SelectedIndex != -1)
     {
         Redactor form = new Redactor((this.MdiParent as Form1).dela[checkedListBox1.SelectedIndex]);
         if (form.ShowDialog() == DialogResult.OK)
         {
             (this.MdiParent as Form1).dela[checkedListBox1.SelectedIndex] = form.del;
             checkedListBox1.Items[checkedListBox1.SelectedIndex]          = form.del.Name;
         }
     }
 }