コード例 #1
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);
            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;
        }
コード例 #2
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_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;
        }
コード例 #3
0
ファイル: Settings.xaml.cs プロジェクト: wrhighfield/Baconit
        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);
        }
コード例 #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);
        }
コード例 #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));
        }
コード例 #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;
        }
コード例 #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);
        }
コード例 #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;
            }
        }
コード例 #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);
        }
コード例 #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));
        }
コード例 #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;
        }
コード例 #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;
        }
コード例 #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;
        }
コード例 #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));
        }
コード例 #15
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;

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

            m_takeChangeAction = true;
        }
コード例 #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;
        }
コード例 #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");
        }
コード例 #18
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;

            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;
        }
コード例 #19
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_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;
        }
コード例 #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();
        }
コード例 #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}";
        }
コード例 #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);
        }
コード例 #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;
        }