Exemplo n.º 1
0
        public void DisplayQuote(frmQuote oFrmQuote, frmQuoteBackground oFrmQuoteBackground, PluginAppSettings oPluginAppSettings)
        {
            _oFrmQuote           = oFrmQuote;
            _oFrmQuoteBackground = oFrmQuoteBackground;
            _pas = oPluginAppSettings;

            QOTDTypeRandomNormalization();

            string sQuote = string.Empty;

            switch (QOTD_Type)
            {
            case "Bible Gateway Verse":
                sQuote = GetBibleGatewayQuote();
                break;

            case "Brainy Quote":
                sQuote = GetBrainyQuoteQuote();
                break;

            case "Local File":
                sQuote = GetLoaclQuote();
                break;
            }

            ShowQuote(sQuote);
        }
Exemplo n.º 2
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            StoreSettingsInAppStrings();

            CloseForms();

            _oFrmQuote           = new frmQuote();
            _oFrmQuoteBackground = new frmQuoteBackground(_oFrmQuote);

            _oFrmQuote.ofrmQuoteBackground = _oFrmQuoteBackground;

            _oFrmQuoteBackground.Show();
            _oFrmQuote.Show();
            _oFrmQuoteBackground.Hide();
            _oFrmQuote.Hide();

            Task.Delay((int)100).ContinueWith(t => new Qotd().DisplayQuote(_oFrmQuote, _oFrmQuoteBackground, _pas));
        }
Exemplo n.º 3
0
        public void OnEventRaised(string eventType)
        {
            if (_pas.GetBoolean("AutomaticUpdates") && (eventType == SystemEventTypes.BigBoxStartupCompleted || eventType == SystemEventTypes.LaunchBoxStartupCompleted))
            {
                using (new Update(_pas));
            }

            if (eventType == SystemEventTypes.BigBoxStartupCompleted && _pas.GetBoolean("ShowInBigBox") || eventType == SystemEventTypes.LaunchBoxStartupCompleted && _pas.GetBoolean("ShowInLaunchBox"))
            {
                frmQuote           oFrmQuote           = new frmQuote();
                frmQuoteBackground oFrmQuoteBackground = new frmQuoteBackground(oFrmQuote);
                oFrmQuote.ofrmQuoteBackground = oFrmQuoteBackground;

                oFrmQuoteBackground.Show();
                oFrmQuote.Show();
                oFrmQuoteBackground.Hide();
                oFrmQuote.Hide();

                Task.Delay((int)1000).ContinueWith(t => new Qotd().DisplayQuote(oFrmQuote, oFrmQuoteBackground, _pas));
            }
        }