private void SetRepeatDelay()
 {
     if (btnRepeatDelay != null)
     {
         GUIControl.ClearControl(this.GetID, this.btnRepeatDelay.GetID);
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "0");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "25");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "50");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "75");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "100");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "125");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "150");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "175");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "200");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "225");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "250");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "275");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "300");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "325");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "350");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "375");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "400");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "425");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "450");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "475");
         GUIControl.AddItemLabelControl(this.GetID, this.btnRepeatDelay.GetID, "500");
         GUIControl.SelectItemControl(this.GetID, this.btnRepeatDelay.GetID, this.RCSettings.RepeatDelay);
     }
 }
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                base.OnMessage(message);
                LoadSettings();
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_PARENTALAGELIMIT);
                for (int i = 1; i <= 99; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_PARENTALAGELIMIT, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_PARENTALAGELIMIT, i_ageLimit - 1);

                return(true);
            }

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;
                if (iControl == (int)Controls.CONTROL_PARENTALAGELIMIT)
                {
                    string strLabel = message.Label;
                    i_ageLimit = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedHorizontal = i_ageLimit;
                }
            }
            break;
            }
            return(base.OnMessage(message));
        }
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                base.OnMessage(message);

                for (int i = 1; i <= 10000; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_SCREENSAVER_DELAY, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_SCREENSAVER_DELAY, _screenSaverDelay - 1);
            }
                return(true);

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;
                if (iControl == (int)Controls.CONTROL_SCREENSAVER_DELAY)
                {
                    string strLabel = message.Label;
                    _screenSaverDelay = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedHorizontal = _screenSaverDelay;
                    SettingsChanged(true);
                }
                break;
            }
            }
            return(base.OnMessage(message));
        }
Exemple #4
0
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                base.OnMessage(message);
                LoadSettings();

                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_DELAYINSEC);

                for (int i = 1; i <= 100; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_DELAYINSEC, i.ToString());
                }

                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_DELAYINSEC, _iDelay - 1);

                return(true);
            }

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;
                if (iControl == (int)Controls.CONTROL_DELAYINSEC)
                {
                    string strLabel = message.Label;
                    _iDelay = Int32.Parse(strLabel);
                    SettingsChanged(true);
                }
            }
            break;
            }
            return(base.OnMessage(message));
        }
Exemple #5
0
 private void SetRed()
 {
     GUIControl.ClearControl(this.GetID, this.btnRed.GetID);
     for (int i = 0; i < 256; i++)
     {
         GUIControl.AddItemLabelControl(this.GetID, this.btnRed.GetID, i.ToString());
     }
     GUIControl.SelectItemControl(this.GetID, this.btnRed.GetID, this.BackLightOptions.BackLightRed);
 }
Exemple #6
0
        private void ResetExampleLabels()
        {
            GUIControl.ClearControl(GetID, (int)Controls.CONTROL_EXAMPLE);
            GUIControl.ClearControl(GetID, (int)Controls.CONTROL_EXAMPLE2);
            string strTmp =
                "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";

            GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_EXAMPLE, strTmp);
            GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_EXAMPLE2, strTmp);
        }
Exemple #7
0
 private void SetBlue()
 {
     Log.Info("MiniDisplay.GUI_SettingsBacklight.SetBlue(): setting Blue = {0}\n",
              new object[] { this.BackLightOptions.BackLightBlue });
     GUIControl.ClearControl(this.GetID, this.btnBlue.GetID);
     for (int i = 0; i < 256; i++)
     {
         GUIControl.AddItemLabelControl(this.GetID, this.btnBlue.GetID, i.ToString());
     }
     GUIControl.SelectItemControl(this.GetID, this.btnBlue.GetID, this.BackLightOptions.BackLightBlue);
 }
 private void SetDisplayActionTime()
 {
     if (this.btnDisplayActionTime != null)
     {
         GUIControl.ClearControl(this.GetID, this.btnDisplayActionTime.GetID);
         for (int i = 0; i < 31; i++)
         {
             GUIControl.AddItemLabelControl(this.GetID, this.btnDisplayActionTime.GetID, i.ToString());
         }
         GUIControl.SelectItemControl(this.GetID, this.btnDisplayActionTime.GetID, this.DisplayControl.DisplayActionTime);
     }
 }
