public AgileBoardViewModel(IJiraApi jiraApi,
           JiraSessionViewModel jiraSession,
           IMessenger messenger,
           IssuesStatisticsCalculator statisticsCalculator,
           RawAgileBoard board)
        {
            Board = board;

            _messenger = messenger;
            _jiraApi = jiraApi;
            _jiraSession = jiraSession;
            _statisticsCalculator = statisticsCalculator;

            PickUpSprintCommand = new RelayCommand(OpenPickUpSprint, () => Board.Type == "scrum");
            OpenPivotAnalysisCommand = new RelayCommand(() => _messenger.Send(new OpenPivotAnalysisMessage(BoardContent.Issues)));
            OpenEpicsOverviewCommand = new RelayCommand(() => _messenger.Send(new OpenEpicsOverviewMessage(BoardContent.Issues, BoardContent.Epics)), () => Board.Type == "scrum");
            BrowseIssuesCommand = new RelayCommand(() => _messenger.Send(new OpenIssuesBrowserMessage(BoardContent.Issues)));
            OpenGraveyardCommand = new RelayCommand(() => _messenger.Send(new OpenBoardGraveyardMessage(BoardContent.Issues)));
            OpenSprintsVelocityCommand = new RelayCommand(() => _messenger.Send(new OpenSprintsVelocityMessage(BoardContent)), () => Board.Type == "scrum");

            RefreshDataCommand = new RelayCommand(() =>
            {
                _forceReload = true;
                DownloadElements();
            }, () => IsBusy == false);
            FetchChangesCommand = new RelayCommand(() =>
            {
                DownloadElements();
            }, () => IsBusy == false);

            DownloadElements();
        }
        public LoginPageViewModel(IMessenger messenger,
           JiraSessionViewModel jiraSession,
           IJiraApi jiraApi,
           AssistantSettings configuration)
        {
            _messenger = messenger;
            _jiraSession = jiraSession;
            _jiraApi = jiraApi;

            JiraAddress = configuration.JiraUrl;
            Username = configuration.Username;
        }
Exemple #3
0
        public LoginPageViewModel(IMessenger messenger,
                                  JiraSessionViewModel jiraSession,
                                  IJiraApi jiraApi,
                                  AssistantSettings configuration)
        {
            _messenger   = messenger;
            _jiraSession = jiraSession;
            _jiraApi     = jiraApi;

            JiraAddress = configuration.JiraUrl;
            Username    = configuration.Username;
        }
        public IssuesUpdatesChecker(ReportsSettings reportsSettings, IJiraApi jiraApi, JiraSessionViewModel jiraSession, IMessenger messenger)
        {
            _reportsSettings = reportsSettings;
            _jiraApi = jiraApi;
            _jiraSession = jiraSession;
            _messenger = messenger;

            SystemEvents.SessionSwitch += (sender, args) =>
            {
                _isStationLocked = args.Reason == SessionSwitchReason.SessionLock;
            };

            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(30);
            _timer.Tick += TimerTick;
            _timer.Start();
        }