Exemplo n.º 1
0
        public BudgetModel LoadBudget(string budgetPath)
        {
            var deviceSettings = _settingsProvider.Get <Device>();

            Guid deviceId = deviceSettings.DeviceID;

            if (!File.Exists(budgetPath))
            {
                throw new FileNotFoundException(budgetPath);
            }

            IBudgetStore budgetStore = new SQLiteBudgetStore(deviceId, budgetPath);
            var          budgetModel = BudgetModel.Load(deviceId, budgetStore);

            return(budgetModel);
        }
Exemplo n.º 2
0
 public void ReloadBudget()
 {
     BudgetModel = BudgetModel.Load(DeviceID, BudgetStore);
     Budget      = BudgetModel.GetBudget();
 }