Ejemplo n.º 1
0
        private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
        {
            //Application.Current.UpdateContentWindows(this);
            $"{Title} Loading...".INFO();

            CommandRefresh.Hide();
            CommandFilter.Hide();

            if (Content is BrowerPage)
            {
                CommandPageRead.Show();
                CommandRefreshThumb.ToolTip = "Refresh";
                PreftchingProgress.Hide();
            }
            else
                CommandPageRead.Hide();

            if (Content is IllustDetailPage ||
                Content is IllustImageViewerPage ||
                Content is SearchResultPage ||
                Content is HistoryPage)
            {
                CommandRefresh.Show();
                if (!(Content is IllustImageViewerPage))
                {
                    CommandRefreshThumb.Show();
                    PreftchingProgress.Show();
                    CommandFilter.Show();
                }
            }

            if (Content is BatchProcessPage)
            {
                LeftWindowCommands.Hide();
                RightWindowCommands.Hide();
                ShowMinButton = true;
                ShowMaxRestoreButton = false;
                ResizeMode = ResizeMode.CanMinimize;
            }

            if (Application.Current.DropBoxExists() == null)
                CommandDropbox.IsChecked = false;
            else
                CommandDropbox.IsChecked = true;

            this.AdjustWindowPos();

            Commands.SaveOpenedWindows.Execute(null);
        }