public void UpdateChatWindow(string message)
 {
     if (InvokeRequired)
     {
         Invoke(updateChatWindowDelegate, message);
     }
     else
     {
         ViewTextBox.Text          += message += '\n';
         ViewTextBox.SelectionStart = ViewTextBox.Text.Length;
         ViewTextBox.ScrollToCaret();
     }
 }
Пример #2
0
 public void SetView(string[] View)
 {
     ViewTextBox.Lines = View.Where(x => !StripLines.Contains(x.Trim())).SkipWhile(x => x.Trim().Length == 0 || x.Trim() == ";").ToArray();
     ViewTextBox.Select(ViewTextBox.Text.Length, 0);
 }
Пример #3
0
 private void InitializeComponent()
 {
     System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
     this.panel1               = new System.Windows.Forms.Panel();
     this.groupBox2            = new System.Windows.Forms.GroupBox();
     this.GBox_ViewMode        = new System.Windows.Forms.GroupBox();
     this.CBox_DrawType        = new System.Windows.Forms.ComboBox();
     this.GBox_EndLine         = new System.Windows.Forms.GroupBox();
     this.TBox_LFCode          = new System.Windows.Forms.TextBox();
     this.groupBox1            = new System.Windows.Forms.GroupBox();
     this.TBox_BoundaryText    = new System.Windows.Forms.TextBox();
     this.GBox_Input           = new System.Windows.Forms.GroupBox();
     this.GBox_ShiftBit        = new System.Windows.Forms.GroupBox();
     this.Num_ShiftBit         = new System.Windows.Forms.NumericUpDown();
     this.ChkBox_EchoBack      = new System.Windows.Forms.CheckBox();
     this.TBox_Main            = new Ratatoskr.PacketView.Sequential.ViewTextBox();
     this.Splitter_Main        = new System.Windows.Forms.SplitContainer();
     this.PBox_LineNo          = new System.Windows.Forms.PictureBox();
     this.Splitter_Compare     = new System.Windows.Forms.SplitContainer();
     this.TBox_ComparePattern  = new System.Windows.Forms.TextBox();
     this.Panel_CompareSetting = new System.Windows.Forms.Panel();
     this.button1              = new System.Windows.Forms.Button();
     this.Chart_CompareRate    = new System.Windows.Forms.DataVisualization.Charting.Chart();
     this.Panel_CompareStatus  = new System.Windows.Forms.Panel();
     this.panel1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.GBox_ViewMode.SuspendLayout();
     this.GBox_EndLine.SuspendLayout();
     this.groupBox1.SuspendLayout();
     this.GBox_Input.SuspendLayout();
     this.GBox_ShiftBit.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Num_ShiftBit)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.Splitter_Main)).BeginInit();
     this.Splitter_Main.Panel1.SuspendLayout();
     this.Splitter_Main.Panel2.SuspendLayout();
     this.Splitter_Main.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.PBox_LineNo)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.Splitter_Compare)).BeginInit();
     this.Splitter_Compare.Panel1.SuspendLayout();
     this.Splitter_Compare.Panel2.SuspendLayout();
     this.Splitter_Compare.SuspendLayout();
     this.Panel_CompareSetting.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.Chart_CompareRate)).BeginInit();
     this.SuspendLayout();
     //
     // panel1
     //
     this.panel1.Controls.Add(this.groupBox2);
     this.panel1.Controls.Add(this.GBox_Input);
     this.panel1.Dock     = System.Windows.Forms.DockStyle.Top;
     this.panel1.Location = new System.Drawing.Point(0, 0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(922, 74);
     this.panel1.TabIndex = 0;
     //
     // groupBox2
     //
     this.groupBox2.Controls.Add(this.GBox_ViewMode);
     this.groupBox2.Controls.Add(this.GBox_EndLine);
     this.groupBox2.Controls.Add(this.groupBox1);
     this.groupBox2.Location = new System.Drawing.Point(193, 3);
     this.groupBox2.Name     = "groupBox2";
     this.groupBox2.Size     = new System.Drawing.Size(505, 64);
     this.groupBox2.TabIndex = 7;
     this.groupBox2.TabStop  = false;
     this.groupBox2.Text     = "View setting";
     //
     // GBox_ViewMode
     //
     this.GBox_ViewMode.Controls.Add(this.CBox_DrawType);
     this.GBox_ViewMode.Location = new System.Drawing.Point(6, 16);
     this.GBox_ViewMode.Name     = "GBox_ViewMode";
     this.GBox_ViewMode.Size     = new System.Drawing.Size(120, 42);
     this.GBox_ViewMode.TabIndex = 1;
     this.GBox_ViewMode.TabStop  = false;
     this.GBox_ViewMode.Text     = "Draw type";
     //
     // CBox_DrawType
     //
     this.CBox_DrawType.Dock              = System.Windows.Forms.DockStyle.Fill;
     this.CBox_DrawType.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     this.CBox_DrawType.FlatStyle         = System.Windows.Forms.FlatStyle.Flat;
     this.CBox_DrawType.FormattingEnabled = true;
     this.CBox_DrawType.Location          = new System.Drawing.Point(3, 15);
     this.CBox_DrawType.Name              = "CBox_DrawType";
     this.CBox_DrawType.Size              = new System.Drawing.Size(114, 20);
     this.CBox_DrawType.TabIndex          = 0;
     //
     // GBox_EndLine
     //
     this.GBox_EndLine.Controls.Add(this.TBox_LFCode);
     this.GBox_EndLine.Location = new System.Drawing.Point(318, 16);
     this.GBox_EndLine.Name     = "GBox_EndLine";
     this.GBox_EndLine.Size     = new System.Drawing.Size(180, 41);
     this.GBox_EndLine.TabIndex = 2;
     this.GBox_EndLine.TabStop  = false;
     this.GBox_EndLine.Text     = "LF(Line Feed) Code";
     //
     // TBox_LFCode
     //
     this.TBox_LFCode.BorderStyle  = System.Windows.Forms.BorderStyle.FixedSingle;
     this.TBox_LFCode.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.TBox_LFCode.Location     = new System.Drawing.Point(3, 15);
     this.TBox_LFCode.Name         = "TBox_LFCode";
     this.TBox_LFCode.Size         = new System.Drawing.Size(174, 19);
     this.TBox_LFCode.TabIndex     = 0;
     this.TBox_LFCode.TextChanged += new System.EventHandler(this.TBox_LFCode_TextChanged);
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.TBox_BoundaryText);
     this.groupBox1.Location = new System.Drawing.Point(132, 16);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(180, 41);
     this.groupBox1.TabIndex = 4;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "HEX/BIN Boundary text";
     //
     // TBox_BoundaryText
     //
     this.TBox_BoundaryText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.TBox_BoundaryText.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.TBox_BoundaryText.Font        = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
     this.TBox_BoundaryText.Location    = new System.Drawing.Point(3, 15);
     this.TBox_BoundaryText.Name        = "TBox_BoundaryText";
     this.TBox_BoundaryText.Size        = new System.Drawing.Size(174, 19);
     this.TBox_BoundaryText.TabIndex    = 0;
     //
     // GBox_Input
     //
     this.GBox_Input.Controls.Add(this.GBox_ShiftBit);
     this.GBox_Input.Controls.Add(this.ChkBox_EchoBack);
     this.GBox_Input.Location = new System.Drawing.Point(3, 3);
     this.GBox_Input.Name     = "GBox_Input";
     this.GBox_Input.Size     = new System.Drawing.Size(184, 64);
     this.GBox_Input.TabIndex = 6;
     this.GBox_Input.TabStop  = false;
     this.GBox_Input.Text     = "Input setting";
     //
     // GBox_ShiftBit
     //
     this.GBox_ShiftBit.Controls.Add(this.Num_ShiftBit);
     this.GBox_ShiftBit.Location = new System.Drawing.Point(6, 18);
     this.GBox_ShiftBit.Name     = "GBox_ShiftBit";
     this.GBox_ShiftBit.Size     = new System.Drawing.Size(80, 41);
     this.GBox_ShiftBit.TabIndex = 1;
     this.GBox_ShiftBit.TabStop  = false;
     this.GBox_ShiftBit.Text     = "Bit shift";
     //
     // Num_ShiftBit
     //
     this.Num_ShiftBit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.Num_ShiftBit.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.Num_ShiftBit.Location    = new System.Drawing.Point(3, 15);
     this.Num_ShiftBit.Maximum     = new decimal(new int[] {
         7,
         0,
         0,
         0
     });
     this.Num_ShiftBit.Name      = "Num_ShiftBit";
     this.Num_ShiftBit.Size      = new System.Drawing.Size(74, 19);
     this.Num_ShiftBit.TabIndex  = 0;
     this.Num_ShiftBit.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
     //
     // ChkBox_EchoBack
     //
     this.ChkBox_EchoBack.AutoSize = true;
     this.ChkBox_EchoBack.Location = new System.Drawing.Point(92, 34);
     this.ChkBox_EchoBack.Name     = "ChkBox_EchoBack";
     this.ChkBox_EchoBack.Size     = new System.Drawing.Size(77, 16);
     this.ChkBox_EchoBack.TabIndex = 3;
     this.ChkBox_EchoBack.Text     = "Echo back";
     this.ChkBox_EchoBack.UseVisualStyleBackColor = true;
     this.ChkBox_EchoBack.CheckedChanged         += new System.EventHandler(this.ChkBox_EchoBack_CheckedChanged);
     //
     // TBox_Main
     //
     this.TBox_Main.BackColor     = System.Drawing.Color.White;
     this.TBox_Main.BorderStyle   = System.Windows.Forms.BorderStyle.None;
     this.TBox_Main.DetectUrls    = false;
     this.TBox_Main.Dock          = System.Windows.Forms.DockStyle.Fill;
     this.TBox_Main.Font          = new System.Drawing.Font("MS ゴシック", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(128)));
     this.TBox_Main.HideSelection = false;
     this.TBox_Main.Location      = new System.Drawing.Point(70, 0);
     this.TBox_Main.Name          = "TBox_Main";
     this.TBox_Main.ReadOnly      = true;
     this.TBox_Main.ScrollBars    = System.Windows.Forms.RichTextBoxScrollBars.ForcedVertical;
     this.TBox_Main.Size          = new System.Drawing.Size(237, 490);
     this.TBox_Main.TabIndex      = 1;
     this.TBox_Main.Text          = "";
     this.TBox_Main.VScroll      += new System.EventHandler(this.TBox_Main_VScroll);
     this.TBox_Main.TextChanged  += new System.EventHandler(this.TBox_Main_TextChanged);
     this.TBox_Main.MouseDown    += new System.Windows.Forms.MouseEventHandler(this.TBox_Main_MouseDown);
     this.TBox_Main.MouseUp      += new System.Windows.Forms.MouseEventHandler(this.TBox_Main_MouseUp);
     this.TBox_Main.Resize       += new System.EventHandler(this.TBox_Main_Resize);
     //
     // Splitter_Main
     //
     this.Splitter_Main.Dock       = System.Windows.Forms.DockStyle.Fill;
     this.Splitter_Main.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
     this.Splitter_Main.Location   = new System.Drawing.Point(0, 74);
     this.Splitter_Main.Name       = "Splitter_Main";
     //
     // Splitter_Main.Panel1
     //
     this.Splitter_Main.Panel1.Controls.Add(this.TBox_Main);
     this.Splitter_Main.Panel1.Controls.Add(this.PBox_LineNo);
     //
     // Splitter_Main.Panel2
     //
     this.Splitter_Main.Panel2.Controls.Add(this.Splitter_Compare);
     this.Splitter_Main.Size             = new System.Drawing.Size(922, 490);
     this.Splitter_Main.SplitterDistance = 307;
     this.Splitter_Main.TabIndex         = 2;
     //
     // PBox_LineNo
     //
     this.PBox_LineNo.Dock     = System.Windows.Forms.DockStyle.Left;
     this.PBox_LineNo.Location = new System.Drawing.Point(0, 0);
     this.PBox_LineNo.Name     = "PBox_LineNo";
     this.PBox_LineNo.Size     = new System.Drawing.Size(70, 490);
     this.PBox_LineNo.TabIndex = 2;
     this.PBox_LineNo.TabStop  = false;
     this.PBox_LineNo.Paint   += new System.Windows.Forms.PaintEventHandler(this.PBox_LineNo_Paint);
     //
     // Splitter_Compare
     //
     this.Splitter_Compare.Dock        = System.Windows.Forms.DockStyle.Fill;
     this.Splitter_Compare.FixedPanel  = System.Windows.Forms.FixedPanel.Panel2;
     this.Splitter_Compare.Location    = new System.Drawing.Point(0, 0);
     this.Splitter_Compare.Name        = "Splitter_Compare";
     this.Splitter_Compare.Orientation = System.Windows.Forms.Orientation.Horizontal;
     //
     // Splitter_Compare.Panel1
     //
     this.Splitter_Compare.Panel1.Controls.Add(this.TBox_ComparePattern);
     this.Splitter_Compare.Panel1.Controls.Add(this.Panel_CompareSetting);
     //
     // Splitter_Compare.Panel2
     //
     this.Splitter_Compare.Panel2.Controls.Add(this.Chart_CompareRate);
     this.Splitter_Compare.Panel2.Controls.Add(this.Panel_CompareStatus);
     this.Splitter_Compare.Size             = new System.Drawing.Size(611, 490);
     this.Splitter_Compare.SplitterDistance = 208;
     this.Splitter_Compare.TabIndex         = 0;
     //
     // TBox_ComparePattern
     //
     this.TBox_ComparePattern.Dock      = System.Windows.Forms.DockStyle.Fill;
     this.TBox_ComparePattern.Location  = new System.Drawing.Point(79, 0);
     this.TBox_ComparePattern.Multiline = true;
     this.TBox_ComparePattern.Name      = "TBox_ComparePattern";
     this.TBox_ComparePattern.Size      = new System.Drawing.Size(532, 208);
     this.TBox_ComparePattern.TabIndex  = 1;
     //
     // Panel_CompareSetting
     //
     this.Panel_CompareSetting.Controls.Add(this.button1);
     this.Panel_CompareSetting.Dock     = System.Windows.Forms.DockStyle.Left;
     this.Panel_CompareSetting.Location = new System.Drawing.Point(0, 0);
     this.Panel_CompareSetting.Name     = "Panel_CompareSetting";
     this.Panel_CompareSetting.Size     = new System.Drawing.Size(79, 208);
     this.Panel_CompareSetting.TabIndex = 0;
     //
     // button1
     //
     this.button1.FlatAppearance.BorderSize = 0;
     this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
     this.button1.Location  = new System.Drawing.Point(3, 3);
     this.button1.Name      = "button1";
     this.button1.Size      = new System.Drawing.Size(73, 23);
     this.button1.TabIndex  = 0;
     this.button1.Text      = "Preset";
     this.button1.UseVisualStyleBackColor = true;
     //
     // Chart_CompareRate
     //
     this.Chart_CompareRate.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.Chart_CompareRate.Location = new System.Drawing.Point(0, 68);
     this.Chart_CompareRate.Name     = "Chart_CompareRate";
     series6.ChartType  = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Spline;
     series6.Name       = "Series_Rate";
     series6.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.UInt32;
     series6.YValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.UInt32;
     this.Chart_CompareRate.Series.Add(series6);
     this.Chart_CompareRate.Size     = new System.Drawing.Size(611, 210);
     this.Chart_CompareRate.TabIndex = 0;
     this.Chart_CompareRate.Text     = "chart1";
     //
     // Panel_CompareStatus
     //
     this.Panel_CompareStatus.Dock     = System.Windows.Forms.DockStyle.Top;
     this.Panel_CompareStatus.Location = new System.Drawing.Point(0, 0);
     this.Panel_CompareStatus.Name     = "Panel_CompareStatus";
     this.Panel_CompareStatus.Size     = new System.Drawing.Size(611, 68);
     this.Panel_CompareStatus.TabIndex = 1;
     //
     // PacketViewInstanceImpl
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
     this.Controls.Add(this.Splitter_Main);
     this.Controls.Add(this.panel1);
     this.Name = "ViewInstanceImpl";
     this.Size = new System.Drawing.Size(922, 564);
     this.panel1.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.GBox_ViewMode.ResumeLayout(false);
     this.GBox_EndLine.ResumeLayout(false);
     this.GBox_EndLine.PerformLayout();
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.GBox_Input.ResumeLayout(false);
     this.GBox_Input.PerformLayout();
     this.GBox_ShiftBit.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Num_ShiftBit)).EndInit();
     this.Splitter_Main.Panel1.ResumeLayout(false);
     this.Splitter_Main.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Splitter_Main)).EndInit();
     this.Splitter_Main.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.PBox_LineNo)).EndInit();
     this.Splitter_Compare.Panel1.ResumeLayout(false);
     this.Splitter_Compare.Panel1.PerformLayout();
     this.Splitter_Compare.Panel2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Splitter_Compare)).EndInit();
     this.Splitter_Compare.ResumeLayout(false);
     this.Panel_CompareSetting.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.Chart_CompareRate)).EndInit();
     this.ResumeLayout(false);
 }