public EditLogViewModel(NavigationEventArgs navigation, BatContext db, NavigationHelper navigationHelper) { _db = db; _navigationHelper = navigationHelper; _batLog = (BatNodeLog)navigation.Parameter; SaveCommand = new RelayCommand(async () => await SaveAction()); CancelCommand = new RelayCommand(() => GoBack()); PivotItems = new ObservableCollection<PivotModelBase>(); PivotItems.Add(new EditCallsPivotModel(_batLog, this)); PivotItems.Add(new EditCallsPivotModel(_batLog, this)); }
public MainPageModel(NavigationEventArgs navigation, BatContext db, NavigationService navigationService, BatNodeLogReader logReader) { _db = db; _navigationService = navigationService; _logReader = logReader; ImportFileCommand = new RelayCommand(async () => await ImportLogFile()); EditCommand = new RelayCommand(() => { if (SelectedItem != null) { _navigationService.EditLog(SelectedItem); } }, () => SelectedItem != null); DetailsCommand = new RelayCommand(() => { if (SelectedItem != null) { _navigationService.NavigateToLogDetails(SelectedItem); } }, () => SelectedItem != null); }
public LogDetailsPageModel(NavigationEventArgs navigation, BatContext db, NavigationService navigationService) : this((BatNodeLog)navigation.Parameter) { _db = db; _navigationService = navigationService; }