Esempio n. 1
0
        //private readonly AppController _appController;

        public AutorizationView(AutorizationsViewModels autorizationsViewModels)
        {
            InitializeComponent();
            _viewModel = autorizationsViewModels ??
                         throw new ArgumentNullException(nameof(autorizationsViewModels));

            //_bsUsers = new BindingSource();
            //_bsUsers.DataSource = _viewModel.Users;

            SetBindings();

            //привязка
            Load += Autorizationfrom_Load;
            _checkBoxVisiblePassword.Click += CheckBoxVisPass_Click;

            //привязка кнопки
            _buttonRegistration.Click += ButtonRegistration_Click;
            _buttonEnter.Click        += ButtonEnter_Click;

            //привязка лейблов
            _labelRegAndEnt.Click += LabelRegistrAndEnter_Click;

            //привзяка текстбоксов
            //_textBoxRegLogin.Enter += TextBoxRegLogin_Enter;
            //_textBoxRegLogin.Leave += TextBoxRegLogin_Leave;
            //_textBoxRegPassword.Enter += TextBoxRegPassword_Enter;
            //_textBoxRegPassword.Leave += TextBoxRegPassword_Leave;
        }
Esempio n. 2
0
        public void ShowAutorizationView()
        {
            var vm   = new AutorizationsViewModels(this);
            var from = new AutorizationView(vm);

            from.Owner = _mainfrom;
            from.Show();
        }
Esempio n. 3
0
        public void ShowAutorizationView(Users users)
        {
            var vm = new AutorizationsViewModels(this);

            vm.SetUsers(users);
            var from = new AutorizationView(vm);

            from.Owner = _mainfrom;
            // if (from == null || from.IsDisposed)
            from.ShowDialog();
        }