private void EnableGUIButtons() { if (nextEpisodeButton == null || prevEpisodeButton == null) { return; } // only enable episode buttons for episode shouts if (ShoutType != ShoutTypeEnum.episode) { GUIControl.DisableControl(GetID, nextEpisodeButton.GetID); GUIControl.DisableControl(GetID, prevEpisodeButton.GetID); return; } // we could get the max episode number and disable next button // on last episode, for now, lets not do the extra request and // rely on notify to popup indicating no more shouts. GUIControl.EnableControl(GetID, nextEpisodeButton.GetID); GUIControl.EnableControl(GetID, prevEpisodeButton.GetID); // if episode one, then disable prev button if (EpisodeInfo.EpisodeIdx <= 1) { GUIControl.DisableControl(GetID, prevEpisodeButton.GetID); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnLog) { OnLog(); } if (control == btnProcess) { OnProcess(); } if (control == cmWatchdog) { SettingsChanged(true); } if (control == cmAutoRestart) { if (!cmAutoRestart.Selected) { GUIControl.DisableControl(GetID, (int)Controls.CONTROL_DELAYINSEC); } else { GUIControl.EnableControl(GetID, (int)Controls.CONTROL_DELAYINSEC); } SettingsChanged(true); } base.OnClicked(controlId, control, actionType); }
private void LoadRelatedShows() { GUIUtils.SetProperty("#Trakt.Items", string.Empty); GUIBackgroundTask.Instance.ExecuteInBackgroundAndCallback(() => { if (hideWatchedButton != null) { GUIControl.DisableControl((int)TraktGUIWindows.RelatedShows, hideWatchedButton.GetID); } return(RelatedShows); }, delegate(bool success, object result) { if (hideWatchedButton != null) { GUIControl.EnableControl((int)TraktGUIWindows.RelatedShows, hideWatchedButton.GetID); } if (success) { IEnumerable <TraktShow> shows = result as IEnumerable <TraktShow>; SendRelatedShowsToFacade(shows); } }, Translation.GettingRelatedShows, true); }
protected override void OnPageLoad() { updateStationLogoTimer.Enabled = true; _setting = Settings.Instance; grabber.Settings.User = _setting.User; grabber.Settings.Password = _setting.Password; grabber.Settings.PartnerId = _setting.PartnerId; LoadLocalPresetStations(); if (String.IsNullOrEmpty(GUIPropertyManager.GetProperty("#RadioTime.Presets.Folder.Name").Trim())) { GUIControl.DisableControl(GetID, folderButton.GetID); } else { GUIControl.EnableControl(GetID, folderButton.GetID); } foreach (var name in Translation.Strings.Keys) { SetProperty("#RadioTime.Translation." + name + ".Label", Translation.Strings[name]); } GUIControl.FocusControl(GetID, GetFocusControlId()); base.OnPageLoad(); }
private void Update() { try { if (listExifProperties != null && !listExifProperties.IsVisible) { listExifProperties.IsVisible = true; if (!listExifProperties.IsEnabled) { GUIControl.EnableControl(GetID, listExifProperties.GetID); } GUIControl.SelectControl(GetID, listExifProperties.GetID); GUIControl.FocusControl(GetID, listExifProperties.GetID); GUIPropertyManager.SetProperty("#itemcount", Util.Utils.GetObjectCountLabel(listExifProperties.Count)); listExifProperties.SelectedListItemIndex = _currentSelectedItem; SelectItem(); } if (imgPicture != null) { imgPicture.Rotation = PictureDatabase.GetRotation(_currentPicture); imgPicture.Dispose(); imgPicture.AllocResources(); } GUIPropertyManager.SetProperty("#pictures.exif.picture", _currentPicture); } catch (Exception ex) { Log.Error("GUIPictureExif Update controls Error: {1}", ex.Message); } }
private void LoadRelatedMovies() { GUIUtils.SetProperty("#Trakt.Items", string.Empty); GUIBackgroundTask.Instance.ExecuteInBackgroundAndCallback(() => { if (hideWatchedButton != null) { GUIControl.DisableControl((int)TraktGUIWindows.RelatedMovies, hideWatchedButton.GetID); } if (HideWatched) { // wait until watched item has been sent to trakt or timesout (10secs) while (SendingWatchedToTrakt) { Thread.Sleep(500); } } return(RelatedMovies); }, delegate(bool success, object result) { if (hideWatchedButton != null) { GUIControl.EnableControl((int)TraktGUIWindows.RelatedMovies, hideWatchedButton.GetID); } if (success) { var movies = result as IEnumerable <TraktMovieSummary>; SendRelatedMoviesToFacade(movies); } }, Translation.GettingRelatedMovies, true); }
private void EnableButtons(bool enable) { if (enable) { cmBlankScreen.IsEnabled = true; cmReduceFrameRate.IsEnabled = true; GUIControl.EnableControl(GetID, (int)Controls.CONTROL_SCREENSAVER_DELAY); } else { cmBlankScreen.IsEnabled = false; cmReduceFrameRate.IsEnabled = false; GUIControl.DisableControl(GetID, (int)Controls.CONTROL_SCREENSAVER_DELAY); } }
private void LoadSettings() { using (MPSettings xmlreader = new MPSettings()) { _loglevel = xmlreader.GetValueAsString("general", "loglevel", "2"); // set loglevel to 2:info 3:debug _priority = xmlreader.GetValueAsString("general", "ThreadPriority", "Normal"); cmWatchdog.Selected = xmlreader.GetValueAsBool("general", "watchdogEnabled", false); cmAutoRestart.Selected = xmlreader.GetValueAsBool("general", "restartOnError", true); if (!cmAutoRestart.Selected) { GUIControl.DisableControl(GetID, (int)Controls.CONTROL_DELAYINSEC); } else { GUIControl.EnableControl(GetID, (int)Controls.CONTROL_DELAYINSEC); } _iDelay = xmlreader.GetValueAsInt("general", "restart delay", 10); } }