Example #1
0
        public LogonCreds GetLogin(Exception showReason)
        {
            var model = new LogonModel();

            logonFormCompleteEvent.Reset();

            ShowLogonFormModal(model);

            logonFormCompleteEvent.WaitOne();

            return new LogonCreds() { Name = model.Login, Psw = model.Password, IsCanceled = !model.IsOk, IsSuccessful = model.IsOk };
        }
Example #2
0
 /// <summary>
 /// delegate to launch in the main application thread
 /// </summary>
 private void _showLogonFormModal(LogonModel model)
 {
     LogonView view = new LogonView(logonFormCompleteEvent);
     view.AttachModel(model);
     _regionManager.Regions["ModalRegion"].Add(view);
 }
Example #3
0
 public void ShowLogonFormModal(LogonModel model)
 {
     Application.Current.Dispatcher.BeginInvoke(new Action(() => { _showLogonFormModal(model); }), DispatcherPriority.Background);
 }
Example #4
0
 public void AttachModel(LogonModel model)
 {
     this.DataContext = model;
 }