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