Esempio n. 1
0
        private void MainWindow_ContentRendered(object sender, EventArgs e)
        {
            if (!File.Exists(App.Config.ActiveTheme))
            {
                App.Config.ActiveTheme = Path.Combine("Assets", "Themes", "DarkTheme" + Theme.ThemeExtension);
                App.Config.Save();
            }

            ThemeEditorPage.UpdateGlobalUI();
            MakeWinAnimation(_openStoryboard, 0, 1);
            _openStoryboard.Begin(this);

            if (firstRun)
            {
                MainPage._MainPage.frmRPCPreview.Content = new RPCPreview(RPCPreview.ViewType.Default);
                firstRun = false;
            }
        }
Esempio n. 2
0
        private void MainWindow_ContentRendered(object sender, EventArgs e)
        {
            if (!File.Exists(App.Config.ActiveTheme))
            {
                App.Config.ActiveTheme = Path.Combine("Assets", "Themes", "DarkTheme" + Theme.ThemeExtension);
                App.Config.Save();
            }

            if (App.Config.Debug)
            {
                try
                {
                    ThemeEditorPage.UpdateGlobalUI();
                    MakeWinAnimation(_openStoryboard, 0, 1);
                    _openStoryboard.Begin(this);

                    if (firstRun)
                    {
                        MainPage._MainPage.frmRPCPreview.Content = new RPCPreview(RPCPreview.ViewType.Default);
                        firstRun = false;
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.ToString(), "UI error", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }
            else
            {
                ThemeEditorPage.UpdateGlobalUI();
                MakeWinAnimation(_openStoryboard, 0, 1);
                _openStoryboard.Begin(this);

                if (firstRun)
                {
                    MainPage._MainPage.frmRPCPreview.Content = new RPCPreview(RPCPreview.ViewType.Default);
                    firstRun = false;
                }
            }
        }