コード例 #1
0
 public Form1()
 {
     this.Text = "NTU WooTalk";
     this.Icon = Properties.Resources.clock_reveal_00095_600;
     this.Size = new Size(1000, 700);
     {
         TCmain = new MyTabControl();
         {
             TPlog  = new LogPage();
             TPinfo = new InfoPage();
             TPmsg  = new MessagePage(TPinfo, TPlog);
             TCmain.TabPages.Add(TPmsg);
         }
         {
             TCmain.TabPages.Add(TPinfo);
         }
         {
             TCmain.TabPages.Add(TPlog);
         }
         {
             TCmain.TabPages.Add(new AboutPage());
         }
         this.Controls.Add(TCmain);
     }
     this.FormClosing += Form1_FormClosing;
     Log("初始化完成!");
     this.Shown += Form1_Shown;
 }
コード例 #2
0
 public MessagePage(InfoPage _info, LogPage _log) : base("主頁")
 {
     info = _info;
     log  = _log;
     {
         TLPmain = new MyTableLayoutPanel(3, 3, "PPP", "PAA");
         {
             TXBchat = new MyTextBox(true);
             TLPmain.Controls.Add(TXBchat, 0, 0);
             TLPmain.SetColumnSpan(TXBchat, 2);
         }
         {
             TXBmsg = new MyTextBox(true);
             TLPmain.Controls.Add(TXBmsg, 2, 0);
         }
         {
             TXBinput = new MyTextBox(false);
             //TXBinput.AcceptsReturn = true;
             TXBinput.Multiline    = true;
             TXBinput.Height       = 50;
             TXBinput.TextChanged += TXBinput_TextChanged;
             TLPmain.Controls.Add(TXBinput, 0, 1);
             TLPmain.SetColumnSpan(TXBinput, 3);
         }
         {
             BTNconnect        = new MyButton("");
             BTNconnect.Click += ButtonClicked;
             TLPmain.Controls.Add(BTNconnect, 0, 2);
         }
         {
             BTNmatch        = new MyButton("");
             BTNmatch.Click += ButtonClicked;
             TLPmain.Controls.Add(BTNmatch, 1, 2);
         }
         {
             BTNquit        = new MyButton("");
             BTNquit.Click += ButtonClicked;
             TLPmain.Controls.Add(BTNquit, 2, 2);
         }
         this.Controls.Add(TLPmain);
     }
     SetState(StateEnum.Disconnected);
 }