Beispiel #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 };
        }
Beispiel #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);
 }
Beispiel #3
0
 public void ShowLogonFormModal(LogonModel model)
 {
     Application.Current.Dispatcher.BeginInvoke(new Action(() => { _showLogonFormModal(model); }), DispatcherPriority.Background);
 }
Beispiel #4
0
 public void AttachModel(LogonModel model)
 {
     this.DataContext = model;
 }