示例#1
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));
        }
        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));
            }
        }