Exemplo n.º 1
0
	public MainForm ()
	{
		// 
		// _textBox
		// 
		_textBox = new TextBox ();
		_textBox.Location = new Point (8, 8);
		_textBox.Size = new Size (210, 20);
		// 
		// _errorProvider
		// 
		_errorProvider = new ErrorProvider ();
		_errorProvider.SetIconAlignment (_textBox, ErrorIconAlignment.MiddleRight);
		_errorProvider.SetIconPadding (_textBox, 2);
		_errorProvider.ContainerControl = this;
		Controls.Add (_textBox);
		// 
		// MainForm
		// 
		ClientSize = new Size (240, 50);
		Location = new Point (280, 100);
		StartPosition = FormStartPosition.Manual;
		Text = "bug #329714";
		Load += new EventHandler (MainForm_Load);
	}
Exemplo n.º 2
0
 public static bool numberOnly(ErrorProvider errorProvider1, Control control1, string value, string message = "Number Only")
 {
     if (!numberchk.IsMatch(value))
     {
         errorProvider1.SetError(control1, message);
         return false;
     }
     return true;
 }
Exemplo n.º 3
0
 public static bool lengthMin(ErrorProvider errorProvider1, Control control1, string value, int minlength, string message = "Invalid Length")
 {
     if (value.Length < minlength)
     {
         errorProvider1.SetError(control1, message);
         return false;
     }
     return true;
 }
Exemplo n.º 4
0
 public static bool email(ErrorProvider errorProvider1, Control control1, string value, string message = "Invalid Email")
 {
     if (!emailchk.IsMatch(value))
     {
         errorProvider1.SetError(control1, message);
         return false;
     }
     return true;
 }
Exemplo n.º 5
0
 public frm_AddAppointment()
 {
     InitializeComponent();
     this.errorProvider = new ErrorProvider();
 }
 public static bool ExistsError(this ErrorProvider errorProvider)
 {
     return(existsError);
 }
Exemplo n.º 7
0
 private void InitializeComponent()
 {
     this.components                 = new Container();
     this.toolTip                    = new ToolTip(this.components);
     this.pictureBoxScrollUp         = new PictureBox();
     this.pictureBoxScrollDown       = new PictureBox();
     this.pictureBoxScrollLeft       = new PictureBox();
     this.pictureBoxScrollRight      = new PictureBox();
     this.pictureBoxSample           = new PictureBox();
     this.groupBox1                  = new GroupBox();
     this.textBoxPositionValue       = new TextBox();
     this.radioButtonPositionPercent = new RadioButton();
     this.radioButtonPositionPixel   = new RadioButton();
     this.radioButtonPositionBottom  = new RadioButton();
     this.radioButtonPositionTop     = new RadioButton();
     this.groupBox2                  = new GroupBox();
     this.radioButtonScrollOnOff     = new RadioButton();
     this.radioButtonScrollOn        = new RadioButton();
     this.buttonOK                   = new Button();
     this.buttonCancel               = new Button();
     this.timer = new Timer(this.components);
     this.pictureBoxImageSmall = new PictureBox();
     this.pictureBoxImageLarge = new PictureBox();
     this.groupBox3            = new GroupBox();
     this.label1 = new Label();
     this.numericUpDownTextHeight = new NumericUpDown();
     this.errorProvider           = new ErrorProvider(this.components);
     ((ISupportInitialize)this.pictureBoxScrollUp).BeginInit();
     ((ISupportInitialize)this.pictureBoxScrollDown).BeginInit();
     ((ISupportInitialize)this.pictureBoxScrollLeft).BeginInit();
     ((ISupportInitialize)this.pictureBoxScrollRight).BeginInit();
     ((ISupportInitialize)this.pictureBoxSample).BeginInit();
     this.groupBox1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     ((ISupportInitialize)this.pictureBoxImageSmall).BeginInit();
     ((ISupportInitialize)this.pictureBoxImageLarge).BeginInit();
     this.groupBox3.SuspendLayout();
     this.numericUpDownTextHeight.BeginInit();
     ((ISupportInitialize)this.errorProvider).BeginInit();
     base.SuspendLayout();
     this.pictureBoxScrollUp.Location = new Point(0x71, 23);
     this.pictureBoxScrollUp.Name     = "pictureBoxScrollUp";
     this.pictureBoxScrollUp.Size     = new Size(24, 24);
     this.pictureBoxScrollUp.TabIndex = 0;
     this.pictureBoxScrollUp.TabStop  = false;
     this.toolTip.SetToolTip(this.pictureBoxScrollUp, "Scroll from bottom to top");
     this.pictureBoxScrollUp.Click     += new EventHandler(this.pictureBoxScrollUp_Click);
     this.pictureBoxScrollDown.Location = new Point(0x71, 0x5b);
     this.pictureBoxScrollDown.Name     = "pictureBoxScrollDown";
     this.pictureBoxScrollDown.Size     = new Size(24, 24);
     this.pictureBoxScrollDown.TabIndex = 1;
     this.pictureBoxScrollDown.TabStop  = false;
     this.toolTip.SetToolTip(this.pictureBoxScrollDown, "Scroll from top to bottom");
     this.pictureBoxScrollDown.Click   += new EventHandler(this.pictureBoxScrollDown_Click);
     this.pictureBoxScrollLeft.Location = new Point(0x2f, 0x39);
     this.pictureBoxScrollLeft.Name     = "pictureBoxScrollLeft";
     this.pictureBoxScrollLeft.Size     = new Size(24, 24);
     this.pictureBoxScrollLeft.TabIndex = 2;
     this.pictureBoxScrollLeft.TabStop  = false;
     this.toolTip.SetToolTip(this.pictureBoxScrollLeft, "Scroll from right to left");
     this.pictureBoxScrollLeft.Click    += new EventHandler(this.pictureBoxScrollLeft_Click);
     this.pictureBoxScrollRight.Location = new Point(0xb3, 0x39);
     this.pictureBoxScrollRight.Name     = "pictureBoxScrollRight";
     this.pictureBoxScrollRight.Size     = new Size(24, 24);
     this.pictureBoxScrollRight.TabIndex = 3;
     this.pictureBoxScrollRight.TabStop  = false;
     this.toolTip.SetToolTip(this.pictureBoxScrollRight, "Scroll from left to right");
     this.pictureBoxScrollRight.Click += new EventHandler(this.pictureBoxScrollRight_Click);
     this.pictureBoxSample.Location    = new Point(0x4d, 0x35);
     this.pictureBoxSample.Name        = "pictureBoxSample";
     this.pictureBoxSample.Size        = new Size(0x60, 0x20);
     this.pictureBoxSample.TabIndex    = 4;
     this.pictureBoxSample.TabStop     = false;
     this.pictureBoxSample.Paint      += new PaintEventHandler(this.pictureBoxSample_Paint);
     this.groupBox1.Controls.Add(this.textBoxPositionValue);
     this.groupBox1.Controls.Add(this.radioButtonPositionPercent);
     this.groupBox1.Controls.Add(this.radioButtonPositionPixel);
     this.groupBox1.Controls.Add(this.radioButtonPositionBottom);
     this.groupBox1.Controls.Add(this.radioButtonPositionTop);
     this.groupBox1.Location                  = new Point(12, 0xcd);
     this.groupBox1.Name                      = "groupBox1";
     this.groupBox1.Size                      = new Size(0xe2, 0x7e);
     this.groupBox1.TabIndex                  = 5;
     this.groupBox1.TabStop                   = false;
     this.groupBox1.Text                      = "Position";
     this.textBoxPositionValue.Enabled        = false;
     this.textBoxPositionValue.Location       = new Point(0xa7, 0x52);
     this.textBoxPositionValue.Name           = "textBoxPositionValue";
     this.textBoxPositionValue.Size           = new Size(0x29, 20);
     this.textBoxPositionValue.TabIndex       = 4;
     this.textBoxPositionValue.Leave         += new EventHandler(this.textBoxPositionValue_Leave);
     this.radioButtonPositionPercent.AutoSize = true;
     this.radioButtonPositionPercent.Location = new Point(20, 0x5f);
     this.radioButtonPositionPercent.Name     = "radioButtonPositionPercent";
     this.radioButtonPositionPercent.Size     = new Size(0x80, 0x11);
     this.radioButtonPositionPercent.TabIndex = 3;
     this.radioButtonPositionPercent.Text     = "Percent vertical offset";
     this.radioButtonPositionPercent.UseVisualStyleBackColor = true;
     this.radioButtonPositionPercent.CheckedChanged         += new EventHandler(this.radioButtonPositionPercent_CheckedChanged);
     this.radioButtonPositionPixel.AutoSize = true;
     this.radioButtonPositionPixel.Location = new Point(20, 0x48);
     this.radioButtonPositionPixel.Name     = "radioButtonPositionPixel";
     this.radioButtonPositionPixel.Size     = new Size(0x71, 0x11);
     this.radioButtonPositionPixel.TabIndex = 2;
     this.radioButtonPositionPixel.Text     = "Pixel vertical offset";
     this.radioButtonPositionPixel.UseVisualStyleBackColor = true;
     this.radioButtonPositionPixel.CheckedChanged         += new EventHandler(this.radioButtonPositionPixel_CheckedChanged);
     this.radioButtonPositionBottom.AutoSize = true;
     this.radioButtonPositionBottom.Location = new Point(20, 0x31);
     this.radioButtonPositionBottom.Name     = "radioButtonPositionBottom";
     this.radioButtonPositionBottom.Size     = new Size(0x3a, 0x11);
     this.radioButtonPositionBottom.TabIndex = 1;
     this.radioButtonPositionBottom.Text     = "Bottom";
     this.radioButtonPositionBottom.UseVisualStyleBackColor = true;
     this.radioButtonPositionBottom.CheckedChanged         += new EventHandler(this.radioButtonPositionBottom_CheckedChanged);
     this.radioButtonPositionTop.AutoSize = true;
     this.radioButtonPositionTop.Checked  = true;
     this.radioButtonPositionTop.Location = new Point(20, 26);
     this.radioButtonPositionTop.Name     = "radioButtonPositionTop";
     this.radioButtonPositionTop.Size     = new Size(0x2c, 0x11);
     this.radioButtonPositionTop.TabIndex = 0;
     this.radioButtonPositionTop.TabStop  = true;
     this.radioButtonPositionTop.Text     = "Top";
     this.radioButtonPositionTop.UseVisualStyleBackColor = true;
     this.radioButtonPositionTop.CheckedChanged         += new EventHandler(this.radioButtonPositionTop_CheckedChanged);
     this.groupBox2.Controls.Add(this.radioButtonScrollOnOff);
     this.groupBox2.Controls.Add(this.radioButtonScrollOn);
     this.groupBox2.Location = new Point(12, 0x15b);
     this.groupBox2.Name     = "groupBox2";
     this.groupBox2.Size     = new Size(0xe2, 0x48);
     this.groupBox2.TabIndex = 6;
     this.groupBox2.TabStop  = false;
     this.groupBox2.Text     = "How to scroll";
     this.radioButtonScrollOnOff.AutoSize = true;
     this.radioButtonScrollOnOff.Checked  = true;
     this.radioButtonScrollOnOff.Location = new Point(20, 0x13);
     this.radioButtonScrollOnOff.Name     = "radioButtonScrollOnOff";
     this.radioButtonScrollOnOff.Size     = new Size(0x66, 0x11);
     this.radioButtonScrollOnOff.TabIndex = 0;
     this.radioButtonScrollOnOff.TabStop  = true;
     this.radioButtonScrollOnOff.Text     = "Scroll on and off";
     this.radioButtonScrollOnOff.UseVisualStyleBackColor = true;
     this.radioButtonScrollOnOff.CheckedChanged         += new EventHandler(this.RespondToChange);
     this.radioButtonScrollOn.AutoSize = true;
     this.radioButtonScrollOn.Location = new Point(20, 0x2a);
     this.radioButtonScrollOn.Name     = "radioButtonScrollOn";
     this.radioButtonScrollOn.Size     = new Size(0x6d, 0x11);
     this.radioButtonScrollOn.TabIndex = 1;
     this.radioButtonScrollOn.Text     = "Scroll and stay on";
     this.radioButtonScrollOn.UseVisualStyleBackColor = true;
     this.radioButtonScrollOn.CheckedChanged         += new EventHandler(this.RespondToChange);
     this.buttonOK.Anchor                      = AnchorStyles.Right | AnchorStyles.Bottom;
     this.buttonOK.DialogResult                = System.Windows.Forms.DialogResult.OK;
     this.buttonOK.Location                    = new Point(0x52, 0x1b2);
     this.buttonOK.Name                        = "buttonOK";
     this.buttonOK.Size                        = new Size(0x4b, 23);
     this.buttonOK.TabIndex                    = 7;
     this.buttonOK.Text                        = "OK";
     this.buttonOK.UseVisualStyleBackColor     = true;
     this.buttonOK.Click                      += new EventHandler(this.buttonOK_Click);
     this.buttonCancel.Anchor                  = AnchorStyles.Right | AnchorStyles.Bottom;
     this.buttonCancel.DialogResult            = System.Windows.Forms.DialogResult.Cancel;
     this.buttonCancel.Location                = new Point(0xa3, 0x1b2);
     this.buttonCancel.Name                    = "buttonCancel";
     this.buttonCancel.Size                    = new Size(0x4b, 23);
     this.buttonCancel.TabIndex                = 8;
     this.buttonCancel.Text                    = "Cancel";
     this.buttonCancel.UseVisualStyleBackColor = true;
     this.timer.Interval                       = 50;
     this.timer.Tick += new EventHandler(this.timer_Tick);
     this.pictureBoxImageSmall.Location = new Point(0x1f, 23);
     this.pictureBoxImageSmall.Name     = "pictureBoxImageSmall";
     this.pictureBoxImageSmall.Size     = new Size(0x4c, 14);
     this.pictureBoxImageSmall.SizeMode = PictureBoxSizeMode.AutoSize;
     this.pictureBoxImageSmall.TabIndex = 9;
     this.pictureBoxImageSmall.TabStop  = false;
     this.pictureBoxImageSmall.Visible  = false;
     this.pictureBoxImageLarge.Location = new Point(0x1f, 0x5b);
     this.pictureBoxImageLarge.Name     = "pictureBoxImageLarge";
     this.pictureBoxImageLarge.Size     = new Size(0x4c, 28);
     this.pictureBoxImageLarge.SizeMode = PictureBoxSizeMode.AutoSize;
     this.pictureBoxImageLarge.TabIndex = 10;
     this.pictureBoxImageLarge.TabStop  = false;
     this.pictureBoxImageLarge.Visible  = false;
     this.groupBox3.Controls.Add(this.label1);
     this.groupBox3.Controls.Add(this.numericUpDownTextHeight);
     this.groupBox3.Location = new Point(12, 0x8d);
     this.groupBox3.Name     = "groupBox3";
     this.groupBox3.Size     = new Size(0xe1, 0x35);
     this.groupBox3.TabIndex = 11;
     this.groupBox3.TabStop  = false;
     this.groupBox3.Text     = "Text height";
     this.label1.AutoSize    = true;
     this.label1.Location    = new Point(0x77, 23);
     this.label1.Name        = "label1";
     this.label1.Size        = new Size(0x21, 13);
     this.label1.TabIndex    = 1;
     this.label1.Text        = "pixels";
     this.numericUpDownTextHeight.Location = new Point(0x48, 0x15);
     int[] textHeight = new int[4];
     textHeight[0] = 8;
     this.numericUpDownTextHeight.Minimum  = new decimal(textHeight);
     this.numericUpDownTextHeight.Name     = "numericUpDownTextHeight";
     this.numericUpDownTextHeight.Size     = new Size(0x29, 20);
     this.numericUpDownTextHeight.TabIndex = 0;
     int[] textHeightValue = new int[4];
     textHeightValue[0] = 8;
     this.numericUpDownTextHeight.Value  = new decimal(textHeightValue);
     this.errorProvider.ContainerControl = this;
     base.AcceptButton        = this.buttonOK;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     base.CancelButton        = this.buttonCancel;
     base.ClientSize          = new Size(250, 0x1d5);
     base.Controls.Add(this.groupBox3);
     base.Controls.Add(this.pictureBoxImageLarge);
     base.Controls.Add(this.pictureBoxImageSmall);
     base.Controls.Add(this.buttonCancel);
     base.Controls.Add(this.buttonOK);
     base.Controls.Add(this.groupBox2);
     base.Controls.Add(this.groupBox1);
     base.Controls.Add(this.pictureBoxSample);
     base.Controls.Add(this.pictureBoxScrollRight);
     base.Controls.Add(this.pictureBoxScrollLeft);
     base.Controls.Add(this.pictureBoxScrollDown);
     base.Controls.Add(this.pictureBoxScrollUp);
     base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     base.MaximizeBox     = false;
     base.MinimizeBox     = false;
     base.Name            = "AutoTextOptionsDialog";
     base.StartPosition   = FormStartPosition.CenterScreen;
     this.Text            = "Auto Text Options";
     base.FormClosing    += new FormClosingEventHandler(this.AutoTextOptionsDialog_FormClosing);
     base.Load           += new EventHandler(this.AutoTextOptionsDialog_Load);
     ((ISupportInitialize)this.pictureBoxScrollUp).EndInit();
     ((ISupportInitialize)this.pictureBoxScrollDown).EndInit();
     ((ISupportInitialize)this.pictureBoxScrollLeft).EndInit();
     ((ISupportInitialize)this.pictureBoxScrollRight).EndInit();
     ((ISupportInitialize)this.pictureBoxSample).EndInit();
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.groupBox2.ResumeLayout(false);
     this.groupBox2.PerformLayout();
     ((ISupportInitialize)this.pictureBoxImageSmall).EndInit();
     ((ISupportInitialize)this.pictureBoxImageLarge).EndInit();
     this.groupBox3.ResumeLayout(false);
     this.groupBox3.PerformLayout();
     this.numericUpDownTextHeight.EndInit();
     ((ISupportInitialize)this.errorProvider).EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Exemplo n.º 8
0
        public static void validationTxt(Guna.UI.WinForms.GunaTextBox txt, string errorMessage, ref string str, CancelEventArgs e, ErrorProvider errorProvider)
        {
            if (string.IsNullOrEmpty(txt.Text))
            {
                e.Cancel = true;
                //txt.Focus();
                errorProvider.SetError(txt, errorMessage);
            }
            else
            {
                //Phone
                if (txt.Name == "txtPhone")
                {
                    Regex r = new Regex(@"^[0]{1}[1]{1}[0-9]{9}$");
                    if (!(r.IsMatch(txt.Text)))
                    {
                        e.Cancel = true;
                        //txt.Focus();
                        errorProvider.SetError(txt, errorMessage);
                    }
                    else
                    {
                        e.Cancel = false;
                        errorProvider.SetError(txt, null);
                        str = txt.Text;
                    }
                }
                //Driver name and bus
                else if (txt.Name == "txtDriverName" || txt.Name == "txtBusName")
                {
                    Regex r = new Regex(@"^[a-zA-Z\x20]{3,25}$");
                    if (!(r.IsMatch(txt.Text)))
                    {
                        e.Cancel = true;
                        //txt.Focus();
                        errorProvider.SetError(txt, errorMessage);
                    }
                    else
                    {
                        e.Cancel = false;
                        errorProvider.SetError(txt, null);
                        str = txt.Text;
                    }
                }
                //LicenseNumber
                else if (txt.Name == "txtLicenseNumber")
                {
                    Regex r = new Regex(@"^[0-9]{1,4}[a-zA-Z]{1,4}$");
                    if (!(r.IsMatch(txt.Text)))
                    {
                        e.Cancel = true;
                        //txt.Focus();
                        errorProvider.SetError(txt, errorMessage);
                    }
                    else
                    {
                        e.Cancel = false;
                        errorProvider.SetError(txt, null);
                        str = txt.Text;
                    }
                }
                //SalaryDriver
                else if (txt.Name == "txtSalary")
                {
                    Regex r = new Regex(@"^[1-9]{1}[0-9]{3}[0-9]*$");
                    if (!(r.IsMatch(txt.Text)))
                    {
                        e.Cancel = true;
                        //txt.Focus();
                        errorProvider.SetError(txt, errorMessage);
                    }
                    else
                    {
                        e.Cancel = false;
                        errorProvider.SetError(txt, null);
                        str = txt.Text;
                    }
                }

                //StudentId
                else if (txt.Name == "txtStudentId" || txt.Name == "txtOneWay" || txt.Name == "txtRoundTrip")
                {
                    Regex r = new Regex(@"^[1-9]{1}[0-9]*$");
                    if (!(r.IsMatch(txt.Text)))
                    {
                        e.Cancel = true;
                        //txt.Focus();
                        errorProvider.SetError(txt, errorMessage);
                    }
                    else
                    {
                        e.Cancel = false;
                        errorProvider.SetError(txt, null);
                        str = txt.Text;
                    }
                }

                //Money
                else if (txt.Name == "txtMoney")
                {
                    Regex r = new Regex(@"^[1-9]{1}[0-9]*$");
                    if (!(r.IsMatch(txt.Text)))
                    {
                        e.Cancel = true;
                        //txt.Focus();
                        errorProvider.SetError(txt, errorMessage);
                    }
                    else
                    {
                        e.Cancel = false;
                        errorProvider.SetError(txt, null);
                        str = txt.Text;
                    }
                }

                //Name
                else
                {
                    Regex r = new Regex(@"^[a-zA-Z]{3,25}$");
                    if (!(r.IsMatch(txt.Text)))
                    {
                        e.Cancel = true;
                        //txt.Focus();
                        errorProvider.SetError(txt, errorMessage);
                    }
                    else
                    {
                        e.Cancel = false;
                        errorProvider.SetError(txt, null);
                        str = txt.Text;
                    }
                }
            }
        }
 public static void CustomSetError(this ErrorProvider errorProvider, Control control, string message)
 {
     errorProvider.SetError(control, message);
     existsError = true;
 }
Exemplo n.º 10
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GXDLMSTcpUdpSetupView));
     this.groupBox1             = new System.Windows.Forms.GroupBox();
     this.InactivityTimeoutTB   = new Gurux.DLMS.UI.GXValueField();
     this.InactivityTimeoutLbl  = new System.Windows.Forms.Label();
     this.MaxConnectionsTB      = new Gurux.DLMS.UI.GXValueField();
     this.MaxConnectionsLbl     = new System.Windows.Forms.Label();
     this.MaximumSegmentSizeTB  = new Gurux.DLMS.UI.GXValueField();
     this.MaximumSegmentSizeLbl = new System.Windows.Forms.Label();
     this.IPReferenceTB         = new Gurux.DLMS.UI.GXValueField();
     this.IPReferenceLbl        = new System.Windows.Forms.Label();
     this.PortTB         = new Gurux.DLMS.UI.GXValueField();
     this.PortLbl        = new System.Windows.Forms.Label();
     this.LogicalNameTB  = new Gurux.DLMS.UI.GXValueField();
     this.LogicalNameLbl = new System.Windows.Forms.Label();
     this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components);
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.Controls.Add(this.InactivityTimeoutTB);
     this.groupBox1.Controls.Add(this.InactivityTimeoutLbl);
     this.groupBox1.Controls.Add(this.MaxConnectionsTB);
     this.groupBox1.Controls.Add(this.MaxConnectionsLbl);
     this.groupBox1.Controls.Add(this.MaximumSegmentSizeTB);
     this.groupBox1.Controls.Add(this.MaximumSegmentSizeLbl);
     this.groupBox1.Controls.Add(this.IPReferenceTB);
     this.groupBox1.Controls.Add(this.IPReferenceLbl);
     this.groupBox1.Controls.Add(this.PortTB);
     this.groupBox1.Controls.Add(this.PortLbl);
     this.groupBox1.Controls.Add(this.LogicalNameTB);
     this.groupBox1.Controls.Add(this.LogicalNameLbl);
     this.groupBox1.Location = new System.Drawing.Point(12, 12);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(296, 184);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "TCP/UDP Setup Object";
     this.groupBox1.UseCompatibleTextRendering = true;
     //
     // InactivityTimeoutTB
     //
     this.InactivityTimeoutTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                             | System.Windows.Forms.AnchorStyles.Right)));
     this.InactivityTimeoutTB.Index    = 6;
     this.InactivityTimeoutTB.Location = new System.Drawing.Point(102, 151);
     this.InactivityTimeoutTB.Name     = "InactivityTimeoutTB";
     this.InactivityTimeoutTB.Size     = new System.Drawing.Size(171, 20);
     this.InactivityTimeoutTB.TabIndex = 11;
     this.InactivityTimeoutTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // InactivityTimeoutLbl
     //
     this.InactivityTimeoutLbl.AutoSize = true;
     this.InactivityTimeoutLbl.Location = new System.Drawing.Point(6, 154);
     this.InactivityTimeoutLbl.Name     = "InactivityTimeoutLbl";
     this.InactivityTimeoutLbl.Size     = new System.Drawing.Size(93, 13);
     this.InactivityTimeoutLbl.TabIndex = 10;
     this.InactivityTimeoutLbl.Text     = "Inactivity Timeout:";
     //
     // MaxConnectionsTB
     //
     this.MaxConnectionsTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.MaxConnectionsTB.Index    = 5;
     this.MaxConnectionsTB.Location = new System.Drawing.Point(102, 125);
     this.MaxConnectionsTB.Name     = "MaxConnectionsTB";
     this.MaxConnectionsTB.Size     = new System.Drawing.Size(171, 20);
     this.MaxConnectionsTB.TabIndex = 9;
     this.MaxConnectionsTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // MaxConnectionsLbl
     //
     this.MaxConnectionsLbl.AutoSize = true;
     this.MaxConnectionsLbl.Location = new System.Drawing.Point(6, 128);
     this.MaxConnectionsLbl.Name     = "MaxConnectionsLbl";
     this.MaxConnectionsLbl.Size     = new System.Drawing.Size(92, 13);
     this.MaxConnectionsLbl.TabIndex = 8;
     this.MaxConnectionsLbl.Text     = "Max Connections:";
     //
     // MaximumSegmentSizeTB
     //
     this.MaximumSegmentSizeTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));
     this.MaximumSegmentSizeTB.Index    = 4;
     this.MaximumSegmentSizeTB.Location = new System.Drawing.Point(102, 99);
     this.MaximumSegmentSizeTB.Name     = "MaximumSegmentSizeTB";
     this.MaximumSegmentSizeTB.Size     = new System.Drawing.Size(171, 20);
     this.MaximumSegmentSizeTB.TabIndex = 7;
     this.MaximumSegmentSizeTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // MaximumSegmentSizeLbl
     //
     this.MaximumSegmentSizeLbl.AutoSize = true;
     this.MaximumSegmentSizeLbl.Location = new System.Drawing.Point(6, 102);
     this.MaximumSegmentSizeLbl.Name     = "MaximumSegmentSizeLbl";
     this.MaximumSegmentSizeLbl.Size     = new System.Drawing.Size(98, 13);
     this.MaximumSegmentSizeLbl.TabIndex = 6;
     this.MaximumSegmentSizeLbl.Text     = "Max Segment Size:";
     //
     // IPReferenceTB
     //
     this.IPReferenceTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.IPReferenceTB.Index    = 3;
     this.IPReferenceTB.Location = new System.Drawing.Point(102, 73);
     this.IPReferenceTB.Name     = "IPReferenceTB";
     this.IPReferenceTB.Size     = new System.Drawing.Size(171, 20);
     this.IPReferenceTB.TabIndex = 5;
     this.IPReferenceTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // IPReferenceLbl
     //
     this.IPReferenceLbl.AutoSize = true;
     this.IPReferenceLbl.Location = new System.Drawing.Point(6, 76);
     this.IPReferenceLbl.Name     = "IPReferenceLbl";
     this.IPReferenceLbl.Size     = new System.Drawing.Size(73, 13);
     this.IPReferenceLbl.TabIndex = 4;
     this.IPReferenceLbl.Text     = "IP Reference:";
     //
     // PortTB
     //
     this.PortTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.PortTB.Index    = 2;
     this.PortTB.Location = new System.Drawing.Point(102, 47);
     this.PortTB.Name     = "PortTB";
     this.PortTB.Size     = new System.Drawing.Size(171, 20);
     this.PortTB.TabIndex = 3;
     this.PortTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // PortLbl
     //
     this.PortLbl.AutoSize = true;
     this.PortLbl.Location = new System.Drawing.Point(6, 50);
     this.PortLbl.Name     = "PortLbl";
     this.PortLbl.Size     = new System.Drawing.Size(29, 13);
     this.PortLbl.TabIndex = 2;
     this.PortLbl.Text     = "Port:";
     //
     // LogicalNameTB
     //
     this.LogicalNameTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.LogicalNameTB.Index    = 1;
     this.LogicalNameTB.Location = new System.Drawing.Point(102, 21);
     this.LogicalNameTB.Name     = "LogicalNameTB";
     this.LogicalNameTB.Size     = new System.Drawing.Size(171, 20);
     this.LogicalNameTB.TabIndex = 1;
     this.LogicalNameTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // LogicalNameLbl
     //
     this.LogicalNameLbl.AutoSize = true;
     this.LogicalNameLbl.Location = new System.Drawing.Point(6, 24);
     this.LogicalNameLbl.Name     = "LogicalNameLbl";
     this.LogicalNameLbl.Size     = new System.Drawing.Size(75, 13);
     this.LogicalNameLbl.TabIndex = 0;
     this.LogicalNameLbl.Text     = "Logical Name:";
     //
     // errorProvider1
     //
     this.errorProvider1.BlinkStyle       = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     this.errorProvider1.ContainerControl = this;
     this.errorProvider1.Icon             = ((System.Drawing.Icon)(resources.GetObject("errorProvider1.Icon")));
     //
     // GXDLMSTcpUdpSetupView
     //
     this.ClientSize = new System.Drawing.Size(320, 199);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "GXDLMSTcpUdpSetupView";
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
     this.ResumeLayout(false);
 }
