示例#1
0
 public OnlineStateViewModel(IOfflineService service, ICurrentProjectService currentProject)
 {
     SwitchCommand        = new DelegateCommand(OnSwitch);
     StartSyncCommand     = new DelegateCommand(() => { }, () => false);
     this._service        = service;
     this._currentProject = currentProject;
 }
示例#2
0
 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);
 }
示例#3
0
        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;
        }
示例#4
0
 public DashboardViewModel(ICurrentProjectService currentProjectService, IIssueService issueService, INavigationController navigation)
 {
     _issueService          = issueService;
     _currentProjectService = currentProjectService;
     _subscription          = currentProjectService.Register(ProjectChanged);
 }