protected void ReportInfoBtns() { var isNpc = (string.Equals(TargetUserName, Npc.SkagyName, StringComparison.CurrentCultureIgnoreCase)); var fromReport = IsReport; var btnPref = (fromReport) ? "report_" + Id + "_" : "spy_" + Id + "_"; if (!isNpc) { var mes = ButtonsView.ConstructorSizeBtn(2, true, "tr_send message"); mes.ButtonId = btnPref + "mes"; Buttons.Add(mes); var smSpay = ButtonsView.Spy(2, TargetPlanetId, TargetPlanetName, true); smSpay.ButtonId = btnPref + "spy"; Buttons.Add(smSpay); } else { if (IsLose || !fromReport) { var spyBtn = ButtonsView.Spy(1, TargetPlanetId, TargetPlanetName, true); spyBtn.ButtonId = btnPref + "spy"; Buttons.Add(spyBtn); } } }
private void DropButtons() { HasButtons = true; Buttons = new List <IButtonsView> { ButtonsView.ConstructorSizeBtn(2, true, Resource.Jump), ButtonsView.ConstructorSizeBtn(2, true, Resource.ReturnFleet) }; }
protected void SetButtons(bool containSubmit) { HasButtons = true; Buttons = new Dictionary <string, IButtonsView>(); if (containSubmit) { Buttons.Add("Submit", ButtonsView.ConstructorSizeBtn(1, true, Resource.Submit)); } }
protected void _setBtnSend() { BtnSendMessage = ButtonsView.ConstructorSizeBtn(4); BtnSendMessage.Params = new { ChannelId, ChannelType, MessageMaxLength }; BtnSendMessage.ShowName = true; BtnSendMessage.TranslateName = Server.Modules.Localize.Game.Common.Resource.Send; }
public override void TaskButtons() { HasButtons = true; Buttons = new List <IButtonsView> { ButtonsView.NewTaskAttack(), ButtonsView.NewTaskTransfer(), ButtonsView.ConstructorSizeBtn(3, true, Resource.Reset, "GameServices.journalHelper.resetTaskUnits"), ButtonsView.ConstructorSizeBtn(3, true, Resource.LoadAll, "GameServices.journalHelper.setAllUnits"), ButtonsView.ConstructorSizeBtn(3, true, null, "GameServices.journalHelper.submitTaskForm") }; }
public void SetButtons() { if (IsCurrentUser) { Buttons = new Dictionary <string, IButtonsView> { { "edit", ButtonsView.ConstructorSizeBtn(1, true, Resource.Edit) }, { "cancel", ButtonsView.ConstructorSizeBtn(2, true, Resource.Cancel) }, { "send", ButtonsView.ConstructorSizeBtn(2, true, Resource.Send) } }; } }
public void PlanetInfoButtons() { if (HasButtons) { return; } HasButtons = true; if (PlanetReferToCurrentUser) { if (IsBookmark) { Buttons = new List <IButtonsView> { ButtonsView.DeleteBookmark(1, BookmarkId, TypeNativeName, Id, 0) }; } else { Buttons = new List <IButtonsView> { ButtonsView.ConstructorSizeBtn(1, true, "Go To Planet", "GameServices.mapControlHelper.jumpToUserPlanet", new { OwnId = Id, UpdateSelect = true }) }; } } else if (IsBookmark) { Buttons = new List <IButtonsView> { ButtonsView.Spy(3, Id, NativeName, false), ButtonsView.Attack(false, 3, NativeName, Id), ButtonsView.DeleteBookmark(3, BookmarkId, TypeNativeName, Id, 0) }; } else { Buttons = new List <IButtonsView> { ButtonsView.Spy(2, Id, NativeName, false), ButtonsView.Attack(false, 2, NativeName, Id) }; } }