public RequestFormController(IRequestForm view)
 {
     this.view = view;
     this.view.SetController(this);
     this.request    = new ProtocolRequest();
     loginInfo       = LoginInfo.GetInstance();
     this.auditItems = new List <AuditItem>();
 }
Esempio n. 2
0
 public void Handle(INavigationService navigation, IRestResponse response, IRequestForm form)
 {
     if (response.IsSuccessful)
     {
         Messenger.Default.Send(form as CodeInputForm);
         navigation.NavigateTo(VM.RegistrationConfirmCodeViewModel);
         return;
     }
     throw new ArgumentException("Something went wrong: " + response.Content);
 }
Esempio n. 3
0
 public void Handle(INavigationService navigation, IRestResponse response, IRequestForm form)
 {
     if (response.IsSuccessful)
     {
         navigation.NavigateTo(VM.MainNavigationViewModel);
     }
     else
     {
         try
         {
             var ser = new JsonDeserializer();
             var msg = ser.Deserialize <AccountErrorMessages>(response);
             if (msg == AccountErrorMessages.NotConfirmed)
             {
                 Messenger.Default.Send(form as CodeInputForm);
                 navigation.NavigateTo(VM.RegistrationConfirmCodeViewModel);
             }
         }
         catch (Exception)
         {
             throw new ArgumentException("Something went wrong: " + response.Content);
         }
     }
 }
Esempio n. 4
0
        public MessageCreation(IRequestForm caller)
        {
            InitializeComponent();

            callingForm = caller;
        }