Exemplo n.º 11
0
 public ValidatorText(TextBox textBox, ErrorProvider errorProvider)
 {
     this.textBox       = textBox;
     this.errorProvider = errorProvider;
 }
Exemplo n.º 12
0
 private void InitializeComponent()
 {
     components    = new Container();
     errorProvider = new ErrorProvider(components);
     gBoxOverloadCurrentProtection = new GroupBoxEx();
     panel4              = new Panel();
     rBtnOcpOff          = new RadioButton();
     rBtnOcpOn           = new RadioButton();
     label5              = new Label();
     nudOcpTrim          = new NumericUpDownEx();
     suffixOCPtrim       = new Label();
     gBoxOutputPower     = new GroupBoxEx();
     nudOutputPower      = new NumericUpDownEx();
     suffixOutputPower   = new Label();
     gBoxPowerAmplifier  = new GroupBoxEx();
     cBoxPaRamp          = new ComboBox();
     panel1              = new Panel();
     rBtnPaControlPa1Pa2 = new RadioButton();
     rBtnPaControlPa1    = new RadioButton();
     rBtnPaControlPa0    = new RadioButton();
     suffixPAramp        = new Label();
     label3              = new Label();
     ((ISupportInitialize)errorProvider).BeginInit();
     gBoxOverloadCurrentProtection.SuspendLayout();
     panel4.SuspendLayout();
     nudOcpTrim.BeginInit();
     gBoxOutputPower.SuspendLayout();
     nudOutputPower.BeginInit();
     gBoxPowerAmplifier.SuspendLayout();
     panel1.SuspendLayout();
     base.SuspendLayout();
     errorProvider.ContainerControl = this;
     gBoxOverloadCurrentProtection.Controls.Add(panel4);
     gBoxOverloadCurrentProtection.Controls.Add(label5);
     gBoxOverloadCurrentProtection.Controls.Add(nudOcpTrim);
     gBoxOverloadCurrentProtection.Controls.Add(suffixOCPtrim);
     gBoxOverloadCurrentProtection.Location    = new Point(0xd9, 0x12b);
     gBoxOverloadCurrentProtection.Name        = "gBoxOverloadCurrentProtection";
     gBoxOverloadCurrentProtection.Size        = new Size(0x16c, 0x45);
     gBoxOverloadCurrentProtection.TabIndex    = 2;
     gBoxOverloadCurrentProtection.TabStop     = false;
     gBoxOverloadCurrentProtection.Text        = "Overload current protection";
     gBoxOverloadCurrentProtection.MouseEnter += new EventHandler(control_MouseEnter);
     gBoxOverloadCurrentProtection.MouseLeave += new EventHandler(control_MouseLeave);
     panel4.AutoSize     = true;
     panel4.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     panel4.Controls.Add(rBtnOcpOff);
     panel4.Controls.Add(rBtnOcpOn);
     panel4.Location     = new Point(0xc0, 0x13);
     panel4.Name         = "panel4";
     panel4.Size         = new Size(0x66, 20);
     panel4.TabIndex     = 0;
     rBtnOcpOff.AutoSize = true;
     rBtnOcpOff.Location = new Point(0x36, 3);
     rBtnOcpOff.Margin   = new Padding(3, 0, 3, 0);
     rBtnOcpOff.Name     = "rBtnOcpOff";
     rBtnOcpOff.Size     = new Size(0x2d, 0x11);
     rBtnOcpOff.TabIndex = 1;
     rBtnOcpOff.Text     = "OFF";
     rBtnOcpOff.UseVisualStyleBackColor = true;
     rBtnOcpOff.CheckedChanged         += new EventHandler(rBtnOcpOn_CheckedChanged);
     rBtnOcpOn.AutoSize = true;
     rBtnOcpOn.Checked  = true;
     rBtnOcpOn.Location = new Point(3, 3);
     rBtnOcpOn.Margin   = new Padding(3, 0, 3, 0);
     rBtnOcpOn.Name     = "rBtnOcpOn";
     rBtnOcpOn.Size     = new Size(0x29, 0x11);
     rBtnOcpOn.TabIndex = 0;
     rBtnOcpOn.TabStop  = true;
     rBtnOcpOn.Text     = "ON";
     rBtnOcpOn.UseVisualStyleBackColor = true;
     rBtnOcpOn.CheckedChanged         += new EventHandler(rBtnOcpOn_CheckedChanged);
     label5.AutoSize     = true;
     label5.Location     = new Point(6, 0x31);
     label5.Name         = "label5";
     label5.Size         = new Size(0x34, 13);
     label5.TabIndex     = 1;
     label5.Text         = "Trimming:";
     nudOcpTrim.Location = new Point(0xc0, 0x2d);
     int[] bits = new int[4];
     bits[0]            = 120;
     nudOcpTrim.Maximum = new decimal(bits);
     int[] numArray2 = new int[4];
     numArray2[0]                  = 0x2d;
     nudOcpTrim.Minimum            = new decimal(numArray2);
     nudOcpTrim.Name               = "nudOcpTrim";
     nudOcpTrim.Size               = new Size(0x7c, 20);
     nudOcpTrim.TabIndex           = 2;
     nudOcpTrim.ThousandsSeparator = true;
     int[] numArray3 = new int[4];
     numArray3[0]             = 100;
     nudOcpTrim.Value         = new decimal(numArray3);
     nudOcpTrim.ValueChanged += new EventHandler(nudOcpTrim_ValueChanged);
     suffixOCPtrim.AutoSize   = true;
     suffixOCPtrim.Location   = new Point(0x142, 0x31);
     suffixOCPtrim.Name       = "suffixOCPtrim";
     suffixOCPtrim.Size       = new Size(0x16, 13);
     suffixOCPtrim.TabIndex   = 3;
     suffixOCPtrim.Text       = "mA";
     gBoxOutputPower.Controls.Add(nudOutputPower);
     gBoxOutputPower.Controls.Add(suffixOutputPower);
     gBoxOutputPower.Location    = new Point(0xd9, 0xf9);
     gBoxOutputPower.Name        = "gBoxOutputPower";
     gBoxOutputPower.Size        = new Size(0x16c, 0x2c);
     gBoxOutputPower.TabIndex    = 1;
     gBoxOutputPower.TabStop     = false;
     gBoxOutputPower.Text        = "Output power";
     gBoxOutputPower.MouseEnter += new EventHandler(control_MouseEnter);
     gBoxOutputPower.MouseLeave += new EventHandler(control_MouseLeave);
     nudOutputPower.Location     = new Point(0xc0, 0x13);
     int[] numArray4 = new int[4];
     numArray4[0]           = 13;
     nudOutputPower.Maximum = new decimal(numArray4);
     int[] numArray5 = new int[4];
     numArray5[0]                      = 0x12;
     numArray5[3]                      = -2147483648;
     nudOutputPower.Minimum            = new decimal(numArray5);
     nudOutputPower.Name               = "nudOutputPower";
     nudOutputPower.Size               = new Size(0x7c, 20);
     nudOutputPower.TabIndex           = 0;
     nudOutputPower.ThousandsSeparator = true;
     int[] numArray6 = new int[4];
     numArray6[0]                 = 13;
     nudOutputPower.Value         = new decimal(numArray6);
     nudOutputPower.ValueChanged += new EventHandler(nudOutputPower_ValueChanged);
     suffixOutputPower.AutoSize   = true;
     suffixOutputPower.Location   = new Point(0x142, 0x17);
     suffixOutputPower.Name       = "suffixOutputPower";
     suffixOutputPower.Size       = new Size(0x1c, 13);
     suffixOutputPower.TabIndex   = 1;
     suffixOutputPower.Text       = "dBm";
     gBoxPowerAmplifier.Controls.Add(cBoxPaRamp);
     gBoxPowerAmplifier.Controls.Add(panel1);
     gBoxPowerAmplifier.Controls.Add(suffixPAramp);
     gBoxPowerAmplifier.Controls.Add(label3);
     gBoxPowerAmplifier.Location    = new Point(0xd9, 0x7c);
     gBoxPowerAmplifier.Name        = "gBoxPowerAmplifier";
     gBoxPowerAmplifier.Size        = new Size(0x16c, 0x77);
     gBoxPowerAmplifier.TabIndex    = 0;
     gBoxPowerAmplifier.TabStop     = false;
     gBoxPowerAmplifier.Text        = "Power Amplifier";
     gBoxPowerAmplifier.MouseEnter += new EventHandler(control_MouseEnter);
     gBoxPowerAmplifier.MouseLeave += new EventHandler(control_MouseLeave);
     cBoxPaRamp.Items.AddRange(new object[] { "3400", "2000", "1000", "500", "250", "125", "100", "62", "50", "40", "31", "25", "20", "15", "12", "10" });
     cBoxPaRamp.Location              = new Point(0xc0, 0x5e);
     cBoxPaRamp.Name                  = "cBoxPaRamp";
     cBoxPaRamp.Size                  = new Size(0x7c, 0x15);
     cBoxPaRamp.TabIndex              = 2;
     cBoxPaRamp.SelectedIndexChanged += new EventHandler(cBoxPaRamp_SelectedIndexChanged);
     panel1.AutoSize                  = true;
     panel1.AutoSizeMode              = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
     panel1.Controls.Add(rBtnPaControlPa1Pa2);
     panel1.Controls.Add(rBtnPaControlPa1);
     panel1.Controls.Add(rBtnPaControlPa0);
     panel1.Location = new Point(0x41, 0x13);
     panel1.Name     = "panel1";
     panel1.Size     = new Size(0xeb, 0x45);
     panel1.TabIndex = 0;
     rBtnPaControlPa1Pa2.AutoSize = true;
     rBtnPaControlPa1Pa2.Location = new Point(3, 0x31);
     rBtnPaControlPa1Pa2.Name     = "rBtnPaControlPa1Pa2";
     rBtnPaControlPa1Pa2.Size     = new Size(0xe5, 0x11);
     rBtnPaControlPa1Pa2.TabIndex = 2;
     rBtnPaControlPa1Pa2.Text     = "PA1 + PA2 -> Transmits on pin PA_BOOST";
     rBtnPaControlPa1Pa2.UseVisualStyleBackColor = true;
     rBtnPaControlPa1Pa2.CheckedChanged         += new EventHandler(rBtnPaControl_CheckedChanged);
     rBtnPaControlPa1.AutoSize = true;
     rBtnPaControlPa1.Location = new Point(3, 0x1a);
     rBtnPaControlPa1.Name     = "rBtnPaControlPa1";
     rBtnPaControlPa1.Size     = new Size(0xc5, 0x11);
     rBtnPaControlPa1.TabIndex = 1;
     rBtnPaControlPa1.Text     = "PA1 -> Transmits on pin PA_BOOST";
     rBtnPaControlPa1.UseVisualStyleBackColor = true;
     rBtnPaControlPa1.CheckedChanged         += new EventHandler(rBtnPaControl_CheckedChanged);
     rBtnPaControlPa0.AutoSize = true;
     rBtnPaControlPa0.Checked  = true;
     rBtnPaControlPa0.Location = new Point(3, 3);
     rBtnPaControlPa0.Name     = "rBtnPaControlPa0";
     rBtnPaControlPa0.Size     = new Size(0xa5, 0x11);
     rBtnPaControlPa0.TabIndex = 0;
     rBtnPaControlPa0.TabStop  = true;
     rBtnPaControlPa0.Text     = "PA0 -> Transmits on pin RFIO";
     rBtnPaControlPa0.UseVisualStyleBackColor = true;
     rBtnPaControlPa0.CheckedChanged         += new EventHandler(rBtnPaControl_CheckedChanged);
     suffixPAramp.AutoSize    = true;
     suffixPAramp.Location    = new Point(0x142, 0x62);
     suffixPAramp.Name        = "suffixPAramp";
     suffixPAramp.Size        = new Size(0x12, 13);
     suffixPAramp.TabIndex    = 3;
     suffixPAramp.Text        = "\x00b5s";
     label3.AutoSize          = true;
     label3.Location          = new Point(6, 0x62);
     label3.Name              = "label3";
     label3.Size              = new Size(50, 13);
     label3.TabIndex          = 1;
     label3.Text              = "PA ramp:";
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     base.Controls.Add(gBoxOverloadCurrentProtection);
     base.Controls.Add(gBoxOutputPower);
     base.Controls.Add(gBoxPowerAmplifier);
     base.Name = "TransmitterViewControl";
     base.Size = new Size(0x31f, 0x1ed);
     ((ISupportInitialize)errorProvider).EndInit();
     gBoxOverloadCurrentProtection.ResumeLayout(false);
     gBoxOverloadCurrentProtection.PerformLayout();
     panel4.ResumeLayout(false);
     panel4.PerformLayout();
     nudOcpTrim.EndInit();
     gBoxOutputPower.ResumeLayout(false);
     gBoxOutputPower.PerformLayout();
     nudOutputPower.EndInit();
     gBoxPowerAmplifier.ResumeLayout(false);
     gBoxPowerAmplifier.PerformLayout();
     panel1.ResumeLayout(false);
     panel1.PerformLayout();
     base.ResumeLayout(false);
 }
