Ejemplo n.º 1
0
        public void AddText_Click(object sender, EventArgs e)
        {
            Text_kusock txt = new Text_kusock(this);

            txt.Dock     = DockStyle.Bottom;
            txt.Margin   = new System.Windows.Forms.Padding(5);
            txt.AutoSize = true;
            txt.LabelLocale.MaximumSize = new Size(this.Size.Width, 10000);
            this.Resize += new EventHandler(delegate { txt.LabelLocale.MaximumSize = new Size(txt.Size.Width, 10000); });
            this.inWorkPage.Controls.Add(txt);
        }
Ejemplo n.º 2
0
 public AddRedact(int indes)
 {
     InitializeComponent();
     this.localMessage         = MessageControl.msContr.messages[indes];
     oldID                     = indes;
     this.TittleName.Text      = MessageControl.msContr.messages[indes].TittleName;
     this.MainText.Checked     = MessageControl.msContr.messages[indes].MainMessage;
     this.ThisMeessageDateTime = MessageControl.msContr.messages[indes].TimeDate;
     foreach (TextBody txtbd in MessageControl.msContr.messages[indes].Textes)
     {
         if (txtbd.GetType().ToString() == "KME.TextBody")
         {
             Text_kusock txt = new Text_kusock(this);
             txt.Dock                    = DockStyle.Bottom;
             txt.Margin                  = new System.Windows.Forms.Padding(5);
             txt.AutoSize                = true;
             txt.textBox1.Text           = txtbd.sTextBody;
             txt.LabelLocale.MaximumSize = new Size(this.Size.Width, 10000);
             this.Resize                += new EventHandler(delegate { txt.LabelLocale.MaximumSize = new Size(txt.Size.Width, 10000); });
             this.inWorkPage.Controls.Add(txt);
         }
         if (txtbd.GetType().ToString() == "KME.CheckBody")
         {
             check_kusock ch_txt = new check_kusock(this);
             ch_txt.Dock                   = DockStyle.Bottom;
             ch_txt.Margin                 = new System.Windows.Forms.Padding(5);
             ch_txt.AutoSize               = true;
             ch_txt.textBox1.Text          = ((CheckBody)txtbd).sTextBody;
             ch_txt.check_.Checked         = ((CheckBody)txtbd).bCheckBody;
             ch_txt.LabelLocal.MaximumSize = new Size(this.Size.Width - 15, 10000);
             this.Resize                  += new EventHandler(delegate { ch_txt.LabelLocal.MaximumSize = new Size(ch_txt.Size.Width - 15, 10000); });
             this.inWorkPage.Controls.Add(ch_txt);
         }
     }
     SetTextButtonDateTime();
 }