Пример #1
0
        public NoIssueFoundView(IJiraToolWindowNavigatorViewModel parent, string issueKey)
        {
            InitializeComponent();

            this._viewModel  = new NoIssueFoundViewModel(parent, issueKey);
            this.DataContext = this._viewModel;
        }
Пример #2
0
        public AuthenticationViewModel(IJiraToolWindowNavigatorViewModel parent,
                                       IOAuthService oAuthService,
                                       IBasicAuthenticationService basicService,
                                       IUserService userService)
        {
            this._parent = parent;

            this._baseUrl      = UserSettingsHelper.ReadStringFromUserSettings("JiraBaseUrl");
            this._baseUrlBasic = UserSettingsHelper.ReadStringFromUserSettings("JiraBaseUrl");
            this._username     = UserSettingsHelper.ReadStringFromUserSettings("JiraUsername");

            this._oAuthService = oAuthService;
            this._basicService = basicService;
            this._userService  = userService;

            SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider);

            this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            this.SignInOAuthCommand     = new DelegateCommand(SignInOAuth);
            this.SignInBasicCommand     = new DelegateCommand(SignInBasic);
            this.HowToSetupOAuthCommand = new DelegateCommand(HowToSetupOAuth);

            SetPanelTitles();
        }
Пример #3
0
        public CreateIssueViewModel(IJiraToolWindowNavigatorViewModel parent, Project project, IIssueService issueService) : this(project, issueService)
        {
            this._parent  = parent;
            this._project = project;

            this.SelectedType = this._typesList[0];
        }
Пример #4
0
        public FiltersListView(IJiraToolWindowNavigatorViewModel parent, IIssueService issueService)
        {
            InitializeComponent();

            this._viewModel  = new FilterListViewModel(parent, issueService);
            this.DataContext = this._viewModel;
        }
Пример #5
0
        public NoIssueFoundViewModel(IJiraToolWindowNavigatorViewModel parent, string issueKey)
        {
            this._parent = parent;

            this._issueKey = issueKey;

            SetPanelTitles();
        }
Пример #6
0
        public AdvancedSearchView(IJiraToolWindowNavigatorViewModel parent, IPriorityService priorityService,
                                  IIssueService issueService, IProjectService projectService, ISprintService sprintService, IBoardService boardService)
        {
            InitializeComponent();

            this._viewModel = new AdvancedSearchViewModel(parent, priorityService, issueService, projectService,
                                                          sprintService, boardService);
            this.DataContext = this._viewModel;
        }
Пример #7
0
        public CreateIssueViewModel(IJiraToolWindowNavigatorViewModel parent, Issue parentIssue, Project project, IIssueService issueService) : this(project, issueService)
        {
            this._parent      = parent;
            this._parentIssue = parentIssue;
            this._project     = project;

            this.SelectedType = this._subTask;

            this.IsCreatingSubTask = true;
        }
Пример #8
0
        public FilterListViewModel(IJiraToolWindowNavigatorViewModel parent, IIssueService issueService)
        {
            this._parent = parent;
            this._parent.SetRefreshCommand(RefreshFilters);

            this._issueService = issueService;

            this._filterList = new ObservableCollection <Filter>();

            GetFiltersAsync();

            SetPanelTitles();
        }
Пример #9
0
        public IssueListViewModel(IJiraToolWindowNavigatorViewModel parent, IIssueService issueService, string filter) : this(parent, issueService)
        {
            this._type   = IssueListType.filter;
            this._filter = filter;

            this._subtitle = filter;

            this._parent.SetRefreshCommand(RefreshFilteredIssues);

            GetIssuesAsync(this._startAt, filter);

            this.IssueList.CollectionChanged += this.OnCollectionChanged;

            SetPanelTitles();
        }
Пример #10
0
        public IssueListViewModel(IJiraToolWindowNavigatorViewModel parent, IIssueService issueService, Project project) : this(parent, issueService)
        {
            this._type = IssueListType.normal;

            this._project       = project;
            this._subtitle      = this._project.Name;
            this.CanCreateIssue = true;

            this._parent.SetRefreshCommand(RefreshIssues);

            GetIssuesAsync(this._startAt);

            this.IssueList.CollectionChanged += this.OnCollectionChanged;

            SetPanelTitles();
        }
Пример #11
0
        public IssueListViewModel(IJiraToolWindowNavigatorViewModel parent, IIssueService issueService, bool quickSearch, string searchString) : this(parent, issueService)
        {
            this._type = IssueListType.quickSearch;

            this._searchString = searchString;

            this._subtitle = "Search string \"" + searchString + "\"";;

            this._parent.SetRefreshCommand(RefreshQuickSearchIssues);

            GetIssuesQuickSearchAsync(this._startAt, searchString);

            this.IssueList.CollectionChanged += this.OnCollectionChanged;

            SetPanelTitles();
        }
