/// <summary> /// Method used to excute <see cref="MainWindow"/> loaded event /// </summary> /// <param name="param"></param> private void WindowLoaded(object param) { #if DEBUG if (CanAutomate) { try { BindingErrorAutomation.RunBindingErrorAutomation(this); } catch (Exception e) { ErrorLogging.LogError(e.Message + "\n" + e.StackTrace); } } #endif }
/// <summary> /// Method used to excute <see cref="ProductDemosWindow"/> loaded event /// </summary> /// <param name="param"></param> private void ProductWindowLoaded(object param) { #if DEBUG if (CanAutomate) { try { BindingErrorAutomation.UpdateSelectedSample(); } catch (Exception e) { ErrorLogging.LogError(e.Message + "\n" + e.StackTrace); } } #endif }
public MainWindow(DemoBrowserViewModel viewModel) { #if DEBUG if (DemoBrowserViewModel.CanAutomate) { BindingErrorListener.Listen(errorMessage => BindingErrorAutomation.OnBindingError(errorMessage, viewModel)); } #endif InitializeComponent(); this.DataContext = viewModel; DemosNavigationService.MainWindow = this; DemosNavigationService.RootNavigationService = this.ROOTFRAME.NavigationService; DemosNavigationService.RootNavigationService.Navigate(new ProductsListView() { DataContext = viewModel }); this.ROOTFRAME.NavigationService.Navigated += NavigationService_Navigated; }
/// <summary> /// Method used to excute <see cref="ProductDemosWindow"/> loaded event /// </summary> /// <param name="param"></param> private void ProductWindowLoaded(object param) { #if DEBUG if (CanAutomate) { try { BindingErrorAutomation.UpdateSelectedSample(); } catch (Exception exception) { if (this.SelectedProduct != null && this.SelectedSample != null) { ErrorLogging.LogError("Product Sample\\" + this.SelectedProduct.Product + "\\" + this.SelectedSample.SampleName + "@@" + exception.Message + " StackTrace: " + exception.StackTrace + " Exception Source: " + exception.Source); } else if (this.SelectedShowcaseSample != null) { ErrorLogging.LogError("Product ShowCase\\" + this.SelectedShowcaseSample.SampleName + "\\" + this.SelectedShowcaseSample.SampleName + "@@" + exception.Message + " StackTrace: " + exception.StackTrace + " Exception Source: " + exception.Source); } } } #endif }