Exemplo n.º 1
0
        public void Sfab_DelClicked(object sender, EventArgs e)
        {
            if (dm == null || dm.IsDisposed)
            {
                dm = new AddMission(Erc1.Forms.MissionType.Dlayed)
                {
                    TopLevel = false
                };


                dm.MonthlyID.Hide();

                dm.AnnualID.Name    = "ID";
                dm.paI.label20.Text = "رقم المتصل";
                dm.paI.label21.Text = "اسم المتصل";
                Control c = dm.paI.Insurance.Parent;
                dm.paI.Insurance.Dispose();

                TextBox t = new TextBox();
                t.Font        = dm.paI.OtherInfo.Font;
                t.BackColor   = dm.paI.OtherInfo.BackColor;
                t.Dock        = DockStyle.Fill;
                t.Margin      = dm.paI.OtherInfo.Margin;
                t.RightToLeft = RightToLeft.Yes;
                c.Controls.Add(t);


                dm.paI.tableLayoutPanel21.Hide();


                dm.Size = panel2.Size;
                dm.Dock = DockStyle.Fill;
                panel2.Controls.Add(dm);
            }
            dm.Show();
            if (im != null)
            {
                im.Hide();
            }
            if (cm != null)
            {
                cm.Hide();
            }
        }
Exemplo n.º 2
0
 //Add Mission buttons
 public void Sfab_CancClicked(object sender, EventArgs e)
 {
     if (cm == null || cm.IsDisposed)
     {
         cm = new AddMission(Erc1.Forms.MissionType.Canceled)
         {
             TopLevel = false
         };
         cm.Size = panel2.Size;
         cm.Dock = DockStyle.Fill;
         panel2.Controls.Add(cm);
     }
     cm.Show();
     if (dm != null)
     {
         dm.Hide();
     }
     if (im != null)
     {
         im.Hide();
     }
 }