Esempio n. 1
0
        public void SaveInfobase(string name, Settings settings)
        {
            _infobases.ForEach(val => val.IsActive = false);

            Infobase s = Infobases.FirstOrDefault(val => val.Name == name);

            if (s == null)
            {
                s = new Infobase { Name = name };
                _infobases.Add(s);
            }

            s.ApplicationString = settings.ApplicationString;
            s.BaseUrl = settings.BaseUrl;
            if (!settings.AnonymousAccess)
            {
                s.UserName = settings.UserName;
                s.Password = settings.Password;
            }
            s.AnonymousAccess = settings.AnonymousAccess;
            s.IsActive = true;
            s.IsAutorun = true;

            Serialize(_infobases);
        }
Esempio n. 2
0
        void StartApplication(Settings settings)
        {
            Settings = settings;

            Settings.ReadSettings();
            Settings.WriteSettings();

            _logonScreen = new LogonScreen(_baseActivity, Settings, LoadApplication);
            _progressScreen = new ProgressScreen(_baseActivity, Settings);

            AppContext = new ApplicationContext(_baseActivity, Settings, LoadComplete);
            AppContext.LoadingProgress += _progressScreen.Progress;
            AppContext.ReturnToStartMenu += OpenStartScreen;

            ExceptionHandler = new ExceptionHandler(Settings, _baseActivity, AppContext);
            HandleLastError(Prepare);
        }
Esempio n. 3
0
        public ApplicationContext(BaseScreen baseActivity, Settings settings, System.Action loadComplete)
        {
            GlobalVariables = new Dictionary<string, object>();

            _baseActivity = baseActivity;
            _settings = settings;
            _loadComplete = loadComplete;

            LocationProvider = new GpsProvider(baseActivity);

            LocationTracker = new GPSTracker(baseActivity);

            GalleryProvider = new GalleryProvider(baseActivity);

            CameraProvider = new CameraProvider(baseActivity, this);

            DialogProvider = new DialogProvider(baseActivity, this);

            ClipboardProvider = new ClipboardProvider(baseActivity, this);

            Application.ApplicationContext.InitContext(this);
        }
Esempio n. 4
0
 public ExceptionHandler(Settings settings, BaseScreen screen, ApplicationContext context)
 {
     _settings = settings;
     _screen = screen;
     _context = context;
 }