private void PhoneApplicationPage_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (SignInControl.CanGoBack)
     {
         SignInControl.GoBack();
         e.Cancel = true;
     }
 }
Пример #2
0
        public AppManager(MainWindow mw)
        {
            Connect("net.tcp://localhost:4222/IContract");

            instance = this;
            this.mw  = mw;

            CurControl = new SignInControl();
        }
Пример #3
0
        private void SetSignInControl()
        {
            this.Title = "Авторизация";
            var control = new SignInControl();

            control.AutorizationCompleted += OnAutorizationCompleted;
            control.RegisterStarted       += OnRegisterStarted;
            MainControl.Content            = control;
        }
Пример #4
0
        private void userTableControl_EditClicked(object sender, ItemClickEventArgs e)
        {
            UserInfo user = (sender as Button).DataContext as UserInfo;

            if (null != user)
            {
                signinControl = new SignInControl(user);
                signinControl.Show();
                signinControl.AddRecordClick += userTableControl_Refresh;
            }
        }
Пример #5
0
 private void AddUserBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         signinControl = new SignInControl();
         signinControl.Show();
         signinControl.AddRecordClick += userTableControl_Refresh;
     }
     catch (Exception ex)
     {
         MainPage.ShowErrorMessage(ex.Message);
     }
 }
Пример #6
0
 private void LoginControl_SigninClicked(object sender, ItemClickEventArgs e)
 {
     try
     {
         signinControl = new SignInControl(this.LoginControl.Userinfo, "用户注册");
         signinControl.Show();
         signinControl.AddRecordClick += SigninControl_AddRecordClick;
     }
     catch (Exception ex)
     {
         MainPage.ShowErrorMessage(ex.Message);
     }
 }
Пример #7
0
        public void SignOut(bool closeWindow)
        {
            Channel.SignOut();

            if (closeWindow)
            {
                mw.Close();
            }

            MenuControl       = null;
            TestEditControl   = null;
            CurMessageControl = null;
            User = null;

            CurControl = new SignInControl();
        }
Пример #8
0
 private void EditUserBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         var user = UserList.Where(x => x.selected).FirstOrDefault();
         if (null != user)
         {
             signinControl = new SignInControl(user);
             signinControl.Show();
             signinControl.AddRecordClick += userTableControl_Refresh;
         }
     }
     catch (Exception ex)
     {
         MainPage.ShowErrorMessage(ex.Message);
     }
 }
 private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
 {
     SignInControl.RequestSecurityTokenResponseCompleted += new EventHandler <SL.Phone.Federation.Controls.RequestSecurityTokenResponseCompletedEventArgs>(SignInControl_RequestSecurityTokenResponseCompleted);
     SignInControl.GetSecurityToken();
 }
Пример #10
0
 private void InitSignInControl(SignInControl signInControl)
 {
     signInControl.AfterSignIn        += new AfterSignInDelegate(signInControl_AfterSignIn);
     signInControl.BeforeAuthenticate += signInControl_BeforeAuthenticate;
     this._Owner = signInControl;
 }
 private void InitSignInControl(SignInControl signInControl)
 {
     signInControl.AfterSignIn += new AfterSignInDelegate(signInControl_AfterSignIn);
 }
Пример #12
0
 private void InitSignInControl(SignInControl signInControl)
 {
     signInControl.AfterSignIn += new AfterSignInDelegate(signInControl_AfterSignIn);
 }