From: <br...@us...> - 2008-08-19 08:45:55
|
Revision: 336 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=336&view=rev Author: brus07 Date: 2008-08-19 08:46:04 +0000 (Tue, 19 Aug 2008) Log Message: ----------- Added LogDataGridView into Tester form. Modified Paths: -------------- ACMServer/trunk/ACMServer/Tester/Form1.Designer.cs ACMServer/trunk/ACMServer/Tester/Form1.cs ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs ACMServer/trunk/ACMServer/Tester/Tester.csproj Added Paths: ----------- ACMServer/trunk/ACMServer/Tester/LogDataGridView.dll Property Changed: ---------------- ACMServer/trunk/ACMServer/Tester/ Property changes on: ACMServer/trunk/ACMServer/Tester ___________________________________________________________________ Modified: svn:ignore - bin obj + bin obj *.user Modified: ACMServer/trunk/ACMServer/Tester/Form1.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Form1.Designer.cs 2008-08-18 21:48:42 UTC (rev 335) +++ ACMServer/trunk/ACMServer/Tester/Form1.Designer.cs 2008-08-19 08:46:04 UTC (rev 336) @@ -29,7 +29,7 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.textBox1 = new System.Windows.Forms.TextBox(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); @@ -38,14 +38,15 @@ this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); this.timer1 = new System.Windows.Forms.Timer(this.components); this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.dataGridViewLog = new System.Windows.Forms.DataGridView(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage3 = new System.Windows.Forms.TabPage(); this.statusStrip1.SuspendLayout(); this.tabControl1.SuspendLayout(); - this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridViewLog)).BeginInit(); + this.tabPage1.SuspendLayout(); this.SuspendLayout(); // // textBox1 @@ -112,6 +113,7 @@ this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.tabControl1.Controls.Add(this.tabPage3); this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Location = new System.Drawing.Point(12, 70); @@ -120,17 +122,6 @@ this.tabControl1.Size = new System.Drawing.Size(268, 178); this.tabControl1.TabIndex = 7; // - // tabPage1 - // - this.tabPage1.Controls.Add(this.textBox1); - this.tabPage1.Location = new System.Drawing.Point(4, 22); - this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(260, 152); - this.tabPage1.TabIndex = 0; - this.tabPage1.Text = "TextLog"; - this.tabPage1.UseVisualStyleBackColor = true; - // // tabPage2 // this.tabPage2.Controls.Add(this.dataGridViewLog); @@ -148,14 +139,14 @@ this.dataGridViewLog.AllowUserToDeleteRows = false; this.dataGridViewLog.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; this.dataGridViewLog.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridViewLog.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridViewLog.DefaultCellStyle = dataGridViewCellStyle2; this.dataGridViewLog.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridViewLog.Location = new System.Drawing.Point(3, 3); this.dataGridViewLog.Name = "dataGridViewLog"; @@ -163,6 +154,27 @@ this.dataGridViewLog.Size = new System.Drawing.Size(254, 146); this.dataGridViewLog.TabIndex = 0; // + // tabPage1 + // + this.tabPage1.Controls.Add(this.textBox1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(260, 152); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "TextLog"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // tabPage3 + // + this.tabPage3.Location = new System.Drawing.Point(4, 22); + this.tabPage3.Name = "tabPage3"; + this.tabPage3.Padding = new System.Windows.Forms.Padding(3); + this.tabPage3.Size = new System.Drawing.Size(260, 152); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "GridLogSe"; + this.tabPage3.UseVisualStyleBackColor = true; + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -180,10 +192,10 @@ this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.tabControl1.ResumeLayout(false); + this.tabPage2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewLog)).EndInit(); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); - this.tabPage2.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.dataGridViewLog)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -202,6 +214,7 @@ private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.DataGridView dataGridViewLog; + private System.Windows.Forms.TabPage tabPage3; } } Modified: ACMServer/trunk/ACMServer/Tester/Form1.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Form1.cs 2008-08-18 21:48:42 UTC (rev 335) +++ ACMServer/trunk/ACMServer/Tester/Form1.cs 2008-08-19 08:46:04 UTC (rev 336) @@ -9,6 +9,7 @@ using AcmContester.Library.LibraryExtention; using System.Threading; using AcmContester.Tester.Library; +using LogDataGridView; namespace Tester { @@ -24,7 +25,15 @@ textBox3.Text = ip; initGrid(); + + initGridSe(); } + LogDataGridView.LogDataGridView view = new LogDataGridView.LogDataGridView(); + private void initGridSe() + { + view.Dock = DockStyle.Fill; + tabPage3.Controls.Add(view); + } DataTable tableLog = new DataTable(); private void initGrid() @@ -86,6 +95,7 @@ { AddText(type + ": " + text); AddTextToGridLog(new LogMessage(text, type)); + view.AddRow(new SystemMessage(text, type)); } public class LogMessage @@ -117,9 +127,9 @@ { get { - if (type == "SystemR") + if (type == "SystemReceive") return Color.LightBlue; - if (type == "SystemS") + if (type == "SystemSend") return Color.LightSkyBlue; if (type == "Receive") return Color.LightGreen; Modified: ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs 2008-08-18 21:48:42 UTC (rev 335) +++ ACMServer/trunk/ACMServer/Tester/Library/SocketClientGate.cs 2008-08-19 08:46:04 UTC (rev 336) @@ -50,7 +50,7 @@ string[] mes = message.Split(chars); if (mes[0] == "test") { - OnAddLogText("SystemR", message); + OnAddLogText("SystemReceive", message); string result = ""; if (IsBusy() == true) { @@ -64,7 +64,7 @@ { result += " " + mes[i]; } - OnAddLogText("SystemS", result); + OnAddLogText("SystemSend", result); base.Send(result); return true; } Property changes on: ACMServer/trunk/ACMServer/Tester/LogDataGridView.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Modified: ACMServer/trunk/ACMServer/Tester/Tester.csproj =================================================================== --- ACMServer/trunk/ACMServer/Tester/Tester.csproj 2008-08-18 21:48:42 UTC (rev 335) +++ ACMServer/trunk/ACMServer/Tester/Tester.csproj 2008-08-19 08:46:04 UTC (rev 336) @@ -28,6 +28,7 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="LogDataGridView, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Deployment" /> @@ -86,6 +87,11 @@ <Name>LibraryExtention</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <Content Include="LogDataGridView.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |