Ejemplo n.º 1
0
        public void SetUp()
        {
            repository = new DataRepository();
            ConstPopulator populator     = new ConstPopulator();
            DataPopulator  dataPopulator = new DataPopulator(repository, populator);

            dataPopulator.populate();
        }
 public ApplicationOverviewViewModel(int id)
 {
     _applicationDataRepository = new ApplicationDataRepository($"Data Source={DatabaseManager.DatabaseName};Version=3;");
     Cards         = new ObservableCollection <CardModel>();
     CurrentViewId = id;
     SaveCommand   = new DelegateCommand(OnSave);
     LoadViewData(id);
     AddApplication();
 }
Ejemplo n.º 3
0
 public ShortcutsViewModel(int id)
 {
     CurrentApplication = id;
     Cards = new ObservableCollection <ShortcutViewModel>();
     _shortcutDataRepository = new ShortcutDataRepository($"Data Source={DatabaseManager.DatabaseName};Version=3;");
     LoadShortcuts(id);
     SaveCommand     = new DelegateCommand(OnSave);
     AddCommand      = new DelegateCommand(OnAdd);
     RemoveCommand   = new DelegateCommand(OnRemove);
     EditCommand     = new DelegateCommand(OnEdit);
     SaveEditCommand = new DelegateCommand(OnSaveEdit);
 }
Ejemplo n.º 4
0
 public CategorieOverviewViewModel()
 {
     _categoryDataRepository = new CategoryDataRepository($"Data Source={DatabaseManager.DatabaseName};Version=3;");
     Cards = new List <CardModel>();
     LoadCategories();
     AddCategory();
     //Cards = new List<CardModel>
     //{
     //	new CardModel
     //	{
     //		DisplayName = "Operating systems",
     //		ImageSource = "pack://application:,,,/DevCut.UI;component/Resources/icons8-System Task Filled-100.png"
     //	},
     //	new CardModel
     //	{
     //		DisplayName = "Development",
     //		ImageSource = "pack://application:,,,/DevCut.UI;component/Resources/icons8-Code Filled-100.png"
     //	},
     //	new CardModel
     //	{
     //		DisplayName = "Design",
     //		ImageSource = "pack://application:,,,/DevCut.UI;component/Resources/icons8-Design Filled-100.png"
     //	},
     //	new CardModel
     //	{
     //		DisplayName = "Games",
     //		ImageSource = "pack://application:,,,/DevCut.UI;component/Resources/icons8-Game Controller Filled-100.png"
     //	},
     //	new CardModel
     //	{
     //		DisplayName = "Web",
     //		ImageSource = "pack://application:,,,/DevCut.UI;component/Resources/icons8-Internet Filled-100.png"
     //	},
     //	new CardModel
     //	{
     //		DisplayName = "Miscellaneous",
     //		ImageSource = "pack://application:,,,/DevCut.UI;component/Resources/icons8-Device Manager Filled-100.png"
     //	}
     //};
 }
Ejemplo n.º 5
0
 public DataPopulator(AbstractDataRepository dataRepository, IPopulateData populateData)
 {
     this._dataRepository = dataRepository;
     this._populateData   = populateData;
 }
Ejemplo n.º 6
0
 public DataService(AbstractDataRepository dataRepository)
 {
     _dataRepository = dataRepository;
 }