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. |
From: <br...@us...> - 2009-02-06 22:01:37
|
Revision: 496 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=496&view=rev Author: brus07 Date: 2009-02-06 21:50:04 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Bug fix: Added School to Submit information. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 21:05:57 UTC (rev 495) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 21:50:04 UTC (rev 496) @@ -43,7 +43,8 @@ int lang = Int32.Parse(languageTextBox.Text); int problem = Int32.Parse(problemTextBox.Text); string soucreCode = sourceTextBox.Text; - plugin.SendSubmit(contestantName, form, soucreCode, lang, problem); + string school = schoolTextBox.Text; + plugin.SendSubmit(contestantName, form, school, soucreCode, lang, problem); } public void AddText(string type, string text) Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-06 21:05:57 UTC (rev 495) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-06 21:50:04 UTC (rev 496) @@ -25,11 +25,12 @@ } } - internal void SendSubmit(string contestantName, int form, string soucreCode, int lang, int problem) + internal void SendSubmit(string contestantName, int form, string school, string soucreCode, int lang, int problem) { SubmitIoi submit = new SubmitIoi(); submit.name = contestantName; submit.form = form; + submit.school = school; submit.submit = new Submit(); submit.submit.id = Guid.NewGuid().GetHashCode(); if (submit.submit.id < 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-27 23:53:09
|
Revision: 512 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=512&view=rev Author: brus07 Date: 2009-02-27 23:53:06 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Added errorProvaider to FormCobmoBox element. 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/IoiSubmitGuiControl.resx Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-26 19:43:42 UTC (rev 511) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-27 23:53:06 UTC (rev 512) @@ -1,3 +1,4 @@ +using System.Windows.Forms; namespace AcmContester.Plugins.IoiPlugins.IoiSubmitGuiPlugin { partial class IoiSubmitGuiControl @@ -28,11 +29,13 @@ /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.label1 = new System.Windows.Forms.Label(); this.nameTextBox = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.formComboBox = new System.Windows.Forms.ComboBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); this.problemTextBox = new System.Windows.Forms.TextBox(); @@ -41,13 +44,14 @@ this.submitButton = new System.Windows.Forms.Button(); this.sourceTextBox = new System.Windows.Forms.TextBox(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.schoolTextBox = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); + this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components); this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); this.SuspendLayout(); // // label1 @@ -80,6 +84,7 @@ // formComboBox // this.formComboBox.FormattingEnabled = true; + this.errorProvider1.SetIconPadding(this.formComboBox, 2); this.formComboBox.Items.AddRange(new object[] { "9", "10", @@ -89,6 +94,7 @@ this.formComboBox.Size = new System.Drawing.Size(121, 21); this.formComboBox.TabIndex = 4; this.formComboBox.Text = "9"; + this.formComboBox.Validated += new System.EventHandler(this.formComboBox_Validated); // // groupBox1 // @@ -108,23 +114,47 @@ 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"; // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(305, 13); + this.numericUpDown1.Maximum = new decimal(new int[] { + 4, + 0, + 0, + 0}); + this.numericUpDown1.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(48, 20); + this.numericUpDown1.TabIndex = 15; + this.numericUpDown1.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); + // // comboBox1 // this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; this.comboBox1.Items.AddRange(new object[] { "1 (Pascal)", - "2 (C++)"}); + "2 (C++)", + "3 (TurboPascal test)"}); this.comboBox1.Location = new System.Drawing.Point(100, 13); this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(67, 21); + this.comboBox1.Size = new System.Drawing.Size(129, 21); this.comboBox1.TabIndex = 14; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(173, 16); + this.label3.Location = new System.Drawing.Point(251, 16); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(48, 13); this.label3.TabIndex = 13; @@ -133,7 +163,7 @@ // problemTextBox // this.problemTextBox.Enabled = false; - this.problemTextBox.Location = new System.Drawing.Point(281, 13); + this.problemTextBox.Location = new System.Drawing.Point(359, 13); this.problemTextBox.Name = "problemTextBox"; this.problemTextBox.Size = new System.Drawing.Size(24, 20); this.problemTextBox.TabIndex = 12; @@ -197,29 +227,6 @@ this.splitContainer1.SplitterDistance = 163; this.splitContainer1.TabIndex = 6; // - // numericUpDown1 - // - this.numericUpDown1.Location = new System.Drawing.Point(227, 13); - this.numericUpDown1.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.numericUpDown1.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(48, 20); - this.numericUpDown1.TabIndex = 15; - this.numericUpDown1.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); - // // schoolTextBox // this.schoolTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -238,6 +245,12 @@ this.label5.TabIndex = 7; this.label5.Text = "School:"; // + // errorProvider1 + // + this.errorProvider1.BlinkRate = 1000; + this.errorProvider1.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.AlwaysBlink; + this.errorProvider1.ContainerControl = this; + // // IoiSubmitGuiControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -253,9 +266,10 @@ this.Size = new System.Drawing.Size(459, 402); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -279,5 +293,6 @@ private System.Windows.Forms.NumericUpDown numericUpDown1; private System.Windows.Forms.TextBox schoolTextBox; private System.Windows.Forms.Label label5; + private System.Windows.Forms.ErrorProvider errorProvider1; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-26 19:43:42 UTC (rev 511) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-27 23:53:06 UTC (rev 512) @@ -56,5 +56,15 @@ { problemTextBox.Text = numericUpDown1.Value.ToString(); } + + private void formComboBox_Validated(object sender, EventArgs e) + { + int a; + if (Int32.TryParse(this.formComboBox.Text, out a) == false) + errorProvider1.SetError(this.formComboBox, "\xC2\xE2\xE5\xE4\xB3\xF2\xFC \xF2\xB3\xEB\xFC\xEA\xE8 \xF7\xE8\xF1\xEB\xEE"); + else + errorProvider1.SetError(this.formComboBox, ""); + + } } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx 2009-02-26 19:43:42 UTC (rev 511) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx 2009-02-27 23:53:06 UTC (rev 512) @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="errorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |