コード例 #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            LoadConfigSettings();
            this.Hide();

            var browserWindow = new BrowserWindow(_spotify);

            browserWindow.ShowDialog();

            if (browserWindow.ResultToken == null)
            {
                this.Close();
                return;
            }

            AppInfo.State.SpotifyAccessToken  = browserWindow.ResultToken;
            AppInfo.State.SpotifyRefreshToken = browserWindow.RefreshToken;
            AppInfo.State.TokenExpireTime     = DateTime.Now.AddSeconds(browserWindow.ExpireTime - 5);

            this.Show();

            if (AccountsList.SelectedItem == null)
            {
                MessageBox.Show("failed to fetch current account");
            }

            AcrylicMaterial.EnableBlur(this);
            this.InitializeTrayMenu();
            Program.TrayMenu.Show();
        }
 void UpdateFallbackColor()
 {
     fallbackColor = AcrylicMaterial.GetFallbackColor(Element).ToUwpColor();
 }
 void UpdateBackgroundSource()
 {
     backgroundSource = (AcrylicBackgroundSource)Enum.Parse(typeof(AcrylicBackgroundSource), AcrylicMaterial.GetBackgroundSource(Element).ToString());
 }
 void UpdateTintOpacity()
 {
     tintOpacity = AcrylicMaterial.GetTintOpacity(Element);
     //tintOpacity = (double)Element.GetValue(AcrylicMaterial.TintOpacityProperty);
 }
 void UpdateTintColor()
 {
     tintColor = AcrylicMaterial.GetTintColor(Element).ToUwpColor();
 }