Exemplo n.º 13
0
        //Kontrollon nese ne tekstin e TextBox-it te dhene si parameter nuk ka shkronje te madhe ne fillim te tekstit
        public static void Check_nameReg(TextBox txt, string stre, ErrorProvider error, ErrorProvider tick)
        {
            Regex str = new Regex(@"^(\p{Lu}\p{Ll}+)$");

            if (txt.Text == string.Empty)
            {
                error.SetError(txt, "Please fill this field!");
                tick.SetError(txt, "");
            }
            else if (str.IsMatch(txt.Text))
            {
                error.SetError(txt, "");
                tick.SetError(txt, "Correct!");
            }
            else
            {
                Match txtnumbers = Regex.Match(txt.Text, @"[\p{P}\p{S}\p{N}\s]");
                if (txtnumbers.Success)
                {
                    error.SetError(txt, stre + " can't contain numbers, special symbols or white spaces!");
                    tick.SetError(txt, "");
                }
                else
                {
                    error.SetError(txt, "Please start with a upper case!");
                    tick.SetError(txt, "");
                }
            }
        }
        private void cmdYes_Click(object sender, EventArgs e)
        {
            if (lookupGudang1.GudangID == "" && GlobalVar.Gudang != "0901")
            {
                lookupGudang1.Focus();
                ErrorProvider err = new ErrorProvider();
                err.SetError(lookupGudang1, "harap di isi");
                return;
            }
            try
            {
                this.Cursor = Cursors.WaitCursor;
                DataTable dt = new DataTable();
                using (Database db = new Database())
                {
                    //db.Commands.Add(db.CreateCommand((this.lookupGudang1.GudangID != "") ? "[rsp_StokGudang_PosisiStok]" : "[rsp_StokGudang_PosisiStok_all]"));
                    db.Commands.Add(db.CreateCommand("[rsp_StokGudang_PosisiStokNew]"));
                    db.Commands[0].Parameters.Add(new Parameter("@fromDate", SqlDbType.DateTime, rangeDateBox1.FromDate.Value));
                    db.Commands[0].Parameters.Add(new Parameter("@toDate", SqlDbType.DateTime, rangeDateBox1.ToDate.Value));
                    db.Commands[0].Parameters.Add(new Parameter("@InitGudang", SqlDbType.VarChar, GlobalVar.Gudang));
                    db.Commands[0].Parameters.Add(new Parameter("@KodeGudang", SqlDbType.VarChar, lookupGudang1.GudangID));
                    db.Commands[0].Parameters.Add(new Parameter("@KelompokBarang", SqlDbType.VarChar, cboKel.Text));
                    db.Commands[0].Parameters.Add(new Parameter("@BarangID", SqlDbType.VarChar, lookupStock.BarangID));
                    if (rdbD2.Checked == true)
                    {
                        db.Commands[0].Parameters.Add(new Parameter("@Minus", SqlDbType.Int, 0));
                    }

                    if (cboPen.Text != "")
                    {
                        db.Commands[0].Parameters.Add(new Parameter("@PenanggungJawab", SqlDbType.VarChar, cboPen.Text));
                    }
                    if (!rdbB1.Checked)
                    {
                        db.Commands[0].Parameters.Add(new Parameter("@LPasif", SqlDbType.Bit, rdbB2.Checked ? 0 :1));
                    }

                    if (rdbA2.Checked == true)
                    {
                        db.Commands[0].Parameters.Add(new Parameter("@NamaStok", SqlDbType.VarChar, txtNama.Text));
                    }
                    db.Commands[0].Parameters.Add(new Parameter("@HppBeli", SqlDbType.Bit, 1));
                    dt = db.Commands[0].ExecuteDataTable();
                }

                if (dt.Rows.Count == 0)
                {
                    MessageBox.Show("No Data");
                }
                //DisplayReport(dt);
                DisplayReportExcell(dt);
            }
            catch (Exception ex)
            {
                Error.LogError(ex);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Exemplo n.º 15
0
 public Validation(Form Form = null, ErrorProvider ErrorProvider = null)
 {
     ValidateForm       = Form;
     this.ErrorProvider = ErrorProvider;
 }
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GXDLMSMBusSlavePortSetupView));
     this.groupBox1            = new System.Windows.Forms.GroupBox();
     this.BusAddressLbl        = new System.Windows.Forms.Label();
     this.AddressStateLbl      = new System.Windows.Forms.Label();
     this.AvailableBaudrateLbl = new System.Windows.Forms.Label();
     this.DefaultBaudrateLbl   = new System.Windows.Forms.Label();
     this.LogicalNameLbl       = new System.Windows.Forms.Label();
     this.errorProvider1       = new System.Windows.Forms.ErrorProvider(this.components);
     this.BusAddressTB         = new Gurux.DLMS.UI.GXValueField();
     this.AddressStateTB       = new Gurux.DLMS.UI.GXValueField();
     this.AvailableBaudrateTB  = new Gurux.DLMS.UI.GXValueField();
     this.DefaultBaudrateTB    = new Gurux.DLMS.UI.GXValueField();
     this.LogicalNameTB        = new Gurux.DLMS.UI.GXValueField();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.Controls.Add(this.BusAddressTB);
     this.groupBox1.Controls.Add(this.BusAddressLbl);
     this.groupBox1.Controls.Add(this.AddressStateTB);
     this.groupBox1.Controls.Add(this.AddressStateLbl);
     this.groupBox1.Controls.Add(this.AvailableBaudrateTB);
     this.groupBox1.Controls.Add(this.AvailableBaudrateLbl);
     this.groupBox1.Controls.Add(this.DefaultBaudrateTB);
     this.groupBox1.Controls.Add(this.DefaultBaudrateLbl);
     this.groupBox1.Controls.Add(this.LogicalNameTB);
     this.groupBox1.Controls.Add(this.LogicalNameLbl);
     this.groupBox1.Location = new System.Drawing.Point(12, 12);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(300, 153);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "MBus Slave Port Setup Object";
     this.groupBox1.UseCompatibleTextRendering = true;
     //
     // BusAddressLbl
     //
     this.BusAddressLbl.AutoSize = true;
     this.BusAddressLbl.Location = new System.Drawing.Point(3, 128);
     this.BusAddressLbl.Name     = "BusAddressLbl";
     this.BusAddressLbl.Size     = new System.Drawing.Size(69, 13);
     this.BusAddressLbl.TabIndex = 19;
     this.BusAddressLbl.Text     = "Bus Address:";
     //
     // AddressStateLbl
     //
     this.AddressStateLbl.AutoSize = true;
     this.AddressStateLbl.Location = new System.Drawing.Point(3, 102);
     this.AddressStateLbl.Name     = "AddressStateLbl";
     this.AddressStateLbl.Size     = new System.Drawing.Size(76, 13);
     this.AddressStateLbl.TabIndex = 17;
     this.AddressStateLbl.Text     = "Address State:";
     //
     // AvailableBaudrateLbl
     //
     this.AvailableBaudrateLbl.AutoSize = true;
     this.AvailableBaudrateLbl.Location = new System.Drawing.Point(6, 76);
     this.AvailableBaudrateLbl.Name     = "AvailableBaudrateLbl";
     this.AvailableBaudrateLbl.Size     = new System.Drawing.Size(99, 13);
     this.AvailableBaudrateLbl.TabIndex = 4;
     this.AvailableBaudrateLbl.Text     = "Available Baudrate:";
     //
     // DefaultBaudrateLbl
     //
     this.DefaultBaudrateLbl.AutoSize = true;
     this.DefaultBaudrateLbl.Location = new System.Drawing.Point(6, 50);
     this.DefaultBaudrateLbl.Name     = "DefaultBaudrateLbl";
     this.DefaultBaudrateLbl.Size     = new System.Drawing.Size(90, 13);
     this.DefaultBaudrateLbl.TabIndex = 2;
     this.DefaultBaudrateLbl.Text     = "Default Baudrate:";
     //
     // LogicalNameLbl
     //
     this.LogicalNameLbl.AutoSize = true;
     this.LogicalNameLbl.Location = new System.Drawing.Point(6, 24);
     this.LogicalNameLbl.Name     = "LogicalNameLbl";
     this.LogicalNameLbl.Size     = new System.Drawing.Size(75, 13);
     this.LogicalNameLbl.TabIndex = 0;
     this.LogicalNameLbl.Text     = "Logical Name:";
     //
     // errorProvider1
     //
     this.errorProvider1.BlinkStyle       = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     this.errorProvider1.ContainerControl = this;
     this.errorProvider1.Icon             = ((System.Drawing.Icon)(resources.GetObject("errorProvider1.Icon")));
     //
     // BusAddressTB
     //
     this.BusAddressTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                      | System.Windows.Forms.AnchorStyles.Right)));
     this.BusAddressTB.Index    = 5;
     this.BusAddressTB.Location = new System.Drawing.Point(122, 125);
     this.BusAddressTB.Name     = "BusAddressTB";
     this.BusAddressTB.Size     = new System.Drawing.Size(168, 20);
     this.BusAddressTB.TabIndex = 20;
     this.BusAddressTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // AddressStateTB
     //
     this.AddressStateTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                        | System.Windows.Forms.AnchorStyles.Right)));
     this.AddressStateTB.Index    = 4;
     this.AddressStateTB.Location = new System.Drawing.Point(122, 99);
     this.AddressStateTB.Name     = "AddressStateTB";
     this.AddressStateTB.Size     = new System.Drawing.Size(168, 20);
     this.AddressStateTB.TabIndex = 18;
     this.AddressStateTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // AvailableBaudrateTB
     //
     this.AvailableBaudrateTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                             | System.Windows.Forms.AnchorStyles.Right)));
     this.AvailableBaudrateTB.Index    = 3;
     this.AvailableBaudrateTB.Location = new System.Drawing.Point(122, 73);
     this.AvailableBaudrateTB.Name     = "AvailableBaudrateTB";
     this.AvailableBaudrateTB.Size     = new System.Drawing.Size(168, 20);
     this.AvailableBaudrateTB.TabIndex = 3;
     this.AvailableBaudrateTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // DefaultBaudrateTB
     //
     this.DefaultBaudrateTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                           | System.Windows.Forms.AnchorStyles.Right)));
     this.DefaultBaudrateTB.Index    = 2;
     this.DefaultBaudrateTB.Location = new System.Drawing.Point(122, 47);
     this.DefaultBaudrateTB.Name     = "DefaultBaudrateTB";
     this.DefaultBaudrateTB.Size     = new System.Drawing.Size(168, 20);
     this.DefaultBaudrateTB.TabIndex = 2;
     this.DefaultBaudrateTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // LogicalNameTB
     //
     this.LogicalNameTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.LogicalNameTB.Index    = 1;
     this.LogicalNameTB.Location = new System.Drawing.Point(122, 21);
     this.LogicalNameTB.Name     = "LogicalNameTB";
     this.LogicalNameTB.Size     = new System.Drawing.Size(168, 20);
     this.LogicalNameTB.TabIndex = 1;
     this.LogicalNameTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // GXDLMSMBusSlavePortSetupView
     //
     this.ClientSize = new System.Drawing.Size(324, 179);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "GXDLMSMBusSlavePortSetupView";
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
     this.ResumeLayout(false);
 }
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GXDLMSImageTransferView));
     this.groupBox1               = new System.Windows.Forms.GroupBox();
     this.ImageTransferStatusCB   = new Gurux.DLMS.UI.GXValueField();
     this.ImageTransferStatusLbl  = new System.Windows.Forms.Label();
     this.ImageTransferEnabledCB  = new System.Windows.Forms.CheckBox();
     this.ImageTransferEnabledLbl = new System.Windows.Forms.Label();
     this.ImageFirstNotTransferredBlockNumberTB  = new Gurux.DLMS.UI.GXValueField();
     this.ImageFirstNotTransferredBlockNumberLbl = new System.Windows.Forms.Label();
     this.ImageTransferredBlocksStatusTB         = new Gurux.DLMS.UI.GXValueField();
     this.ImageTransferredBlocksStatusLbl        = new System.Windows.Forms.Label();
     this.DescriptionLbl       = new System.Windows.Forms.Label();
     this.DescriptionTB        = new System.Windows.Forms.TextBox();
     this.ImageBlockSizeTB     = new Gurux.DLMS.UI.GXValueField();
     this.ImageBlockSizeLbl    = new System.Windows.Forms.Label();
     this.LogicalNameTB        = new Gurux.DLMS.UI.GXValueField();
     this.LogicalNameLbl       = new System.Windows.Forms.Label();
     this.errorProvider1       = new System.Windows.Forms.ErrorProvider(this.components);
     this.ImageActivateInfoTB  = new Gurux.DLMS.UI.GXValueField();
     this.ImageActivateInfoLbl = new System.Windows.Forms.Label();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.Controls.Add(this.ImageActivateInfoTB);
     this.groupBox1.Controls.Add(this.ImageActivateInfoLbl);
     this.groupBox1.Controls.Add(this.ImageTransferStatusCB);
     this.groupBox1.Controls.Add(this.ImageTransferStatusLbl);
     this.groupBox1.Controls.Add(this.ImageTransferEnabledCB);
     this.groupBox1.Controls.Add(this.ImageTransferEnabledLbl);
     this.groupBox1.Controls.Add(this.ImageFirstNotTransferredBlockNumberTB);
     this.groupBox1.Controls.Add(this.ImageFirstNotTransferredBlockNumberLbl);
     this.groupBox1.Controls.Add(this.ImageTransferredBlocksStatusTB);
     this.groupBox1.Controls.Add(this.ImageTransferredBlocksStatusLbl);
     this.groupBox1.Controls.Add(this.DescriptionLbl);
     this.groupBox1.Controls.Add(this.DescriptionTB);
     this.groupBox1.Controls.Add(this.ImageBlockSizeTB);
     this.groupBox1.Controls.Add(this.ImageBlockSizeLbl);
     this.groupBox1.Controls.Add(this.LogicalNameTB);
     this.groupBox1.Controls.Add(this.LogicalNameLbl);
     this.groupBox1.Location = new System.Drawing.Point(12, 12);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(296, 251);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "Image Transfer Object";
     //
     // ImageTransferStatusCB
     //
     this.ImageTransferStatusCB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                               | System.Windows.Forms.AnchorStyles.Right)));
     this.ImageTransferStatusCB.Index    = 6;
     this.ImageTransferStatusCB.Location = new System.Drawing.Point(104, 171);
     this.ImageTransferStatusCB.Name     = "ImageTransferStatusCB";
     this.ImageTransferStatusCB.ReadOnly = true;
     this.ImageTransferStatusCB.Size     = new System.Drawing.Size(171, 59);
     this.ImageTransferStatusCB.TabIndex = 19;
     this.ImageTransferStatusCB.Type     = Gurux.DLMS.UI.GXValueFieldType.CompoBox;
     //
     // ImageTransferStatusLbl
     //
     this.ImageTransferStatusLbl.AutoSize = true;
     this.ImageTransferStatusLbl.Location = new System.Drawing.Point(7, 174);
     this.ImageTransferStatusLbl.Name     = "ImageTransferStatusLbl";
     this.ImageTransferStatusLbl.Size     = new System.Drawing.Size(40, 13);
     this.ImageTransferStatusLbl.TabIndex = 20;
     this.ImageTransferStatusLbl.Text     = "Status:";
     //
     // ImageTransferEnabledCB
     //
     this.ImageTransferEnabledCB.Checked    = true;
     this.ImageTransferEnabledCB.CheckState = System.Windows.Forms.CheckState.Indeterminate;
     this.ImageTransferEnabledCB.Location   = new System.Drawing.Point(104, 148);
     this.ImageTransferEnabledCB.Name       = "ImageTransferEnabledCB";
     this.ImageTransferEnabledCB.Size       = new System.Drawing.Size(27, 17);
     this.ImageTransferEnabledCB.TabIndex   = 17;
     this.ImageTransferEnabledCB.UseVisualStyleBackColor = false;
     //
     // ImageTransferEnabledLbl
     //
     this.ImageTransferEnabledLbl.AutoSize = true;
     this.ImageTransferEnabledLbl.Location = new System.Drawing.Point(7, 149);
     this.ImageTransferEnabledLbl.Name     = "ImageTransferEnabledLbl";
     this.ImageTransferEnabledLbl.Size     = new System.Drawing.Size(49, 13);
     this.ImageTransferEnabledLbl.TabIndex = 18;
     this.ImageTransferEnabledLbl.Text     = "Enabled:";
     //
     // ImageFirstNotTransferredBlockNumberTB
     //
     this.ImageFirstNotTransferredBlockNumberTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                                               | System.Windows.Forms.AnchorStyles.Right)));
     this.ImageFirstNotTransferredBlockNumberTB.Index    = 4;
     this.ImageFirstNotTransferredBlockNumberTB.Location = new System.Drawing.Point(104, 123);
     this.ImageFirstNotTransferredBlockNumberTB.Name     = "ImageFirstNotTransferredBlockNumberTB";
     this.ImageFirstNotTransferredBlockNumberTB.Size     = new System.Drawing.Size(171, 20);
     this.ImageFirstNotTransferredBlockNumberTB.TabIndex = 8;
     this.ImageFirstNotTransferredBlockNumberTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // ImageFirstNotTransferredBlockNumberLbl
     //
     this.ImageFirstNotTransferredBlockNumberLbl.AutoSize = true;
     this.ImageFirstNotTransferredBlockNumberLbl.Location = new System.Drawing.Point(7, 126);
     this.ImageFirstNotTransferredBlockNumberLbl.Name     = "ImageFirstNotTransferredBlockNumberLbl";
     this.ImageFirstNotTransferredBlockNumberLbl.Size     = new System.Drawing.Size(59, 13);
     this.ImageFirstNotTransferredBlockNumberLbl.TabIndex = 9;
     this.ImageFirstNotTransferredBlockNumberLbl.Text     = "First Block:";
     //
     // ImageTransferredBlocksStatusTB
     //
     this.ImageTransferredBlocksStatusTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                                        | System.Windows.Forms.AnchorStyles.Right)));
     this.ImageTransferredBlocksStatusTB.Index    = 3;
     this.ImageTransferredBlocksStatusTB.Location = new System.Drawing.Point(104, 97);
     this.ImageTransferredBlocksStatusTB.Name     = "ImageTransferredBlocksStatusTB";
     this.ImageTransferredBlocksStatusTB.Size     = new System.Drawing.Size(171, 20);
     this.ImageTransferredBlocksStatusTB.TabIndex = 6;
     this.ImageTransferredBlocksStatusTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // ImageTransferredBlocksStatusLbl
     //
     this.ImageTransferredBlocksStatusLbl.AutoSize = true;
     this.ImageTransferredBlocksStatusLbl.Location = new System.Drawing.Point(7, 100);
     this.ImageTransferredBlocksStatusLbl.Name     = "ImageTransferredBlocksStatusLbl";
     this.ImageTransferredBlocksStatusLbl.Size     = new System.Drawing.Size(75, 13);
     this.ImageTransferredBlocksStatusLbl.TabIndex = 7;
     this.ImageTransferredBlocksStatusLbl.Text     = "Blocks Status:";
     //
     // DescriptionLbl
     //
     this.DescriptionLbl.AutoSize = true;
     this.DescriptionLbl.Location = new System.Drawing.Point(7, 22);
     this.DescriptionLbl.Name     = "DescriptionLbl";
     this.DescriptionLbl.Size     = new System.Drawing.Size(63, 13);
     this.DescriptionLbl.TabIndex = 5;
     this.DescriptionLbl.Text     = "Description:";
     //
     // DescriptionTB
     //
     this.DescriptionTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.DescriptionTB.Location = new System.Drawing.Point(103, 19);
     this.DescriptionTB.Name     = "DescriptionTB";
     this.DescriptionTB.ReadOnly = true;
     this.DescriptionTB.Size     = new System.Drawing.Size(172, 20);
     this.DescriptionTB.TabIndex = 4;
     //
     // ImageBlockSizeTB
     //
     this.ImageBlockSizeTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.ImageBlockSizeTB.Index     = 2;
     this.ImageBlockSizeTB.Location  = new System.Drawing.Point(104, 71);
     this.ImageBlockSizeTB.Name      = "ImageBlockSizeTB";
     this.ImageBlockSizeTB.Size      = new System.Drawing.Size(171, 20);
     this.ImageBlockSizeTB.TabIndex  = 0;
     this.ImageBlockSizeTB.Type      = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     this.ImageBlockSizeTB.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ValueTB_KeyPress);
     this.ImageBlockSizeTB.KeyUp    += new System.Windows.Forms.KeyEventHandler(this.ValueTB_KeyUp);
     //
     // ImageBlockSizeLbl
     //
     this.ImageBlockSizeLbl.AutoSize = true;
     this.ImageBlockSizeLbl.Location = new System.Drawing.Point(7, 74);
     this.ImageBlockSizeLbl.Name     = "ImageBlockSizeLbl";
     this.ImageBlockSizeLbl.Size     = new System.Drawing.Size(92, 13);
     this.ImageBlockSizeLbl.TabIndex = 2;
     this.ImageBlockSizeLbl.Text     = "Image Block Size:";
     //
     // LogicalNameTB
     //
     this.LogicalNameTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.LogicalNameTB.Index    = 1;
     this.LogicalNameTB.Location = new System.Drawing.Point(103, 45);
     this.LogicalNameTB.Name     = "LogicalNameTB";
     this.LogicalNameTB.Size     = new System.Drawing.Size(171, 20);
     this.LogicalNameTB.TabIndex = 1;
     this.LogicalNameTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // LogicalNameLbl
     //
     this.LogicalNameLbl.AutoSize = true;
     this.LogicalNameLbl.Location = new System.Drawing.Point(7, 48);
     this.LogicalNameLbl.Name     = "LogicalNameLbl";
     this.LogicalNameLbl.Size     = new System.Drawing.Size(75, 13);
     this.LogicalNameLbl.TabIndex = 0;
     this.LogicalNameLbl.Text     = "Logical Name:";
     //
     // errorProvider1
     //
     this.errorProvider1.BlinkStyle       = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     this.errorProvider1.ContainerControl = this;
     this.errorProvider1.Icon             = ((System.Drawing.Icon)(resources.GetObject("errorProvider1.Icon")));
     //
     // ImageActivateInfoTB
     //
     this.ImageActivateInfoTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                             | System.Windows.Forms.AnchorStyles.Right)));
     this.ImageActivateInfoTB.Index    = 7;
     this.ImageActivateInfoTB.Location = new System.Drawing.Point(103, 200);
     this.ImageActivateInfoTB.Name     = "ImageActivateInfoTB";
     this.ImageActivateInfoTB.Size     = new System.Drawing.Size(171, 20);
     this.ImageActivateInfoTB.TabIndex = 21;
     this.ImageActivateInfoTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // ImageActivateInfoLbl
     //
     this.ImageActivateInfoLbl.AutoSize = true;
     this.ImageActivateInfoLbl.Location = new System.Drawing.Point(6, 203);
     this.ImageActivateInfoLbl.Name     = "ImageActivateInfoLbl";
     this.ImageActivateInfoLbl.Size     = new System.Drawing.Size(59, 13);
     this.ImageActivateInfoLbl.TabIndex = 22;
     this.ImageActivateInfoLbl.Text     = "First Block:";
     //
     // GXDLMSImageTransferView
     //
     this.ClientSize = new System.Drawing.Size(320, 275);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "GXDLMSImageTransferView";
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
     this.ResumeLayout(false);
 }
