From: <br...@us...> - 2009-02-06 21:06:04
|
Revision: 495 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=495&view=rev Author: brus07 Date: 2009-02-06 21:05:57 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Added "School" to SubmitIoi and to forms and to results. Change ProblemTextBox in SubmitIoiPlugins to numeric. (HardCode). Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs Modified: ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -13,6 +13,8 @@ public string name; [XmlElement("form", typeof(int))] public int form; + [XmlElement("school", typeof(string))] + public string school; public SubmitIoi() { Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-06 21:05:57 UTC (rev 495) @@ -21,6 +21,7 @@ <xs:element name="submit" type="submitType" /> <xs:element name="name" type="xs:string" /> <xs:element name="form" type="xs:positiveInteger" /> + <xs:element name="school" type="xs:string" minOccurs="0" /> </xs:sequence> </xs:complexType> <xs:element name="submitList"> Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -32,24 +32,29 @@ this.fileNeed = new System.Windows.Forms.CheckBox(); this.button1 = new System.Windows.Forms.Button(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.resGrid = new System.Windows.Forms.DataGridView(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.submitGrid = new System.Windows.Forms.DataGridView(); this.source = new System.Windows.Forms.RichTextBox(); + this.resGrid = new System.Windows.Forms.DataGridView(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); this.SuspendLayout(); // // numericUpDown1 // this.numericUpDown1.Location = new System.Drawing.Point(3, 3); + this.numericUpDown1.Maximum = new decimal(new int[] { + 1000000, + 0, + 0, + 0}); this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Size = new System.Drawing.Size(120, 20); this.numericUpDown1.TabIndex = 0; @@ -96,17 +101,6 @@ this.splitContainer1.SplitterDistance = 177; this.splitContainer1.TabIndex = 7; // - // resGrid - // - this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.resGrid.Location = new System.Drawing.Point(0, 0); - this.resGrid.Name = "resGrid"; - this.resGrid.RowHeadersVisible = false; - this.resGrid.Size = new System.Drawing.Size(396, 173); - this.resGrid.TabIndex = 5; - this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); - // // splitContainer2 // this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; @@ -146,6 +140,17 @@ this.source.TabIndex = 3; this.source.Text = ""; // + // resGrid + // + this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.resGrid.Location = new System.Drawing.Point(0, 0); + this.resGrid.Name = "resGrid"; + this.resGrid.RowHeadersVisible = false; + this.resGrid.Size = new System.Drawing.Size(396, 173); + this.resGrid.TabIndex = 5; + this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); + // // IoiInformerControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -161,11 +166,11 @@ this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false); this.splitContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -73,19 +73,21 @@ FileName = "IoiResults\\" + message.Submit.form.ToString() + " form\\" + message.Submit.name + "\\" + message.Submit.submit.pbolemID.ToString() + ".html"; source.Text = message.Submit.submit.sourceCode; submitGrid.ColumnCount = 2; - submitGrid.RowCount = 6; + submitGrid.RowCount = 7; submitGrid[0, 0].Value = "\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; submitGrid[1, 0].Value = message.Submit.name; submitGrid[0, 1].Value = "\xCA\xEB\xE0\xF1:"; submitGrid[1, 1].Value = message.Submit.form.ToString(); - submitGrid[0, 2].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; - submitGrid[1, 2].Value = message.Submit.submit.pbolemID.ToString(); - submitGrid[0, 3].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - submitGrid[1, 3].Value = GetLanguage(message.Submit.submit.language); - submitGrid[0, 4].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - submitGrid[1, 4].Value = message.Submit.submit.id.ToString(); - submitGrid[0, 5].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + submitGrid[0, 2].Value = "\xD8\xEA\xEE\xEB\xE0:"; + submitGrid[1, 2].Value = message.Submit.school; + submitGrid[0, 3].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + submitGrid[1, 3].Value = message.Submit.submit.pbolemID.ToString(); + submitGrid[0, 4].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + submitGrid[1, 4].Value = GetLanguage(message.Submit.submit.language); + submitGrid[0, 5].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + submitGrid[1, 5].Value = message.Submit.submit.id.ToString(); + submitGrid[0, 6].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; if (message.testResults != null) { @@ -94,7 +96,7 @@ allPoints += message.testResults[i].points; myPoints += (message.testResults[i].res == "Accepted") ? message.testResults[i].points : 0; } - submitGrid[1, 5].Value = myPoints.ToString() + "/" + allPoints.ToString(); + submitGrid[1, 6].Value = myPoints.ToString() + "/" + allPoints.ToString(); resGrid.ColumnCount = 8; resGrid.RowCount = message.testResults.Length + 2; Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -38,7 +38,7 @@ if (((IoiInformerControl)base.Control).NeedToFile()) { HtmlBuilder h = new HtmlBuilder(); - string[,] subdata = new string[6, 2]; + string[,] subdata = new string[7, 2]; h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF"; h.Head += "<meta HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; @@ -62,13 +62,15 @@ subdata[0, 1] = result.Submit.name; subdata[1, 0] = "\xCA\xEB\xE0\xF1:"; subdata[1, 1] = result.Submit.form.ToString(); - subdata[2, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; - subdata[2, 1] = result.Submit.submit.pbolemID.ToString(); - subdata[3, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - subdata[3, 1] = GetLanguage(result.Submit.submit.language); - subdata[4, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - subdata[4, 1] = result.Submit.submit.id.ToString(); - subdata[5, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + subdata[2, 0] = "\xD8\xEA\xEE\xEB\xE0:"; + subdata[2, 1] = result.Submit.school; + subdata[3, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + subdata[3, 1] = result.Submit.submit.pbolemID.ToString(); + subdata[4, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + subdata[4, 1] = GetLanguage(result.Submit.submit.language); + subdata[5, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + subdata[5, 1] = result.Submit.submit.id.ToString(); + subdata[6, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; if (result.testResults != null) { @@ -77,10 +79,10 @@ allPoints += result.testResults[i].points; myPoints += (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; } - subdata[5, 1] = myPoints.ToString() + "/" + allPoints.ToString(); + subdata[6, 1] = myPoints.ToString() + "/" + allPoints.ToString(); } else - subdata[5, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + subdata[6, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; h.AddTable(subdata, new string[0], "", 2, 0, 5, "center"); Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -41,9 +41,13 @@ 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.groupBox1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.SuspendLayout(); // // label1 @@ -88,6 +92,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.numericUpDown1); this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.problemTextBox); @@ -98,7 +103,7 @@ 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, 177); + this.groupBox1.Size = new System.Drawing.Size(450, 163); 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"; @@ -121,15 +126,16 @@ this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(173, 16); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.Size = new System.Drawing.Size(48, 13); this.label3.TabIndex = 13; - this.label3.Text = "Problem"; + this.label3.Text = "Problem:"; // // problemTextBox // - this.problemTextBox.Location = new System.Drawing.Point(224, 13); + this.problemTextBox.Enabled = false; + this.problemTextBox.Location = new System.Drawing.Point(281, 13); this.problemTextBox.Name = "problemTextBox"; - this.problemTextBox.Size = new System.Drawing.Size(100, 20); + this.problemTextBox.Size = new System.Drawing.Size(24, 20); this.problemTextBox.TabIndex = 12; this.problemTextBox.Text = "1"; // @@ -138,9 +144,9 @@ this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(6, 16); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(55, 13); + this.label4.Size = new System.Drawing.Size(58, 13); this.label4.TabIndex = 11; - this.label4.Text = "Language"; + this.label4.Text = "Language:"; // // languageTextBox // @@ -155,7 +161,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, 148); + this.submitButton.Location = new System.Drawing.Point(6, 134); this.submitButton.Name = "submitButton"; this.submitButton.Size = new System.Drawing.Size(438, 23); this.submitButton.TabIndex = 9; @@ -171,7 +177,7 @@ 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, 103); + this.sourceTextBox.Size = new System.Drawing.Size(438, 89); this.sourceTextBox.TabIndex = 8; this.sourceTextBox.Text = "begin\r\nend."; // @@ -180,21 +186,64 @@ 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.Location = new System.Drawing.Point(6, 82); 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.Size = new System.Drawing.Size(450, 317); + 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) + | System.Windows.Forms.AnchorStyles.Right))); + this.schoolTextBox.Location = new System.Drawing.Point(47, 56); + this.schoolTextBox.Name = "schoolTextBox"; + this.schoolTextBox.Size = new System.Drawing.Size(409, 20); + this.schoolTextBox.TabIndex = 8; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(3, 59); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(43, 13); + this.label5.TabIndex = 7; + this.label5.Text = "School:"; + // // IoiSubmitGuiControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.schoolTextBox); + this.Controls.Add(this.label5); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.formComboBox); this.Controls.Add(this.label2); @@ -206,6 +255,7 @@ this.groupBox1.PerformLayout(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -226,5 +276,8 @@ private System.Windows.Forms.Button submitButton; private System.Windows.Forms.TextBox sourceTextBox; private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.TextBox schoolTextBox; + private System.Windows.Forms.Label label5; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -50,5 +50,10 @@ { view.AddRow(new LogDataGridView.SystemMessage(text, type)); } + + private void numericUpDown1_ValueChanged(object sender, EventArgs e) + { + problemTextBox.Text = numericUpDown1.Value.ToString(); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |