Ejemplo n.º 1
0
 public void Clear()
 {
     TB1A.Text           = "";
     TB2AHInicial.Text   = "";
     TB3AHFinal.Text     = "";
     CheckBox1.IsChecked = false;
     DatePicker.ClearValue(DatePicker.SelectedDateProperty);
 }
Ejemplo n.º 2
0
 private void resetujBojuOkvira(object sender, EventArgs e)
 {
     try
     {
         TextBox t = (TextBox)sender;
         t.ClearValue(Border.BorderBrushProperty);
     }
     catch
     {
         DatePicker d = (DatePicker)sender;
         d.ClearValue(Border.BorderBrushProperty);
     }
 }
Ejemplo n.º 3
0
 // static methods
 public static void ClearForm(List <Control> lst)
 {
     foreach (Control control in lst)
     {
         if (control is TextBox)
         {
             TextBox txtbox = (TextBox)control;
             txtbox.Clear();
         }
         else if (control is PasswordBox)
         {
             PasswordBox passbox = (PasswordBox)control;
             passbox.Clear();
         }
         else if (control is CheckBox)
         {
             CheckBox chkbox = (CheckBox)control;
             chkbox.IsChecked = false;
         }
         else if (control is RadioButton)
         {
             RadioButton rdbtn = (RadioButton)control;
             rdbtn.IsChecked = false;
         }
         else if (control is DatePicker)
         {
             DatePicker datePckr = (DatePicker)control;
             datePckr.ClearValue(DatePicker.SelectedDateProperty);
         }
         else if (control is ComboBox)
         {
             ComboBox cmbbox = (ComboBox)control;
             cmbbox.ClearValue(ComboBox.SelectedItemProperty);
         }
     }
 }