Esempio n. 1
0
 public void GoBack(ButtonClickEvent e, SingleNode <BackButtonComponent> button)
 {
     if (!button.component.Disabled)
     {
         base.ScheduleEvent <GoBackRequestEvent>(button.Entity);
     }
 }
Esempio n. 2
0
        public void ShowInfoDialog(ButtonClickEvent e, SingleNode <PremiumLearnMoreButtonComponent> button, [JoinAll] SingleNode <Dialogs60Component> dialogs60)
        {
            PremiumLearnMoreComponent component = dialogs60.component.Get <PremiumLearnMoreComponent>();

            component.tabManager.index = button.component.idx;
            component.Show(null);
        }
Esempio n. 3
0
        public void SendData(ButtonClickEvent e, SingleNode <ContinueButtonComponent> button, [JoinByScreen] SingleNode <BankCardPaymentScreenComponent> screen, [JoinAll] SelectedGoodNode selectedGood, [JoinAll] SelectedMethodNode selectedMethod, [JoinAll] SingleNode <AdyenPublicKeyComponent> adyenProvider, [JoinAll] SingleNode <ClientSessionComponent> session)
        {
            BankCardPaymentScreenComponent component = screen.component;
            Card card = new Card {
                number      = component.Number.Replace(" ", string.Empty),
                expiryMonth = int.Parse(component.MM).ToString(),
                expiryYear  = "20" + component.YY,
                holderName  = component.CardHolder,
                cvc         = component.CVC
            };
            AdyenBuyGoodsByCardEvent eventInstance = new AdyenBuyGoodsByCardEvent {
                EncrypedCard = new Encrypter(adyenProvider.component.PublicKey).Encrypt(card.ToString())
            };

            Entity[] entities = new Entity[] { selectedGood.Entity, selectedMethod.Entity };
            base.NewEvent(eventInstance).AttachAll(entities).Schedule();
            base.ScheduleEvent <ShowScreenLeftEvent <PaymentProcessingScreenComponent> >(screen);
            PaymentStatisticsEvent event3 = new PaymentStatisticsEvent {
                Action = PaymentStatisticsAction.PROCEED,
                Item   = selectedGood.Entity.Id,
                Screen = screen.component.gameObject.name,
                Method = selectedMethod.Entity.Id
            };

            base.ScheduleEvent(event3, session);
        }
        public void ChangeNickname(ButtonClickEvent e, SingleNode <ChangeNicknameButtonComponent> changeNicknameButton, [JoinAll] LoginInputFieldValidStateNode inputField, [JoinAll] SelfUserXMoneyNode selfUserXMoney, [JoinAll] ChangeUIDNode changeUID, [JoinAll] SingleNode <Dialogs60Component> dialogs)
        {
            long price = changeUID.goodsXPrice.Price;
            bool flag  = IsFreeNickChange(selfUserXMoney);

            if ((selfUserXMoney.userXCrystals.Money < price) && !flag)
            {
                dialogs.component.Get <NicknameChangeDialog>().Hide();
                ShopTabManager.shopTabIndex = 3;
                MainScreenComponent.Instance.ShowHome();
                MainScreenComponent.Instance.ShowShopIfNotVisible();
            }
            else
            {
                if (flag)
                {
                    price = 0L;
                }
                BuyUIDChangeEvent eventInstance = new BuyUIDChangeEvent {
                    Uid   = inputField.inputField.Input,
                    Price = price
                };
                base.ScheduleEvent(eventInstance, selfUserXMoney);
            }
        }
Esempio n. 5
0
 public void SubmitInviteToServer(ButtonClickEvent e, SingleNode <InviteSubmitButtonComponent> loginButton, [JoinAll] ClientSessionInviteNode clientSession, [JoinAll] SingleNode <InviteScreenComponent> inviteScreen)
 {
     inviteScreen.component.InviteField.Input = inviteScreen.component.InviteField.Input.Trim();
     clientSession.invite.InviteCode          = inviteScreen.component.InviteField.Input;
     base.ScheduleEvent <InviteEnteredEvent>(clientSession);
     inviteScreen.Entity.AddComponent <LockedScreenComponent>();
 }