Exemple #9
0
 private void SetDelayStart()
 {
     if (btnDelayStartTime != null)
     {
         GUIControl.ClearControl(this.GetID, this.btnDelayStart.GetID);
         for (int i = 0; i < 31; i++)
         {
             GUIControl.AddItemLabelControl(this.GetID, this.btnDelayStartTime.GetID, i.ToString());
         }
         GUIControl.SelectItemControl(this.GetID, this.btnDelayStartTime.GetID, this.EQSettings._DelayEQTime);
     }
 }
Exemple #10
0
 private void SetBrightness()
 {
     if (this.btnBrightness != null)
     {
         this.btnBrightness.Clear();
         for (int i = 0; i < 256; i++)
         {
             GUIControl.AddItemLabelControl(this.GetID, this.btnBrightness.GetID, i.ToString());
         }
         GUIControl.SelectItemControl(this.GetID, this.btnBrightness.GetID, Settings.Instance.Backlight);
     }
 }
 private void SetIdleDelay()
 {
     if (this.btnIdleDelay != null)
     {
         GUIControl.ClearControl(this.GetID, this.btnIdleDelay.GetID);
         for (int i = 0; i < 31; i++)
         {
             GUIControl.AddItemLabelControl(this.GetID, this.btnIdleDelay.GetID, i.ToString());
         }
         GUIControl.SelectItemControl(this.GetID, this.btnIdleDelay.GetID, this.DisplayControl.BlankIdleDelay);
     }
 }
        void SetFilterButtonOptions()
        {
            if (Sites.Updater.OnlineSites == null || Sites.Updater.OnlineSites.Length == 0)
            {
                return;
            }

            // get a sorted list of all site owners and languages to display in filter buttons
            Dictionary <string, bool> creatorsHash  = new Dictionary <string, bool>();
            Dictionary <string, bool> languagesHash = new Dictionary <string, bool>();

            foreach (OnlineVideosWebservice.Site site in Sites.Updater.OnlineSites)
            {
                string owner = site.Owner_FK.Substring(0, site.Owner_FK.IndexOf('@'));
                bool   temp;
                if (!creatorsHash.TryGetValue(owner, out temp))
                {
                    creatorsHash.Add(owner, true);
                }
                if (!string.IsNullOrEmpty(site.Language))
                {
                    if (!languagesHash.TryGetValue(site.Language, out temp))
                    {
                        languagesHash.Add(site.Language, true);
                    }
                }
            }
            string[] creators = new string[creatorsHash.Count];
            creatorsHash.Keys.CopyTo(creators, 0);
            Array.Sort(creators);
            if (GUI_btnFilterCreator != null)
            {
                GUI_btnFilterCreator.Clear();
                GUIControl.AddItemLabelControl(GetID, GUI_btnFilterCreator.GetID, Translation.Instance.All);
                foreach (string creator in creators)
                {
                    GUIControl.AddItemLabelControl(GetID, GUI_btnFilterCreator.GetID, creator);
                }
            }
            string[] languages = new string[languagesHash.Count];
            languagesHash.Keys.CopyTo(languages, 0);
            Array.Sort(languages);
            if (GUI_btnFilterLang != null)
            {
                GUI_btnFilterLang.Clear();
                GUIControl.AddItemLabelControl(GetID, GUI_btnFilterLang.GetID, Translation.Instance.All);
                foreach (string language in languages)
                {
                    GUIControl.AddItemLabelControl(GetID, GUI_btnFilterLang.GetID, language);
                }
            }
        }
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                base.OnMessage(message);
                LoadSettings();
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE);
                for (int i = 1; i <= 100; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE, i.ToString());
                }

                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY);
                for (int i = 1; i <= 100; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY, i.ToString());
                }

                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE, _watchedPercentage - 1);
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY, _videoAudioDelay - 1);

                return(true);
            }

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;
                if (iControl == (int)Controls.CONTROL_PLAYEDTIMEPERCENTAGE)
                {
                    string strLabel = message.Label;
                    _watchedPercentage = Int32.Parse(strLabel);
                }
                if (iControl == (int)Controls.CONTROL_VIDEOAUDIODELAY)
                {
                    string strLabel = message.Label;
                    if (Int32.Parse(strLabel) < 10)
                    {
                        GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_VIDEOAUDIODELAY, 9);
                        _videoAudioDelay = 10;
                        break;
                    }
                    _videoAudioDelay = Int32.Parse(strLabel);
                }
            }
            break;
            }
            return(base.OnMessage(message));
        }
