public LoginPanelMediator(UIBase viewComponent)
        : base(NAME, viewComponent)
    {
        dialog = (LoginPanel)viewComponent;
        dialog.Login += new EventHandler(Login);
        dialog.Signup += new EventHandler(Signup);
	}
Esempio n. 2
0
    void Start()
    {
        _loginPanel = GetComponent<LoginPanel>();
        _optionPanel = GetComponent<OptionPanel>();
        _backgroundMusic.Play();

        audio.Play();
    }
Esempio n. 3
0
 private void RegisterTab_Click(object sender, EventArgs e)
 {
     if (currentTabIndex == 0)
     {
         timer_slider.Start();
         LoginTab.BackColor    = Color.FromArgb(59, 102, 128);
         RegisterTab.BackColor = Color.FromArgb(23, 117, 173);
         RegistrationPanel.Show();
         LoginPanel.Hide();
         currentTabIndex = 1;
     }
 }
Esempio n. 4
0
        /// <summary>
        /// 创建UI
        /// </summary>
        /// <param name="go"></param>
        private void OnCreateOK(GameObject go)
        {
            panel = go.AddComponent <LoginPanel>();
            panel.btnButton.onClick.AddListener(OnLoginClick);

            RectTransform rect = go.transform as RectTransform;

            rect.anchorMin          = Vector2.zero;
            rect.anchorMax          = Vector2.one;
            rect.sizeDelta          = Vector2.zero;
            rect.anchoredPosition3D = Vector3.zero;
        }
        public ActionResult Edit(LoginPanel model)
        {
            var item = db.LoginPanel.Where(x => x.ID == model.ID).First();

            item.Username = model.Username;
            item.Password = model.Password;
            db.SaveChanges();
            //untuk mengecek setelah di update
            var item2 = db.LoginPanel.ToList();

            return(View("ShowDataBaseForUser", item2));
        }
Esempio n. 6
0
 public static LoginPanel GetInstance()
 {
     if (_inst == null)
     {
         GameObject go = Resources.Load <GameObject>("UI/Panel/LoginPanel");
         if (go != null)
         {
             _inst = Util.AddChild <LoginPanel>(uiCenterRoot.gameObject, go, false);
         }
     }
     return(_inst);
 }
Esempio n. 7
0
    private LoginPanel loginPanel;  // 登录面板实例

    protected override void Initialize()
    {
        title       = Get(this, "title");
        center      = Get(this, "center");
        login_btn   = Get(this, "login_btn");
        about_btn   = Get(this, "about_btn");
        close_btn   = Get(this, "close_btn");
        login_panel = Get(this, "LoginPanel");
        bg          = Get(this, "bg");

        loginPanel = NewElement <LoginPanel>(this, login_panel);// 实例化登录面板
    }
Esempio n. 8
0
 public void SetUpSteps()
 {
     AddStep("create login dialog", () =>
     {
         Add(loginPanel = new LoginPanel
         {
             Anchor = Anchor.Centre,
             Origin = Anchor.Centre,
             Width  = 0.5f,
         });
     });
 }
Esempio n. 9
0
        public virtual void Start()
        {
            if (AllowLogin)
            {
                LoginPanel[] panels = Resources.FindObjectsOfTypeAll <LoginPanel>();
                if (panels.Length > 0)
                {
                    _loginPanel = panels[0]; // Assume only one type of this object exists.

                    if (!ConnectionMgr.Instance.IsLoggedIn)
                    {
                        if (ShowLogin)
                        {
                            Debug.Log("Showing login panel");
                            _loginPanel.Show();
                        }
                    }
                    else
                    {
                        _loginPanel.Hide();

                        UpdateAccountInfo(ConnectionMgr.Instance.CurrentAccount);
                    }
                }
                else
                {
                    Debug.LogError("Missing valid LoginPanel prefab in this scene!");
                }
            }

            if (AllowOptions)
            {
                OptionsPanel[] panels = Resources.FindObjectsOfTypeAll <OptionsPanel>();
                if (panels.Length > 0)
                {
                    _optionsPanel = panels[0]; // Assume only one type of this object exists.
                    _optionsPanel.Hide();
                }
                else
                {
                    Debug.LogError("Missing valid OptionPanel prefab in this scene!");
                }
            }

            if (ShowHideTransition)
            {
                if (_transitionPanel != null)
                {
                    _transitionPanel.Hide();
                }
            }
        }