Exemplo n.º 18
0
 public RegistroExistencia()
 {
     InitializeComponent();
     errorProvider = new ErrorProvider();
 }
Exemplo n.º 19
0
 public void inicializar(IForm unForm)
 {
     controles      = new List <IControlDeUsuario>();
     errorProvider1 = new ErrorProvider();
     miFormulario   = unForm;
 }
Exemplo n.º 20
0
        private bool Is_Valid()
        {
            errorProvider1 = new ErrorProvider();
            int  no;
            bool result;
            bool is_valid = true;

            // 驗證科目名稱
            if (string.IsNullOrWhiteSpace(this.SubjectName.Text))
            {
                errorProvider1.SetError(this.SubjectName, "必填");
                is_valid = false;
            }
            else
            {
                errorProvider1.SetError(this.SubjectName, "");
            }

            // 驗證級別
            if (!string.IsNullOrWhiteSpace(this.Level.Text))
            {
                result = int.TryParse(this.Level.Text.Trim(), out no);

                if (!result)
                {
                    errorProvider1.SetError(this.Level, "請填阿拉伯數字");
                    is_valid = false;
                }
                else
                {
                    errorProvider1.SetError(this.Level, "");
                }
            }
            else
            {
                errorProvider1.SetError(this.Level, "");
            }

            //// 驗證學分數
            //if (!string.IsNullOrWhiteSpace(this.Credit.Text))
            //{
            //    result = int.TryParse(this.Credit.Text.Trim(), out no);

            //    if (!result)
            //    {
            //        errorProvider1.SetError(this.Credit, "請填阿拉伯數字");
            //        is_valid = false;
            //    }
            //    else
            //        errorProvider1.SetError(this.Credit, "");
            //}
            //else
            //    errorProvider1.SetError(this.Credit, "");

            // 驗證學分數
            if (string.IsNullOrWhiteSpace(this.Credit.Text))
            {
                errorProvider1.SetError(this.Credit, "必填");
                is_valid = false;
            }
            else
            {
                result = int.TryParse(this.Credit.Text.Trim(), out no);

                if (!result)
                {
                    errorProvider1.SetError(this.Credit, "請輸入數值。");
                    is_valid = false;
                }
                else
                {
                    errorProvider1.SetError(this.Credit, "");
                }
            }
            // 驗證人數上限
            if (string.IsNullOrWhiteSpace(this.Limit.Text))
            {
                errorProvider1.SetError(this.Limit, "必填");
                is_valid = false;
            }
            else
            {
                result = int.TryParse(this.Limit.Text.Trim(), out no);

                if (!result)
                {
                    errorProvider1.SetError(this.Limit, "請輸入正整數。");
                    is_valid = false;
                }
                else
                {
                    errorProvider1.SetError(this.Limit, "");
                }
            }

            // 驗證前導課程級別
            if (!string.IsNullOrWhiteSpace(this.tbxPreSubjectLevel.Text))
            {
                result = int.TryParse(this.tbxPreSubjectLevel.Text.Trim(), out no);

                if (!result)
                {
                    errorProvider1.SetError(this.tbxPreSubjectLevel, "請填正整數或空白。");
                    is_valid = false;
                }
                else
                {
                    errorProvider1.SetError(this.tbxPreSubjectLevel, "");
                }
            }
            else
            {
                errorProvider1.SetError(this.tbxPreSubjectLevel, "");
            }

            // 驗證若有前導課程科目,前導課程採計方式必填
            if (!string.IsNullOrWhiteSpace(tbxPreSubject.Text))
            {
                if (cbxPreSubjectBlockMode.SelectedItem == null)
                {
                    errorProvider1.SetError(this.cbxPreSubjectBlockMode, "請選擇前導課程採計方式。");
                    is_valid = false;
                }
                else
                {
                    if (string.IsNullOrWhiteSpace(cbxPreSubjectBlockMode.SelectedItem.ToString()))
                    {
                        errorProvider1.SetError(this.cbxPreSubjectBlockMode, "請選擇前導課程採計方式。");
                        is_valid = false;
                    }
                    else
                    {
                        errorProvider1.SetError(this.cbxPreSubjectBlockMode, "");
                    }
                }
            }


            // 驗證學年度學期科目級別 不可重複
            string key = $"{SubjectName.Text}_{Level.Text}_{Type.Text}";

            if (dicSubjectByKey.ContainsKey(key))
            {
                if (mRecord.UID == "" + dicSubjectByKey[key]["uid"])
                {
                    errorProvider1.SetError(this.SubjectName, "");
                }
                else
                {
                    errorProvider1.SetError(this.SubjectName, "科目名稱 + 級別 + 課程時段 不可重複。");
                    is_valid = false;
                }
            }
            else
            {
                errorProvider1.SetError(this.SubjectName, "");
            }

            return(is_valid);
        }
 private void Limpiar()
 {
     IdNumericUpDown.Value = 0;
     PermisoTextBox.Clear();
     ErrorProvider.Clear();
 }