Exemple #14
0
 private void SetUseStyle()
 {
     if (this.btnUseStyle != null)
     {
         int iItem = this.EQSettings.UseNormalEq
               ? 0
               : (this.EQSettings.UseStereoEq ? 1 : (this.EQSettings.UseVUmeter ? 2 : 3));
         GUIControl.ClearControl(this.GetID, this.btnUseStyle.GetID);
         GUIControl.AddItemLabelControl(this.GetID, this.btnUseStyle.GetID, GUILocalizeStrings.Get(9149));
         GUIControl.AddItemLabelControl(this.GetID, this.btnUseStyle.GetID, GUILocalizeStrings.Get(9150));
         GUIControl.AddItemLabelControl(this.GetID, this.btnUseStyle.GetID, GUILocalizeStrings.Get(9151));
         GUIControl.AddItemLabelControl(this.GetID, this.btnUseStyle.GetID, GUILocalizeStrings.Get(9152));
         GUIControl.SelectItemControl(this.GetID, this.btnUseStyle.GetID, iItem);
     }
 }
Exemple #15
0
 private void SetShowTitle()
 {
     if (btnShowTitleTime != null && btnShowTitleFreq != null)
     {
         GUIControl.ClearControl(this.GetID, this.btnShowTitleTime.GetID);
         GUIControl.ClearControl(this.GetID, this.btnShowTitleFreq.GetID);
         for (int i = 0; i < 31; i++)
         {
             GUIControl.AddItemLabelControl(this.GetID, this.btnShowTitleTime.GetID, i.ToString());
             GUIControl.AddItemLabelControl(this.GetID, this.btnShowTitleFreq.GetID, i.ToString());
         }
         GUIControl.SelectItemControl(this.GetID, this.btnShowTitleTime.GetID, this.EQSettings._EQTitleShowTime);
         GUIControl.SelectItemControl(this.GetID, this.btnShowTitleFreq.GetID, this.EQSettings._EQTitleDisplayTime);
     }
 }
        private void ResetExampleLabels()
        {
            GUIControl.ClearControl(GetID, (int)Controls.CONTROL_EXAMPLE);
            GUIControl.ClearControl(GetID, (int)Controls.CONTROL_EXAMPLE2);
            const string exampleText =
                "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.";
            const string exampleText2 =
                "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer nec odio. Praesent libero. Sed cursus ante dapibus diam. Sed nisi. Nulla quis sem at nibh elementum imperdiet. Duis sagittis ipsum. Praesent mauris. Fusce nec tellus sed augue semper porta. Mauris massa. Vestibulum lacinia arcu eget nulla. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Curabitur sodales ligula in libero. Sed dignissim lacinia nunc.\n\n" +
                "Curabitur tortor. Pellentesque nibh. Aenean quam. In scelerisque sem at dolor. Maecenas mattis. Sed convallis tristique sem. Proin ut ligula vel nunc egestas porttitor. Morbi lectus risus, iaculis vel, suscipit quis, luctus non, massa. Fusce ac turpis quis ligula lacinia aliquet. Mauris ipsum. Nulla metus metus, ullamcorper vel, tincidunt sed, euismod in, nibh. Quisque volutpat condimentum velit. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Nam nec ante.\n\n" +
                "Sed lacinia, urna non tincidunt mattis, tortor neque adipiscing diam, a cursus ipsum ante quis turpis. Nulla facilisi. Ut fringilla. Suspendisse potenti. Nunc feugiat mi a tellus consequat imperdiet. Vestibulum sapien. Proin quam. Etiam ultrices. Suspendisse in justo eu magna luctus suscipit. Sed lectus. Integer euismod lacus luctus magna.\n\n" +
                "Quisque cursus, metus vitae pharetra auctor, sem massa mattis sem, at interdum magna augue eget diam. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi lacinia molestie dui. Praesent blandit dolor. Sed non quam. In vel mi sit amet augue congue elementum. Morbi in ipsum sit amet pede facilisis laoreet. Donec lacus nunc, viverra nec, blandit vel, egestas et, augue. Vestibulum tincidunt malesuada tellus. Ut ultrices ultrices enim. Curabitur sit amet mauris. Morbi in dui quis est pulvinar ullamcorper. Nulla facilisi. Integer lacinia sollicitudin massa.\n\n" +
                "Cras metus. Sed aliquet risus a tortor. Integer id quam. Morbi mi. Quisque nisl felis, venenatis tristique, dignissim in, ultrices sit amet, augue. Proin sodales libero eget ante. Nulla quam. Aenean laoreet. Vestibulum nisi lectus, commodo ac, facilisis ac, ultricies eu, pede. Ut orci risus, accumsan porttitor, cursus quis, aliquet eget, justo. Sed pretium blandit orci.\n";

            GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_EXAMPLE, exampleText);
            GUIControl.SetControlLabel(GetID, (int)Controls.CONTROL_EXAMPLE2, exampleText2);
        }
        protected override void OnPageLoad()
        {
            base.OnPageLoad();

            Log.Instance.Info("OnPageLoad of Site Updater with PreviousWindowId '{0}'", PreviousWindowId);

            defaultLabelBtnSort          = GUIPropertyManager.Parse(GUI_btnSort.Label);
            defaultLabelBtnFilterState   = GUIPropertyManager.Parse(GUI_btnFilterState.Label);
            defaultLabelBtnFilterCreator = GUIPropertyManager.Parse(GUI_btnFilterCreator.Label);
            defaultLabelBtnFilterLang    = GUIPropertyManager.Parse(GUI_btnFilterLang.Label);

            if (GUI_btnFilterState.SubItemCount == 0)
            {
                foreach (string aFilterOption in Enum.GetNames(typeof(FilterStateOption)))
                {
                    GUIControl.AddItemLabelControl(GetID, GUI_btnFilterState.GetID, Translation.Instance.GetByName(aFilterOption));
                }
            }
            if (GUI_btnSort.SubItemCount == 0)
            {
                foreach (string aSortOption in Enum.GetNames(typeof(SortOption)))
                {
                    string[] singled = aSortOption.Split('_');
                    for (int i = 0; i < singled.Length; i++)
                    {
                        singled[i] = Translation.Instance.GetByName(singled[i]);
                    }
                    GUIControl.AddItemLabelControl(GetID, GUI_btnSort.GetID, string.Join(", ", singled));
                }
            }
            SetFilterButtonOptions();

            GUIPropertyManager.SetProperty("#OnlineVideos.HeaderLabel",
                                           PluginConfiguration.Instance.BasicHomeScreenName + ": " + Translation.Instance.ManageSites);
            GUIPropertyManager.SetProperty("#OnlineVideos.HeaderImage",
                                           SiteImageExistenceCache.GetImageForSite("OnlineVideos"));

            GUIOnlineVideos ovGuiInstance = (GUIOnlineVideos)GUIWindowManager.GetWindow(GUIOnlineVideos.WindowId);

            if (ovGuiInstance != null && ovGuiInstance.SelectedSite != null && ovGuiInstance.CurrentState != GUIOnlineVideos.State.sites)
            {
                selectedSite = ovGuiInstance.SelectedSite.Settings.Name;
            }

            RefreshDisplayedOnlineSites();
        }
        /// <summary>
        /// On Message
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                // fetch settings for the current capture card
                _cropSettings = TvCropManager.CropSettings;
                GUILabelControl cardLabel = GetControl((int)Controls.CONTROL_CARD_LABEL) as GUILabelControl;
                cardLabel.Visible = false;

                foreach (int iCtl in Enum.GetValues(typeof(Controls)))
                {
                    if (GetControl(iCtl) is GUISpinControl)
                    {
                        GUISpinControl cntl = (GUISpinControl)GetControl(iCtl);
                        cntl.ShowRange = false;
                    }
                }
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_CROP_TOP);
                for (int i = 0; i <= 200; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_CROP_TOP, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_CROP_TOP, _cropSettings.Top);
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_CROP_BOTTOM);
                for (int i = 0; i <= 200; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_CROP_BOTTOM, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_CROP_BOTTOM, _cropSettings.Bottom);
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_CROP_LEFT);
                for (int i = 0; i <= 200; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_CROP_LEFT, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_CROP_LEFT, _cropSettings.Left);
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_CROP_RIGHT);
                for (int i = 0; i <= 200; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_CROP_RIGHT, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_CROP_RIGHT, _cropSettings.Right);

                break;
            }

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;
                if (iControl == (int)Controls.CONTROL_EXIT)
                {
                    Close();
                }
                else if (iControl == (int)Controls.CONTROL_CROP_TOP)
                {
                    // do not use message.Label, because it's empty for "page up/down", causing exceptions
                    _cropSettings.Top = (GetControl(iControl) as GUISpinControl).Value;
                }
                else if (iControl == (int)Controls.CONTROL_CROP_BOTTOM)
                {
                    _cropSettings.Bottom = (GetControl(iControl) as GUISpinControl).Value;
                }
                else if (iControl == (int)Controls.CONTROL_CROP_LEFT)
                {
                    _cropSettings.Left = (GetControl(iControl) as GUISpinControl).Value;
                }
                else if (iControl == (int)Controls.CONTROL_CROP_RIGHT)
                {
                    _cropSettings.Right = (GetControl(iControl) as GUISpinControl).Value;
                }

                // ativate & save settings for the current capture card
                TvCropManager.CropSettings = _cropSettings;

                break;
            }
            }
            return(base.OnMessage(message));
        }
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                base.OnMessage(message);

                for (int i = 1; i <= 6; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_THUMBNAILS_QUALITY, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_THUMBNAILS_QUALITY, _iQuality - 1);

                for (int i = 1; i <= 3; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_THUMBNAILS_COLUMNS, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_THUMBNAILS_COLUMNS, _iColumns - 1);

                for (int i = 1; i <= 3; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_THUMBNAILS_ROWS, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_THUMBNAILS_ROWS, _iRows - 1);
            }
                return(true);

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;

                if (iControl == (int)Controls.CONTROL_THUMBNAILS_QUALITY)
                {
                    string strLabel = message.Label;
                    _iQuality = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedHorizontal = _iQuality;
                    //settingsChanged = true;
                    ThumbQualityValueChanged();
                    SetProperties();
                }

                if (iControl == (int)Controls.CONTROL_THUMBNAILS_COLUMNS)
                {
                    string strLabel = message.Label;
                    _iColumns = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedHorizontal = _iColumns;
                    //settingsChanged = true;
                }

                if (iControl == (int)Controls.CONTROL_THUMBNAILS_ROWS)
                {
                    string strLabel = message.Label;
                    _iRows = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedHorizontal = _iRows;
                    //settingsChanged = true;
                }

                break;
            }
            }
            return(base.OnMessage(message));
        }
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                base.OnMessage(message);
                LoadSettings();
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_SPEED);
                for (int i = 1; i <= 10; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_SPEED, i.ToString());
                }

                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_TRANSITION);
                for (int i = 1; i <= 50; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_TRANSITION, i.ToString());
                }

                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_KENBURNS_SPEED);
                for (int i = 1; i <= 50; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_KENBURNS_SPEED, i.ToString());
                }

                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_SPEED, m_iSpeed - 1);
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_TRANSITION, m_iTransistion - 1);
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_KENBURNS_SPEED, m_iKenBurnsSpeed - 1);

                if (m_bXFade)
                {
                    cmXfade.Selected = true;
                }
                if (m_bKenBurns)
                {
                    cmKenburns.Selected = true;
                }
                if (m_bRandom)
                {
                    cmRandom.Selected = true;
                }

                return(true);
            }

            case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
            {
                SaveSettings();
            }
            break;

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;
                if (iControl == (int)Controls.CONTROL_SPEED)
                {
                    string strLabel = message.Label;
                    m_iSpeed = Int32.Parse(strLabel);
                }
                if (iControl == (int)Controls.CONTROL_TRANSITION)
                {
                    string strLabel = message.Label;
                    m_iTransistion = Int32.Parse(strLabel);
                }
                if (iControl == (int)Controls.CONTROL_KENBURNS_SPEED)
                {
                    string strLabel = message.Label;
                    m_iKenBurnsSpeed = Int32.Parse(strLabel);
                }
                if (iControl == cmXfade.GetID)
                {
                    m_bXFade    = true;
                    m_bKenBurns = false;
                    m_bRandom   = false;
                    UpdateButtons();
                    return(true);
                }
                if (iControl == cmKenburns.GetID)
                {
                    m_bXFade    = false;
                    m_bKenBurns = true;
                    m_bRandom   = false;
                    UpdateButtons();
                    return(true);
                }
                if (iControl == cmRandom.GetID)
                {
                    m_bXFade    = false;
                    m_bKenBurns = false;
                    m_bRandom   = true;
                    UpdateButtons();
                    return(true);
                }
            }
            break;
            }
            return(base.OnMessage(message));
        }
        public override bool OnMessage(GUIMessage message)
        {
            switch (message.Message)
            {
            case GUIMessage.MessageType.GUI_MSG_WINDOW_INIT:
            {
                base.OnMessage(message);
                LoadSettings();
                GUISpinControl cntl = (GUISpinControl)GetControl((int)Controls.CONTROL_FPS);
                cntl.ShowRange = false;
                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_SPEED_HORIZONTAL);
                for (int i = 1; i <= 5; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_SPEED_HORIZONTAL, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_SPEED_HORIZONTAL, m_iSpeedHorizontal - 1);

                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_SPEED_VERTICAL);
                for (int i = 1; i <= 5; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_SPEED_VERTICAL, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_SPEED_VERTICAL, m_iSpeedVertical - 1);

                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_FPS);
                for (int i = 10; i <= 100; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_FPS, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_FPS, GUIGraphicsContext.MaxFPS - 10);


                GUIControl.ClearControl(GetID, (int)Controls.CONTROL_LISTLOOP_DELAY);
                for (int i = 1; i <= 10000; ++i)
                {
                    GUIControl.AddItemLabelControl(GetID, (int)Controls.CONTROL_LISTLOOP_DELAY, i.ToString());
                }
                GUIControl.SelectItemControl(GetID, (int)Controls.CONTROL_LISTLOOP_DELAY, m_iListLoopDelay - 1);


                ResetExampleLabels();

                return(true);
            }

            case GUIMessage.MessageType.GUI_MSG_WINDOW_DEINIT:
            {
                SaveSettings();
            }
            break;

            case GUIMessage.MessageType.GUI_MSG_CLICKED:
            {
                int iControl = message.SenderControlId;
                if (iControl == (int)Controls.CONTROL_SPEED_HORIZONTAL)
                {
                    string strLabel = message.Label;
                    m_iSpeedHorizontal = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedHorizontal = m_iSpeedHorizontal;
                    ResetExampleLabels();
                }
                if (iControl == (int)Controls.CONTROL_SPEED_VERTICAL)
                {
                    string strLabel = message.Label;
                    m_iSpeedVertical = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedVertical = m_iSpeedVertical;
                    ResetExampleLabels();
                }
                if (iControl == (int)Controls.CONTROL_FPS)
                {
                    string strLabel = message.Label;
                    int    fps      = Int32.Parse(strLabel);
                    GUIGraphicsContext.MaxFPS = fps;
                }
                if (iControl == (int)Controls.CONTROL_LISTLOOP_DELAY)
                {
                    string strLabel = message.Label;
                    m_iListLoopDelay = Int32.Parse(strLabel);
                    GUIGraphicsContext.ScrollSpeedVertical = m_iListLoopDelay;
                    ResetExampleLabels();
                }
            }
            break;
            }
            return(base.OnMessage(message));
        }