Esempio n. 10
0
 private void BtnGoSignUp_Click(object sender, EventArgs e)
 {
     SignUpPanel.Show();
     LoginPanel.Hide();
     try
     {
         bindingNavigatorAddNewItem.PerformClick();
     }
     catch (System.Data.NoNullAllowedException)
     {
         MessageBox.Show("Don't Do this Again xD");
     }
 }
Esempio n. 11
0
 public void SetUpSteps()
 {
     AddStep("create login dialog", () =>
     {
         Add(loginPanel = new LoginPanel
         {
             Anchor      = Anchor.Centre,
             Origin      = Anchor.Centre,
             Width       = 0.5f,
             RequestHide = () => hideCount++,
         });
     });
 }
Esempio n. 12
0
        public AdministratorPanel(AdministratorPanelVM administratorPanelVM)
        {
            InitializeComponent();

            // Set information about login panel
            loginPanel = administratorPanelVM.loginPanel;

            // Set administrator information
            this.administrator = administratorPanelVM.administrator;

            // Show basic user information
            AdministratorInformationLabel.Text = $"Witaj {administrator._Name._Value } " +
                                                 $"{administrator._Surname._Value}";
        }
Esempio n. 13
0
        public BasicUserPanel(BasicUserPanelVM basicUserPanelVM)
        {
            InitializeComponent();

            // Set information about login panel
            loginPanel = basicUserPanelVM.loginPanel;

            // Set basic user data
            this.basicUser = basicUserPanelVM.basicUser;

            // Show basic user information
            BasicUserInformationLabel.Text = $"Witaj {basicUser._Name._Value } " +
                                             $"{basicUser._Surname._Value}";
        }
Esempio n. 14
0
        public BasicUserAddMoneyPanel(BasicUserAddMoneyPanelVM basicUserAddMoneyPanelVM)
        {
            InitializeComponent();

            // Set login panel information
            this.loginPanel = basicUserAddMoneyPanelVM.loginPanel;

            // Set basic user panel information
            this.basicUserPanel = basicUserAddMoneyPanelVM.basicUserPanel;

            // Set basic user information
            this.basicUser = basicUserAddMoneyPanelVM.basicUser;

            // Set exchange rates information
            this.PLN_ExchangeRateValueLabel.Text =
                CashWithdrawalProperties.exchangeRates.PLN_exchangeRate.ToString(
                    new CultureInfo("en-US"));

            this.USD_ExchangeRateValueLabel.Text =
                CashWithdrawalProperties.exchangeRates.USD_exchangeRate.ToString(
                    new CultureInfo("en-US"));

            this.EUR_ExchangeRateValueLabel.Text =
                CashWithdrawalProperties.exchangeRates.EUR_exchangeRate.ToString(
                    new CultureInfo("en-US"));

            this.GBP_ExchangeRateValueLabel.Text =
                CashWithdrawalProperties.exchangeRates.GBP_exchangeRate.ToString(
                    new CultureInfo("en-US"));

            // Set currency combobox
            this.CurrencyComboBox.Items.Add("Polski Złoty");
            this.CurrencyComboBox.Items.Add("Dolar Amerykański");
            this.CurrencyComboBox.Items.Add("Euro");
            this.CurrencyComboBox.Items.Add("Funt Brytyjski");

            this.CurrencyComboBox.SelectedIndex = 0;

            // Set add money value combobox
            this.AddMoneyValueComboBox.Items.Add("50");
            this.AddMoneyValueComboBox.Items.Add("100");
            this.AddMoneyValueComboBox.Items.Add("200");
            this.AddMoneyValueComboBox.Items.Add("500");
            this.AddMoneyValueComboBox.Items.Add("1 000");

            this.AddMoneyValueComboBox.SelectedIndex = 0;

            // Set add money report check box
            this.AddMoneyReportCheckBox.Checked = false;
        }