Exemplo n.º 22
0
        private void InitializeComponent()
        {
            _components = new Container();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(MaskDesignerDialog));

            _lblHeader             = new Label();
            _listViewCannedMasks   = new ListView();
            _maskDescriptionHeader = new ColumnHeader(resources.GetString("listViewCannedMasks.Columns"));
            _dataFormatHeader      = new ColumnHeader(resources.GetString("listViewCannedMasks.Columns1"));
            _validatingTypeHeader  = new ColumnHeader(resources.GetString("listViewCannedMasks.Columns2"));
            _btnOK     = new Button();
            _btnCancel = new Button();
            _checkBoxUseValidatingType = new CheckBox();
            _maskTryItTable            = new TableLayoutPanel();
            _lblMask    = new Label();
            _txtBoxMask = new TextBox();
            _lblTryIt   = new Label();
            _overarchingTableLayoutPanel = new TableLayoutPanel();
            _okCancelTableLayoutPanel    = new TableLayoutPanel();
            _errorProvider = new ErrorProvider(_components);
            _maskTryItTable.SuspendLayout();
            _overarchingTableLayoutPanel.SuspendLayout();
            _okCancelTableLayoutPanel.SuspendLayout();
            ((ISupportInitialize)(_errorProvider)).BeginInit();
            SuspendLayout();
            //
            // maskedTextBox
            //
            resources.ApplyResources(_maskedTextBox, "maskedTextBox");
            _maskedTextBox.Margin = new Padding(3, 3, 18, 0);
            _maskedTextBox.Name   = "maskedTextBox";
            //
            // lblHeader
            //
            resources.ApplyResources(_lblHeader, "lblHeader");
            _lblHeader.Margin = new Padding(0, 0, 0, 3);
            _lblHeader.Name   = "lblHeader";
            //
            // listViewCannedMasks
            //
            resources.ApplyResources(_listViewCannedMasks, "listViewCannedMasks");
            _listViewCannedMasks.Columns.AddRange(new ColumnHeader[] {
                _maskDescriptionHeader,
                _dataFormatHeader,
                _validatingTypeHeader
            });
            _listViewCannedMasks.FullRowSelect = true;
            _listViewCannedMasks.HideSelection = false;
            _listViewCannedMasks.Margin        = new Padding(0, 3, 0, 3);
            _listViewCannedMasks.MultiSelect   = false;
            _listViewCannedMasks.Name          = "listViewCannedMasks";
            _listViewCannedMasks.Sorting       = SortOrder.None; // We'll do the sorting ourselves.
            _listViewCannedMasks.View          = View.Details;
            //
            // maskDescriptionHeader
            //
            resources.ApplyResources(_maskDescriptionHeader, "maskDescriptionHeader");
            //
            // dataFormatHeader
            //
            resources.ApplyResources(_dataFormatHeader, "dataFormatHeader");
            //
            // validatingTypeHeader
            //
            resources.ApplyResources(_validatingTypeHeader, "validatingTypeHeader");
            //
            // btnOK
            //
            resources.ApplyResources(_btnOK, "btnOK");
            _btnOK.DialogResult = DialogResult.OK;
            _btnOK.Margin       = new Padding(0, 0, 3, 0);
            _btnOK.MinimumSize  = new Drawing.Size(75, 23);
            _btnOK.Name         = "btnOK";
            _btnOK.Padding      = new Padding(10, 0, 10, 0);
            //
            // btnCancel
            //
            resources.ApplyResources(_btnCancel, "btnCancel");
            _btnCancel.DialogResult = DialogResult.Cancel;
            _btnCancel.Margin       = new Padding(3, 0, 0, 0);
            _btnCancel.MinimumSize  = new Drawing.Size(75, 23);
            _btnCancel.Name         = "btnCancel";
            _btnCancel.Padding      = new Padding(10, 0, 10, 0);
            //
            // checkBoxUseValidatingType
            //
            resources.ApplyResources(_checkBoxUseValidatingType, "checkBoxUseValidatingType");
            _checkBoxUseValidatingType.Checked    = true;
            _checkBoxUseValidatingType.CheckState = CheckState.Checked;
            _checkBoxUseValidatingType.Margin     = new Padding(0, 0, 0, 3);
            _checkBoxUseValidatingType.Name       = "checkBoxUseValidatingType";
            //
            // maskTryItTable
            //
            resources.ApplyResources(_maskTryItTable, "maskTryItTable");
            _maskTryItTable.ColumnStyles.Add(new ColumnStyle());
            _maskTryItTable.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            _maskTryItTable.ColumnStyles.Add(new ColumnStyle());
            _maskTryItTable.Controls.Add(_checkBoxUseValidatingType, 2, 0);
            _maskTryItTable.Controls.Add(_lblMask, 0, 0);
            _maskTryItTable.Controls.Add(_txtBoxMask, 1, 0);
            _maskTryItTable.Controls.Add(_lblTryIt, 0, 1);
            _maskTryItTable.Controls.Add(_maskedTextBox, 1, 1);
            _maskTryItTable.Margin = new Padding(0, 3, 0, 3);
            _maskTryItTable.Name   = "maskTryItTable";
            _maskTryItTable.RowStyles.Add(new RowStyle());
            _maskTryItTable.RowStyles.Add(new RowStyle());
            //
            // lblMask
            //
            resources.ApplyResources(_lblMask, "lblMask");
            _lblMask.Margin = new Padding(0, 0, 3, 3);
            _lblMask.Name   = "lblMask";
            //
            // txtBoxMask
            //
            resources.ApplyResources(_txtBoxMask, "txtBoxMask");
            _txtBoxMask.Margin = new Padding(3, 0, 18, 3);
            _txtBoxMask.Name   = "txtBoxMask";
            //
            // lblTryIt
            //
            resources.ApplyResources(_lblTryIt, "lblTryIt");
            _lblTryIt.Margin = new Padding(0, 3, 3, 0);
            _lblTryIt.Name   = "lblTryIt";
            //
            // overarchingTableLayoutPanel
            //
            resources.ApplyResources(_overarchingTableLayoutPanel, "overarchingTableLayoutPanel");
            _overarchingTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
            _overarchingTableLayoutPanel.Controls.Add(_maskTryItTable, 0, 3);
            _overarchingTableLayoutPanel.Controls.Add(_okCancelTableLayoutPanel, 0, 4);
            _overarchingTableLayoutPanel.Controls.Add(_lblHeader, 0, 1);
            _overarchingTableLayoutPanel.Controls.Add(_listViewCannedMasks, 0, 2);
            _overarchingTableLayoutPanel.Name = "overarchingTableLayoutPanel";
            _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle());
            _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle());
            _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
            _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle());
            _overarchingTableLayoutPanel.RowStyles.Add(new RowStyle());
            //
            // okCancelTableLayoutPanel
            //
            resources.ApplyResources(_okCancelTableLayoutPanel, "okCancelTableLayoutPanel");
            _okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
            _okCancelTableLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
            _okCancelTableLayoutPanel.Controls.Add(_btnCancel, 1, 0);
            _okCancelTableLayoutPanel.Controls.Add(_btnOK, 0, 0);
            _okCancelTableLayoutPanel.Margin = new Padding(0, 6, 0, 0);
            _okCancelTableLayoutPanel.Name   = "okCancelTableLayoutPanel";
            _okCancelTableLayoutPanel.RowStyles.Add(new RowStyle());
            //
            // errorProvider
            //
            _errorProvider.BlinkStyle       = ErrorBlinkStyle.NeverBlink;
            _errorProvider.ContainerControl = this;
            //
            // MaskDesignerDialog
            //
            resources.ApplyResources(this, "$this");
            AcceptButton  = _btnOK;
            CancelButton  = _btnCancel;
            AutoScaleMode = AutoScaleMode.Font;
            Controls.Add(_overarchingTableLayoutPanel);
            FormBorderStyle = FormBorderStyle.FixedDialog;
            HelpButton      = true;
            MaximizeBox     = false;
            MinimizeBox     = false;
            Name            = "MaskDesignerDialog";
            ShowInTaskbar   = false;
            SizeGripStyle   = SizeGripStyle.Hide;
            _maskTryItTable.ResumeLayout(false);
            _maskTryItTable.PerformLayout();
            _overarchingTableLayoutPanel.ResumeLayout(false);
            _overarchingTableLayoutPanel.PerformLayout();
            _okCancelTableLayoutPanel.ResumeLayout(false);
            _okCancelTableLayoutPanel.PerformLayout();
            ((ISupportInitialize)(_errorProvider)).EndInit();
            ResumeLayout(false);
        }
Exemplo n.º 23
0
 public static void validationcmb(Guna.UI.WinForms.GunaComboBox cmb, string errorMessage, ref int index, CancelEventArgs e, ErrorProvider errorProvider)
 {
     if (cmb.SelectedItem == null)
     {
         e.Cancel = true;
         errorProvider.SetError(cmb, errorMessage);
     }
     else
     {
         e.Cancel = false;
         errorProvider.SetError(cmb, null);
         index = cmb.SelectedIndex;
     }
 }
 /// <summary>
 /// Default Constructor
 /// </summary>
 public ValidationBase()
 {
     errorProvider            = new ErrorProvider();
     errorProvider.BlinkStyle = ErrorBlinkStyle.NeverBlink;
 }
 protected virtual void SetErrors([NotNull] Control target, [NotNull] ErrorProvider errorProvider,
                                  [NotNull] IList <object> errors, [NotNull] IDataContext context)
 {
     errorProvider.SetError(target, errors.Count == 0 ? null : string.Join(Environment.NewLine, errors));
 }
