Example #1
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);
        }
Example #2
0
        /// <summary>
        /// Checks if we should update and if so does so.
        /// </summary>
        /// <param name="refDeferral"></param>
        /// <param name="force"></param>
        public void RunUpdate(RefCountedDeferral refDeferral, bool force = false)
        {
            if (!IsEnabled || !_baconMan.UserMan.IsUserSignedIn)
            {
                return;
            }
            var timeSinceLastRun = DateTime.Now - LastUpdateTime;

            if (!(timeSinceLastRun.TotalMinutes > 10) && !force)
            {
                return;
            }
            // We should update. Grab the deferral
            _refDeferral = refDeferral;
            _refDeferral.AddRef();

            // Make the collector
            _collector = new MessageCollector(_baconMan);

            // We don't need to sub to the collection update because we will get
            // called automatically when it updates
            _collector.OnCollectorStateChange += Collector_OnCollectorStateChange;

            // Tell it to update!
            _collector.Update(true);
        }
Example #3
0
        public void PanelSetup(IPanelHost host, Dictionary <string, object> arguments)
        {
            // Grab the panel manager
            m_panelHost = host;

            // Make a new collector
            m_collector = new MessageCollector(App.BaconMan);

            // Sub to the collector callbacks
            m_collector.OnCollectionUpdated    += Collector_OnCollectionUpdated;
            m_collector.OnCollectorStateChange += Collector_OnCollectorStateChange;

            // Ask the collector to update
            m_collector.Update();
        }
Example #4
0
        public void PanelSetup(IPanelHost host, Dictionary<string, object> arguments)
        {
            // Grab the panel manager
            m_panelHost = host;

            // Make a new collector
            m_collector = new MessageCollector(App.BaconMan);

            // Sub to the collector callbacks
            m_collector.OnCollectionUpdated += Collector_OnCollectionUpdated;
            m_collector.OnCollectorStateChange += Collector_OnCollectorStateChange;

            // Ask the collector to update
            m_collector.Update();
        }
        /// <summary>
        /// Checks if we should update and if so does so.
        /// </summary>
        /// <param name="refDeferral"></param>
        /// <param name="force"></param>
        public void RunUpdate(RefCountedDeferral refDeferral, bool force = false)
        {
            if (IsEnabled && m_baconMan.UserMan.IsUserSignedIn)
            {
                TimeSpan timeSinceLastRun = DateTime.Now - LastUpdateTime;
                if (timeSinceLastRun.TotalMinutes > 10 || force)
                {
                    // We should update. Grab the deferral
                    m_refDeferral = refDeferral;
                    m_refDeferral.AddRef();

                    // Make the collector
                    m_collector = new MessageCollector(m_baconMan);

                    // We don't need to sub to the collection update because we will get
                    // called automatically when it updates
                    m_collector.OnCollectorStateChange += Collector_OnCollectorStateChange;

                    // Tell it to update!
                    m_collector.Update(true);
                }
            }
        }
Example #6
0
 public void OnNavigatingTo()
 {
     // Ask the collector to update, this will be ignored
     // if it is too recent.
     m_collector.Update();
 }