public RequestFormController(IRequestForm view) { this.view = view; this.view.SetController(this); this.request = new ProtocolRequest(); loginInfo = LoginInfo.GetInstance(); this.auditItems = new List <AuditItem>(); }
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); }
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); } } }
public MessageCreation(IRequestForm caller) { InitializeComponent(); callingForm = caller; }