From: <br...@us...> - 2008-12-09 20:36:26
|
Revision: 440 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=440&view=rev Author: brus07 Date: 2008-12-09 20:36:22 +0000 (Tue, 09 Dec 2008) Log Message: ----------- Added LanguageID and ProblemID to Submit structure. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/Submit.cs ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Library/testData/data.xsx ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs ACMServer/trunk/ACMServer/Runner/Class1.cs Modified: ACMServer/trunk/ACMServer/Library/Data/Submit.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/Submit.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Library/Data/Submit.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -11,6 +11,8 @@ { [XmlElement("id", typeof(int))] public int id; + [XmlElement("problem", typeof(int))] + public int pbolemID; [XmlElement("sourceCode", typeof(string))] public string sourceCode; [XmlElement("language", typeof(int))] Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2008-12-09 20:36:22 UTC (rev 440) @@ -4,6 +4,7 @@ <xs:sequence maxOccurs="1"> <!-- потрібно щоб ці записи могли слідувати у довільному порядку --> <xs:element name="id" type="xs:positiveInteger" /> + <xs:element name="problem" type="xs:positiveInteger" /> <xs:element name="sourceCode" type="xs:string" /> <xs:element name="language"> <!-- обмеження для ID мови програмування --> Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsx =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsx 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsx 2008-12-09 20:36:22 UTC (rev 440) @@ -14,16 +14,16 @@ </_x0028_group1_x0029__XmlSequence> </submitList_XmlElement> <resultType_XmlComplexType left="1317" top="7932" width="5292" height="2831" selected="0" zOrder="19" index="2" expanded="1"> - <submit_XmlElement left="7243" top="7932" width="5292" height="2831" selected="0" zOrder="21" index="0" expanded="1"> + <submit_XmlElement left="7243" top="7932" width="5292" height="2831" selected="0" zOrder="21" index="4" expanded="1"> <language_XmlElement left="13169" top="8990" width="5292" height="714" selected="0" zOrder="24" index="2" expanded="0" /> </submit_XmlElement> </resultType_XmlComplexType> <result_XmlElement left="1317" top="11271" width="5292" height="2831" selected="0" zOrder="27" index="3" expanded="1"> - <submit_XmlElement left="7243" top="11271" width="5292" height="2831" selected="0" zOrder="29" index="0" expanded="1"> + <submit_XmlElement left="7243" top="11271" width="5292" height="2831" selected="0" zOrder="29" index="4" expanded="1"> <language_XmlElement left="13169" top="12329" width="5292" height="714" selected="0" zOrder="32" index="2" expanded="0" /> </submit_XmlElement> </result_XmlElement> <submit_XmlElement left="2910" top="14393" width="5292" height="2831" selected="0" zOrder="35" index="4" expanded="1"> - <language_XmlElement left="8836" top="15385" width="5292" height="714" selected="0" zOrder="37" index="2" expanded="0" /> + <language_XmlElement left="8836" top="15451" width="5292" height="714" selected="0" zOrder="37" index="2" expanded="0" /> </submit_XmlElement> </XSDDesignerLayout> \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIPlugin.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -15,11 +15,12 @@ ((SubmitterGUIUserControl)base.Control).SetPlugin(this); } - public bool SendSubmit(string sourceCode, int language) + public bool SendSubmit(string sourceCode, int language, int problem) { Submit submit = new Submit(); submitID++; submit.id = submitID; + submit.pbolemID = problem; submit.sourceCode = sourceCode; submit.language = language; Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.Designer.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -33,6 +33,8 @@ this.button1 = new System.Windows.Forms.Button(); this.languageTextBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.problemTextBox = new System.Windows.Forms.TextBox(); this.SuspendLayout(); // // panel1 @@ -75,7 +77,7 @@ this.languageTextBox.Name = "languageTextBox"; this.languageTextBox.Size = new System.Drawing.Size(100, 20); this.languageTextBox.TabIndex = 3; - this.languageTextBox.Text = "2"; + this.languageTextBox.Text = "1"; // // label1 // @@ -86,10 +88,29 @@ this.label1.TabIndex = 4; this.label1.Text = "Language"; // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(170, 6); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(45, 13); + this.label2.TabIndex = 6; + this.label2.Text = "Problem"; + // + // problemTextBox + // + this.problemTextBox.Location = new System.Drawing.Point(221, 3); + this.problemTextBox.Name = "problemTextBox"; + this.problemTextBox.Size = new System.Drawing.Size(100, 20); + this.problemTextBox.TabIndex = 5; + this.problemTextBox.Text = "1"; + // // SubmitterGUIUserControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.label2); + this.Controls.Add(this.problemTextBox); this.Controls.Add(this.label1); this.Controls.Add(this.languageTextBox); this.Controls.Add(this.button1); @@ -109,5 +130,7 @@ private System.Windows.Forms.Button button1; private System.Windows.Forms.TextBox languageTextBox; private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox problemTextBox; } } Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SubmitterGUIPlugin/SubmitterGUIUserControl.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -39,7 +39,8 @@ private void button1_Click(object sender, EventArgs e) { int lang = Int32.Parse(languageTextBox.Text); - plugin.SendSubmit(sourceTextBox.Text, lang); + int problem = Int32.Parse(problemTextBox.Text); + plugin.SendSubmit(sourceTextBox.Text, lang, problem); } } } Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2008-12-09 15:17:25 UTC (rev 439) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2008-12-09 20:36:22 UTC (rev 440) @@ -38,14 +38,13 @@ string code = submit.sourceCode; code = HtmlEntityDecode(code); string id = submit.id.ToString(); - Result result = new Result(submit); try { //Console.SetOut(File.CreateText("logout.txt")); string[] data = File.ReadAllLines("InData.txt"); - + data[2] = data[2] + submit.pbolemID.ToString() + "\\"; string src = code; TestEnv test = new TestEnv(src, data[0], data[1], data[2]); test.Compile(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |