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. |