Esempio n. 6
0
 public void EnterAsSpectator(ButtonClickEvent e, SingleNode <EnterBattleAsSpectatorButtonComponent> button, [JoinAll] ProfileScreenWithUserGroupNode profileScreen, [JoinByUser] UserInBattleNode userInBattle, [JoinAll] ClientSessionNode session, [JoinAll] Optional <SelfBattleLobbyUser> selfBattleLobbyUser)
 {
     if (!selfBattleLobbyUser.IsPresent())
     {
         base.ScheduleEvent(new EnterBattleAsSpectatorFromLobbyRequestEvent(userInBattle.battleGroup.Key), session);
     }
 }
Esempio n. 7
0
 public void Click()
 {
     if (ButtonClickEvent != null)
     {
         ButtonClickEvent.Invoke();
     }
 }
Esempio n. 8
0
 public void ShowCancelButton(ButtonClickEvent e, SingleNode <AddTeammateToSquadButtonComponent> button, [JoinAll] SingleNode <InviteFriendsPopupComponent> friendsPopup, [JoinAll] SelfUserNode selfUser)
 {
     if (selfUser.userRank.Rank > 3)
     {
         friendsPopup.component.ShowInvite(button.component.PopupPosition, new Vector2(0f, 1f), InviteMode.Squad);
     }
 }
Esempio n. 9
0
        private void ChessBoard_PlayerMarked(object sender, ButtonClickEvent e)
        {
            pnlChessBoard.Enabled = false;
            socket.Send(new SocketDATA(e.ClickedPoint, "", (int)SocketCommand.SEND_POINT));

            Listen();
        }
Esempio n. 10
0
 /// <summary>
 /// Creates new menu button
 /// </summary>
 /// <param name="buttonRect">Button rectangle.</param>
 /// <param name="text">Button caption.</param>
 /// <param name="button">Button type</param>
 /// <param name="onClick">Button onclick event</param>
 public MenuButton(Rectangle buttonRect, string text, ButtonType button, ButtonClickEvent onClick)
 {
     this.buttonRect = buttonRect;
     this.text       = text;
     this.button     = button;
     this.onClick   += onClick;
 }
Esempio n. 11
0
 public void EnterAsSpectator(ButtonClickEvent e, SingleNode <EnterBattleAsSpectatorButtonComponent> button, [JoinAll] SelectedFriendUI friendUI, [JoinByUser] FriendInBattle friend, [JoinAll] ClientSessionNode session, [JoinAll] Optional <SelfBattleLobbyUser> selfBattleLobbyUser)
 {
     if (!selfBattleLobbyUser.IsPresent())
     {
         base.ScheduleEvent(new EnterBattleAsSpectatorFromLobbyRequestEvent(friend.battleGroup.Key), session);
     }
 }
Esempio n. 12
0
        public void ShowShopDialog(ButtonClickEvent e, PurchaseButtonNode node, [JoinAll] SingleNode <Dialogs60Component> dialogs)
        {
            ShopDialogs dialogs2 = dialogs.component.Get <ShopDialogs>();

            node.purchaseDialog.shopDialogs = dialogs2;
            node.purchaseDialog.ShowDialog(node.purchaseButton.GoodsEntity);
        }
Esempio n. 13
0
 public void PlayAgain(ButtonClickEvent e, SingleNode <PlayAgainButtonComponent> button, [JoinAll] Optional <SingleNode <ChosenMatchMackingModeComponent> > chosenMode)
 {
     if (chosenMode.IsPresent())
     {
         base.NewEvent <PlayAgainEvent>().Attach(chosenMode.Get()).Schedule();
     }
 }
Esempio n. 14
0
        public void OnClick(ButtonClickEvent e, NewsItemWithUINode newsItem, [JoinAll] UserNode user, [JoinByUser] SingleNode <ClientLocaleComponent> clientLocale)
        {
            CheckForTutorialEvent eventInstance = new CheckForTutorialEvent();

            base.ScheduleEvent(eventInstance, newsItem);
            if (!eventInstance.TutorialIsActive)
            {
                base.Log.InfoFormat("OnClickNewsItem: {0}", newsItem);
                if (!string.IsNullOrEmpty(newsItem.newsItem.Data.InternalUrl))
                {
                    NavigateLinkEvent event3 = new NavigateLinkEvent {
                        Link = newsItem.newsItem.Data.InternalUrl
                    };
                    base.ScheduleEvent(event3, newsItem);
                }
                else
                {
                    string externalUrl = newsItem.newsItem.Data.ExternalUrl;
                    if (!string.IsNullOrEmpty(externalUrl))
                    {
                        Application.OpenURL(externalUrl.Replace(ID, user.Entity.Id.ToString()).Replace(RANK, user.userRank.Rank.ToString()).Replace(UID, user.userUid.Uid).Replace(LOCALE, clientLocale.component.LocaleCode));
                    }
                }
            }
        }
