示例#1
0
        public MessageCenter()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();
            //treeMessage.Location = new System.Drawing.Point(comboCode.Location.X, comboCode.Location.Y + comboCode.Height);

            dropMessage.Location = new System.Drawing.Point(comboCode.Location.X, comboCode.Location.Y + comboCode.Height);
            history.Location     = new System.Drawing.Point(comboCode.Location.X, comboCode.Location.Y + comboCode.Height);
            //history.list.SelectedIndexChanged += new EventHandler(history_SelectedIndexChanged);
            history.list.MouseDown += new MouseEventHandler(history_MouseDown);
            //history.VisibleChanged += new EventHandler(history_VisibleChanged);
            history.list.KeyPress += new KeyPressEventHandler(history_KeyPress);
            history.Leave         += new EventHandler(history_Leave);
            treeMessage            = dropMessage.treeView;

            treeMessage.MouseDown += new MouseEventHandler(treeMessage_MouseDown);
            treeMessage.KeyPress  += new KeyPressEventHandler(treeMessage_KeyPress);
            //dropMessage.VisibleChanged += new EventHandler(dropMessage_VisibleChanged);
            dropMessage.Leave += new EventHandler(dropMessage_Leave);
            //treeMessage.Leave += new EventHandler(treeMessage_Leave);
            dropMessage.treeView.Release = "15E";

            //dzs
            OnMessageChanged += new OnMessageChangedHandler(MessageCenter_OnMessageChanged);
            toolTip.SetToolTip(comboCode,
                               "Click the drop down to see all messages." + Environment.NewLine +
                               "Right-click the drop down to see recent history.");
        }
示例#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.lblTitle = new System.Windows.Forms.Label();
     this.pnlMain  = new System.Windows.Forms.Panel();
     this.treeView = new ConsoleRecords.TcpIpMessageTree();
     this.pnlMain.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.treeView)).BeginInit();
     this.SuspendLayout();
     //
     // lblTitle
     //
     this.lblTitle.BackColor = System.Drawing.Color.DimGray;
     this.lblTitle.Dock      = System.Windows.Forms.DockStyle.Top;
     this.lblTitle.Font      = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.lblTitle.ForeColor = System.Drawing.Color.White;
     this.lblTitle.Location  = new System.Drawing.Point(0, 0);
     this.lblTitle.Name      = "lblTitle";
     this.lblTitle.Size      = new System.Drawing.Size(180, 20);
     this.lblTitle.TabIndex  = 3;
     this.lblTitle.Text      = "All Messages";
     this.lblTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // pnlMain
     //
     this.pnlMain.Controls.Add(this.treeView);
     this.pnlMain.Controls.Add(this.lblTitle);
     this.pnlMain.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.pnlMain.Location = new System.Drawing.Point(0, 0);
     this.pnlMain.Name     = "pnlMain";
     this.pnlMain.Size     = new System.Drawing.Size(180, 180);
     this.pnlMain.TabIndex = 4;
     //
     // treeView
     //
     this.treeView.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(252)))), ((int)(((byte)(252)))), ((int)(((byte)(252)))));
     this.treeView.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.treeView.Font      = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.treeView.Location  = new System.Drawing.Point(0, 20);
     this.treeView.Name      = "treeView";
     this.treeView.Release   = null;
     this.treeView.Size      = new System.Drawing.Size(180, 160);
     this.treeView.TabIndex  = 4;
     //
     // TcpIpMessageDropDown
     //
     this.Controls.Add(this.pnlMain);
     this.Name = "TcpIpMessageDropDown";
     this.Size = new System.Drawing.Size(180, 180);
     this.pnlMain.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.treeView)).EndInit();
     this.ResumeLayout(false);
 }