protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Hide Spoilers Button case (2): TraktSettings.HideSpoilersOnShouts = !TraktSettings.HideSpoilersOnShouts; PublishShoutSkinProperties(Facade.SelectedListItem.TVTag as TraktShout); break; // Next Episode case (3): GetNextEpisodeShouts(); break; // Previous Episode case (4): GetPrevEpisodeShouts(); break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): var selectedItem = Facade.SelectedListItem as GUIPersonListItem; if (selectedItem == null) { return; } GUIWindowManager.ActivateWindow((int)TraktGUIWindows.PersonSummary, selectedItem.Person.Ids.Trakt.ToString()); break; // Layout Button case (2): CurrentLayout = GUICommon.ShowLayoutMenu(CurrentLayout, PreviousSelectedIndex); break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { GUIListItem selectedItem = this.Facade.SelectedListItem; if (selectedItem == null) { return; } // Load current selected list GUIListItems.CurrentList = (TraktUserList)selectedItem.TVTag; GUIListItems.CurrentUser = CurrentUser; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.ListItems); } break; default: break; } base.OnClicked(controlId, control, actionType); }
private void OnExternalAction(Action action) { if (this.DisplaySettings.EnableDisplayAction) { if (this.DoDebug) { Log.Info("MD8800.OnExternalAction(): received action {0}", new object[] { action.wID.ToString() }); } Action.ActionType wID = action.wID; if (wID <= Action.ActionType.ACTION_SHOW_OSD) { if ((wID != Action.ActionType.ACTION_SHOW_INFO) && (wID != Action.ActionType.ACTION_SHOW_OSD)) { return; } } else if (((wID != Action.ActionType.ACTION_SHOW_MPLAYER_OSD) && (wID != Action.ActionType.ACTION_KEY_PRESSED)) && (wID != Action.ActionType.ACTION_MOUSE_CLICK)) { return; } this.DisplaySettings._DisplayControlAction = true; this.DisplaySettings._DisplayControlLastAction = DateTime.Now.Ticks; if (this.DoDebug) { Log.Info("MD8800.OnExternalAction(): received DisplayControlAction"); } this.DisplayOn(); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // Resume if (control == cmTurnoffmonitor) { SettingsChanged(true); } if (control == cmTurnmonitoronafterresume) { SettingsChanged(true); } if (control == cmEnables3trick) { SettingsChanged(true); } if (control == cmUseS3Hack) { SettingsChanged(true); } if (control == cmRestartonresume) { SettingsChanged(true); } if (control == cmShowlastactivemodule) { SettingsChanged(true); } if (control == cmUsescreenselector) { SettingsChanged(true); if (cmUsescreenselector.Selected) { btnShowScreens.IsEnabled = true; } else { btnShowScreens.IsEnabled = false; } } // Delay at startup if (control == btnDelayStartup) { OnStartUpDelay(); } if (control == cmDelayStartup) { SettingsChanged(true); } if (control == cmDelayResume) { SettingsChanged(true); } if (control == btnShowScreens) { OnShowScreens(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == btnSavedPlaylists) { OnShowSavedPlaylists(m_strPlayListPath); } if (control == btnPlayDVD) { ISelectDVDHandler selectDVDHandler; if (GlobalServiceProvider.IsRegistered <ISelectDVDHandler>()) { selectDVDHandler = GlobalServiceProvider.Get <ISelectDVDHandler>(); } else { selectDVDHandler = new SelectDVDHandler(); GlobalServiceProvider.Add <ISelectDVDHandler>(selectDVDHandler); } string dvdToPlay = selectDVDHandler.ShowSelectDVDDialog(GetID); if (dvdToPlay != null) { OnPlayDVD(dvdToPlay, GetID); } return; } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnVideo) { _selectedOption = -1; OnVideo(); } if (control == btnAudio) { _selectedOption = -1; OnAudio(); } if (control == btnPlayall) { OnPlayAllVideos(); } if (control == btnExtensions) { OnExtensions(); } if (control == btnFolders) { OnFolders(); } if (control == btnDatabase) { OnDatabase(); } if (control == btnPlaylist) { OnPlayList(); } if (control == btnOtherSettings) { OnOtherSettings(); } if (control == btnForceSourceSplitter) { SaveSettings(); LoadSettings(); } if (control == btnautoDecoderSettings) { SaveSettings(); LoadSettings(); } if (control == btnUseAudioDefaultCheckBox) { SaveSettings(); LoadSettings(); } if (control == btnUseSstreamLAVSelection) { btnAudio.IsEnabled = !btnUseSstreamLAVSelection.Selected; SaveSettings(); LoadSettings(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == btnSortBy) { OnShowSort(); } if (control == facadeLayout) { if (actionType == Action.ActionType.ACTION_SHOW_INFO) { OnInfo(SelectedFacadeItem()); facadeLayout.RefreshCoverArt(); } if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { OnClick(SelectedFacadeItem()); } if (actionType == Action.ActionType.ACTION_QUEUE_ITEM) { OnQueueItem(SelectedFacadeItem()); } } UpdateButtonStates(); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // Startup/Resume if (control == cmStartfullscreen) { SettingsChanged(true); } if (control == cmUsefullscreensplash) { SettingsChanged(true); } if (control == cmAlwaysontop) { SettingsChanged(true); } if (control == cmHidetaskbar) { SettingsChanged(true); } if (control == cmAutostart) { SettingsChanged(true); } if (control == cmMinimizeonstartup) { SettingsChanged(true); } if (control == cmMinimizeonexit) { SettingsChanged(true); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == this.btnEnableKeyPad) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnEnableCustom) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnKeyPadMapping) { try { if (!File.Exists(MatrixMX.DefaultMappingPath)) { MatrixMX.AdvancedSettings.CreateDefaultKeyPadMapping(); } new InputMappingForm("MatrixMX_Keypad").ShowDialog(); } catch (Exception exception) { Log.Info("VLSYS_AdvancedSetupForm.btnRemoteSetup_Click() CAUGHT EXCEPTION: {0}", new object[] { exception }); } } base.OnClicked(controlId, control, actionType); }
private void idComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (currentlySelectedNode != null) { // // Update the actual node // if (currentlySelectedNode.Tag is ActionWindow) { ActionWindow window = currentlySelectedNode.Tag as ActionWindow; // window.Id = Convert.ToInt32(idTextBox.Text); // // currentlySelectedNode.Text = window.Description + " (" + window.Id + ")"; } else if (currentlySelectedNode.Tag is KeyAction) { if (idComboBox.Text != null) { KeyAction action = currentlySelectedNode.Tag as KeyAction; try { Action.ActionType actionType = (Action.ActionType)Enum.Parse(typeof(Action.ActionType), idComboBox.Text); action.Id = (int)actionType; currentlySelectedNode.Text = action.Description + " (" + action.Id + ")"; currentlySelectedNode.Nodes[0].Text = String.Format("Action = " + GetActionName(action.Id)); } catch { } } } } }
/// <summary> /// Called when a control is clicked. /// </summary> /// <param name="controlId">The control id.</param> /// <param name="control">The control.</param> /// <param name="actionType">Type of the action.</param> protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == facadeView) { if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { if (facadeView.SelectedListItem.IsFolder) { if (facadeView.SelectedListItem.Label.Equals("..", StringComparison.Ordinal)) { PopulateListControl("\\"); } else { PopulateListControl(facadeView.SelectedListItem.Label); } } else { string command = GetCommand(facadeView.SelectedListItem.Path, facadeView.SelectedListItem.Label); ProcessCommand(command, true); } } } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == _guideSourceButton) { OnchangeEpgSource(); UpdateButtons(); } else if (control == _keepUntilModeButton) { OnChangeKeepUntilMode(); UpdateButtons(); } else if (control == _keepUntilValueButton) { OnChangeKeeUntilValue(); UpdateButtons(); } else if (control == _deleteAllGuideDataButton) { OnDeleteAllGuideData(); } else if (control == _restoreDefaultsButton) { OnRestoreDefaults(); LoadSettings(); UpdateButtons(); } else if (control == _showLogsButton) { OnShowLogs(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnVideo) { _selectedOption = -1; _selectedOptionLvl2 = -1; OnVideo(); } if (control == btnAudio) { _selectedOption = -1; OnAudio(); } if (control == btnDXVA) { OnDXVA(); } if (control == btnEnableSubtitles) { OnSubtitleOnOff(); } if (control == btnEnableCC) { OnEnableCC(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnGeneral) { OnGeneral(); } if (control == btnStartup) { OnStartup(); } if (control == btnResume) { OnResume(); } if (control == btnVolume) { OnVolume(); } if (control == btnRefreshRate) { OnRefreshRate(); } if (control == btnAutoplay) { _selectedOption = -1; OnAutoPlay(); } base.OnClicked(controlId, control, actionType); }
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); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnOK) { DialogModalResult = ModalResult.OK; Close(); } if (control == btnCancel) { DialogModalResult = ModalResult.Cancel; Close(); } if (control == SelectionList) { if (SelectionList.SelectedListItem != null) { SelectionList.SelectedListItem.Selected = !SelectionList.SelectedListItem.Selected; return; } } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnSearch) { TvNewScheduleSearch.SearchFor = TvNewScheduleSearch.SearchType.Title; GUIWindowManager.ActivateWindow((int)Window.WINDOW_TV_SEARCH); return; } if (control == btnTvGuide) { TvNewScheduleSearch.SearchFor = TvNewScheduleSearch.SearchType.KeyWord; GUIWindowManager.ActivateWindow((int)Window.WINDOW_TVGUIDE); return; } if (control == btnQuickRecord) { OnQuickRecord(); return; } if (control == btnAdvancedRecord) { OnAdvancedRecord(); return; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { GUIListItem selectedItem = this.Facade.SelectedListItem; if (selectedItem == null) { return; } TraktListDetail selectedList = null; string username = CurrentUser; if (selectedItem.TVTag is TraktListDetail) { selectedList = selectedItem.TVTag as TraktListDetail; } else if (selectedItem.TVTag is TraktListTrending) { var trending = selectedItem.TVTag as TraktListTrending; selectedList = trending.List; username = trending.List.User.Username; } else if (selectedItem.TVTag is TraktListPopular) { var popular = selectedItem.TVTag as TraktListPopular; selectedList = popular.List; username = popular.List.User.Username; } else if (selectedItem.TVTag is TraktLike) { var likedItem = selectedItem.TVTag as TraktLike; selectedList = likedItem.List; username = likedItem.List.User.Username; } // Load current selected list GUIListItems.CurrentList = selectedList; GUIListItems.CurrentUser = username; ReturningFromListItemsOrComments = true; GUIWindowManager.ActivateWindow((int)TraktGUIWindows.CustomListItems); } break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == cmAllowRememberLastFocusedItem) { SettingsChanged(true); } if (control == cmAutosize) { SettingsChanged(true); } if (control == cmHideextensions) { SettingsChanged(true); } if (control == cmFileexistscache) { SettingsChanged(true); } if (control == cmEnableguisounds) { SettingsChanged(true); } if (control == cmMousesupport) { SettingsChanged(true); } if (control == btnHomeUsage) { OnHomeUsage(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { PreviousUser = CurrentUser; PlayCommentItem(true); } break; // Hide Spoilers Button case (2): TraktSettings.HideSpoilersOnShouts = !TraktSettings.HideSpoilersOnShouts; PublishCommentSkinProperties(Facade.SelectedListItem.TVTag as TraktCommentItem); break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == this.btnDisableRemote) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnDisableRepeat) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnRepeatDelay) { this.SaveSettings(); } if (control == this.btnRemoteMapping) { try { if (!File.Exists(VLSYS_Mplay.DefaultMappingPath)) { VLSYS_Mplay.AdvancedSettings.CreateDefaultRemoteMapping(); } new InputMappingForm("VLSYS_Mplay").ShowDialog(); } catch (Exception exception) { Log.Info("VLSYS_AdvancedSetupForm.btnRemoteSetup_Click() CAUGHT EXCEPTION: {0}", new object[] { exception }); } } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnCreateMovingPicturesCategories) { CreateMovingPicturesCategoriesClicked(); } if (control == btnCreateMovingPicturesFilters) { CreateMovingPicturesFiltersClicked(); } if (control == btnStartLibrarySync) { if (TraktPlugin.StartSync()) { GUIUtils.ShowNotifyDialog(GUIUtils.PluginName(), Translation.LibraryAndPlaybackSyncStarted); } else { GUIUtils.ShowNotifyDialog(GUIUtils.PluginName(), Translation.LibraryAndPlaybackSyncAlreadyRunning); } } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == btnSortBy) { OnShowSort(); } if (control == facadeLayout) { if (actionType == Action.ActionType.ACTION_SHOW_INFO) { OnInfo(SelectedFacadeItem()); facadeLayout.RefreshCoverArt(); } if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { OnClick(SelectedFacadeItem()); } if (actionType == Action.ActionType.ACTION_QUEUE_ITEM) { OnQueueItem(SelectedFacadeItem()); } if (actionType == Action.ActionType.ACTION_MOVE_SELECTED_ITEM_DOWN || actionType == Action.ActionType.ACTION_MOVE_SELECTED_ITEM_UP) { GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED, GetID, 0, controlId, 0, 0, null); OnMessage(msg); } } UpdateButtonStates(); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Facade case (50): if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { CheckAndPlayMovie(true); } break; // Layout Button case (2): CurrentLayout = GUICommon.ShowLayoutMenu(CurrentLayout, PreviousSelectedIndex); break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // Resume if (control == _cmTurnoffmonitor) { SettingsChanged(true); } if (control == _cmShowlastactivemodule) { SettingsChanged(true); } if (control == _cmStopOnAudioRemoval) { SettingsChanged(true); } // Delay at startup if (control == _btnDelayStartup) { OnStartUpDelay(); } if (control == _cmDelayStartup) { SettingsChanged(true); } if (control == _cmDelayResume) { SettingsChanged(true); } if (control == _btnStartScreen) { OnShowScreens(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (MA3WindowManager.HandleWindowChangeButton(control)) { return; } if (btnRefresh != null && control == btnRefresh) { btnRefresh.IsFocused = false; m_Facade.Focus = true; LoadData(); } if (control == m_Facade) { // show the files if we are looking at a torrent GUIListItem item = m_Facade.SelectedListItem; if (item == null || item.TVTag == null) { return; } if (item.TVTag.GetType() == typeof(VM_AnimeEpisode_User)) { VM_AnimeEpisode_User ep = item.TVTag as VM_AnimeEpisode_User; if (ep != null) { MainWindow.vidHandler.ResumeOrPlay(ep); } } } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == _btnLocked) { // User want's to lock settings with PIN if (_btnLocked.Selected) { if (!SetPin()) { // No PIN entered, reset control _btnLocked.Selected = false; } } else { // User want's to remove or change PIN (need current PIN validation first) if (RequestPin()) { _pin = string.Empty; } else { // Wrong PIN, reset control _btnLocked.Selected = true; } } } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { // wait for any background action to finish if (GUIBackgroundTask.Instance.IsBusy) { return; } switch (controlId) { // Hide Spoilers Button case (2): TraktSettings.HideSpoilersOnShouts = !TraktSettings.HideSpoilersOnShouts; PublishCommentSkinProperties(Facade.SelectedListItem.TVTag as TraktComment); break; // Next Episode case (3): GetNextEpisodeComments(); break; // Previous Episode case (4): GetPrevEpisodeComments(); break; // Comments case (50): // re-act to comment e.g. view replies if any, like a comment etc. var selectedComment = Facade.SelectedListItem.TVTag as TraktComment; if (selectedComment != null) { if (selectedComment.Replies > 0) { // remember position for level if (SelectedParentItems.ContainsKey(CurrentLevel)) { SelectedParentItems[CurrentLevel] = selectedComment.Id; } else { SelectedParentItems.Add(CurrentLevel, selectedComment.Id); } CurrentLevel++; LoadCommentReplies(selectedComment.Id); } else { // let user do something else OnShowContextMenu(); } } break; default: break; } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == btnClose) { PageDestroy(); } }