private void Submit(object sender, RoutedEventArgs e) { Button sent = sender as Button; if (((String)sent.Name).Equals("cancelButton")) { NavigationService.GoBack(); return; } // only update a rental if it was found in the lookup if (rentalFound) { rental.CheckinTime = DateTime.Now; rental.Resource.Status = Resource.ResourceStatus.RETURNED; rentals.updateSingle(rental); resources.updateSingle(rental.Resource); infoWindow = new InformationWindow("Item Checkin"); infoWindow.setInfoText("Rental was successfully checked in."); infoWindow.ShowDialog(); } NavigationService.GoBack(); }
public void Information() { Window window = new InformationWindow(); WindowVisibility = false; window.ShowDialog(); WindowVisibility = true; }
private void InformationButton_Click(object sender, RoutedEventArgs e) { InformationWindow IW = new InformationWindow(); IW.Owner = this; this.Hide(); IW.ShowDialog(); this.Show(); }
private static async Task ShowInformationDialogAsync(InformationMessage message) { if (message is ExceptionMessage) { Trace.TraceError($"Exception: { message.VM.Details }"); } var window = new InformationWindow() { VM = message.VM }; await window.ShowDialog(MainWindow); message.Process(); }
private void resourceId_LostFocus(object sender, RoutedEventArgs e) { TextBox sent = sender as TextBox; int id = -1; List <Rental> checkedOut; if (sent.Text == "") { return; } if (!int.TryParse(sent.Text, out id)) { //display error message return; } checkedOut = rentals.getRentalByResourceId(id); if (checkedOut == null || checkedOut.Count < 1) { infoWindow = new InformationWindow("Rental not found"); infoWindow.setInfoText("A rental associated to the resource with id " + id + " was not found"); infoWindow.ShowDialog(); return; } rentalFound = true; rental = checkedOut[0]; renterName.Text = rental.Renter.FullName; renterEmail.Text = rental.Renter.CpEmail; returnButton.Focus(); }
private void Information() { _informationWindow = new InformationWindow(); _informationWindow.Owner = Application.Current.MainWindow; _informationWindow.ShowDialog(); }
public void ShowInformationWindow() { InformationOpen = new InformationWindow(); InformationOpen.ShowDialog(); }
private void information_button_Click(object sender, RoutedEventArgs e) { InformationWindow informationwindow = new InformationWindow(); informationwindow.ShowDialog(); }
private void OnClickInformation() { Window window = new InformationWindow(); window.ShowDialog(); }
private void InformationButtonClick(object sender, RoutedEventArgs e) { var informationDialog = new InformationWindow(); informationDialog.ShowDialog(); }