Example #1
0
 /// <summary>
 /// Validation method for input box for sequence data
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void inputBox_SequenceValidating(object sender, InputBoxValidatingArgs e)
 {
     if (e.Text.Trim().Length == 0)
     {
         e.Cancel  = true;
         e.Message = "Required";
     }
     else if (Nucleotide.isDNA(e.Text.Trim()) == false)
     {
         e.Cancel  = true;
         e.Message = "Required";
     }
 }
 /// <summary>
 /// Validate the Text using the Validator
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textBoxText_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (Validator != null)
     {
         InputBoxValidatingArgs args = new InputBoxValidatingArgs();
         args.Text = textBoxText.Text;
         Validator(this, args);
         if (args.Cancel)
         {
             e.Cancel = true;
             errorProviderText.SetError(textBoxText, args.Message);
         }
     }
 }
Example #3
0
 private void inputBox_GCThresholdValidating(object sender, InputBoxValidatingArgs e)
 {
     if (e.Text.Trim().Length == 0)
     {
         e.Cancel  = true;
         e.Message = "Required";
     }
     else if (HelperMethods.safeParseInt(e.Text.Trim()) == false)
     {
         e.Cancel  = true;
         e.Message = "Required";
     }
     else
     {
         int i = Int32.Parse(e.Text.Trim());
         if (i < 1 || i > 99)
         {
             e.Cancel  = true;
             e.Message = "Required";
         }
     }
 }
Example #4
0
 /// <summary>
 /// Validation method for the input box for an integer
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void inputBox_Validating(object sender, InputBoxValidatingArgs e)
 {
     if (e.Text.Trim().Length == 0)
     {
         e.Cancel  = true;
         e.Message = "Required";
     }
     else if (HelperMethods.safeParseInt(e.Text.Trim()) == false)
     {
         e.Cancel  = true;
         e.Message = "Required";
     }
     else
     {
         int i = Int32.Parse(e.Text.Trim());
         if (i > (FastqController.getInstance().GetFqFileMap().GlobalDetails.MaxSeqSize - 1) && i < 1)
         {
             e.Cancel  = true;
             e.Message = "Required";
         }
     }
 }
 /// <summary>
 /// Validation method for the input box for an integer
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void inputBox_Validating(object sender, InputBoxValidatingArgs e)
 {
     if (e.Text.Trim().Length == 0)
     {
         e.Cancel = true;
         e.Message = "Required";
     }
     else if (HelperMethods.safeParseInt(e.Text.Trim()) == false)
     {
         e.Cancel = true;
         e.Message = "Required";
     }
     else
     {
         int i = Int32.Parse(e.Text.Trim());
         if (i > (FastqController.getInstance().GetFqFileMap().GlobalDetails.MaxSeqSize - 1) && i < 1)
         {
             e.Cancel = true;
             e.Message = "Required";
         }
     }
 }
 /// <summary>
 /// Validation method for input box for sequence data
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void inputBox_SequenceValidating(object sender, InputBoxValidatingArgs e)
 {
     if (e.Text.Trim().Length == 0)
     {
         e.Cancel = true;
         e.Message = "Required";
     }
     else if (Nucleotide.isDNA(e.Text.Trim()) == false)
     {
         e.Cancel = true;
         e.Message = "Required";
     }
 }
 /// <summary>
 /// Validation method for input box for mean threshold
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void inputBox_MeanThresholdValidating(object sender, InputBoxValidatingArgs e)
 {
     if (e.Text.Trim().Length == 0)
     {
         e.Cancel = true;
         e.Message = "Required";
     }
     else if (HelperMethods.safeParseInt(e.Text.Trim()) == false)
     {
         e.Cancel = true;
         e.Message = "Required";
     }
     else
     {
         int i = Int32.Parse(e.Text.Trim());
         if (i > 40 || i < 1)
         {
             e.Cancel = true;
             e.Message = "Required";
         }
     }
 }
 /// <summary>
 /// Validate the Text using the Validator
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void textBoxText_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (Validator != null)
     {
         InputBoxValidatingArgs args = new InputBoxValidatingArgs();
         args.Text = textBoxText.Text;
         Validator(this, args);
         if (args.Cancel)
         {
             e.Cancel = true;
             errorProviderText.SetError(textBoxText, args.Message);
         }
     }
 }