Exemplo n.º 26
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GXDLMSMBusClientView));
     this.groupBox1               = new System.Windows.Forms.GroupBox();
     this.SendBtn                 = new Gurux.DLMS.UI.GXButton();
     this.CaptureBtn              = new Gurux.DLMS.UI.GXButton();
     this.groupBox5               = new System.Windows.Forms.GroupBox();
     this.TransferKeyBtn          = new Gurux.DLMS.UI.GXButton();
     this.SetBtn                  = new Gurux.DLMS.UI.GXButton();
     this.ResetAlarmBtn           = new Gurux.DLMS.UI.GXButton();
     this.groupBox3               = new System.Windows.Forms.GroupBox();
     this.DeInstallSlaveBtn       = new Gurux.DLMS.UI.GXButton();
     this.InstallSlaveBtn         = new Gurux.DLMS.UI.GXButton();
     this.SynchronizeClockBtn     = new Gurux.DLMS.UI.GXButton();
     this.groupBox2               = new System.Windows.Forms.GroupBox();
     this.CaptureDefinitionView   = new System.Windows.Forms.ListView();
     this.DataInformationBlockCh  = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.ValueInformationBlockCh = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
     this.EncryptionKeyStatusTB   = new Gurux.DLMS.UI.GXValueField();
     this.EncryptionKeyStatusLbl  = new System.Windows.Forms.Label();
     this.ConfigurationTB         = new Gurux.DLMS.UI.GXValueField();
     this.ConfigurationLbl        = new System.Windows.Forms.Label();
     this.AlarmTB                 = new Gurux.DLMS.UI.GXValueField();
     this.AlarmLbl                = new System.Windows.Forms.Label();
     this.StatusTB                = new Gurux.DLMS.UI.GXValueField();
     this.StatusLbl               = new System.Windows.Forms.Label();
     this.AccessNumberTB          = new Gurux.DLMS.UI.GXValueField();
     this.AccessNumberLbl         = new System.Windows.Forms.Label();
     this.DeviceTypeTB            = new Gurux.DLMS.UI.GXValueField();
     this.DeviceTypeLbl           = new System.Windows.Forms.Label();
     this.VersionTB               = new Gurux.DLMS.UI.GXValueField();
     this.VersionLbl              = new System.Windows.Forms.Label();
     this.ManufacturerIDTB        = new Gurux.DLMS.UI.GXValueField();
     this.ManufacturerIDLbl       = new System.Windows.Forms.Label();
     this.IdentificationNumberTB  = new Gurux.DLMS.UI.GXValueField();
     this.IdentificationNumberLbl = new System.Windows.Forms.Label();
     this.PrimaryAddressTB        = new Gurux.DLMS.UI.GXValueField();
     this.PrimaryAddressLbl       = new System.Windows.Forms.Label();
     this.CapturePeriodTB         = new Gurux.DLMS.UI.GXValueField();
     this.CapturePeriodLbl        = new System.Windows.Forms.Label();
     this.MBusPortReferenceTB     = new Gurux.DLMS.UI.GXValueField();
     this.MBusPortReferenceLbl    = new System.Windows.Forms.Label();
     this.LogicalNameTB           = new Gurux.DLMS.UI.GXValueField();
     this.LogicalNameLbl          = new System.Windows.Forms.Label();
     this.errorProvider1          = new System.Windows.Forms.ErrorProvider(this.components);
     this.groupBox1.SuspendLayout();
     this.groupBox5.SuspendLayout();
     this.groupBox3.SuspendLayout();
     this.groupBox2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.Controls.Add(this.SendBtn);
     this.groupBox1.Controls.Add(this.CaptureBtn);
     this.groupBox1.Controls.Add(this.groupBox5);
     this.groupBox1.Controls.Add(this.ResetAlarmBtn);
     this.groupBox1.Controls.Add(this.groupBox3);
     this.groupBox1.Controls.Add(this.SynchronizeClockBtn);
     this.groupBox1.Controls.Add(this.groupBox2);
     this.groupBox1.Controls.Add(this.EncryptionKeyStatusTB);
     this.groupBox1.Controls.Add(this.EncryptionKeyStatusLbl);
     this.groupBox1.Controls.Add(this.ConfigurationTB);
     this.groupBox1.Controls.Add(this.ConfigurationLbl);
     this.groupBox1.Controls.Add(this.AlarmTB);
     this.groupBox1.Controls.Add(this.AlarmLbl);
     this.groupBox1.Controls.Add(this.StatusTB);
     this.groupBox1.Controls.Add(this.StatusLbl);
     this.groupBox1.Controls.Add(this.AccessNumberTB);
     this.groupBox1.Controls.Add(this.AccessNumberLbl);
     this.groupBox1.Controls.Add(this.DeviceTypeTB);
     this.groupBox1.Controls.Add(this.DeviceTypeLbl);
     this.groupBox1.Controls.Add(this.VersionTB);
     this.groupBox1.Controls.Add(this.VersionLbl);
     this.groupBox1.Controls.Add(this.ManufacturerIDTB);
     this.groupBox1.Controls.Add(this.ManufacturerIDLbl);
     this.groupBox1.Controls.Add(this.IdentificationNumberTB);
     this.groupBox1.Controls.Add(this.IdentificationNumberLbl);
     this.groupBox1.Controls.Add(this.PrimaryAddressTB);
     this.groupBox1.Controls.Add(this.PrimaryAddressLbl);
     this.groupBox1.Controls.Add(this.CapturePeriodTB);
     this.groupBox1.Controls.Add(this.CapturePeriodLbl);
     this.groupBox1.Controls.Add(this.MBusPortReferenceTB);
     this.groupBox1.Controls.Add(this.MBusPortReferenceLbl);
     this.groupBox1.Controls.Add(this.LogicalNameTB);
     this.groupBox1.Controls.Add(this.LogicalNameLbl);
     this.groupBox1.Location = new System.Drawing.Point(12, 12);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(482, 529);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "MBus Client Object";
     this.groupBox1.UseCompatibleTextRendering = true;
     //
     // SendBtn
     //
     this.SendBtn.Index    = 6;
     this.SendBtn.Location = new System.Drawing.Point(372, 442);
     this.SendBtn.Name     = "SendBtn";
     this.SendBtn.Size     = new System.Drawing.Size(94, 23);
     this.SendBtn.TabIndex = 16;
     this.SendBtn.Text     = "Send...";
     this.SendBtn.UseVisualStyleBackColor = true;
     //
     // CaptureBtn
     //
     this.CaptureBtn.Index    = 3;
     this.CaptureBtn.Location = new System.Drawing.Point(15, 442);
     this.CaptureBtn.Name     = "CaptureBtn";
     this.CaptureBtn.Size     = new System.Drawing.Size(112, 23);
     this.CaptureBtn.TabIndex = 13;
     this.CaptureBtn.Text     = "Capture";
     this.CaptureBtn.UseVisualStyleBackColor = true;
     //
     // groupBox5
     //
     this.groupBox5.Controls.Add(this.TransferKeyBtn);
     this.groupBox5.Controls.Add(this.SetBtn);
     this.groupBox5.Location = new System.Drawing.Point(9, 472);
     this.groupBox5.Name     = "groupBox5";
     this.groupBox5.Size     = new System.Drawing.Size(462, 52);
     this.groupBox5.TabIndex = 52;
     this.groupBox5.TabStop  = false;
     this.groupBox5.Text     = "Encryption key";
     //
     // TransferKeyBtn
     //
     this.TransferKeyBtn.Index    = 8;
     this.TransferKeyBtn.Location = new System.Drawing.Point(124, 19);
     this.TransferKeyBtn.Name     = "TransferKeyBtn";
     this.TransferKeyBtn.Size     = new System.Drawing.Size(112, 23);
     this.TransferKeyBtn.TabIndex = 1;
     this.TransferKeyBtn.Text     = "Transfer...";
     this.TransferKeyBtn.UseVisualStyleBackColor = true;
     //
     // SetBtn
     //
     this.SetBtn.Index    = 7;
     this.SetBtn.Location = new System.Drawing.Point(6, 19);
     this.SetBtn.Name     = "SetBtn";
     this.SetBtn.Size     = new System.Drawing.Size(112, 23);
     this.SetBtn.TabIndex = 0;
     this.SetBtn.Text     = "Set...";
     this.SetBtn.UseVisualStyleBackColor = true;
     //
     // ResetAlarmBtn
     //
     this.ResetAlarmBtn.Index    = 4;
     this.ResetAlarmBtn.Location = new System.Drawing.Point(133, 442);
     this.ResetAlarmBtn.Name     = "ResetAlarmBtn";
     this.ResetAlarmBtn.Size     = new System.Drawing.Size(112, 23);
     this.ResetAlarmBtn.TabIndex = 14;
     this.ResetAlarmBtn.Text     = "Reset alarm";
     this.ResetAlarmBtn.UseVisualStyleBackColor = true;
     //
     // groupBox3
     //
     this.groupBox3.Controls.Add(this.DeInstallSlaveBtn);
     this.groupBox3.Controls.Add(this.InstallSlaveBtn);
     this.groupBox3.Location = new System.Drawing.Point(9, 386);
     this.groupBox3.Name     = "groupBox3";
     this.groupBox3.Size     = new System.Drawing.Size(463, 50);
     this.groupBox3.TabIndex = 50;
     this.groupBox3.TabStop  = false;
     this.groupBox3.Text     = "Slave";
     //
     // DeInstallSlaveBtn
     //
     this.DeInstallSlaveBtn.Index    = 2;
     this.DeInstallSlaveBtn.Location = new System.Drawing.Point(124, 19);
     this.DeInstallSlaveBtn.Name     = "DeInstallSlaveBtn";
     this.DeInstallSlaveBtn.Size     = new System.Drawing.Size(112, 23);
     this.DeInstallSlaveBtn.TabIndex = 1;
     this.DeInstallSlaveBtn.Text     = "De-install";
     this.DeInstallSlaveBtn.UseVisualStyleBackColor = true;
     //
     // InstallSlaveBtn
     //
     this.InstallSlaveBtn.Index    = 1;
     this.InstallSlaveBtn.Location = new System.Drawing.Point(6, 19);
     this.InstallSlaveBtn.Name     = "InstallSlaveBtn";
     this.InstallSlaveBtn.Size     = new System.Drawing.Size(112, 23);
     this.InstallSlaveBtn.TabIndex = 0;
     this.InstallSlaveBtn.Text     = "Install";
     this.InstallSlaveBtn.UseVisualStyleBackColor = true;
     //
     // SynchronizeClockBtn
     //
     this.SynchronizeClockBtn.Index    = 5;
     this.SynchronizeClockBtn.Location = new System.Drawing.Point(254, 442);
     this.SynchronizeClockBtn.Name     = "SynchronizeClockBtn";
     this.SynchronizeClockBtn.Size     = new System.Drawing.Size(112, 23);
     this.SynchronizeClockBtn.TabIndex = 15;
     this.SynchronizeClockBtn.Text     = "Synchronize clock";
     this.SynchronizeClockBtn.UseVisualStyleBackColor = true;
     //
     // groupBox2
     //
     this.groupBox2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox2.Controls.Add(this.CaptureDefinitionView);
     this.groupBox2.Location = new System.Drawing.Point(9, 73);
     this.groupBox2.Name     = "groupBox2";
     this.groupBox2.Size     = new System.Drawing.Size(463, 125);
     this.groupBox2.TabIndex = 41;
     this.groupBox2.TabStop  = false;
     this.groupBox2.Text     = "Capture Definition:";
     //
     // CaptureDefinitionView
     //
     this.CaptureDefinitionView.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.CaptureDefinitionView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
         this.DataInformationBlockCh,
         this.ValueInformationBlockCh
     });
     this.CaptureDefinitionView.FullRowSelect = true;
     this.CaptureDefinitionView.HeaderStyle   = System.Windows.Forms.ColumnHeaderStyle.Nonclickable;
     this.CaptureDefinitionView.HideSelection = false;
     this.CaptureDefinitionView.Location      = new System.Drawing.Point(0, 19);
     this.CaptureDefinitionView.Name          = "CaptureDefinitionView";
     this.CaptureDefinitionView.Size          = new System.Drawing.Size(457, 72);
     this.CaptureDefinitionView.TabIndex      = 0;
     this.CaptureDefinitionView.UseCompatibleStateImageBehavior = false;
     this.CaptureDefinitionView.View = System.Windows.Forms.View.Details;
     //
     // DataInformationBlockCh
     //
     this.DataInformationBlockCh.Text  = "Data Information";
     this.DataInformationBlockCh.Width = 114;
     //
     // ValueInformationBlockCh
     //
     this.ValueInformationBlockCh.Text  = "Value Information";
     this.ValueInformationBlockCh.Width = 147;
     //
     // EncryptionKeyStatusTB
     //
     this.EncryptionKeyStatusTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                               | System.Windows.Forms.AnchorStyles.Right)));
     this.EncryptionKeyStatusTB.Index         = 14;
     this.EncryptionKeyStatusTB.Location      = new System.Drawing.Point(122, 360);
     this.EncryptionKeyStatusTB.Name          = "EncryptionKeyStatusTB";
     this.EncryptionKeyStatusTB.NotifyChanges = false;
     this.EncryptionKeyStatusTB.Size          = new System.Drawing.Size(350, 20);
     this.EncryptionKeyStatusTB.TabIndex      = 12;
     this.EncryptionKeyStatusTB.Type          = Gurux.DLMS.Enums.ValueFieldType.CompoBox;
     //
     // EncryptionKeyStatusLbl
     //
     this.EncryptionKeyStatusLbl.AutoSize = true;
     this.EncryptionKeyStatusLbl.Location = new System.Drawing.Point(3, 363);
     this.EncryptionKeyStatusLbl.Name     = "EncryptionKeyStatusLbl";
     this.EncryptionKeyStatusLbl.Size     = new System.Drawing.Size(114, 13);
     this.EncryptionKeyStatusLbl.TabIndex = 37;
     this.EncryptionKeyStatusLbl.Text     = "Encryption Key Status:";
     //
     // ConfigurationTB
     //
     this.ConfigurationTB.Index         = 13;
     this.ConfigurationTB.Location      = new System.Drawing.Point(357, 334);
     this.ConfigurationTB.Name          = "ConfigurationTB";
     this.ConfigurationTB.NotifyChanges = false;
     this.ConfigurationTB.Size          = new System.Drawing.Size(115, 20);
     this.ConfigurationTB.TabIndex      = 11;
     this.ConfigurationTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // ConfigurationLbl
     //
     this.ConfigurationLbl.AutoSize = true;
     this.ConfigurationLbl.Location = new System.Drawing.Point(245, 337);
     this.ConfigurationLbl.Name     = "ConfigurationLbl";
     this.ConfigurationLbl.Size     = new System.Drawing.Size(72, 13);
     this.ConfigurationLbl.TabIndex = 36;
     this.ConfigurationLbl.Text     = "Configuration:";
     //
     // AlarmTB
     //
     this.AlarmTB.Index         = 12;
     this.AlarmTB.Location      = new System.Drawing.Point(122, 334);
     this.AlarmTB.Name          = "AlarmTB";
     this.AlarmTB.NotifyChanges = false;
     this.AlarmTB.Size          = new System.Drawing.Size(115, 20);
     this.AlarmTB.TabIndex      = 10;
     this.AlarmTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // AlarmLbl
     //
     this.AlarmLbl.AutoSize = true;
     this.AlarmLbl.Location = new System.Drawing.Point(6, 337);
     this.AlarmLbl.Name     = "AlarmLbl";
     this.AlarmLbl.Size     = new System.Drawing.Size(36, 13);
     this.AlarmLbl.TabIndex = 34;
     this.AlarmLbl.Text     = "Alarm:";
     //
     // StatusTB
     //
     this.StatusTB.Index         = 11;
     this.StatusTB.Location      = new System.Drawing.Point(357, 308);
     this.StatusTB.Name          = "StatusTB";
     this.StatusTB.NotifyChanges = false;
     this.StatusTB.Size          = new System.Drawing.Size(115, 20);
     this.StatusTB.TabIndex      = 9;
     this.StatusTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // StatusLbl
     //
     this.StatusLbl.AutoSize = true;
     this.StatusLbl.Location = new System.Drawing.Point(264, 311);
     this.StatusLbl.Name     = "StatusLbl";
     this.StatusLbl.Size     = new System.Drawing.Size(40, 13);
     this.StatusLbl.TabIndex = 31;
     this.StatusLbl.Text     = "Status:";
     //
     // AccessNumberTB
     //
     this.AccessNumberTB.Index         = 10;
     this.AccessNumberTB.Location      = new System.Drawing.Point(122, 308);
     this.AccessNumberTB.Name          = "AccessNumberTB";
     this.AccessNumberTB.NotifyChanges = false;
     this.AccessNumberTB.Size          = new System.Drawing.Size(115, 20);
     this.AccessNumberTB.TabIndex      = 8;
     this.AccessNumberTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // AccessNumberLbl
     //
     this.AccessNumberLbl.AutoSize = true;
     this.AccessNumberLbl.Location = new System.Drawing.Point(3, 311);
     this.AccessNumberLbl.Name     = "AccessNumberLbl";
     this.AccessNumberLbl.Size     = new System.Drawing.Size(85, 13);
     this.AccessNumberLbl.TabIndex = 29;
     this.AccessNumberLbl.Text     = "Access Number:";
     //
     // DeviceTypeTB
     //
     this.DeviceTypeTB.Index         = 9;
     this.DeviceTypeTB.Location      = new System.Drawing.Point(357, 283);
     this.DeviceTypeTB.Name          = "DeviceTypeTB";
     this.DeviceTypeTB.NotifyChanges = false;
     this.DeviceTypeTB.Size          = new System.Drawing.Size(115, 20);
     this.DeviceTypeTB.TabIndex      = 7;
     this.DeviceTypeTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // DeviceTypeLbl
     //
     this.DeviceTypeLbl.AutoSize = true;
     this.DeviceTypeLbl.Location = new System.Drawing.Point(264, 286);
     this.DeviceTypeLbl.Name     = "DeviceTypeLbl";
     this.DeviceTypeLbl.Size     = new System.Drawing.Size(71, 13);
     this.DeviceTypeLbl.TabIndex = 27;
     this.DeviceTypeLbl.Text     = "Device Type:";
     //
     // VersionTB
     //
     this.VersionTB.Index         = 8;
     this.VersionTB.Location      = new System.Drawing.Point(122, 283);
     this.VersionTB.Name          = "VersionTB";
     this.VersionTB.NotifyChanges = false;
     this.VersionTB.Size          = new System.Drawing.Size(115, 20);
     this.VersionTB.TabIndex      = 6;
     this.VersionTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // VersionLbl
     //
     this.VersionLbl.AutoSize = true;
     this.VersionLbl.Location = new System.Drawing.Point(3, 286);
     this.VersionLbl.Name     = "VersionLbl";
     this.VersionLbl.Size     = new System.Drawing.Size(45, 13);
     this.VersionLbl.TabIndex = 26;
     this.VersionLbl.Text     = "Version:";
     //
     // ManufacturerIDTB
     //
     this.ManufacturerIDTB.Index         = 7;
     this.ManufacturerIDTB.Location      = new System.Drawing.Point(357, 257);
     this.ManufacturerIDTB.Name          = "ManufacturerIDTB";
     this.ManufacturerIDTB.NotifyChanges = false;
     this.ManufacturerIDTB.Size          = new System.Drawing.Size(115, 20);
     this.ManufacturerIDTB.TabIndex      = 5;
     this.ManufacturerIDTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // ManufacturerIDLbl
     //
     this.ManufacturerIDLbl.AutoSize = true;
     this.ManufacturerIDLbl.Location = new System.Drawing.Point(264, 260);
     this.ManufacturerIDLbl.Name     = "ManufacturerIDLbl";
     this.ManufacturerIDLbl.Size     = new System.Drawing.Size(87, 13);
     this.ManufacturerIDLbl.TabIndex = 24;
     this.ManufacturerIDLbl.Text     = "Manufacturer ID:";
     //
     // IdentificationNumberTB
     //
     this.IdentificationNumberTB.Index         = 6;
     this.IdentificationNumberTB.Location      = new System.Drawing.Point(122, 257);
     this.IdentificationNumberTB.Name          = "IdentificationNumberTB";
     this.IdentificationNumberTB.NotifyChanges = false;
     this.IdentificationNumberTB.Size          = new System.Drawing.Size(115, 20);
     this.IdentificationNumberTB.TabIndex      = 4;
     this.IdentificationNumberTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // IdentificationNumberLbl
     //
     this.IdentificationNumberLbl.AutoSize = true;
     this.IdentificationNumberLbl.Location = new System.Drawing.Point(3, 260);
     this.IdentificationNumberLbl.Name     = "IdentificationNumberLbl";
     this.IdentificationNumberLbl.Size     = new System.Drawing.Size(110, 13);
     this.IdentificationNumberLbl.TabIndex = 21;
     this.IdentificationNumberLbl.Text     = "Identification Number:";
     //
     // PrimaryAddressTB
     //
     this.PrimaryAddressTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.PrimaryAddressTB.Index         = 5;
     this.PrimaryAddressTB.Location      = new System.Drawing.Point(122, 230);
     this.PrimaryAddressTB.Name          = "PrimaryAddressTB";
     this.PrimaryAddressTB.NotifyChanges = false;
     this.PrimaryAddressTB.Size          = new System.Drawing.Size(350, 20);
     this.PrimaryAddressTB.TabIndex      = 3;
     this.PrimaryAddressTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // PrimaryAddressLbl
     //
     this.PrimaryAddressLbl.AutoSize = true;
     this.PrimaryAddressLbl.Location = new System.Drawing.Point(3, 233);
     this.PrimaryAddressLbl.Name     = "PrimaryAddressLbl";
     this.PrimaryAddressLbl.Size     = new System.Drawing.Size(85, 13);
     this.PrimaryAddressLbl.TabIndex = 19;
     this.PrimaryAddressLbl.Text     = "Primary Address:";
     //
     // CapturePeriodTB
     //
     this.CapturePeriodTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                         | System.Windows.Forms.AnchorStyles.Right)));
     this.CapturePeriodTB.Index         = 4;
     this.CapturePeriodTB.Location      = new System.Drawing.Point(122, 204);
     this.CapturePeriodTB.Name          = "CapturePeriodTB";
     this.CapturePeriodTB.NotifyChanges = false;
     this.CapturePeriodTB.Size          = new System.Drawing.Size(350, 20);
     this.CapturePeriodTB.TabIndex      = 2;
     this.CapturePeriodTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // CapturePeriodLbl
     //
     this.CapturePeriodLbl.AutoSize = true;
     this.CapturePeriodLbl.Location = new System.Drawing.Point(3, 207);
     this.CapturePeriodLbl.Name     = "CapturePeriodLbl";
     this.CapturePeriodLbl.Size     = new System.Drawing.Size(80, 13);
     this.CapturePeriodLbl.TabIndex = 17;
     this.CapturePeriodLbl.Text     = "Capture Period:";
     //
     // MBusPortReferenceTB
     //
     this.MBusPortReferenceTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                             | System.Windows.Forms.AnchorStyles.Right)));
     this.MBusPortReferenceTB.Index         = 2;
     this.MBusPortReferenceTB.Location      = new System.Drawing.Point(122, 47);
     this.MBusPortReferenceTB.Name          = "MBusPortReferenceTB";
     this.MBusPortReferenceTB.NotifyChanges = false;
     this.MBusPortReferenceTB.Size          = new System.Drawing.Size(350, 20);
     this.MBusPortReferenceTB.TabIndex      = 1;
     this.MBusPortReferenceTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // MBusPortReferenceLbl
     //
     this.MBusPortReferenceLbl.AutoSize = true;
     this.MBusPortReferenceLbl.Location = new System.Drawing.Point(6, 50);
     this.MBusPortReferenceLbl.Name     = "MBusPortReferenceLbl";
     this.MBusPortReferenceLbl.Size     = new System.Drawing.Size(112, 13);
     this.MBusPortReferenceLbl.TabIndex = 2;
     this.MBusPortReferenceLbl.Text     = "MBus Port Reference:";
     //
     // LogicalNameTB
     //
     this.LogicalNameTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.LogicalNameTB.Index         = 1;
     this.LogicalNameTB.Location      = new System.Drawing.Point(122, 21);
     this.LogicalNameTB.Name          = "LogicalNameTB";
     this.LogicalNameTB.NotifyChanges = false;
     this.LogicalNameTB.Size          = new System.Drawing.Size(350, 20);
     this.LogicalNameTB.TabIndex      = 0;
     this.LogicalNameTB.Type          = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // LogicalNameLbl
     //
     this.LogicalNameLbl.AutoSize = true;
     this.LogicalNameLbl.Location = new System.Drawing.Point(6, 24);
     this.LogicalNameLbl.Name     = "LogicalNameLbl";
     this.LogicalNameLbl.Size     = new System.Drawing.Size(75, 13);
     this.LogicalNameLbl.TabIndex = 0;
     this.LogicalNameLbl.Text     = "Logical Name:";
     //
     // errorProvider1
     //
     this.errorProvider1.BlinkStyle       = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     this.errorProvider1.ContainerControl = this;
     this.errorProvider1.Icon             = ((System.Drawing.Icon)(resources.GetObject("errorProvider1.Icon")));
     //
     // GXDLMSMBusClientView
     //
     this.ClientSize = new System.Drawing.Size(506, 556);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "GXDLMSMBusClientView";
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     this.groupBox5.ResumeLayout(false);
     this.groupBox3.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
     this.ResumeLayout(false);
 }
 public static void CustomClear(this ErrorProvider errorProvider)
 {
     errorProvider.Clear();
     existsError = false;
 }
