From: <br...@us...> - 2009-02-04 12:22:24
|
Revision: 485 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=485&view=rev Author: brus07 Date: 2009-02-04 11:37:21 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Added LogDataGridView to SubmitIoi form. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-03 22:54:13 UTC (rev 484) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-04 11:37:21 UTC (rev 485) @@ -40,7 +40,10 @@ this.languageTextBox = new System.Windows.Forms.TextBox(); this.submitButton = new System.Windows.Forms.Button(); this.sourceTextBox = new System.Windows.Forms.TextBox(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.groupBox1.SuspendLayout(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.SuspendLayout(); this.SuspendLayout(); // // label1 @@ -85,9 +88,6 @@ // // groupBox1 // - this.groupBox1.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.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.problemTextBox); @@ -95,9 +95,10 @@ this.groupBox1.Controls.Add(this.languageTextBox); this.groupBox1.Controls.Add(this.submitButton); this.groupBox1.Controls.Add(this.sourceTextBox); - this.groupBox1.Location = new System.Drawing.Point(6, 56); + this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(450, 343); + this.groupBox1.Size = new System.Drawing.Size(450, 177); this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; this.groupBox1.Text = "\xD4\xEE\xF0\xEC\xE0 \xE2\xB3\xEF\xF0\xE0\xE2\xEA\xE8 \xF0\xEE\xE7\xE2\'\xFF\xE7\xEA\xF3"; @@ -154,7 +155,7 @@ // this.submitButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.submitButton.Location = new System.Drawing.Point(6, 314); + this.submitButton.Location = new System.Drawing.Point(6, 148); this.submitButton.Name = "submitButton"; this.submitButton.Size = new System.Drawing.Size(438, 23); this.submitButton.TabIndex = 9; @@ -170,15 +171,31 @@ this.sourceTextBox.Location = new System.Drawing.Point(6, 39); this.sourceTextBox.Multiline = true; this.sourceTextBox.Name = "sourceTextBox"; - this.sourceTextBox.Size = new System.Drawing.Size(438, 269); + this.sourceTextBox.Size = new System.Drawing.Size(438, 103); this.sourceTextBox.TabIndex = 8; this.sourceTextBox.Text = "begin\r\nend."; // + // splitContainer1 + // + this.splitContainer1.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.splitContainer1.Location = new System.Drawing.Point(6, 56); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.groupBox1); + this.splitContainer1.Size = new System.Drawing.Size(450, 343); + this.splitContainer1.SplitterDistance = 177; + this.splitContainer1.TabIndex = 6; + // // IoiSubmitGuiControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.groupBox1); + this.Controls.Add(this.splitContainer1); this.Controls.Add(this.formComboBox); this.Controls.Add(this.label2); this.Controls.Add(this.nameTextBox); @@ -187,6 +204,8 @@ this.Size = new System.Drawing.Size(459, 402); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); @@ -206,5 +225,6 @@ private System.Windows.Forms.TextBox languageTextBox; private System.Windows.Forms.Button submitButton; private System.Windows.Forms.TextBox sourceTextBox; + private System.Windows.Forms.SplitContainer splitContainer1; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-03 22:54:13 UTC (rev 484) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-04 11:37:21 UTC (rev 485) @@ -15,8 +15,16 @@ public IoiSubmitGuiControl() { InitializeComponent(); + initGridSe(); } + LogDataGridView.LogDataGridView view = new LogDataGridView.LogDataGridView(); + private void initGridSe() + { + view.Dock = DockStyle.Fill; + splitContainer1.Panel2.Controls.Add(view); + } + internal void SetPlugin(IoiSubmitGuiPlugin ioiSubmitGuiPlugin) { plugin = ioiSubmitGuiPlugin; @@ -37,5 +45,10 @@ string soucreCode = sourceTextBox.Text; plugin.SendSubmit(contestantName, form, soucreCode, lang, problem); } + + public void AddText(string type, string text) + { + view.AddRow(new LogDataGridView.SystemMessage(text, type)); + } } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-03 22:54:13 UTC (rev 484) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-04 11:37:21 UTC (rev 485) @@ -15,6 +15,14 @@ public override void Send(SystemMessage message) { + if (message.IsType("TestingResultIoi") == true) + { + ResultIoi result = ResultIoi.CreateFromXml(message.Message); + string text = result.Submit.submit.id.ToString() + + Environment.NewLine + + result.res; + ((IoiSubmitGuiControl)base.Control).AddText("Receive", text); + } } internal void SendSubmit(string contestantName, int form, string soucreCode, int lang, int problem) @@ -32,6 +40,12 @@ SystemMessage message = new SystemMessage(submit.ToString(), "TestingSubmitIoi"); base.DataArrived(message); + + string text = submit.submit.id.ToString() + + Environment.NewLine + + submit.name + " lang:" + submit.submit.language.ToString() + " problem:" + submit.submit.pbolemID.ToString(); + + ((IoiSubmitGuiControl)base.Control).AddText("Send", text); } } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj 2009-02-03 22:54:13 UTC (rev 484) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.csproj 2009-02-04 11:37:21 UTC (rev 485) @@ -28,6 +28,10 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="LogDataGridView, Version=1.1.3198.29045, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\Resource\LogDataGridView.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |