Пример #1
0
        private void ShopButton(object sender, RoutedEventArgs e)
        {
            ShopPanel newShopPanel = new ShopPanel();

            newShopPanel.Show();

            this.Close();
        }
Пример #2
0
    public void Show(ShopModel model)
    {
        HideAllShopPanel();

        for (int i = 0; i < model.shopDataList.Count; i++)
        {
            ShopData  sd = model.shopDataList[i];
            ShopPanel sp = shopPanelList[i];

            sp.Show(sd);
        }

        this.gameObject.SetActive(true);
    }
Пример #3
0
        private void LoginUser(object sender, RoutedEventArgs e)
        {
            Account user = _accountController.GetAccountByUsername(usernameBox.Text);

            if (user.username == null)
            {
                ThrowError(2);
            }
            else
            {
                if (user.username.Equals(usernameBox.Text))
                {
                    if (user.password.Equals(passwordBox.Password))
                    {
                        Color prevColor = new Color();
                        prevColor.R = 179;
                        prevColor.G = 171;
                        prevColor.B = 171;
                        prevColor.A = 255;

                        passwordBox.BorderBrush = new SolidColorBrush(prevColor);
                        usernameBox.BorderBrush = new SolidColorBrush(prevColor);

                        recoverButton.Visibility = Visibility.Hidden;

                        ShopPanel newShopPanel = new ShopPanel(user);
                        newShopPanel.Show();

                        this.Close();
                    }
                    else
                    {
                        ThrowError(1);
                    }
                }
                else
                {
                    ThrowError(2);
                }
            }
        }
 public void Click()
 {
     _shopPanel.Show();
 }