Exemplo n.º 28
0
 private void txtDescripcion_TextChanged(object sender, EventArgs e)
 {
     ErrorProvider.Clear();
 }
Exemplo n.º 29
0
 public CallsignChecker(TextBox callsignTextBox, ErrorProvider errorProvider, Button continueButton, SetCheckMessageDelegate setCheckMessage)
     : this(callsignTextBox, errorProvider, continueButton, setCheckMessage, new Panel())
 {
 }
Exemplo n.º 30
0
 private void txtNombreMunicipio_TextChanged(object sender, EventArgs e)
 {
     ErrorProvider.Clear();
 }
Exemplo n.º 31
0
	string exePath; //path of loaded exe

	public insertWild(string ExePath, bool dbPro)
	{
		exePath = ExePath;
		int y = 5;
		GroupBox gb;
		Text = "Insert multiple files";
		ShowInTaskbar = false;
		Size = new Size(500, 490);
		StartPosition = FormStartPosition.CenterParent;

		selectedFiles = new string[0];

		this.Resize += new EventHandler(insertWild_Resize);

		//filtered contextmenu
		EventHandler mAll = new EventHandler(mAllOnClick);
		EventHandler mNone = new EventHandler(mNoneOnClick);
		EventHandler mInvert = new EventHandler(mInvertOnClick);

		MenuItem[] ami = {new MenuItem("Select &All", mAll),
						  new MenuItem("Select &None", mNone),
						  new MenuItem("&Invert Selection", mInvert)};

		//directory
		gb = new GroupBox();
		gb.Parent = this;
		gb.Text = "Directory";
		gb.Location = new Point(5, y);
		gb.Size = new Size(this.Width - 20, 45);
		gb.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
		directory = new TextBox();
		directory.Parent = gb;
		directory.Location = new Point(10, 15);
		directory.Width = gb.Width - 155;
		directory.Anchor = AnchorStyles.Left | AnchorStyles.Right;
		directory.TextChanged += new EventHandler(directory_TextChanged);
		btnDirectory = new Button();
		btnDirectory.Parent = gb;
		btnDirectory.Location = new Point(directory.Width + directory.Left + 5, 15);
		btnDirectory.Text = "...";
		btnDirectory.Width = 25;
		btnDirectory.Anchor = AnchorStyles.Right;
		btnDirectory.Click += new EventHandler(btnDirectory_Click);
		cbDirectory = new CheckBox();
		cbDirectory.Parent = gb;
		cbDirectory.Location = new Point(btnDirectory.Left + btnDirectory.Width + 5, 15);
		cbDirectory.Text = "Recurse subdirs";
		cbDirectory.Width = 105;
		cbDirectory.Anchor = AnchorStyles.Right;
		cbDirectory.CheckStateChanged += new EventHandler(cbDirectory_CheckStateChanged);
		y += gb.Height + 5;

		gbFiles = new GroupBox();
		gbFiles.Parent = this;
		gbFiles.Location = new Point(5, y);
		gbFiles.Text = "Files in dir";
		gbFiles.Size = new Size((this.Width / 2) - 20, 325);
		gbFiles.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
		files = new ListBox();
		files.Parent = gbFiles;
		files.Location = new Point(10, 15);
		files.Size = new Size(gbFiles.Width - 20, gbFiles.Height - 25);
		files.Anchor = AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;

		gbFiltered = new GroupBox();
		gbFiltered.Parent = this;
		gbFiltered.Location = new Point((this.Width / 2), y);
		gbFiltered.Text = "Files to insert";
		gbFiltered.Size = gbFiles.Size;
		gbFiltered.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Bottom;
		filtered = new ListBox();
		filtered.Parent = gbFiltered;
		filtered.SelectionMode = SelectionMode.MultiSimple;
		filtered.Location = new Point(10, 15);
		filtered.Size = new Size(gbFiltered.Width - 20, gbFiltered.Height - 25);
		filtered.Anchor = AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom;
		filtered.ContextMenu = new ContextMenu(ami);
		y += gbFiltered.Height + 5;

		//filter
		gb = new GroupBox();
		gb.Parent = this;
		gb.Text = "Filter regex";
		gb.Location = new Point(5, y);
		gb.Size = new Size(this.Width - 20, 45);
		gb.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
		filter = new TextBox();
		filter.Parent = gb;
		filter.Location = new Point(10, 15);
		filter.Width = gb.Width - 35;
		filter.TextChanged += new EventHandler(filter_TextChanged);
		filter.Anchor = AnchorStyles.Left | AnchorStyles.Right;
		filterError = new ErrorProvider();
		filterError.BlinkStyle = ErrorBlinkStyle.NeverBlink;
		y += gb.Height + 5;

		Button btn = new Button();
		btn.Parent = this;
		btn.Text = "Cancel";
		btn.Location = new Point(this.Width - btn.Width - 15, y);
		btn.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
		CancelButton = btn;

		insertAll = new Button();
		insertAll.Parent = this;
		insertAll.Text = "Insert &all";
		insertAll.Location = new Point(btn.Left - insertAll.Width - 10, y);
		insertAll.Click += new EventHandler(insertAll_Click);
		insertAll.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

		insertSelected = new Button();
		insertSelected.Parent = this;
		insertSelected.Text = "Insert &Selected";
		insertSelected.Width += 20;
		insertSelected.Location = new Point(insertAll.Left - insertSelected.Width - 10, y);
		insertSelected.Click += new EventHandler(insertSelected_Click);
		insertSelected.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;

		mediaPrefix = new CheckBox();
		mediaPrefix.Parent = this;
		mediaPrefix.Text = "Insert with \"media\\\" prefix";
		mediaPrefix.Width = 160;
		mediaPrefix.Checked = dbPro;
		mediaPrefix.Location = new Point(5, y);
		mediaPrefix.Anchor = AnchorStyles.Left | AnchorStyles.Bottom;
	}
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GXDLMSSecuritySetupView));
     this.groupBox1            = new System.Windows.Forms.GroupBox();
     this.ServerSystemTitleLbl = new System.Windows.Forms.Label();
     this.ClientSystemTitleLbl = new System.Windows.Forms.Label();
     this.SuiteLbl             = new System.Windows.Forms.Label();
     this.DescriptionLbl       = new System.Windows.Forms.Label();
     this.DescriptionTB        = new System.Windows.Forms.TextBox();
     this.SecurityPolicyLbl    = new System.Windows.Forms.Label();
     this.LogicalNameLbl       = new System.Windows.Forms.Label();
     this.errorProvider1       = new System.Windows.Forms.ErrorProvider(this.components);
     this.ServerSystemTitleTB  = new Gurux.DLMS.UI.GXValueField();
     this.ClientSystemTitleTB  = new Gurux.DLMS.UI.GXValueField();
     this.SuiteTB          = new Gurux.DLMS.UI.GXValueField();
     this.SecurityPolicyTB = new Gurux.DLMS.UI.GXValueField();
     this.LogicalNameTB    = new Gurux.DLMS.UI.GXValueField();
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.Controls.Add(this.ServerSystemTitleTB);
     this.groupBox1.Controls.Add(this.ServerSystemTitleLbl);
     this.groupBox1.Controls.Add(this.ClientSystemTitleTB);
     this.groupBox1.Controls.Add(this.ClientSystemTitleLbl);
     this.groupBox1.Controls.Add(this.SuiteTB);
     this.groupBox1.Controls.Add(this.SuiteLbl);
     this.groupBox1.Controls.Add(this.DescriptionLbl);
     this.groupBox1.Controls.Add(this.DescriptionTB);
     this.groupBox1.Controls.Add(this.SecurityPolicyTB);
     this.groupBox1.Controls.Add(this.SecurityPolicyLbl);
     this.groupBox1.Controls.Add(this.LogicalNameTB);
     this.groupBox1.Controls.Add(this.LogicalNameLbl);
     this.groupBox1.Location = new System.Drawing.Point(12, 12);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(296, 181);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = "Security Setup Object";
     //
     // ServerSystemTitleLbl
     //
     this.ServerSystemTitleLbl.AutoSize = true;
     this.ServerSystemTitleLbl.Location = new System.Drawing.Point(7, 152);
     this.ServerSystemTitleLbl.Name     = "ServerSystemTitleLbl";
     this.ServerSystemTitleLbl.Size     = new System.Drawing.Size(101, 13);
     this.ServerSystemTitleLbl.TabIndex = 11;
     this.ServerSystemTitleLbl.Text     = "Server System Title:";
     //
     // ClientSystemTitleLbl
     //
     this.ClientSystemTitleLbl.AutoSize = true;
     this.ClientSystemTitleLbl.Location = new System.Drawing.Point(7, 126);
     this.ClientSystemTitleLbl.Name     = "ClientSystemTitleLbl";
     this.ClientSystemTitleLbl.Size     = new System.Drawing.Size(96, 13);
     this.ClientSystemTitleLbl.TabIndex = 9;
     this.ClientSystemTitleLbl.Text     = "Client System Title:";
     //
     // SuiteLbl
     //
     this.SuiteLbl.AutoSize = true;
     this.SuiteLbl.Location = new System.Drawing.Point(7, 100);
     this.SuiteLbl.Name     = "SuiteLbl";
     this.SuiteLbl.Size     = new System.Drawing.Size(34, 13);
     this.SuiteLbl.TabIndex = 7;
     this.SuiteLbl.Text     = "Suite:";
     //
     // DescriptionLbl
     //
     this.DescriptionLbl.AutoSize = true;
     this.DescriptionLbl.Location = new System.Drawing.Point(7, 22);
     this.DescriptionLbl.Name     = "DescriptionLbl";
     this.DescriptionLbl.Size     = new System.Drawing.Size(63, 13);
     this.DescriptionLbl.TabIndex = 5;
     this.DescriptionLbl.Text     = "Description:";
     //
     // DescriptionTB
     //
     this.DescriptionTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.DescriptionTB.Location = new System.Drawing.Point(103, 19);
     this.DescriptionTB.Name     = "DescriptionTB";
     this.DescriptionTB.ReadOnly = true;
     this.DescriptionTB.Size     = new System.Drawing.Size(172, 20);
     this.DescriptionTB.TabIndex = 4;
     //
     // SecurityPolicyLbl
     //
     this.SecurityPolicyLbl.AutoSize = true;
     this.SecurityPolicyLbl.Location = new System.Drawing.Point(7, 74);
     this.SecurityPolicyLbl.Name     = "SecurityPolicyLbl";
     this.SecurityPolicyLbl.Size     = new System.Drawing.Size(38, 13);
     this.SecurityPolicyLbl.TabIndex = 2;
     this.SecurityPolicyLbl.Text     = "Policy:";
     //
     // LogicalNameLbl
     //
     this.LogicalNameLbl.AutoSize = true;
     this.LogicalNameLbl.Location = new System.Drawing.Point(7, 48);
     this.LogicalNameLbl.Name     = "LogicalNameLbl";
     this.LogicalNameLbl.Size     = new System.Drawing.Size(75, 13);
     this.LogicalNameLbl.TabIndex = 0;
     this.LogicalNameLbl.Text     = "Logical Name:";
     //
     // errorProvider1
     //
     this.errorProvider1.BlinkStyle       = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     this.errorProvider1.ContainerControl = this;
     this.errorProvider1.Icon             = ((System.Drawing.Icon)(resources.GetObject("errorProvider1.Icon")));
     //
     // ServerSystemTitleTB
     //
     this.ServerSystemTitleTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                             | System.Windows.Forms.AnchorStyles.Right)));
     this.ServerSystemTitleTB.Index    = 5;
     this.ServerSystemTitleTB.Location = new System.Drawing.Point(104, 149);
     this.ServerSystemTitleTB.Name     = "ServerSystemTitleTB";
     this.ServerSystemTitleTB.Size     = new System.Drawing.Size(171, 20);
     this.ServerSystemTitleTB.TabIndex = 3;
     this.ServerSystemTitleTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // ClientSystemTitleTB
     //
     this.ClientSystemTitleTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                             | System.Windows.Forms.AnchorStyles.Right)));
     this.ClientSystemTitleTB.Index    = 4;
     this.ClientSystemTitleTB.Location = new System.Drawing.Point(104, 123);
     this.ClientSystemTitleTB.Name     = "ClientSystemTitleTB";
     this.ClientSystemTitleTB.Size     = new System.Drawing.Size(171, 20);
     this.ClientSystemTitleTB.TabIndex = 2;
     this.ClientSystemTitleTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // SuiteTB
     //
     this.SuiteTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                 | System.Windows.Forms.AnchorStyles.Right)));
     this.SuiteTB.Index    = 3;
     this.SuiteTB.Location = new System.Drawing.Point(104, 97);
     this.SuiteTB.Name     = "SuiteTB";
     this.SuiteTB.Size     = new System.Drawing.Size(171, 20);
     this.SuiteTB.TabIndex = 1;
     this.SuiteTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // SecurityPolicyTB
     //
     this.SecurityPolicyTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.SecurityPolicyTB.Index     = 2;
     this.SecurityPolicyTB.Location  = new System.Drawing.Point(104, 71);
     this.SecurityPolicyTB.Name      = "SecurityPolicyTB";
     this.SecurityPolicyTB.Size      = new System.Drawing.Size(171, 20);
     this.SecurityPolicyTB.TabIndex  = 0;
     this.SecurityPolicyTB.Type      = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     this.SecurityPolicyTB.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.ValueTB_KeyPress);
     this.SecurityPolicyTB.KeyUp    += new System.Windows.Forms.KeyEventHandler(this.ValueTB_KeyUp);
     //
     // LogicalNameTB
     //
     this.LogicalNameTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.LogicalNameTB.Index    = 1;
     this.LogicalNameTB.Location = new System.Drawing.Point(103, 45);
     this.LogicalNameTB.Name     = "LogicalNameTB";
     this.LogicalNameTB.Size     = new System.Drawing.Size(171, 20);
     this.LogicalNameTB.TabIndex = 5;
     this.LogicalNameTB.Type     = Gurux.DLMS.UI.GXValueFieldType.TextBox;
     //
     // GXDLMSSecuritySetupView
     //
     this.ClientSize = new System.Drawing.Size(320, 204);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "GXDLMSSecuritySetupView";
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
     this.ResumeLayout(false);
 }
