public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin    = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding   = new Thickness(0, statusBarHeight, 0, 0);
            ui_loadingOverlay.Margin = new Thickness(0, -statusBarHeight, 0, 0);

            // Star the band detection timer
            BandCheckTimer_Tick(null, null);

            // Update the UI
            m_ignoreUpdates = true;

            ui_enableBandWallpaperUpdate.IsOn = App.BaconMan.BackgroundMan.ImageUpdaterMan.IsBandWallpaperEnabled;
            ui_wallpaperSubreddit.IsEnabled   = App.BaconMan.BackgroundMan.ImageUpdaterMan.IsBandWallpaperEnabled;
            SetupSubredditLists();

            ui_syncToBand.IsOn      = App.BaconMan.BackgroundMan.BandMan.ShowInboxOnBand;
            ui_syncToBand.IsEnabled = App.BaconMan.BackgroundMan.MessageUpdaterMan.IsEnabled;
            ui_messageInboxNotEnabled.Visibility = App.BaconMan.BackgroundMan.MessageUpdaterMan.IsEnabled ? Visibility.Collapsed : Visibility.Visible;

            m_ignoreUpdates = false;
        }
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            m_ingoreUpdates = true;

            // Setup the UI
            ui_enableLockScreen.IsOn = App.BaconMan.BackgroundMan.ImageUpdaterMan.IsLockScreenEnabled;
            ui_enableDesktop.IsOn    = App.BaconMan.BackgroundMan.ImageUpdaterMan.IsDeskopEnabled;
            SetupSubredditLists();
            ui_imageFrequency.ItemsSource   = m_updateFrequencys;
            ui_imageFrequency.SelectedIndex = FrequencySettingToListIndex(App.BaconMan.BackgroundMan.ImageUpdaterMan.UpdateFrquency);

            m_ingoreUpdates = false;

            // Set our status
            ui_lastUpdate.Text = "Last Update: " + (App.BaconMan.BackgroundMan.LastUpdateTime.Equals(new DateTime(0)) ? "Never" : App.BaconMan.BackgroundMan.LastUpdateTime.ToString("g"));
            ui_currentSystemUpdateStatus.Text = "System State: " + (App.BaconMan.BackgroundMan.LastSystemBackgroundUpdateStatus != 3 ? "Allowed" : "Denied");

            // Setup the listener
            App.BaconMan.SubredditMan.OnSubredditsUpdated += SubredditMan_OnSubredditsUpdated;
        }
Ejemplo n.º 3
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            var statusBarHeight = await _mHost.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);
        }
Ejemplo n.º 4
0
        private async void OnNavigateToInternal()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            var statusBarHeight = await _mPanelManager.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);
        }
Ejemplo n.º 5
0
        public void OnNavigatingTo()
        {
            _isVisible = true;

            // Make sure we are up to date
            _collector?.Update();

            // Set the task bar color
            _host.SetStatusBar(Color.FromArgb(255, 10, 10, 10));
        }
Ejemplo n.º 6
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin = new Thickness(0, -statusBarHeight, 0, 0);

            ui_imageScrolBackground.BeginAnimation();
            m_isVisible = true;
        }
Ejemplo n.º 7
0
        public async void OnNavigatingTo()
        {
            // Ask the collector to update
            m_collector.Update(true);

            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_panelHost.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Fired when the panel is being navigated to.
        /// </summary>
        public void OnNavigatingTo()
        {
            // Set the task bar color
            _host.SetStatusBar(Color.FromArgb(255, 25, 25, 25));

            // If we have a current panel, set it visible.
            if (ui_flipView.SelectedItem != null)
            {
                ((FlipViewPostItem)ui_flipView.SelectedItem).IsVisible    = true;
                ((FlipViewPostItem)ui_flipView.SelectedItem).LoadComments = true;
            }
        }
Ejemplo n.º 9
0
        public async void OnNavigatingTo()
        {
            if (m_host.CurrentScreenMode() == ScreenMode.Split)
            {
                ui_slidingImageControl.BeginAnimation();
            }

            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin = new Thickness(0, -statusBarHeight, 0, 0);
        }
Ejemplo n.º 10
0
        public void OnNavigatingTo()
        {
            m_isVisible = true;

            if (m_collector != null)
            {
                // Make sure we are up to date
                m_collector.Update();
            }

            // Set the task bar color
            m_host.SetStatusBar(Color.FromArgb(255, 10, 10, 10));
        }
Ejemplo n.º 11
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            var statusBarHeight = await _mHost.SetStatusBar(null, 0);

            ui_contentRoot.Margin = new Thickness(0, -statusBarHeight, 0, 0);

            ui_imageScrolBackground.BeginAnimation();
            _mIsVisible              = true;
            ui_loginUI.Visibility    = Visibility.Visible;
            AuthWebViewUi.Visibility = Visibility.Collapsed;
        }
Ejemplo n.º 12
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            var statusBarHeight = await _host.SetStatusBar(null, 0);

            ApplicationSettingsRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ApplicationSettingsRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            _takeAction = false;
            TelemetryManager.ReportEvent(this, "ApplicationSettings");
            AnalyticCollection.IsOn = App.BaconMan.UiSettingsMan.AnalyticCollection;
            _takeAction             = true;
        }
