Esempio n. 1
0
        /// <summary>
        /// Shows next Twitter status
        /// </summary>
        private void ShowNextTwitterStatus()
        {
            string[] twitterStatusString = _twitter.GetNextTwitterStatus();

            if (twitterStatusString != null)
            {
                int timeToShow = 5;

                // Show long tweets longer time
                if (twitterStatusString[1].Length > 100)
                {
                    timeToShow = 10;
                }

                // Show suspend tweets button if configured
                if (bool.Parse(CommonFunctions.GetSetting("Service_Twitter_EnableSuspend")))
                {
                    var buttons = new string[] { "OK", "Suspend" };

                    DialogClosedCallback dcc = new DialogClosedCallback(TwitterDialogClosed);
                    _host.MediaCenterEnvironment.Dialog(twitterStatusString[1], twitterStatusString[0] + " says", buttons, timeToShow, false, "", dcc);
                }
                else
                {
                    _host.MediaCenterEnvironment.Dialog(twitterStatusString[1], twitterStatusString[0] + " says", DialogButtons.Ok, timeToShow, false);
                }
            }
        }