Exemplo n.º 1
0
        private void MenuChangeUser_Click(object sender, EventArgs e)
        {
            Hide();
            Form Az = new AutorizationForm();

            Az.ShowDialog();
            Close();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Метод команды, вызывающий форму авторизации
        /// </summary>

        private void ClickMethodAutorization()
        {
            var windowAutorizationForm = new AutorizationForm();

            windowAutorizationForm.ShowDialog();
            CurrentUser = MainWindowData.CurrentUser;

            if (MainWindowData.CurrentUser != null)
            {
                FirstName = MainWindowData.CurrentUser.FirstName;
                OnPropertyChanged("FirstName");
            }
        }
Exemplo n.º 3
0
        public static bool CheckAutorizaton()
        {
            var result      = false;
            var setServ     = new SettingService();
            var authService = new AuthenticationService(setServ);

            //var paymentService = new PaymentService();
            if (authService.IsRegistered)
            {
                return(true);
            }

            using (var form = new AutorizationForm(authService))
            {
                form.ShowDialog();
                result = form.IsAutorizationSuccess;
            }

            return(result);
        }