Пример #12
0
        public AdvancedSearchViewModel(IJiraToolWindowNavigatorViewModel parent, IPriorityService priorityService,
                                       IIssueService issueService, IProjectService projectService, ISprintService sprintService, IBoardService boardService)
        {
            this._parent = parent;

            this._parent.SetRefreshCommand(RefreshAdvancedSearch);

            this._priorityService = priorityService;
            this._issueService    = issueService;
            this._projectService  = projectService;
            this._sprintService   = sprintService;
            this._boardService    = boardService;

            this.PriorityList = new ObservableCollection <Priority>();
            this.StatusList   = new ObservableCollection <Status>();
            this.ProjectList  = new ObservableCollection <Project>();
            this.IssueList    = new ObservableCollection <Issue>();
            this._boardList   = new List <BoardProject>();
            this.SprintList   = new ObservableCollection <Sprint>();

            this.CheckedPriorityCommand = new DelegateCommand(CheckedPriority);
            this.CheckedStatusCommand   = new DelegateCommand(CheckedStatus);
            this.CheckedProjectCommand  = new DelegateCommand(CheckedProject);
            this.CheckedSprintCommand   = new DelegateCommand(CheckedSprint);

            this.EditProjectsCommand       = new DelegateCommand(EditProjects);
            this.CancelEditProjectsCommand = new DelegateCommand(CancelEditProjects);

            this.EditSprintsCommand       = new DelegateCommand(EditSprints);
            this.CancelEditSprintsCommand = new DelegateCommand(CancelEditSprints);

            this.EditPrioritiesCommand       = new DelegateCommand(EditPriorities);
            this.CancelEditPrioritiesCommand = new DelegateCommand(CancelEditPriorities);

            this.EditStatusesCommand       = new DelegateCommand(EditStatuses);
            this.CancelEditStatusesCommand = new DelegateCommand(CancelEditStatuses);

            this.ClearFiltersCommand = new DelegateCommand(ClearFilters);

            GetIssuesAsync();
            GetPrioritiesAsync();
            GetStatusesAsync();
            GetProjectsAsync();
            GetBoardsAsync();
        }
Пример #13
0
        public ConnectionViewModel(IJiraToolWindowNavigatorViewModel parent, IUserService userService, IBasicAuthenticationService basicAuthenticationService)
        {
            this._parent = parent;

            this._userService = userService;
            this._basicAuthenticationService = basicAuthenticationService;

            this.GetAuthenticatedUserAsync();

            SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider);

            this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            this.SignOutCommand           = new DelegateCommand(SignOut);
            this.IssueReportGitHubCommand = new DelegateCommand(IssueReportGitHub);

            SetPanelTitles();
        }
        public AuthenticationVerificationViewModel(IJiraToolWindowNavigatorViewModel parent, IToken requestToken, IOAuthService oAuthService)
        {
            this._parent = parent;

            this._oAuthService = oAuthService;

            this._requestToken = requestToken;

            this.StartRequestTokenExpireTimeCountdown();

            SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider);

            this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            this.SignInCommand = new DelegateCommand(SignIn);

            SetPanelTitles();
        }
Пример #15
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public ProjectListViewModel(IJiraToolWindowNavigatorViewModel parent, IProjectService projectService, IBoardService boardService)
        {
            this._projectService = projectService;
            this._boardService   = boardService;

            this._parent = parent;
            this._parent.SetRefreshCommand(RefreshProjects);

            this.ProjectList = new ObservableCollection <Project>();

            this.ProjectSelectedCommand = new DelegateCommand(OnItemSelected);
            OleMenuCommandService service = JiraPackage.Mcs;

            GetProjectsAsync();

            this.ProjectList.CollectionChanged += this.OnCollectionChanged;

            SetPanelTitles();
        }
Пример #16
0
        public IssueListViewModel(IJiraToolWindowNavigatorViewModel parent, IIssueService issueService)
        {
            this._issueService = issueService;

            this._parent = parent;

            this.IssueList = new ObservableCollection <Issue>();
            AttributesList = new ObservableCollection <MyAttribute>();

            this.CreateIssueCommand = new DelegateCommand(RedirectCreateIssue);

            this.CheckedAttributeCommand     = new DelegateCommand(CheckedAttribute);
            this.EditAttributesCommand       = new DelegateCommand(EditAttributes);
            this.CancelEditAttributesCommand = new DelegateCommand(CancelEditAttributes);

            this.GetNextIssuesCommand     = new DelegateCommand(GetNextIssues);
            this.GetPreviousIssuesCommand = new DelegateCommand(GetPreviousIssues);

            InitializeAttributes();

            OleMenuCommandService service = JiraPackage.Mcs;
        }
Пример #17
0
        protected void ShowErrorMessages(UnauthorizedException ex, IJiraToolWindowNavigatorViewModel parent)
        {
            parent.StopLoading();

            string errorMessage = "";

            if (ex.ErrorResponse.ErrorMessages.Length != 0 && ex.ErrorResponse.ErrorMessages != null)
            {
                foreach (string errorMsg in ex.ErrorResponse.ErrorMessages)
                {
                    errorMessage += errorMsg;
                }
            }

            if (ex.ErrorResponse.Errors != null)
            {
                foreach (KeyValuePair <string, string> error in ex.ErrorResponse.Errors)
                {
                    errorMessage += error.Value;
                }
            }

            parent.SetErrorMessage(errorMessage);
        }
Пример #18
0
        protected void ShowErrorMessages(WebException ex, IJiraToolWindowNavigatorViewModel parent)
        {
            parent.StopLoading();

            parent.SetErrorMessage(ex.Message);
        }
Пример #19
0
 protected void HideErrorMessages(IJiraToolWindowNavigatorViewModel parent)
 {
     parent.SetErrorMessage(null);
 }