Ejemplo n.º 13
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            m_takeAction = false;
            App.BaconMan.TelemetryMan.ReportEvent(this, "DevSettingsOpened");
            ui_debuggingOn.IsOn       = App.BaconMan.UiSettingsMan.Developer_Debug;
            ui_preventAppCrashes.IsOn = App.BaconMan.UiSettingsMan.Developer_StopFatalCrashesAndReport;
            m_takeAction = true;
        }
Ejemplo n.º 14
0
        public void OnNavigatingTo()
        {
            m_isVisible = true;

            if (m_collector != null)
            {
                // Make sure we are up to date
                m_collector.Update();
            }

            // Resume the snow if it was going
            ui_letItSnow.OkNowIWantMoreSnowIfItHasBeenStarted();

            // Set the task bar color
            m_host.SetStatusBar(Color.FromArgb(255, 10, 10, 10));
        }
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            m_takeChangeAction = false;

            ui_showFullTitles.IsOn = App.BaconMan.UiSettingsMan.SubredditList_ShowFullTitles;
            SetSubredditList();

            m_takeChangeAction = true;
        }
Ejemplo n.º 16
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            m_takeChangeAction = false;

            SetDefaultSortType(App.BaconMan.UiSettingsMan.Comments_DefaultSortType);
            SetCount(App.BaconMan.UiSettingsMan.Comments_DefaultCount);

            m_takeChangeAction = true;
        }
Ejemplo n.º 17
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            Package        package   = Package.Current;
            PackageId      packageId = package.Id;
            PackageVersion version   = packageId.Version;

            ui_buildString.Text = $"Build: {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";

            App.BaconMan.TelemetryMan.ReportEvent(this, "AboutOpened");
        }
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            m_takeChangeAction = false;

            ui_showHelpTips.IsOn = App.BaconMan.UiSettingsMan.FlipView_ShowCommentScrollTip;
            ui_flipViewNsfwType.SelectedIndex = (int)App.BaconMan.UiSettingsMan.FlipView_NsfwBlockingType;
            ui_preloadPost.IsOn = App.BaconMan.UiSettingsMan.FlipView_PreloadFutureContent;

            m_takeChangeAction = true;
        }
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            m_ignoreUpdates = true;

            ui_enableBackgroundMessages.IsOn         = App.BaconMan.BackgroundMan.MessageUpdaterMan.IsEnabled;
            ui_messageNotificationType.SelectedIndex = App.BaconMan.BackgroundMan.MessageUpdaterMan.NotificationType;
            ui_addNotesSliently.IsOn = App.BaconMan.BackgroundMan.MessageUpdaterMan.AddToNotificationCenterSilently;

            m_ignoreUpdates = false;
        }
Ejemplo n.º 20
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            Package        package   = Package.Current;
            PackageId      packageId = package.Id;
            PackageVersion version   = packageId.Version;

            ui_buildString.Text = $"Build: {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";

            // Resume snow if it was going
            ui_letItSnow.OkNowIWantMoreSnowIfItHasBeenStarted();
        }
Ejemplo n.º 21
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            m_takeAction              = false;
            ui_debuggingOn.IsOn       = App.BaconMan.UiSettingsMan.Developer_Debug;
            ui_preventAppCrashes.IsOn = App.BaconMan.UiSettingsMan.Developer_StopFatalCrashesAndReport;
            ui_showMemoryOverlay.IsOn = App.BaconMan.UiSettingsMan.Developer_ShowMemoryOverlay;
            m_takeAction              = true;

            // Set the clean up text
            ui_numberPagesCleanedUp.Text = $"Pages cleaned up for memory pressure: {App.BaconMan.UiSettingsMan.PagesMemoryCleanedUp}";
        }
Ejemplo n.º 22
0
        public async void OnNavigatingTo()
        {
            m_isVisible = true;

            // Start the draft timer
            m_draftTimer.Start();

            // If we have a draft and we don't have data in the UI ask the user if they
            // want to restore.
            CheckForAndPromptForDraft();

            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            double statusBarHeight = await m_host.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);
        }
Ejemplo n.º 23
0
        public async void OnNavigatingTo()
        {
            // Set the status bar color and get the size returned. If it is not 0 use that to move the
            // color of the page into the status bar.
            var statusBarHeight = await _mHost.SetStatusBar(null, 0);

            ui_contentRoot.Margin  = new Thickness(0, -statusBarHeight, 0, 0);
            ui_contentRoot.Padding = new Thickness(0, statusBarHeight, 0, 0);

            _mTakeChangeAction = false;

            ui_preLoadComments.IsOn           = App.BaconMan.UiSettingsMan.FlipViewPreloadComments;
            ui_showHelpTips.IsOn              = App.BaconMan.UiSettingsMan.FlipViewShowCommentScrollTip;
            ui_flipViewNsfwType.SelectedIndex = (int)App.BaconMan.UiSettingsMan.FlipViewNsfwBlockingType;
            ui_disablePostLoad.IsOn           = !App.BaconMan.UiSettingsMan.FlipViewLoadPostContentWithoutAction;
            ui_preloadPost.IsOn         = App.BaconMan.UiSettingsMan.FlipViewPreloadFutureContent;
            ui_minimizeStoryHeader.IsOn = App.BaconMan.UiSettingsMan.FlipViewMinimizeStoryHeader;

            _mTakeChangeAction = true;
        }