Ejemplo n.º 1
0
        public void OnLoginCallback(IAsyncResult iAr)
        {
            LoginAnimation.Stop();
            HSession HS = (HSession)iAr.AsyncState;

            if (HS.EndLogin(iAr))
            {
                Invoke(new Action(() =>
                {
                    LoginBtn.Text = "Login Successful!";
                    foreach (Control C in Controls)
                    {
                        C.Enabled = true;
                    }
                    Cursor          = Cursors.Default;
                    Program.Account = HS;
                    Close();
                }));
            }
            else
            {
                Invoke(new Action(() =>
                {
                    LoginBtn.Text = "Login Failed!";
                    foreach (Control C in Controls)
                    {
                        C.Enabled = true;
                    }
                    Cursor = Cursors.Default;
                    MessageBox.Show("Unable to authenticate the account, please try again.", "iKBenPeanut ~ Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    LoginBtn.Text = "Login/Connect";
                }));
            }
        }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        Instance = this;

        oldDoorLeft  = DoorLeft.transform.localPosition;
        oldDoorRight = DoorRight.transform.localPosition;

        Invoke("LogoDrop", 0.8f);
    }
Ejemplo n.º 3
0
        private void LoginBtn_Click(object sender, EventArgs e)
        {
            HSession HS = new HSession(EmailTxt.Text, PasswordTxt.Text, HotelTxt.Text.ToHotel());

            HS.BeginLogin(LoginCB, HS);

            Cursor = Cursors.WaitCursor;
            LoginAnimation.Start();
            foreach (Control C in Controls)
            {
                C.Enabled = false;
            }
        }
Ejemplo n.º 4
0
        private void Lock()
        {
            if (!locked)
            {
                var height = ApplicationView.GetForCurrentView().VisibleBounds.Height;
                //var height = Window.Current.Bounds.Height;

                passwordbox_Password.IsEnabled = true;
                locked = true;

                LoginAnimation.Stop();

                //ContentAnimation.To = Window.Current.Bounds.Height;
                //ContentAnimation.From = 20;

                ContentZoomXAnimation.To   = ContentZoomYAnimation.To = 0.8;
                ContentZoomXAnimation.From = ContentZoomYAnimation.From = 1;

                ContentShadeAnimation.To   = 1;
                ContentShadeAnimation.From = 0;

                LockScreenAnimation.To   = 0;
                LockScreenAnimation.From = -height;// + 20;

                CityAnimation.To       = 0;
                CityAnimation.From     = 60;
                CityAnimation.Duration = TimeSpan.FromMilliseconds(2000);

                SkyAnimation.To   = 0;
                SkyAnimation.From = 1;

                LockScreenAnimation.Duration =
                    //ContentAnimation.Duration =
                    SkyAnimation.Duration =
                        ContentZoomXAnimation.Duration         =
                            ContentZoomYAnimation.Duration     =
                                ContentZoomYAnimation.Duration = TimeSpan.FromMilliseconds(500);

                LoginAnimation.Begin();
            }
        }