示例#1
0
        // ----------------------------------------------------------------------------------------------------------

        // HANDLE VISIBLE TEXTBOXES AND BUTTONS ---------------------------------------------------------------------
        private void HideButtons()
        {
            // Hide buttons (except Adds)
            Ok_button.Hide();
            Cancel_button.Hide();
            Edit_button.Hide();
            Delete_button.Hide();
            Add_Tenant_button.Show();
            Add_SP_button.Show();
        }
示例#2
0
 private void ShowButtons()
 {
     // Hide all buttons (except edit and delete)
     Ok_button.Hide();
     Cancel_button.Hide();
     Add_Tenant_button.Hide();
     Add_SP_button.Hide();
     Edit_button.Show();
     Delete_button.Show();
     if (edit || AddSP || AddTenant)
     {
         Ok_button.Show();
         Cancel_button.Show();
         Edit_button.Hide();
         Delete_button.Hide();
     }
 }
示例#3
0
 private void Buttons_Visibility(string name)
 {
     if (name.Equals("events"))
     {
         // Hide Meeting/Repair attributs
         Name_textBox.Hide();
         Name_input_textBox.Hide();
         Date_textBox.Hide();
         Date_input_textBox.Hide();
         Time_textBox.Hide();
         Hour_input_textBox.Hide();
         Minute_input_textBox.Hide();
         Type_textBox.Hide();
         Type_input_textBox.Hide();
         Place_textBox.Hide();
         Place_input_textBox.Hide();
         Damaged_textBox.Hide();
         Damaged_input_textBox.Hide();
         Description_textBox.Hide();
         Description_input_textBox.Hide();
         Ok_button.Hide();
         Cancel_button.Hide();
     }
     else if (name.Equals("cancel"))
     {
         Name_textBox.Hide();
         Name_input_textBox.Hide();
         Date_textBox.Hide();
         Date_input_textBox.Hide();
         Time_textBox.Hide();
         Hour_input_textBox.Hide();
         Minute_input_textBox.Hide();
         Type_textBox.Hide();
         Type_input_textBox.Hide();
         Place_textBox.Hide();
         Place_input_textBox.Hide();
         Damaged_textBox.Hide();
         Damaged_input_textBox.Hide();
         Description_textBox.Hide();
         Description_input_textBox.Hide();
         Ok_button.Hide();
         Cancel_button.Hide();
     }
     else if (name.Equals("Meeting"))
     {
         Damaged_textBox.Hide();
         Damaged_input_textBox.Hide();
         // Show Meeting/Repair attributs
         Name_textBox.Show();
         Name_input_textBox.Text = "";
         Name_input_textBox.Show();
         Date_textBox.Show();
         Date_input_textBox.Text = Data;
         Date_input_textBox.Show();
         Time_textBox.Show();
         Hour_input_textBox.Text = "";
         Hour_input_textBox.Show();
         Minute_input_textBox.Text = "";
         Minute_input_textBox.Show();
         Type_textBox.Show();
         Type_input_textBox.Show();
         Type_input_textBox.Text = "Meeting";
         Place_textBox.Show();
         Place_input_textBox.Text = "";
         Place_input_textBox.Show();
         Description_textBox.Show();
         Description_input_textBox.Text = "";
         Description_input_textBox.Show();
         Ok_button.Show();
         Cancel_button.Show();
     }
     else if (name.Equals("Repair"))
     {
         Place_textBox.Hide();
         Place_input_textBox.Hide();
         // Show Meeting/Repair attributs
         Name_textBox.Show();
         Name_input_textBox.Text = "";
         Name_input_textBox.Show();
         Date_textBox.Show();
         Date_input_textBox.Text = Data;
         Date_input_textBox.Show();
         Time_textBox.Show();
         Hour_input_textBox.Text = "";
         Hour_input_textBox.Show();
         Minute_input_textBox.Text = "";
         Minute_input_textBox.Show();
         Type_textBox.Show();
         Type_input_textBox.Show();
         Type_input_textBox.Text = "Repair";
         Damaged_textBox.Show();
         Damaged_input_textBox.Text = "";
         Damaged_input_textBox.Show();
         Description_textBox.Show();
         Description_input_textBox.Text = "";
         Description_input_textBox.Show();
         Ok_button.Show();
         Cancel_button.Show();
     }
 }