public MainWindow() { InitializeComponent(); var notifier = new MessageBoxNotifier("Solotter"); try { var executablePath = Assembly.GetExecutingAssembly().Location; var userConfigRepo = UserConfigModule.fileSystemConfigRepo(executablePath); var userConfig = userConfigRepo.Find(); userConfigRepo.Save(userConfig); var themeManager = new ThemeManager(); themeManager.Load(Resources, userConfig.ThemeColorName); var accessTokenRepo = AccessTokenModule.fileSystemAccessTokenRepo(executablePath); var authFrame = AuthFrame.Create(accessTokenRepo, userConfig, notifier); Content = authFrame; } catch (Exception ex) { notifier.NotifyInfo("Failed to start. " + ex.ToString()); Application.Current.Shutdown(Marshal.GetHRForException(ex)); } }
private void _repostPage_ClosedEvent() { ThicknessAnimation RepostPageHideAnimation = new ThicknessAnimation(); RepostPageHideAnimation.Completed += HidePlaylistAnimation_Completed; RepostPageHideAnimation.From = new Thickness(0, 0, 0, 0); RepostPageHideAnimation.To = new Thickness(0, 0, 0, this.ActualHeight); RepostPageHideAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.4)); AuthFrame.BeginAnimation(MarginProperty, RepostPageHideAnimation); }
private void RepostAudio_Click(object sender, RoutedEventArgs e) { AuthFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden; _repostPage.LoadingFriends(); AuthFrame.Content = _repostPage.Content; ThicknessAnimation RepostPageShowAnimation = new ThicknessAnimation(); RepostPageShowAnimation.From = new Thickness(0, 0, 0, this.Height); RepostPageShowAnimation.To = new Thickness(0, 0, 0, 0); RepostPageShowAnimation.Duration = new Duration(TimeSpan.FromSeconds(0.5)); AuthFrame.BeginAnimation(MarginProperty, RepostPageShowAnimation); _repostPage.SuccesLoadPanel.Visibility = Visibility.Visible; AuthFrame.Visibility = Visibility.Visible; }