Example #1
0
        Tuple <Label, ChainLabel> GetCombo(string text, DateTime timeStamp)
        {
            ChainLabel message = new ChainLabel();

            message.Text        = Regex.Replace(text, "\r\n|\r|\n", "\r\n");
            message.BorderStyle = System.Windows.Forms.BorderStyle.None;
            message.Font        = messageFont;
            message.Multiline   = true;
            message.Size        = new Size(Width - 70, 10);
            message.WordWrap    = true;
            message.ReadOnly    = true;
            message.Anchor      = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            message.BackColor   = Color.White;
            message.GotFocus   += baseText_GotFocus;
            message.MouseWheel += baseText_MouseWheel;
            Grow(message);

            Label t = new Label();

            t.Text      = timeStamp.ToString(controller.connected.Client.MySelf.prefs.time24 ? "HH:mm" : "hh:mm");
            t.Font      = timeStampFont;
            t.ForeColor = ts.ForeColor;
            t.Size      = new Size(t.PreferredWidth, ts.Font.Height);
            t.TextAlign = ContentAlignment.MiddleLeft;
            t.Anchor    = AnchorStyles.Left | AnchorStyles.Top;

            return(new Tuple <Label, ChainLabel>(t, message));
        }
Example #2
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.userName = new System.Windows.Forms.Label();
     this.ts       = new System.Windows.Forms.Label();
     this.baseText = new ChainLabel();
     this.SuspendLayout();
     //
     // userName
     //
     this.userName.AutoSize = true;
     this.userName.Location = new System.Drawing.Point(60, 9);
     this.userName.Name     = "userName";
     this.userName.Size     = new System.Drawing.Size(52, 13);
     this.userName.TabIndex = 1;
     this.userName.Text     = "Someone";
     //
     // ts
     //
     this.ts.AutoSize = true;
     this.ts.Location = new System.Drawing.Point(118, 9);
     this.ts.Name     = "ts";
     this.ts.Size     = new System.Drawing.Size(53, 13);
     this.ts.TabIndex = 2;
     this.ts.Text     = "Sometime";
     this.ts.Visible  = true;
     //
     // baseText
     //
     this.baseText.BackColor = System.Drawing.Color.White;
     this.baseText.Location  = new System.Drawing.Point(63, 37);
     this.baseText.Multiline = true;
     this.baseText.Name      = "baseText";
     this.baseText.ReadOnly  = true;
     this.baseText.Size      = new System.Drawing.Size(100, 20);
     this.baseText.TabIndex  = 3;
     this.Controls.Add(this.baseText);
     this.Controls.Add(this.ts);
     this.Controls.Add(this.userName);
     this.Name = "MessageEntry";
     this.Size = new System.Drawing.Size(526, 182);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Example #3
0
 /// <summary> 
 /// Required method for Designer support - do not modify 
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.userName = new System.Windows.Forms.Label();
     this.ts = new System.Windows.Forms.Label();
     this.baseText = new ChainLabel();
     this.SuspendLayout();
     //
     // userName
     //
     this.userName.AutoSize = true;
     this.userName.Location = new System.Drawing.Point(60, 9);
     this.userName.Name = "userName";
     this.userName.Size = new System.Drawing.Size(52, 13);
     this.userName.TabIndex = 1;
     this.userName.Text = "Someone";
     //
     // ts
     //
     this.ts.AutoSize = true;
     this.ts.Location = new System.Drawing.Point(118, 9);
     this.ts.Name = "ts";
     this.ts.Size = new System.Drawing.Size(53, 13);
     this.ts.TabIndex = 2;
     this.ts.Text = "Sometime";
     this.ts.Visible = true;
     //
     // baseText
     //
     this.baseText.BackColor = System.Drawing.Color.White;
     this.baseText.Location = new System.Drawing.Point(63, 37);
     this.baseText.Multiline = true;
     this.baseText.Name = "baseText";
     this.baseText.ReadOnly = true;
     this.baseText.Size = new System.Drawing.Size(100, 20);
     this.baseText.TabIndex = 3;
     this.Controls.Add(this.baseText);
     this.Controls.Add(this.ts);
     this.Controls.Add(this.userName);
     this.Name = "MessageEntry";
     this.Size = new System.Drawing.Size(526, 182);
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Example #4
0
        Tuple<Label, ChainLabel> GetCombo(string text, DateTime timeStamp)
        {
            ChainLabel message = new ChainLabel();

            message.Text = Regex.Replace(text, "\r\n|\r|\n", "\r\n");
            message.BorderStyle = System.Windows.Forms.BorderStyle.None;
            message.Font = messageFont;
            message.Multiline = true;
            message.Size = new Size(Width - 70, 10);
            message.WordWrap = true;
            message.ReadOnly = true;
            message.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            message.BackColor = Color.White;
            message.GotFocus += baseText_GotFocus;
            message.MouseWheel += baseText_MouseWheel;
            Grow(message);

            Label t = new Label();
            t.Text = timeStamp.ToString(controller.connected.Client.MySelf.prefs.time24 ? "HH:mm" : "hh:mm");
            t.Font = timeStampFont;
            t.ForeColor = ts.ForeColor;
            t.Size = new Size(t.PreferredWidth, ts.Font.Height);
            t.TextAlign = ContentAlignment.MiddleLeft;
            t.Anchor = AnchorStyles.Left | AnchorStyles.Top;

            return new Tuple<Label, ChainLabel>(t, message);
        }