Exemple #1
0
        public WorklogView(RefreshableWorklogViewModel parent, Issue issue, IIssueService issueService, IssueDetailViewModel refreshViewModel)
        {
            InitializeComponent();

            this._viewModel  = new WorklogViewModel(parent, issue, issueService, refreshViewModel);
            this.DataContext = this._viewModel;
        }
        /// <summary>
        /// Standard constructor for the tool window.
        /// </summary>
        public JiraWorklogToolWindow() : base(null)
        {
            this._viewModel = new RefreshableWorklogViewModel(this);
            this._view      = new RefreshableWorklogView(this._viewModel);

            base.Content = _view;
        }
Exemple #3
0
        public WorklogViewModel(RefreshableWorklogViewModel parent, Issue issue, IIssueService issueService, IssueDetailViewModel refreshViewModel)
        {
            this._parent = parent;

            HideErrorMessages(this._parent);

            this._issueService = issueService;

            this._refreshViewModel = refreshViewModel;

            this.Issue = issue;
            InitializeTitleTexts();

            this.ConfirmCreateWorklogCommand = new DelegateCommand(ConfirmCreateWorklog);
            this.CancelCreateWorklogCommand  = new DelegateCommand(CancelCreateWorklog);
            this.SetDateStartedToNowCommand  = new DelegateCommand(SetDateStartedToNow);
        }
Exemple #4
0
        protected void ShowErrorMessages(JiraException ex, RefreshableWorklogViewModel 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);
        }
        public RefreshableWorklogView(RefreshableWorklogViewModel contentHolder)
        {
            InitializeComponent();

            this.DataContext = contentHolder;
        }
Exemple #6
0
 protected void HideErrorMessages(RefreshableWorklogViewModel parent)
 {
     parent.SetErrorMessage(null);
 }