private void application_Startup(object sender, StartupEventArgs e) { try { Global.data = Global.data.load(Global.data, "Data/Data.ntp"); if (Global.data.splashScreenDisabled == false) { SplashScreen splashScreen = new SplashScreen(); splashScreen.Show(); } else { HomeScreen homeScreen = new HomeScreen(); homeScreen.Show(); } } catch (Exception exception) { MessageBox.Show(exception.Message); this.Shutdown(); } }
private void splashScreenDisabledCheckBox_Unchecked(object sender, RoutedEventArgs e) { HomeScreen homeScreen = this.Owner as HomeScreen; homeScreen.config.splashScreenDisabled = false; }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.homeScreen = ((FoodRecipes.HomeScreen)(target)); #line 16 "..\..\HomeScreen.xaml" this.homeScreen.Loaded += new System.Windows.RoutedEventHandler(this.homeScreen_Loaded); #line default #line hidden #line 17 "..\..\HomeScreen.xaml" this.homeScreen.Closed += new System.EventHandler(this.homeScreen_Closed); #line default #line hidden return; case 2: this.homeScreenGrid = ((System.Windows.Controls.Grid)(target)); return; case 3: this.mainGrid = ((System.Windows.Controls.Grid)(target)); return; case 4: this.dataListView = ((System.Windows.Controls.ListView)(target)); return; case 7: this.notificationText = ((System.Windows.Controls.TextBlock)(target)); return; case 8: this.searchGrid = ((System.Windows.Controls.Grid)(target)); return; case 9: this.searchBox = ((System.Windows.Controls.TextBox)(target)); #line 275 "..\..\HomeScreen.xaml" this.searchBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.searchBox_TextChanged); #line default #line hidden return; case 10: this.searchIcon = ((System.Windows.Controls.Image)(target)); return; case 11: this.classificationListView = ((System.Windows.Controls.ListView)(target)); #line 298 "..\..\HomeScreen.xaml" this.classificationListView.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.classificationListView_SelectionChanged); #line default #line hidden return; case 12: this.filterButton = ((System.Windows.Controls.Primitives.ToggleButton)(target)); #line 351 "..\..\HomeScreen.xaml" this.filterButton.Unchecked += new System.Windows.RoutedEventHandler(this.filterButton_Unchecked); #line default #line hidden return; case 13: this.showFavoriteCheckBox = ((System.Windows.Controls.CheckBox)(target)); #line 422 "..\..\HomeScreen.xaml" this.showFavoriteCheckBox.Checked += new System.Windows.RoutedEventHandler(this.showFavoriteCheckBox_Checked); #line default #line hidden #line 423 "..\..\HomeScreen.xaml" this.showFavoriteCheckBox.Unchecked += new System.Windows.RoutedEventHandler(this.showFavoriteCheckBox_Unchecked); #line default #line hidden return; case 14: this.favoriteText = ((System.Windows.Controls.TextBlock)(target)); return; case 15: this.addButton = ((System.Windows.Controls.Button)(target)); #line 434 "..\..\HomeScreen.xaml" this.addButton.Click += new System.Windows.RoutedEventHandler(this.addButton_Click); #line default #line hidden return; case 16: this.deleteButton = ((System.Windows.Controls.Button)(target)); return; case 17: this.nextButton = ((System.Windows.Controls.Button)(target)); #line 441 "..\..\HomeScreen.xaml" this.nextButton.Click += new System.Windows.RoutedEventHandler(this.nextButton_Click); #line default #line hidden return; case 18: this.previousButton = ((System.Windows.Controls.Button)(target)); #line 445 "..\..\HomeScreen.xaml" this.previousButton.Click += new System.Windows.RoutedEventHandler(this.previousButton_Click); #line default #line hidden return; case 19: this.pageInfomationText = ((System.Windows.Controls.TextBlock)(target)); return; case 20: this.minButton = ((System.Windows.Controls.Button)(target)); #line 463 "..\..\HomeScreen.xaml" this.minButton.Click += new System.Windows.RoutedEventHandler(this.minButton_Click); #line default #line hidden return; case 21: this.exitButton = ((System.Windows.Controls.Button)(target)); #line 467 "..\..\HomeScreen.xaml" this.exitButton.Click += new System.Windows.RoutedEventHandler(this.exitButton_Click); #line default #line hidden return; case 22: this.coverGrid = ((System.Windows.Controls.Grid)(target)); return; } this._contentLoaded = true; }