public LoginModel(IPiggyRepository repository, IUserService service, ISettingsService settingsService) { _repository = repository; _service = service; _settingsService = settingsService; Currencies = new List <Currency>(); }
public OperationsModel(IPiggyRepository repository, IOperationService operationService, IAccountService accountService, ICategoryService categoryService) { _repository = repository; _operationService = operationService; _accountService = accountService; _categoryService = categoryService; Operations = new List <IOperationModel>(); CurrentPageNumber = 1; _totalPages = 1; }
public SettingsModel(IPiggyRepository repository, IUserService service, ISettingsService settingsService) { _repository = repository; _service = service; _settingsService = settingsService; _isDarkMode = true; if (_settingsService.TryGetValue(Constants.RequestedTheme, out var theme)) { _isDarkMode = theme != ApplicationTheme.Light.ToString(); } _language = GetCurrentLanguage(); }
public OperationModel(Operation operation, IPiggyRepository repository, IOperationService service, IAccountService accountService, ICategoryService categoryService, bool isNew = false) { _operation = operation; _repository = repository; _service = service; _accountService = accountService; _categoryService = categoryService; Accounts = new List <Account>(); Categories = new List <Category>(); Amount = operation.Amount; Type = operation.Type; Comment = operation.Comment; OperationDate = operation.CreatedOn; CategoryType = operation.CategoryType ?? CategoryType.Undefined; CategoryHexColor = operation.CategoryHexColor ?? "#FFFFFF"; CategoryTitle = operation.CategoryTitle; AccountTitle = operation.AccountTitle; ToAccountTitle = operation.ToTitle; Symbol = operation.Symbol; Id = operation.Id; IsNew = isNew; }
public AccountsModel(IAccountService service, IPiggyRepository repository) { _service = service; _repository = repository; Accounts = new List <IAccountModel>(); }
public CategoriesModel(IPiggyRepository repository, ICategoryService service) { _repository = repository; _service = service; Categories = new List <ICategoryModel>(); }