Esempio n. 15
0
        public MainWindow()
        {
            Global glob = new Global();

            InitializeComponent();
            //Page p1 = new StartSettingsPanel(1);
            Page p1 = new LoginPanel();

            //Page p1 = new IrregularBudgetPanel(2);
            myframe.NavigationService.Navigate(p1);
            DB db = new DB();

            // CheckConnecting();
        }
 private void registerToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (i == 0)
     {
         registerpanel.Show();
         // LoginPanel.Hide();
         //  MessageBox.Show("u clicked i = 0");
         i++;
     }
     else
     {
         LoginPanel.Hide();
         // MessageBox.Show("u clicked i>0");
     }
 }
Esempio n. 17
0
 private void ShowLoginPanel(bool state)
 {
     if (state)
     {
         LeftPanel.Visible    = false;
         LogOutButton.Enabled = false;
         LoginPanel.BringToFront();
     }
     else
     {
         LeftPanel.Visible    = true;
         LogOutButton.Enabled = true;
         LoginPanel.SendToBack();
     }
 }
Esempio n. 18
0
        public PkLoginForm()
        {
            this.welcomePanel = new WelcomePanel();
            this.loginPanel   = new LoginPanel();
            this.loginPanel.Hide();

            this.Controls.Add(this.welcomePanel);
            this.Controls.Add(this.loginPanel);

            this.ClientSize      = new Size(380, 380);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox     = false;
            this.ShowInTaskbar   = false;
            this.StartPosition   = FormStartPosition.CenterScreen;
            this.Text            = "PageKite - Log in";
        }
Esempio n. 19
0
        private void OnConnect(object sender, EventArgs e)
        {
            // Switch from login mode to contact list mode
            ContactListPanel.Show();
            LoginPanel.Hide();

            LogoffMenu.Enabled = true;
            AddBuddyToolStripMenuItem.Enabled    = true;
            ServerDiscoToolStripMenuItem.Enabled = true;

            PopulateAwayMessages();

            UserLabel.Text         = XmppGlobal.Connection.Username;
            StatusChooser1.Text    = "Online";
            StatusChooser1.Enabled = true;
        }
Esempio n. 20
0
    /// <summary>
    /// 创建对象完成
    /// </summary>
    /// <param name="go"></param>
    private void OnCreateOK(GameObject go)
    {
        gameObj = go;

        //面板脚本
        panel = go.AddComponent<LoginPanel>();

        //元件事件
        panel.m_Button1.onClick.AddListener(OnOpenButton1);
        panel.m_Button2.onClick.AddListener(OnOpenButton2);
        panel.m_Button3.onClick.AddListener(OnOpenButton3);

        // 加载资源,包名,prefable名

        Debug.LogWarning("OnCreateOK---->>>>" + go.name);
    }
    /**
     * Initialize
     */
    override public void Start()
    {
        if (panel == null)
        {
            panel = this;
        }
        else if (panel != this)
        {
            Destroy(gameObject);
        }

        windowState = true;
        buttons     = RetrieveButtonList("Buttons");
        inputFields = RetrieveInputFieldList("TextFields");
        GeneratePanel();
    }
Esempio n. 22
0
        public PkLoginForm()
        {
            this.welcomePanel = new WelcomePanel();
            this.loginPanel = new LoginPanel();
            this.loginPanel.Hide();

            this.Controls.Add(this.welcomePanel);
            this.Controls.Add(this.loginPanel);

            this.ClientSize      = new Size(380, 380);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox     = false;
            this.ShowInTaskbar   = false;
            this.StartPosition   = FormStartPosition.CenterScreen;
            this.Text            = "PageKite - Log in";
        }
Esempio n. 23
0
    internal void init()
    {
        Transform  parent = UIRootFinder.uiRootTran;
        GameObject asset  = (GameObject)AssetManager.Instance.LoadPrefab("LoginPanel");

        panel = Instantiate(asset) as GameObject;
        panel.transform.parent     = parent;
        panel.transform.localScale = Vector3.one;

        panelScript = panel.GetComponent <LoginPanel>();

        UIEventListener.Get(panelScript.loginbtn).onClick    = OnLoginClick;
        UIEventListener.Get(panelScript.registerbtn).onClick = OnRegClick;
        UIEventListener.Get(panelScript.forgetbtn).onClick   = OnforgetClick;
        UIEventListener.Get(panelScript.kefubtn).onClick     = OnkefuClick;
    }
