Exemplo n.º 1
0
        private void btnPostAndReset_Click(object sender, EventArgs e)
        {
            using (var worklogForm = new WorklogForm(Comment))
            {
                var formResult = worklogForm.ShowDialog(this);
                if (formResult == DialogResult.OK)
                {
                    Comment = worklogForm.Comment.Trim();

                    PostAndReset(cbJira.Text, WatchTimer.TimeElapsed, Comment);
                }
                else if (formResult == DialogResult.Yes)
                {
                    Comment = string.Format("{0}:{1}{2}", DateTime.Now.ToString("g"), Environment.NewLine, worklogForm.Comment.Trim());
                    UpdateOutput();
                }
            }
        }
Exemplo n.º 2
0
        public void PostAndReset()
        {
            using (var worklogForm = new WorklogForm(WatchTimer.GetInitialStartTime(), WatchTimer.TimeElapsedNearestMinute, Comment, EstimateUpdateMethod, EstimateUpdateValue))
            {
                UpdateRemainingEstimate(worklogForm);
                var formResult = worklogForm.ShowDialog(this);
                if (formResult == DialogResult.OK)
                {
                    Comment = worklogForm.Comment.Trim();
                    EstimateUpdateMethod = worklogForm.estimateUpdateMethod;
                    EstimateUpdateValue  = worklogForm.EstimateValue;

                    PostAndReset(cbJira.Text, worklogForm.InitialStartTime, WatchTimer.TimeElapsedNearestMinute, Comment, EstimateUpdateMethod, EstimateUpdateValue);
                }
                else if (formResult == DialogResult.Yes)
                {
                    Comment = string.Format("{0}:{1}{2}", DateTime.Now.ToString("g"), Environment.NewLine, worklogForm.Comment.Trim());
                    EstimateUpdateMethod = worklogForm.estimateUpdateMethod;
                    EstimateUpdateValue  = worklogForm.EstimateValue;
                    UpdateOutput();
                }
            }
        }
Exemplo n.º 3
0
        private void btnPostAndReset_Click(object sender, EventArgs e)
        {
            using (var worklogForm = new WorklogForm(WatchTimer.TimeElapsed, settings.AllowManualEstimateAdjustments, Comment, EstimateUpdateMethod, EstimateUpdateValue))
            {
                UpdateRemainingEstimate(worklogForm);
                var formResult = worklogForm.ShowDialog(this);
                if (formResult == DialogResult.OK)
                {
                    Comment = worklogForm.Comment.Trim();
                    EstimateUpdateMethod = worklogForm.estimateUpdateMethod;
                    EstimateUpdateValue = worklogForm.EstimateValue;

                    PostAndReset(cbJira.Text, WatchTimer.TimeElapsed, Comment, EstimateUpdateMethod, EstimateUpdateValue);
                }
                else if (formResult == DialogResult.Yes)
                {
                    Comment = string.Format("{0}:{1}{2}", DateTime.Now.ToString("g"), Environment.NewLine, worklogForm.Comment.Trim());
                    EstimateUpdateMethod = worklogForm.estimateUpdateMethod;
                    EstimateUpdateValue = worklogForm.EstimateValue;
                    UpdateOutput();
                }
            }
        }
Exemplo n.º 4
0
 private void btnPostAndReset_Click(object sender, EventArgs e)
 {
     using (var worklogForm = new WorklogForm())
     {
         if (worklogForm.ShowDialog(this) == DialogResult.OK)
         {
             Cursor.Current = Cursors.WaitCursor;
             if (jiraClient.PostWorklog(cbJira.Text, WatchTimer.TimeElapsed, worklogForm.Comment))
                 Reset();
             Cursor.Current = DefaultCursor;
         }
     }
 }
Exemplo n.º 5
0
        private void btnPostAndReset_Click(object sender, EventArgs e)
        {
            using (var worklogForm = new WorklogForm(Comment))
            {
                var formResult = worklogForm.ShowDialog(this);
                if (formResult == DialogResult.OK)
                {
                    Comment = worklogForm.Comment.Trim();
                    Cursor.Current = Cursors.WaitCursor;
                    if (jiraClient.PostWorklog(cbJira.Text, WatchTimer.TimeElapsed, Comment))
                        Reset();
                    Cursor.Current = DefaultCursor;
                }
                else if (formResult == DialogResult.Yes)
                {
                    Comment = string.Format("{0}:{1}{2}", DateTime.Now.ToString("g"), Environment.NewLine, worklogForm.Comment.Trim());
                    UpdateOutput();
                }
            }

        }