public MainPage()
        {
            InitializeComponent();

            GlobalConsts.HideHomeButton();
            GlobalConsts.ShowSettingsButton();
            GlobalConsts.ShowAboutButton();
            GlobalConsts.ShowHelpButton();
            GlobalConsts.ShowSubscriptionsButton();

            VideoList = new List <Video>();
            client    = GlobalConsts.YoutubeClient;

            void UpdateSize(object s, SizeChangedEventArgs e)
            {
                double height = GlobalConsts.GetOffset() - (HeadlineStackPanel.ActualHeight + 75);

                GridScrollViewer.Height  = height;
                QueueScrollViewer.Height = height;
                BulkScrollViewer.Height  = height - 110;
                GridScrollViewer.UpdateLayout();
                QueueScrollViewer.UpdateLayout();
                BulkScrollViewer.UpdateLayout();
            }

            GlobalConsts.Current.SizeChanged += UpdateSize;
            Unloaded += (s, e) => GlobalConsts.Current.SizeChanged -= UpdateSize;

            GlobalConsts.MainPage = this;
        }
Example #2
0
        public Settings()
        {
            InitializeComponent();
            FillAccents();
            FillLanguages();

            if (GlobalConsts.Theme.Name == "BaseDark")
            {
                NightModeCheckBox.IsChecked = true;
            }
            CheckForUpdatesCheckBox.IsChecked     = GlobalConsts.CheckForProgramUpdates;
            SaveDirectoryTextBox.Text             = GlobalConsts.SaveDirectory;
            SaveDownloadOptionsCheckBox.IsChecked = GlobalConsts.SaveDownloadOptions;
            LimitConvertionsCheckBox.IsChecked    = GlobalConsts.LimitConvertions;
            ActualConvertionTextBox.Text          = GlobalConsts.ActualConvertionsLimit.ToString();
            ActualConvertionTextBox.TextChanged  += ActualConvertionTextBox_TextChanged;

            NightModeCheckBox.Checked   += NightModeCheckBox_Checked;
            NightModeCheckBox.Unchecked += NightModeCheckBox_Unchecked;

            GlobalConsts.HideSettingsButton();
            GlobalConsts.ShowHomeButton();
            GlobalConsts.ShowAboutButton();
            GlobalConsts.ShowHelpButton();
            GlobalConsts.ShowSubscriptionsButton();
        }
        public SubscriptionsPage()
        {
            InitializeComponent();

            CheckForSubscriptionUpdatesCheckBox.IsChecked = GlobalConsts.CheckForSubscriptionUpdates;

            GlobalConsts.HideSubscriptionsButton();
            GlobalConsts.ShowHelpButton();
            GlobalConsts.ShowSettingsButton();
            GlobalConsts.ShowHomeButton();
            GlobalConsts.ShowAboutButton();

            void UpdateSize(object s, SizeChangedEventArgs e)
            {
                GridScrollViewer.Height    = Subscriptions.Count * 105;
                GridScrollViewer.MaxHeight = GlobalConsts.GetOffset() - 165;
                GridScrollViewer.UpdateLayout();
            }

            GlobalConsts.Current.SizeChanged += UpdateSize;
            Unloaded += (s, e) => GlobalConsts.Current.SizeChanged -= UpdateSize;


            SubscriptionsUpdateDelayTextBox.Text = GlobalConsts.SubscriptionsUpdateDelay.TotalMinutes.ToString();
            FillSubscriptions().ConfigureAwait(false);
        }
 public MainPage Load()
 {
     GlobalConsts.HideHomeButton();
     GlobalConsts.ShowSettingsButton();
     GlobalConsts.ShowAboutButton();
     GlobalConsts.ShowHelpButton();
     GlobalConsts.ShowSubscriptionsButton();
     return(this);
 }
        public About()
        {
            InitializeComponent();
            GlobalConsts.HideAboutButton();
            GlobalConsts.ShowHomeButton();
            GlobalConsts.ShowSettingsButton();
            GlobalConsts.ShowHelpButton();
            GlobalConsts.ShowSubscriptionsButton();

            AboutRun.Text += GlobalConsts.VERSION;
        }