Esempio n. 24
0
    void Awake()
    {
        //  Find and assign references
        cameraTransition = FindObjectOfType <CameraTransition>();
        charController   = FindObjectOfType <PlayerController>();
        accountManager   = FindObjectOfType <AccountManager>();
        loginPanel       = FindObjectOfType <LoginPanel>();
        menuSound        = GetComponent <AudioSource>();

        //  UI
        mainMenuGraphics     = mainMenuGO.GetComponentsInChildren <Graphic>();
        mainMenuButtons      = mainMenuGO.GetComponentsInChildren <Button>();
        loginPanelGraphics   = loginPanel.GetComponentsInChildren <Graphic>();
        loggedStatusGraphics = loggedStatusPanelGO.GetComponentsInChildren <Graphic>();

        continueButtonGO = GetComponentInChildren <ContinueGame>().gameObject;
    }
Esempio n. 25
0
        public MainContainer()
        {
            masterObject = new AllTheShinies();
            masterObject.LoginPreparations();
            string name = masterObject.givenName;

            InitializeComponent();
            TestrailPanel.Hide();
            JiraPanel.Hide();
            LoginPanel.Show();
            GenRep.Show();
            GenRepPlan.Hide();
            GenRepJira.Enabled = false;
            TestplanList.Hide();
            ReadtheJira.Enabled = false;
            userBox.Text        = "Welcome " + name;
        }
Esempio n. 26
0
    private void Awake()
    {
        _inst = this;
        loginBtn.onClick.AddListener(OnLogin);
        curServerBtn.onClick.AddListener(OnShowServerList);
        changeBtn.onClick.AddListener(OnShowAccount);
        wxBtn.onClick.AddListener(OnLogin);

        accountPanel.SetActive(false);
        wxNode.SetActive(false);
        hideNode.SetActive(false);
#if PLATFORM_IOS_SDK || PLATFORM_ANDROID_SDK
        changeBtn.gameObject.SetActive(false);
        wxNode.SetActive(true);
        hideNode.SetActive(false);
#endif
    }
Esempio n. 27
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            // Sets up which input control to focus and which button to use on enter key.
            WebControl control = LoginPanel.FindControl("LoginView$LoginControl$UserName") as WebControl;

            if (control != null)
            {
                Form.DefaultFocus = control.ClientID;
            }
            control = LoginPanel.FindControl("LoginView$LoginControl$LoginBtn") as WebControl;
            if (control != null)
            {
                Form.DefaultButton = control.UniqueID;
            }
        }
        //Logout Button
        private void LockBtn_Click(object sender, EventArgs e)
        {//Hiding all Ui elements
            UserLabel.Hide();
            UserBtn.Hide();
            DetectBtn.Hide();
            TrainBtn.Hide();
            LockBtn.Hide();
            ExitBtn.Hide();
            mark2.Hide();

            LoginPanel.Show();
            LoginPanel.Dock = DockStyle.Fill;
            LoginPanel.BringToFront();

            NameBox.Text = "";
            PassBox.Text = "";
        }
Esempio n. 29
0
    public void LeaveRoom() => PhotonNetwork.LeaveRoom(); //방떠나기

    public override void OnJoinedRoom()
    {
        CloseRank();
        FindObjectOfType <Setting>().Close();
        StartCoroutine(delayDestroy());
        Spawn();
        LobbyPanel.SetActive(false);
        RoomPanel.SetActive(true);
        titleImg.SetActive(false);
        LoginPanel.SetActive(false);
        //RoomRenewal();
        ChatInput.text = "";
        for (int i = 0; i < ChatText.Length; i++)
        {
            ChatText[i].text = "";
        }
    }
Esempio n. 30
0
 public override void OnDisconnected(DisconnectCause cause) //연결 끊어졌을 때
 {
     if (playerCountSave.instance.isKor())
     {
         PopUpManager.instance.PopUp("연결 끊어짐", Color.red);
     }
     else
     {
         PopUpManager.instance.PopUp("Disconnected", Color.red);
     }
     LobbyPanel.SetActive(false);
     RoomPanel.SetActive(false);
     LoadingPanel.SetActive(false);
     LoginPanel.SetActive(true);
     EmailInput.text = PlayerPrefs.GetString(EamilKey, "");
     //UsernameInput.text = PlayerPrefs.GetString(NameKey, "");
 }
