public void SetToSpell(SpellObject Spell) { buttonType = ActionButtonType.Spell; name = Spell.Name; Data = Spell; numOfSameName = 0; }
public void ActionButtonPress(ActionButtonType buttonType) { var actionType = buttonType.ToActionType(); calculatorManager.ExecuteAction(actionType); Display = calculatorManager.Display; }
public void SetToItem(InventoryObject Item) { buttonType = ActionButtonType.Item; name = Item.Name; Data = Item; numOfSameName = Item.NumOfSameName; }
public void SetToAction(AvatarAction Action) { buttonType = ActionButtonType.Action; name = Action.ToString(); Data = Action; numOfSameName = 0; }
public void SetToUnset() { buttonType = ActionButtonType.Unset; name = String.Empty; Data = null; numOfSameName = 0; }
public void SetToUnset() { RemoveListener(); buttonType = ActionButtonType.Unset; name = String.Empty; numOfSameName = 0; Data = null; }
public void SetToAction(AvatarAction Action) { RemoveListener(); buttonType = ActionButtonType.Action; name = Action.ToString(); numOfSameName = 0; Data = Action; }
public PCSetActionButton(byte[] data) : base(data) { Button = ReadByte(); var packedData = ReadUInt32(); Action = packedData & 0x00FFFFFF; Type = (ActionButtonType)((packedData & 0xFF000000) >> 24); }
public string GetCommand(Race race, Class clss, int action, int button, ActionButtonType type) { var builder = new CommandBuilder("playercreateinfo_action"); builder.AddColumnValue("race", (int)race); builder.AddColumnValue("class", (int)clss); builder.AddColumnValue("button", button); builder.AddColumnValue("action", action); builder.AddColumnValue("type", (int)type); return builder.BuildInsert(true); }
public string GetCommand(Race race, Class clss, int action, int button, ActionButtonType type) { var builder = new SQLCommandBuilder("playercreateinfo_action"); builder.AddColumnValue("race", (int)race); builder.AddColumnValue("class", (int)clss); builder.AddColumnValue("button", button); builder.AddColumnValue("action", action); builder.AddColumnValue("type", (int)type); return(builder.BuildInsert()); }
public void SetActionAndType(ulong action, ActionButtonType type) { ulong newData = action | ((ulong)type << 56); if (newData != packedData || uState == ActionButtonUpdateState.Deleted) { packedData = newData; if (uState != ActionButtonUpdateState.New) { uState = ActionButtonUpdateState.Changed; } } }
public void SetToAlias(KeyValuePairString Item) { if (Item == null) { return; } RemoveListener(); buttonType = ActionButtonType.Alias; name = Item.Key; numOfSameName = 0; Data = Item; }
public void SetToItem(InventoryObject Item) { if (Item == null) { return; } RemoveListener(); buttonType = ActionButtonType.Item; name = Item.Name; numOfSameName = Item.NumOfSameName; Data = Item; Item.PropertyChanged += OnObjectPropertyChanged; }
public void Clear(bool RaiseChangedEvent) { if (RaiseChangedEvent) { Num = 1; ButtonType = ActionButtonType.Unset; Name = String.Empty; Data = null; } else { num = 1; buttonType = ActionButtonType.Unset; name = String.Empty; data = null; } }
public ActionButton(ActionButtonType type) { //this.DoubleBuffered = true; m_IsSelected = false; m_IsExclusive = true; CSelect = NONSELECT_COLOR; PBoarder = new Pen(new SolidBrush(CSelect)); PBoarder.Width = BOARDER_WIDTH; BBack = new SolidBrush(BACK_COLOR); BText = new SolidBrush(TEXT_COLOR); BackGraphicsImage = new Bitmap(this.Width, this.Height); BackGraphics = Graphics.FromImage(BackGraphicsImage); ThisGraphics = this.CreateGraphics(); m_Font = new Font(this.Font.Name, 8f); m_ActionType = type; }
public static ActionType ToActionType(this ActionButtonType buttonType) { switch (buttonType) { case ActionButtonType.CLEAR: return(ActionType.CLEAR); case ActionButtonType.DELETE: return(ActionType.DELETE); case ActionButtonType.POINT: return(ActionType.POINT); default: throw new CalculatorException("Unknown action type: " + buttonType); } }
public void SetToSkill(SkillObject Skill) { if (Skill == null) { return; } // remove attached listener RemoveListener(); buttonType = ActionButtonType.Skill; name = Skill.Name; numOfSameName = 0; Data = Skill; Skill.PropertyChanged += OnObjectPropertyChanged; }
public ActionButtonConfig(int Num, ActionButtonType ButtonType, string Name, object Data = null, string Label = null) { num = Num; buttonType = ButtonType; if (Label == null) { Label = String.Empty; } label = Label; if (ButtonType == ActionButtonType.Action) { data = GetAction(Name); name = ((AvatarAction)data).ToString(); } else { name = Name; data = Data; } }
public ActionButtonConfig(int Num, ActionButtonType ButtonType, string Name, object Data = null, string Label = null, uint NumOfSameName = 0) { num = Num; buttonType = ButtonType; numOfSameName = NumOfSameName; if (Label == null) Label = String.Empty; label = Label; if (ButtonType == ActionButtonType.Action) { data = GetAction(Name); name = ((AvatarAction)data).ToString(); } else { name = Name; data = Data; } }
public void CmdExecuteButtonAction(ActionButtonType actionButtonType, NetworkIdentity actingUnitNetworkIdentity) { ActionButtons.Instance.buttons.Find(item => item.ButtonType == actionButtonType).Act(actingUnitNetworkIdentity.gameObject); }
public void Clear(bool RaiseChangedEvent) { if (RaiseChangedEvent) { Num = 1; ButtonType = ActionButtonType.Unset; Name = String.Empty; Data = null; NumOfSameName = 0; } else { num = 1; buttonType = ActionButtonType.Unset; name = String.Empty; data = null; numOfSameName = 0; } }
public void HandleActionButton(ActionButtonType buttonType) { switch (buttonType) { case ActionButtonType.Join: case ActionButtonType.MayBe: GroupsService.Current.Join(this._gid, buttonType == ActionButtonType.MayBe, (Action <BackendResult <OwnCounters, ResultCode> >)(res => { if (res.ResultCode != ResultCode.Succeeded) { return; } CountersManager.Current.Counters = res.ResultData; if (this._group.MembershipType == GroupMembershipType.NotAMember && this._group.Privacy == GroupPrivacy.Public) { EventAggregator.Current.Publish(new GroupMembershipStatusUpdated(this._group.id, true)); } else if (this._group.MembershipType == GroupMembershipType.InvitationReceived) { EventAggregator.Current.Publish(new GroupMembershipStatusUpdated(this._group.id, true)); } this.LoadGroupData(true, false); }), null); break; case ActionButtonType.Leave: GroupsService.Current.Leave(this._gid, (Action <BackendResult <OwnCounters, ResultCode> >)(res => { if (res.ResultCode != ResultCode.Succeeded) { return; } CountersManager.Current.Counters = res.ResultData; if (this._group.MembershipType == GroupMembershipType.Member) { EventAggregator.Current.Publish(new GroupMembershipStatusUpdated(this._group.id, false)); } else if (this._group.MembershipType == GroupMembershipType.InvitationReceived) { EventAggregator.Current.Publish(new GroupMembershipStatusUpdated(this._group.id, false)); } this.LoadGroupData(true, false); })); break; case ActionButtonType.WriteOnWall: Navigator.Current.NavigateToNewWallPost(this._gid, true, this._group.admin_level, this._group.GroupType == GroupType.PublicPage, false, false); break; case ActionButtonType.Map: Navigator.Current.NavigateToMap(false, this._group.place.latitude, this._group.place.longitude); break; case ActionButtonType.Suggested: Navigator.Current.NavigateToSuggestedPostponedPostsPage(this._gid, true, 0); break; case ActionButtonType.Postponed: Navigator.Current.NavigateToSuggestedPostponedPostsPage(this._gid, true, 1); break; } }
public ButtonBuilder Type(ActionButtonType type) { _type = type; return(this); }
public ActionButton(string text, ActionButtonType buttonType) { this.ActionButtonText = text; this.ButtonType = buttonType; }
private bool CanActionButtonPress(ActionButtonType buttonType) { return(calculatorManager.CanActionBeExecuted()); }