Example #1
0
 /// <summary>
 /// Window Button Click Method
 /// Handles Button Presses
 /// </summary>
 /// <param name="sender">Object Which Called This Function</param>
 /// <param name="e">The Arguments</param>
 protected override void Element_Click(object sender, RoutedEventArgs e)
 {
     if (e.Source == CompanyCreationWindow.buttonCreate)
     {
         Exit = ExitStatus.Ok;
         CompanyCreationWindow.Close();
     }
     else if (e.Source == CompanyCreationWindow.buttonCancel)
     {
         Exit = ExitStatus.Cancel;
         CompanyCreationWindow.Close();
     }
     else if (e.Source == CompanyCreationWindow.buttonAddRep)
     {
         EditReps();
     }
     else if (e.Source == CompanyCreationWindow.buttonAddTitle)
     {
         EditJobs();
     }
     else if (e.Source == CompanyCreationWindow.buttonAddBoard)
     {
         EditBoards();
     }
 }
Example #2
0
 /// <summary>
 /// Window Key Down Event Method
 /// Handles Enter And Escape Key Presses
 /// </summary>
 /// <param name="sender">Object Which Called This Function</param>
 /// <param name="e">The Arguments</param>
 protected override void Window_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         SaveCompanyDetails();
         Exit = ExitStatus.Ok;
         CompanyCreationWindow.Close();
     }
     else if (e.Key == Key.Escape)
     {
         Exit = ExitStatus.Cancel;
         CompanyCreationWindow.Close();
     }
 }