Esempio n. 31
0
 private void load(OsuColour colours)
 {
     Children = new Drawable[]
     {
         new OsuContextMenuContainer
         {
             Width        = 360,
             AutoSizeAxes = Axes.Y,
             Children     = new Drawable[]
             {
                 new Box
                 {
                     RelativeSizeAxes = Axes.Both,
                     Colour           = Color4.Black,
                     Alpha            = 0.6f,
                 },
                 new Container
                 {
                     RelativeSizeAxes = Axes.X,
                     AutoSizeAxes     = Axes.Y,
                     Masking          = true,
                     AutoSizeDuration = transition_time,
                     AutoSizeEasing   = Easing.OutQuint,
                     Children         = new Drawable[]
                     {
                         panel = new LoginPanel
                         {
                             Padding     = new MarginPadding(10),
                             RequestHide = Hide,
                         },
                         new Box
                         {
                             RelativeSizeAxes = Axes.X,
                             Anchor           = Anchor.BottomLeft,
                             Origin           = Anchor.BottomLeft,
                             Height           = 3,
                             Colour           = colours.Yellow,
                             Alpha            = 1,
                         },
                     }
                 }
             }
         }
     };
 }
        //Submit Button
        private async void SigninBtn_Click(object sender, EventArgs e)
        {
            //Check if Id and password are not empty
            if (NameBox.Text != "" && PassBox.Text != "")
            {
                //If Login Case
                if (SigninBtn.ButtonText == "Login")
                {
                    //DOLOGIN : by Sending user and pw to reader Class of data base
                    SignInResult resutl = LoginSys.SignIn(NameBox.Text, PassBox.Text);
                    if (resutl.LoggedIn)
                    {
                        //If Login Operation Successfull , Show the Ui
                        LoginPanel.Dock = DockStyle.None;
                        LoginPanel.Hide();
                        LoginPanel.SendToBack();

                        UserLabel.Show();
                        UserBtn.Show();
                        DetectBtn.Show();
                        TrainBtn.Show();
                        LockBtn.Show();
                        ExitBtn.Show();
                        mark2.Show();

                        UserLabel.Text = resutl.UserData.Name.ToUpperInvariant();
                        DetectionPanel.Show();
                    }
                    else
                    {
                        label3.Text = resutl.Reason;
                    }
                }
                else
                {
                    //If Registration Senario : Sending User and pw to Writer Class
                    bool suResult = await LoginSys.SignUp(NameBox.Text, PassBox.Text, "", 0);

                    if (suResult)
                    {
                        label3.Text = "Registration Done Sucessfully";
                    }
                }
            }
        }
Esempio n. 33
0
    public void Register()
    {
        if (UsernameInput.text.Length <= 0)
        {
            PopUpManager.instance.PopUp("Username is NULL", Color.red);
        }
        else
        {
            var request = new RegisterPlayFabUserRequest
            {
                Email = EmailInput.text, Password = PasswordInput.text, Username = UsernameInput.text, DisplayName = UsernameInput.text
            };
            PlayFabClientAPI.RegisterPlayFabUser(request, OnRegisterSuccess, OnRegisterFailure);

            LoginPanel.SetActive(false);
            LoadingPanel.SetActive(true);
        }
    }
Esempio n. 34
0
    private void OnRegisterSuccess(RegisterPlayFabUserResult result)
    {
        PopUpManager.instance.PopUp("Register Succeed", Color.green);

        PlayerPrefs.SetString(EamilKey, EmailInput.text);
        PlayerPrefs.SetString(NameKey, UsernameInput.text);

        LoadingPanel.SetActive(false);
        LoginPanel.SetActive(true);

        SetNick(UsernameInput.text);

        EmailInput.text    = null;
        PasswordInput.text = null;
        UsernameInput.text = null;
        logPanel.SetActive(true);
        regiPanel.SetActive(false);
    }