private void ArtistActions(Action.ActionType actionType) { if ((actionType == Action.ActionType.ACTION_MUSIC_PLAY) || (actionType == Action.ActionType.ACTION_PLAY) || (actionType == Action.ActionType.ACTION_PAUSE)) { if ((actionType == Action.ActionType.ACTION_MUSIC_PLAY) || (actionType == Action.ActionType.ACTION_PLAY) || (actionType == Action.ActionType.ACTION_PAUSE && !g_Player.HasVideo)) { DBArtistInfo currArtist = DBArtistInfo.Get(facadeLayout.SelectedListItem.Label); List <DBTrackInfo> allTracksByArtist = DBTrackInfo.GetEntriesByArtist(currArtist); AddToPlaylist(allTracksByArtist, true, mvCentralCore.Settings.ClearPlaylistOnAdd, mvCentralCore.Settings.GeneratedPlaylistAutoShuffle); } } else if (actionType == Action.ActionType.REMOTE_0 || actionType == Action.ActionType.REMOTE_1 || actionType == Action.ActionType.REMOTE_2 || actionType == Action.ActionType.REMOTE_3 || actionType == Action.ActionType.REMOTE_4 || actionType == Action.ActionType.REMOTE_5 || actionType == Action.ActionType.REMOTE_6 || actionType == Action.ActionType.REMOTE_7 || actionType == Action.ActionType.REMOTE_8 || actionType == Action.ActionType.REMOTE_9) { DoSpell(actionType); } else { _currentView = MvView.Artist; artistID = facadeLayout.SelectedListItem.ItemId; logger.Debug("Calling loadCurrent from ArtistActions"); loadCurrent(); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == this.btnDisplayVideo) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnDisplayAction) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnDisplayActionTime) { this.SaveSettings(); } if (control == this.btnDisplayIdle) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnIdleDelay) { this.SaveSettings(); } base.OnClicked(controlId, control, actionType); }
public void PushState(Action.ActionType ty, ExecState ex, bool pushpos = false) { execlevel++; exectype[execlevel] = ty; execstate[execlevel] = ex; execlooppos[execlevel] = (pushpos) ? (nextstepnumber - 1) : -1; }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == btnClose) { PageDestroy(); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnTvGroup) { TVHome.OnSelectGroup(); UpdateList(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == this.btnVolume) { this.SaveSettings(); } if (control == this.btnProgress) { this.SaveSettings(); } if (control == this.btnDiskIcon) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnMediaStatus) { this.SaveSettings(); } if (control == this.btnDiskStatus) { this.SaveSettings(); } if (control == this.btnCustomFont) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnLargeIcons) { this.SaveSettings(); this.SetButtons(); } if (control == this.btnCustomIcons) { this.SaveSettings(); } if (control == this.btnInvertIcons) { this.SaveSettings(); } if (control == this.btnFontEditor) { Form form = new iMONLCDg_FontEdit(); form.ShowDialog(); form.Dispose(); } if (control == this.btnIconEditor) { Form form2 = new iMONLCDg_IconEdit(); form2.ShowDialog(); form2.Dispose(); } base.OnClicked(controlId, control, actionType); }
/// <summary> /// A method that instantiates a specified Action for the CurrentAction of the Player /// <param name="actionType"></param> /// <returns>bool to indicate whether the player's action successfully solved the puzzle or not </returns> /// </summary> public void SetAction(Action.ActionType actionType) { if (actionType == Action.ActionType.GuessLetterAction) { CurrentAction = new GuessLetterAction(); } else if (actionType == Action.ActionType.SolvePuzzleAction) { CurrentAction = new SolvePuzzleAction(); } }
public string GetKeyCode(Action.ActionType action) { foreach (Button but in mapWindows[0].Buttons) { if (but.ActionType == action) { return(but.RibbonKeyCode); } } return(""); }
protected override void OnClickedUp(int controlId, GUIControl control, Action.ActionType actionType) { if (control == listChannels) { GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_ITEM_SELECTED, GetID, 0, control.GetID, 0, 0, null); OnMessage(msg); int iItem = (int)msg.Param1; OnMoveUp(iItem); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == listControl) { // execute only for enter keys if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { DoPlay(listControl.SelectedListItem.MusicTag as YouTubeEntry, false, null); } } base.OnClicked(controlId, control, actionType); }
public Action(int pClientID, int pCubeID, string pActionName, string pActionSchema, int pActionOrder, Action.ActionType pActionType, bool pIsInclude) { this.Entitykey = pCubeID; this.ClientID = pClientID; this.ActionID = -1; this.ActionName = pActionName; this.ActionSchema = pActionSchema; this.ActionOrder = pActionOrder; this.Type = pActionType; this.IsInclude = pIsInclude; dAction = new TechSharpy.Entitifier.Data.Action(); }
public void EndAction(Action.ActionType t) { isActing = false; manager.ResetTileSearch(); if (t == Action.ActionType.MOVE_EQUIVILANT && !hasMoved) { hasMoved = true; FindSelectableBasicTiles(); } else { EndTurn(); } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { base.OnClicked(controlId, control, actionType); if (control == btnOk) { PageDestroy(); resultCode = ResultCode.Close; return; } if (control == btnNextItem) { PageDestroy(); resultCode = ResultCode.Next; return; } if (control == btnPreviousItem) { PageDestroy(); resultCode = ResultCode.Previous; return; } if (control == btnPlay) { Log.Info("DialogSetRating:Play:{0}", FileName); g_Player.Play(FileName); } if (control == btnMin) { if (rating >= 1) { rating--; } UpdateRating(); return; } if (control == btnPlus) { if (rating < 5) { rating++; } UpdateRating(); return; } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == listChannels) { Channel chan = listChannels.SelectedListItem.TVTag as Channel; chan.GrabEpg = !chan.GrabEpg; chan.Persist(); listChannels.SelectedListItem.Selected = chan.GrabEpg; } if (control == btnSelectAll) { IList <Channel> channels = Channel.ListAll(); foreach (Channel chan in channels) { if (chan.IsTv) { continue; } if (!chan.GrabEpg) { chan.GrabEpg = true; chan.Persist(); } } Update(); } if (control == btnSelectNone) { IList <Channel> channels = Channel.ListAll(); foreach (Channel chan in channels) { if (chan.IsTv) { continue; } if (chan.GrabEpg) { chan.GrabEpg = false; chan.Persist(); } } Update(); } base.OnClicked(controlId, control, actionType); }
//Function called externally to display all of a certain type of action public void DisplayActionTypes(int typeIndex_) { //Making sure there's an acting character first if (CombatManager.globalReference.actingCharacters.Count <= 0) { return; } //Getting a reference to the character's action list ActionList actingCharActions = CombatManager.globalReference.actingCharacters[0].charActionList; switch (typeIndex_) { case 0: this.UpdateActionButtons(actingCharActions.majorActions); this.backgroundImage.color = this.standardColor; this.actionTypeShown = Action.ActionType.Major; break; case 1: this.UpdateActionButtons(actingCharActions.minorActions); this.backgroundImage.color = this.secondaryColor; this.actionTypeShown = Action.ActionType.Minor; break; case 2: this.UpdateActionButtons(actingCharActions.fastActions); this.backgroundImage.color = this.quickColor; this.actionTypeShown = Action.ActionType.Fast; break; case 3: this.UpdateActionButtons(actingCharActions.massiveActions); this.backgroundImage.color = this.fullRoundColor; this.actionTypeShown = Action.ActionType.Massive; break; default: this.UpdateActionButtons(actingCharActions.majorActions); this.backgroundImage.color = this.standardColor; this.actionTypeShown = Action.ActionType.Major; break; } }
public static Action createAction(Action.ActionType type, int nbFor = 0) { Action action = new Action(); action.actionType = type; action.currentAction = 0; action.currentFor = 0; action.nbFor = nbFor; action.ifValid = false; action.ifDirection = 0; action.ifEntityType = 0; action.range = 0; if (type == Action.ActionType.For || type == Action.ActionType.If || type == Action.ActionType.IfElse || type == Action.ActionType.While) { action.actions = new List <Action>(); } return(action); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnNowPlaying) { OnNowPlaying(); } if (control == btnPlaylist) { OnPlayList(); } if (control == btnDeletealbum) { OnDeleteAlbum(); } if (control == btnDeletealbuminfo) { OnDeleteAlbumInfo(); } if (control == btnFolders) { OnFolders(); } if (control == btnExtensions) { OnExtensions(); } if (control == btnDatabase) { OnDatabase(); } base.OnClicked(controlId, control, actionType); }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { switch (controlId) { case (int)Controls.LISTCONTROL_WISHLIST: OnWishListClicked(); break; case (int)Controls.BUTTON_WISHLIST: OnButtonWishListClicked(); break; case (int)Controls.CHECKMARK_TODAY: case (int)Controls.CHECKMARK_TOMORROW: case (int)Controls.CHECKMARK_OneWeek: case (int)Controls.CHECKMARK_ALL: SelectCheckMark(controlId); break; } base.OnClicked(controlId, control, actionType); }
public static void updateActionBlocLimit(GameData gameData, Action.ActionType type, int nb) { switch (type) { case Action.ActionType.Forward: gameData.actionBlocLimit[0] += nb; break; case Action.ActionType.TurnLeft: gameData.actionBlocLimit[1] += nb; break; case Action.ActionType.TurnRight: gameData.actionBlocLimit[2] += nb; break; case Action.ActionType.Wait: gameData.actionBlocLimit[3] += nb; break; case Action.ActionType.Activate: gameData.actionBlocLimit[4] += nb; break; case Action.ActionType.For: gameData.actionBlocLimit[5] += nb; break; case Action.ActionType.If: gameData.actionBlocLimit[6] += nb; break; default: break; } }
protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { if (control == btnAudioRenderer) { OnAudioRenderer(); } if (control == btnVideoCodec) { OnVideoCodec(); } if (control == btnAudioCodec) { OnAudioCodec(); } if (control == btnAspectRatio) { OnAspectRatio(); } if (control == btnDeinterlace) { OnDeinterlace(); } if (control == btnAutoTurnOnTv) { OnAutoTurnOnTv(); } if (control == btnH264VideoCodec) { OnH264VideoCodec(); } if (control == btnAACAudioCodec) { OnAACAudioCodec(); } base.OnClicked(controlId, control, actionType); }
public void PushState(Action.ActionType ty, bool res, bool pushpos = false) { PushState(ty, res ? ExecState.On : ExecState.Off, pushpos); }
public bool IsExecutingType(Action.ActionType ty) { return(exectype[execlevel] == ty); }
public void AddPlayerAction(Player actor, Action.ActionType actType, Player target) { Action action = new Action(actType, actor, target); AddPlayerAction(actor, action); }
//// do the clicked action protected override void OnClicked(int controlId, GUIControl control, Action.ActionType actionType) { //// //// look for button pressed //// //// record ? if (actionType == Action.ActionType.ACTION_RECORD) { //ExecuteRecord(); } else if (control == btnSwitchView) { switch ((View)mapSettings.ViewAs) { case View.List: mapSettings.ViewAs = (int)View.Icons; break; case View.Icons: mapSettings.ViewAs = (int)View.BigIcons; break; case View.BigIcons: mapSettings.ViewAs = (int)View.Albums; break; case View.Albums: mapSettings.ViewAs = (int)View.Filmstrip; break; case View.Filmstrip: mapSettings.ViewAs = (int)View.List; break; } ShowPanel(); GUIControl.FocusControl(GetID, control.GetID); } else if (control == listControl) { // execute only for enter keys if (actionType == Action.ActionType.ACTION_SELECT_ITEM) { // station selected DoListSelection(); } } //else if (control == sortButton) //{ // //sort button selected // OnShowSortOptions(); //} else if (control == searchButton) { DoSearch(); GUIControl.FocusControl(GetID, listControl.GetID); } else if (control == homeButton) { DoHome(); GUIControl.FocusControl(GetID, listControl.GetID); } else if (control == searchHistoryButton) { DoShowHistory(); GUIControl.FocusControl(GetID, listControl.GetID); } else if (control == btnPlayList) { GUIWindowManager.ActivateWindow(29051); } else if (control == btnNowPlaying) { GUIWindowManager.ActivateWindow(29052); } base.OnClicked(controlId, control, actionType); }