public OnlineStateViewModel(IOfflineService service, ICurrentProjectService currentProject) { SwitchCommand = new DelegateCommand(OnSwitch); StartSyncCommand = new DelegateCommand(() => { }, () => false); this._service = service; this._currentProject = currentProject; }
public AreasViewModel(ICurrentProjectService currentProjectService, IAreaService areaController, INavigationController navigation) { this._currentProjectService = currentProjectService; this._areaController = areaController; this._navigation = navigation; _subscription = _currentProjectService.Register(OnProjectChanged); Areas = new ObservableCollection <CommandWrapper>(); CreateIssueCommand = new DelegateCommand <AreaInfo>(CreateIssue); }
public MenuViewModel(INavigationController controller, IProjectService projectController, ICurrentProjectService currentProjectService, IStateViewModel stateViewModel, IOptionsMonitor <AppOptions> monitor) { _subscription = monitor.OnChange(async p => await InitializeAsync()); MenuItems = new ObservableCollection <MenuItem>(); MenuItems.Add(new MenuItem("Areas", new DelegateCommand(() => controller.ShowAsync <AreasViewModel>()))); MenuItems.Add(new MenuItem("Settings", new DelegateCommand(() => controller.ShowAsync <SettingsViewModel>()))); this._navigationController = controller; this._projectService = projectController; this._currentProjectService = currentProjectService; this.StateViewModel = stateViewModel; }
public DashboardViewModel(ICurrentProjectService currentProjectService, IIssueService issueService, INavigationController navigation) { _issueService = issueService; _currentProjectService = currentProjectService; _subscription = currentProjectService.Register(ProjectChanged); }