Esempio n. 15
0
        private void ChessBoard_PlayerMarked(object sender, ButtonClickEvent e)
        {
            pnlChessBoard.Enabled = false;

            socket.Send(new SocketData("", txbPlayerName.Text, (int)SocketCommand.SEND_POINT, "", e.ClickedPoint));

            Listen();
        }
Esempio n. 16
0
 public void HidePopup(ButtonClickEvent e, SingleNode <EulaAgreeButton> button, [JoinAll] EulaNotificationNode notification, [JoinAll] Optional <SingleNode <EulaDialog> > popup)
 {
     if (popup.IsPresent())
     {
         popup.Get().component.HideByAcceptButton();
     }
     base.ScheduleEvent <NotificationShownEvent>(notification);
 }
Esempio n. 17
0
 public void PremiumMainScreenButtonClick(ButtonClickEvent e, SingleNode <PremiumMainScreenButtonComponent> button, [JoinAll] SingleNode <Dialogs60Component> dialogs, [JoinAll] Optional <SingleNode <WindowsSpaceComponent> > screens, [JoinAll] BaseUserNode selfUser, [JoinAll] SingleNode <PremiumToolbarUiComponent> premiumToolbar)
 {
     if (selfUser.Entity.HasComponent <PremiumAccountBoostComponent>())
     {
         premiumToolbar.component.Toggle();
         dialogs.component.Get <PremiumLearnMoreComponent>().HideImmediate();
     }
 }
Esempio n. 18
0
        public void EnterToMatchMaking(ButtonClickEvent e, SingleNode <StartSquadBattleButtonComponent> button, [JoinAll] SelfUserInSquadNode user)
        {
            SquadTryEnterToMatchMakingAfterEnergySharingEvent eventInstance = new SquadTryEnterToMatchMakingAfterEnergySharingEvent {
                MatchMakingModeId = MainScreenComponent.Instance.lastSelectedGameModeId.Id
            };

            base.ScheduleEvent(eventInstance, user);
        }
 public void RequestChangeEmail(ButtonClickEvent e, SingleNode <ChangeUserEmailButtonComponent> button, [JoinByScreen] EmailInputNode emailInput, [JoinAll] SingleNode <SelfUserComponent> selfUser, [JoinAll] SingleNode <ForceEnterEmailDialogComponent> dialog)
 {
     base.ScheduleEvent(new RequestChangeUserEmailEvent(emailInput.inputField.Input), selfUser);
     if (!dialog.Entity.HasComponent <LockedScreenComponent>())
     {
         dialog.Entity.AddComponent <LockedScreenComponent>();
     }
 }
Esempio n. 20
0
        public void NavigateLink(ButtonClickEvent e, SingleNode <LinkButtonComponent> button)
        {
            NavigateLinkEvent eventInstance = new NavigateLinkEvent {
                Link = button.component.Link
            };

            base.ScheduleEvent(eventInstance, button);
        }
 /// <summary>
 /// Any button in the scene was clicked
 /// </summary>
 protected void OnButtonClick(ButtonClickEvent e)
 {
     if (e.Handled)
     {
         Debug.Log(string.Format("ButtonHandlerTest.OnButtonClick({0}) name {1}", e, name));
         buttonClickEventHandledCount += 1;
     }
 }
        public void RequestRestore(ButtonClickEvent e, SingleNode <ContinueButtonComponent> button, [JoinByScreen] SingleNode <EnterUserEmailScreenComponent> screen, [JoinByScreen] SingleNode <InputFieldComponent> emailInput, [JoinAll] SingleNode <ClientSessionComponent> session)
        {
            RestorePasswordByEmailEvent eventInstance = new RestorePasswordByEmailEvent {
                Email = emailInput.component.Input
            };

            base.ScheduleEvent(eventInstance, session);
            screen.Entity.AddComponent <LockedScreenComponent>();
        }
