public LoginPresenter(ILoginView view, IServerCommunicator serverCommunicator, IMobileConfigurationReader mobileConfigurationReader, INavigationManager navigationManager, IFileSystem fileSystem, IVaultRepositoryFactory vaultRepositoryFactory, ISynchronizer synchronizer, IAlertDisplayer alertDisplayer, ISecureStringConverter secureStringConverter, IApplicationContext applicationContext) { this.View = view; this.MobileConfigurationReader = mobileConfigurationReader; this.NavigationManager = navigationManager; this.FileSystem = fileSystem; this.Synchronizer = synchronizer; this.VaultRepositoryFactory = vaultRepositoryFactory; this.AlertDisplayer = alertDisplayer; this.SecureStringConverter = secureStringConverter; this.ApplicationContext = applicationContext; var config = MobileConfigurationReader.GetConfiguration(); this.View.SyncButtonVisible = config.ApplicationMode == ApplicationMode.Client; var repository = VaultRepositoryFactory.CreateInstance(); var vaults = repository.GetAllVaultNames(); this.View.VaultNames = vaults; this.View.SelectedVaultName = vaults.FirstOrDefault(); this.View.Login += OnLogin; this.View.NavigateToConfiguration += OnNavigateToConfiguration; this.View.Sync += OnSync; this.Synchronizer.StatusUpdate += (message) => this.View.ActivityIndicatorText = message; this.View.Initialize += OnInitialize; }
public EntryDetailsPresenter(IEntryDetailsView view, IClipboardService clipboardService, IAlertDisplayer alertDisplayer, Model.Entry entry) { this.View = view; this.Entry = entry; this.ClipboardService = clipboardService; this.AlertDisplayer = alertDisplayer; this.View.Entry = entry; this.View.ShowHidePassword += OnShowHidePassword; this.View.CopyPasswordToClipboard += OnCopyPasswordToClipboard; }
public RegisterCounselPage() { InitializeComponent(); subjectsService = App.LogicContext.SubjectsService; counselService = App.LogicContext.CounselService; exceptionHandler = App.LogicContext.ExceptionHandler; alertDisplayer = App.LogicContext.AlertDisplayer; registerCounselViewModel = new RegisterCounselPageViewModel { Subjects = new SubjectDto[] { } }; BindingContext = registerCounselViewModel; }
public CounselSignupPage(CounselDto counsel) { InitializeComponent(); counselService = App.LogicContext.CounselService; alertDisplayer = App.LogicContext.AlertDisplayer; mapInitializer = App.LogicContext.MapInitializer; exceptionHandler = App.LogicContext.ExceptionHandler; counselSignupViewModel = new CounselSignupPageViewModel { Counsel = counsel }; BindingContext = counselSignupViewModel; Title = counsel.SubjectName; }
public CounselRequestDetailPage(CounselRequestDto counselRequest, bool isDisplayOnly = false) { InitializeComponent(); counselService = App.LogicContext.CounselService; mapInitializer = App.LogicContext.MapInitializer; alertDisplayer = App.LogicContext.AlertDisplayer; exceptionHandler = App.LogicContext.ExceptionHandler; this.counselRequest = counselRequest; counselRequestDetailViewModel = new CounselRequestDetailPageViewModel { SubjectName = counselRequest.SubjectName, StudentName = counselRequest.StudentName, TeacherName = counselRequest.TeacherName, CounselDateTime = counselRequest.CounselDateTime, IsConfirmationDetail = !isDisplayOnly }; Title = counselRequest.ToString(); BindingContext = counselRequestDetailViewModel; }
public ConfigurationPresenter(IConfigurationView view, IUrlValidator urlValidator, IMobileConfigurationReader configurationReader, IMobileConfigurationWriter configurationWriter, INavigationManager navigationManager, IAlertDisplayer alertDisplayer, ISynchronizationServiceManager synchronizationServiceManager) { this.View = view; this.UrlValidator = urlValidator; this.ConfigurationReader = configurationReader; this.ConfigurationWriter = configurationWriter; this.NavigationManager = navigationManager; this.AlertDisplayer = alertDisplayer; this.SynchronizationServiceManager = synchronizationServiceManager; this.View.ApplicationModes = Enum.GetValues(typeof(ApplicationMode)).Cast <ApplicationMode>(); var configuration = ConfigurationReader.GetConfiguration(); this.View.SelectedApplicationMode = configuration.ApplicationMode; this.View.ServerUrlInputEnabled = configuration.ApplicationMode == ApplicationMode.Client; this.View.ServerUrlInputText = configuration.ServerUrl ?? "https://"; this.View.Save += OnSave; this.View.ApplicationModeChange += OnSelectedApplicationModeChange; }
public AppExceptionHandler(IAlertDisplayer alertDisplayer) { this.alertDisplayer = alertDisplayer; RegisteredExceptions = new Dictionary <Type, string>(); }