private void Window_Loaded(object sender, RoutedEventArgs e) { Splasher.SetStatusText("Загрузка новостной ленты"); if (_firstRun) { _firstRun = false; GetClasses(); SetBindings(); BindingLoginData(); MainFrame.Navigate(_newsFeed); if (App.AppArguments[0] == "-m") { var lastExit = AdministrationClass.LastModuleExit(AdministrationClass.Modules.NewsFeed); _newsFeed.ShowNews(lastExit); NotificationManager.ShowNotifications(AdministrationClass.CurrentWorkerId); _workshopMode = false; } } Splasher.CloseSplashWindow(); ShowInTaskbar = true; WindowState = WindowState.Maximized; }
private void GoHomeButton_Click(object sender, RoutedEventArgs e) { if (MainFrame.HasContent) { if (!(MainFrame.Content is NewsFeed)) { _newsFeed = new NewsFeed(); MainFrame.Navigate(_newsFeed); var lastExit = AdministrationClass.LastModuleExit(AdministrationClass.Modules.NewsFeed); _newsFeed.ShowNews(lastExit); NotificationManager.ShowNotifications(AdministrationClass.CurrentWorkerId); } } if (MenuPopupBorder.Child != null) { MenuPopupBorder.Child = null; MainGrid.Children.Add(MenuGrid); } MenuListBox.SelectedItems.Clear(); }