Exemplo n.º 33
0
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GXDLMSIEC14908PhysicalSetupView));
     this.groupBox1 = new System.Windows.Forms.GroupBox();
     this.PLCInactivityTimeoutTB  = new Gurux.DLMS.UI.GXValueField();
     this.PLCInactivityTimeoutLbl = new System.Windows.Forms.Label();
     this.LogicalNameTB           = new Gurux.DLMS.UI.GXValueField();
     this.LogicalNameLbl          = new System.Windows.Forms.Label();
     this.errorProvider1          = new System.Windows.Forms.ErrorProvider(this.components);
     this.groupBox1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit();
     this.SuspendLayout();
     //
     // groupBox1
     //
     this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.groupBox1.Controls.Add(this.PLCInactivityTimeoutTB);
     this.groupBox1.Controls.Add(this.PLCInactivityTimeoutLbl);
     this.groupBox1.Controls.Add(this.LogicalNameTB);
     this.groupBox1.Controls.Add(this.LogicalNameLbl);
     this.groupBox1.Location = new System.Drawing.Point(12, 12);
     this.groupBox1.Name     = "groupBox1";
     this.groupBox1.Size     = new System.Drawing.Size(348, 85);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop  = false;
     this.groupBox1.Text     = " IEC 14908 Physical Setup";
     this.groupBox1.UseCompatibleTextRendering = true;
     //
     // PLCInactivityTimeoutTB
     //
     this.PLCInactivityTimeoutTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                                | System.Windows.Forms.AnchorStyles.Right)));
     this.PLCInactivityTimeoutTB.Index    = 2;
     this.PLCInactivityTimeoutTB.Location = new System.Drawing.Point(136, 47);
     this.PLCInactivityTimeoutTB.Name     = "PLCInactivityTimeoutTB";
     this.PLCInactivityTimeoutTB.Size     = new System.Drawing.Size(206, 20);
     this.PLCInactivityTimeoutTB.TabIndex = 1;
     this.PLCInactivityTimeoutTB.Type     = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // PLCInactivityTimeoutLbl
     //
     this.PLCInactivityTimeoutLbl.AutoSize = true;
     this.PLCInactivityTimeoutLbl.Location = new System.Drawing.Point(6, 50);
     this.PLCInactivityTimeoutLbl.Name     = "PLCInactivityTimeoutLbl";
     this.PLCInactivityTimeoutLbl.Size     = new System.Drawing.Size(111, 13);
     this.PLCInactivityTimeoutLbl.TabIndex = 2;
     this.PLCInactivityTimeoutLbl.Text     = "PLC inactivity timeout:";
     //
     // LogicalNameTB
     //
     this.LogicalNameTB.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     this.LogicalNameTB.Index    = 1;
     this.LogicalNameTB.Location = new System.Drawing.Point(136, 21);
     this.LogicalNameTB.Name     = "LogicalNameTB";
     this.LogicalNameTB.Size     = new System.Drawing.Size(206, 20);
     this.LogicalNameTB.TabIndex = 0;
     this.LogicalNameTB.Type     = Gurux.DLMS.Enums.ValueFieldType.TextBox;
     //
     // LogicalNameLbl
     //
     this.LogicalNameLbl.AutoSize = true;
     this.LogicalNameLbl.Location = new System.Drawing.Point(6, 24);
     this.LogicalNameLbl.Name     = "LogicalNameLbl";
     this.LogicalNameLbl.Size     = new System.Drawing.Size(75, 13);
     this.LogicalNameLbl.TabIndex = 0;
     this.LogicalNameLbl.Text     = "Logical Name:";
     //
     // errorProvider1
     //
     this.errorProvider1.BlinkStyle       = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
     this.errorProvider1.ContainerControl = this;
     this.errorProvider1.Icon             = ((System.Drawing.Icon)(resources.GetObject("errorProvider1.Icon")));
     //
     // GXDLMSIEC14908PhysicalSetupView
     //
     this.ClientSize = new System.Drawing.Size(372, 117);
     this.Controls.Add(this.groupBox1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "GXDLMSIEC14908PhysicalSetupView";
     this.groupBox1.ResumeLayout(false);
     this.groupBox1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit();
     this.ResumeLayout(false);
 }
Exemplo n.º 34
0
 public frm_agendar()
 {
     InitializeComponent();
     radScheduler1.GetDayView().RulerFormatStrings = new RulerFormatStrings("hh", "mm", "", "");
     this.errorProvider = new ErrorProvider();
 }
Exemplo n.º 35
0
 public static bool requireField(ErrorProvider errorProvider1,Control control1,string value,string message ="Field Is Required")
 {
     if (value == string.Empty)
     {
         errorProvider1.SetError(control1, message);
         return false;
     }
     return true;
 }
Exemplo n.º 36
0
        protected override bool Validate()
        {
            string controlValue = ControlToValidate.Text.Trim();
            bool   valid        = true;

            if (IsEnabled && ControlToValidate.Enabled)
            {
                String minInclusive = null;
                String minExclusive = null;
                String maxInclusive = null;
                String maxExclusive = null;
                String length       = null;
                String minLength    = null;
                String maxLength    = null;
                var    errorMessage = new StringBuilder();

                XmlSchemaAttribute attribute = null;
                SchemaManager.FindAttribute(_targetNamespace, _typeName, _attributeName, out attribute);

                if (attribute == null)
                {
                    LogManager.Error("XSDSchemaValidator - Failed to locate attribute: {0} in {1}", _attributeName, _targetNamespace);
                }
                else
                {
                    XmlSchemaUse use = attribute.Use;

                    XmlSchemaSimpleType attributeSchemaType = attribute.AttributeSchemaType;
                    XmlQualifiedName    qname = attributeSchemaType.BaseXmlSchemaType.QualifiedName;
                    String typeName           = qname.Name;
                    ErrorProvider.SetError(_controlToValidate, "");


                    if (attributeSchemaType.Content is XmlSchemaSimpleTypeRestriction)
                    {
                        var restr = (XmlSchemaSimpleTypeRestriction)attributeSchemaType.Content;
                        foreach (object facet in restr.Facets)
                        {
                            if (facet is XmlSchemaMinInclusiveFacet)
                            {
                                var lf = facet as XmlSchemaMinInclusiveFacet;
                                if (!String.IsNullOrEmpty(controlValue))
                                {
                                    int    iResult;
                                    double dResult;
                                    if ((typeName.Contains("int") && int.TryParse(controlValue, out iResult) &&
                                         iResult < int.Parse(lf.Value))
                                        ||
                                        (typeName.Contains("dou") && double.TryParse(controlValue, out dResult) &&
                                         dResult < double.Parse(lf.Value)))
                                    {
                                        errorMessage.Append((errorMessage.Length > 0) ? "\r\n" : "")
                                        .Append(String.Format("The value must not be less than {0}", lf.Value));
                                    }
                                }
                            }
                            else if (facet is XmlSchemaMinExclusiveFacet)
                            {
                                minExclusive = ((XmlSchemaMinExclusiveFacet)facet).Value;
                            }
                            else if (facet is XmlSchemaMaxInclusiveFacet)
                            {
                                maxInclusive = ((XmlSchemaMaxInclusiveFacet)facet).Value;
                            }
                            else if (facet is XmlSchemaMaxExclusiveFacet)
                            {
                                maxExclusive = ((XmlSchemaMaxExclusiveFacet)facet).Value;
                            }
                            else if (facet is XmlSchemaLengthFacet)
                            {
                                var lf = facet as XmlSchemaLengthFacet;
                                if (!String.IsNullOrEmpty(controlValue) && controlValue.Length > int.Parse(lf.Value))
                                {
                                    errorMessage.Append((errorMessage.Length > 0) ? "\r\n" : "")
                                    .Append(String.Format("The value's length must not excede {0} characters",
                                                          lf.Value));
                                }
                            }
                            else if (facet is XmlSchemaMinLengthFacet)
                            {
                                var lf = facet as XmlSchemaMinLengthFacet;
                                if (!String.IsNullOrEmpty(controlValue) && controlValue.Length < int.Parse(lf.Value))
                                {
                                    errorMessage.Append((errorMessage.Length > 0) ? "\r\n" : "")
                                    .Append(String.Format("The value's length must not be less than {0} characters",
                                                          lf.Value));
                                }
                            }
                            else if (facet is XmlSchemaMaxLengthFacet)
                            {
                                var lf = facet as XmlSchemaMaxLengthFacet;
                                if (!String.IsNullOrEmpty(controlValue) && controlValue.Length > int.Parse(lf.Value))
                                {
                                    errorMessage.Append((errorMessage.Length > 0) ? "\r\n" : "")
                                    .Append(
                                        String.Format("The value's length must not be greater than {0} characters",
                                                      lf.Value));
                                }
                            }
                            else if (facet is XmlSchemaPatternFacet)
                            {
                                var spf = facet as XmlSchemaPatternFacet;
                                //Console.WriteLine(spf.Id + " : " + spf.Value);
                                if (!Regex.IsMatch(controlValue, spf.Value))
                                {
                                    if (_icon != null)
                                    {
                                        ErrorProvider.Icon = _icon;
                                    }
                                    errorMessage.Append((errorMessage.Length > 0) ? "\r\n" : "")
                                    .Append(String.Format(
                                                "The \"{0}\" value must match the regular expression: {1}",
                                                _attributeName, spf.Value));
                                    valid = false;
                                }
                            }
                            else if (facet is XmlSchemaEnumerationFacet)
                            {
                            }
                            else if (facet is XmlSchemaTotalDigitsFacet)
                            {
                            }
                            else if (facet is XmlSchemaWhiteSpaceFacet)
                            {
                            }
                        }

                        ErrorProvider.SetError(_controlToValidate, errorMessage.ToString());
                    }
                }
            }
            if (!valid)
            {
                if (ControlToValidate is ATMLControl)
                {
                    ((ATMLControl)ControlToValidate).HasErrors = true;
                }
            }

            return(valid);
        }