Esempio n. 1
0
 public SummaryEntriesPageVm(INavigator navigator)
     : base(navigator)
 {
     _templateService = new LogTemplateService();
     _templateService.TemplatesUpdated += OnTemplatesUpdated;
     OpenTemplateEditionCommand         = ReactiveCommand.Create(CallOpenTemplateEdition);
     HighlightSearches = new ObservableCollection <HighlightSearchItemVm <ALogSummaryVm> >();
     HighlightSearches.Add(new HighlightSearchItemVm <ALogSummaryVm>(this, "#509e9bc5", x => x.Details));
     HighlightSearches.Add(new HighlightSearchItemVm <ALogSummaryVm>(this, "#509eca52", x => x.Details));
     HighlightSearches.Add(new HighlightSearchItemVm <ALogSummaryVm>(this, "#50d67e55", x => x.Details));
 }
 public TemplatesEditionPageVm(INavigator navigator, LogTemplateService templateService) : base(navigator)
 {
     _templateService  = templateService;
     SaveCommand       = ReactiveCommand.Create(CallSave);
     ImportCommand     = ReactiveCommand.Create(CallImport);
     ExportCommand     = ReactiveCommand.Create(CallExport);
     AddItemCommand    = ReactiveCommand.Create(CallAddItem);
     DeleteItemCommand = ReactiveCommand.Create(CallDeleteItem);
     MoveUpCommand     = ReactiveCommand.Create(CallMoveUp);
     MoveDownCommand   = ReactiveCommand.Create(CallMoveDown);
     Task.Run(() =>
     {
         var templates = _templateService.GetTemplates();
         Templates     = new ObservableCollection <CustomLogTemplateVm>(templates.Select(x => new CustomLogTemplateVm(x)));
     });
 }