Esempio n. 23
0
        public void SendCode(ButtonClickEvent e, SingleNode <ContinueButtonComponent> button, [JoinByScreen] CodeInputNode code, [JoinByScreen] SingleNode <EnterConfirmationCodeScreenComponent> screen, [JoinAll] SingleNode <ClientSessionComponent> session)
        {
            CheckRestorePasswordCodeEvent eventInstance = new CheckRestorePasswordCodeEvent {
                Code = code.inputField.Input.Trim()
            };

            base.ScheduleEvent(eventInstance, session);
            screen.Entity.AddComponent <LockedScreenComponent>();
        }
Esempio n. 24
0
 private void ChessBoard_PlayerMarked(object sender, ButtonClickEvent e)
 {
     timer1.Start();
     panel1.Enabled     = false;
     progressBar1.Value = 0;
     socket.Send(new SocketData((int)SocketCommand.SEND_POINT, "", e.ClickedPoint));
     undoToolStripMenuItem.Enabled = false;
     listen();
 }
Esempio n. 25
0
 /// <summary>
 /// A button in the scene was clicked
 /// </summary>
 public void OnButtonClickEvent(ButtonClickEvent e)
 {
     if (e.Handled)
     {
         Log.Debug(string.Format("HeaderText.OnClick({0})", e));
         string caption = string.Format("{0} '{1}' was clicked.\nEventManager.DelegateLookupCount is {2}", e.Kind, e.Name, EventManager.Instance.DelegateLookupCount);
         text.text = caption;
     }
 }
Esempio n. 26
0
        public void OpenExitDialog(ButtonClickEvent e, SingleNode <QuitButtonComponent> quitButton, [JoinAll] SingleNode <Dialogs60Component> dialogs, [JoinAll] Optional <SingleNode <WindowsSpaceComponent> > screens)
        {
            List <Animator> animators = new List <Animator>();

            if (screens.IsPresent())
            {
                animators = screens.Get().component.Animators;
            }
            dialogs.component.Get <ExitGameDialog>().Show(animators);
        }
Esempio n. 27
0
        void ChessBoard_PlayerMarked(object sender, ButtonClickEvent e)
        {
            tmCoolDown.Start();
            pnlChessBoard.Enabled = false;
            pcbCircular.Value     = 0;

            socket.Send(new SocketData((int)SocketCommand.SEND_POINT, "", e.ClickedPoint));
            undoToolStripMenuItem.Enabled = false;
            Listen();
        }
        public void RequestUserId(ButtonClickEvent e, SingleNode <SearchUserButtonComponent> button, [JoinByScreen] SearchUserInputFieldNode searchField, [JoinAll] SingleNode <ClientSessionComponent> clientSession)
        {
            SearchUserIdByUidEvent eventInstance = new SearchUserIdByUidEvent {
                Uid = searchField.searchUserInputField.SearchString
            };

            base.ScheduleEvent(eventInstance, clientSession);
            button.component.gameObject.SetInteractable(false);
            searchField.esm.Esm.ChangeState <InputFieldStates.AwaitState>();
        }
Esempio n. 29
0
        public void SendData(ButtonClickEvent e, SingleNode <ContinueButtonComponent> button, [JoinByScreen] SingleNode <QiwiWalletScreenComponent> screen, [JoinAll] SelectedGoodNode selectedGood, [JoinAll] SelectedMethodNode selectedMethod, [JoinAll] SingleNode <ClientSessionComponent> session)
        {
            QiwiProcessPaymentEvent eventInstance = new QiwiProcessPaymentEvent {
                Account = screen.component.Account
            };

            Node[] nodes = new Node[] { selectedGood, selectedMethod };
            base.NewEvent(eventInstance).AttachAll(nodes).Schedule();
            screen.Entity.AddComponent <LockedScreenComponent>();
        }
Esempio n. 30
0
 public void ResetToDefault(ButtonClickEvent e, DefaultButtonNode button, [JoinByScreen] ScreenNode screen)
 {
     InputManager.ResetToDefaultActions();
     base.ScheduleEvent <SetDefaultControlSettingsEvent>(button);
     foreach (KeyboardSettingsInputComponent component in Object.FindObjectsOfType <KeyboardSettingsInputComponent>())
     {
         component.SetText();
     }
     screen.keyboardSettingsScreen.CheckForOneKeyOnFewActions();
 }
Esempio n. 31
0
 public void RegisterBtnEvent(ButtonClickEvent up, ButtonClickEvent down, ButtonClickEvent ack, ButtonClickEvent ret,ButtonClickEvent ext)
 {
     clickUp = up;
     clickDown = down;
     clickAck = ack;
     clickReturn = ret;
     clickExt = ext;
 }