public StartPage()
        {
            var service = new DependencyServiceManager();

            _mediaPicker = service.MediaPicker;
            InitializeComponent();
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SanteDB.DisconnectedClient.ApplicationContext"/> class.
 /// </summary>
 public ApplicationContext(IConfigurationPersister configPersister)
 {
     this.m_serviceManager       = new DependencyServiceManager();
     this.m_configManager        = new ConfigurationManager(configPersister);
     this.ConfigurationPersister = configPersister;
     this.m_serviceManager.AddServiceProvider(configPersister);
     this.m_serviceManager.AddServiceProvider(this.m_configManager);
 }
        public ConfirmViewModel(MediaFile file)
        {
            _media = file;
            var service = new DependencyServiceManager();

            _mediaPicker    = service.MediaPicker;
            _pictureManager = service.PictureManager;
            _image          = ImageSource.FromStream(() => file.Source);
        }
        public ConfirmPage(MediaFile file)
        {
            _mediFile = file;
            var service = new DependencyServiceManager();

            _pictureManager     = service.PictureManager;
            _api                = new RestApi();
            this.BindingContext = new ConfirmViewModel(file);
            InitializeComponent();
        }
Esempio n. 5
0
 /// <summary>
 /// Force stop
 /// </summary>
 public virtual void Stop()
 {
     this.Stopping?.Invoke(this, EventArgs.Empty);
     AuditUtil.AuditApplicationStartStop(EventTypeCodes.ApplicationStop);
     this.m_serviceManager.Stop();
     this.m_serviceManager.Dispose();
     this.m_serviceManager = null;
     this.m_configManager  = null;
     this.Stopped?.Invoke(this, EventArgs.Empty);
     this.m_running = false;
     s_context      = null; // tear down singleton
 }