public void Run()
        {
            if (this.FileManager.Exists(PatientDatabase.DatabaseFilePath) && PatientDatabase.DebugMode)
            {
                this.FileManager.Delete(PatientDatabase.DatabaseFilePath);
            }

            // Create these objects after possibly deleting the database
            this.PatientFileUpdateManager = this.ObjectFactory.Create<IPatientFileUpdateManager>();
            this.PatientFileUpdateManager.UpdateIfEmpty();

            this.SettingsManager = this.ObjectFactory.Create<ISettingsManager>();
            this.SettingsManager.Initialize();
            if (!this.SettingsManager.DataExists)
            {
                this.ScreenController.ConfigurationStart();
                return;
            }


            this.SessionContext = this.ObjectFactory.Create<ISessionContext>();
            this.SessionContext.Initialize();

            this.GeofenceService = ObjectFactory.Create<IGeofenceService>();
            if (!this.GeofenceService.Initialize())
            {
                this.ScreenController.ShowExitScreen("Your device is outside it's allowed home area.");
                return;
            }

            this.ScreenController.ShowHomeScreen();
        }
示例#2
0
        public void Run()
        {
            if (this.FileManager.Exists(PatientDatabase.DatabaseFilePath) && PatientDatabase.DebugMode)
            {
                this.FileManager.Delete(PatientDatabase.DatabaseFilePath);
            }

            // Create these objects after possibly deleting the database
            this.PatientFileUpdateManager = this.ObjectFactory.Create <IPatientFileUpdateManager>();
            this.PatientFileUpdateManager.UpdateIfEmpty();

            this.SettingsManager = this.ObjectFactory.Create <ISettingsManager>();
            this.SettingsManager.Initialize();
            if (!this.SettingsManager.DataExists)
            {
                this.ScreenController.ConfigurationStart();
                return;
            }


            this.SessionContext = this.ObjectFactory.Create <ISessionContext>();
            this.SessionContext.Initialize();

            this.GeofenceService = ObjectFactory.Create <IGeofenceService>();
            if (!this.GeofenceService.Initialize())
            {
                this.ScreenController.ShowExitScreen("Your device is outside it's allowed home area.");
                return;
            }

            this.ScreenController.ShowHomeScreen();
        }
示例#3
0
 /// <summary>for iPad</summary>
 public PatientListViewController(
     IPatientManager patientManager,
     PatientSplitViewController patientSplitViewController,
     IPatientFileUpdateManager patientFileUpdateManager,
     IObjectFactory objectFactory)
     : base(patientFileUpdateManager)
 {
     PatientManager           = patientManager;
     this.ObjectFactory       = objectFactory;
     this.splitViewController = patientSplitViewController;
     this.EnableSearch        = true;      // requires PatientTableElement to implement Matches()
 }
		/// <summary>for iPad</summary>
        public PatientListViewController(
            IPatientManager patientManager,
            PatientSplitViewController patientSplitViewController, 
            IPatientFileUpdateManager patientFileUpdateManager,
            IObjectFactory objectFactory)
            : base(patientFileUpdateManager)
		{
		    PatientManager = patientManager;
		    this.ObjectFactory = objectFactory;
		    this.splitViewController = patientSplitViewController;
			this.EnableSearch = true; // requires PatientTableElement to implement Matches()
		}
 /// <summary>
 /// Set pushing=true so that the UINavCtrl 'back' button is enabled
 /// </summary>
 public UpdateManagerLoadingDialogViewController(IPatientFileUpdateManager patientFileUpdateManager) : base(UITableViewStyle.Plain, null, true)
 {
     PatientFileUpdateManager = patientFileUpdateManager;
 }
示例#6
0
 /// <summary>for iPhone</summary>
 public PatientListViewController(
     IPatientManager patientManager,
     IPatientFileUpdateManager patientFileUpdateManager,
     IObjectFactory objectFactory) : this(patientManager, null, patientFileUpdateManager, objectFactory)
 {
 }
		/// <summary>
		/// Set pushing=true so that the UINavCtrl 'back' button is enabled
		/// </summary>
		public UpdateManagerLoadingDialogViewController (IPatientFileUpdateManager patientFileUpdateManager) : base (UITableViewStyle.Plain, null, true)
		{
		    PatientFileUpdateManager = patientFileUpdateManager;
		}
		/// <summary>for iPhone</summary>
        public PatientListViewController(
            IPatientManager  patientManager,
            IPatientFileUpdateManager patientFileUpdateManager,
            IObjectFactory objectFactory) : this(patientManager, null, patientFileUpdateManager, objectFactory)
		{
		}