Exemple #1
0
        private void Commit_button_Click(object sender, EventArgs e)
        {
            CurrentIssueTimer.Stop();
            CurrentIssueTimerTicking = false;
            AutoSaveTimer.Stop();
            SaveTimeTicked(NewTicksAfterAutoSave);

            if (NewIssueSelectionAvailability)
            {
                BuisinessLogicClass.SuperIssueId = Convert.ToInt32(Issue_list_GridView.SelectedRows[0].Cells[0].Value);
            }
            else
            {
                BuisinessLogicClass.SuperIssueId = CurrentIssueId;
            }

            CommitForm CommitWindow = new CommitForm();

            if (CommitWindow.ShowDialog() == DialogResult.OK)
            {
                Timer_label.Text        = "00:00:00";
                Start_timer_button.Text = "Start";
                NewTicksAfterAutoSave   = 0;
                TimerTicks = 0;
                NewIssueSelectionAvailability = true;
                Commit_button.Enabled         = false;
                ModifyGridViewData();
            }
            else
            {
                CurrentIssueTimer.Start();
                CurrentIssueTimerTicking = true;
                AutoSaveTimer.Start();
            }
        }
Exemple #2
0
 private void ExitApplication()
 {
     CurrentIssueTimer.Stop();
     CurrentIssueTimerTicking = false;
     AutoSaveTimer.Stop();
     SaveTimeTicked(NewTicksAfterAutoSave);
     BuisinessLogicClass.CleanUpIssuesFile(); // move all time to comments and empty time in main file.
     notifyIcon.Visible = false;
 }
Exemple #3
0
        private void Start_timer_button_Click(object sender, EventArgs e)
        {
            if (NewIssueSelectionAvailability)
            {
                CurrentIssueId = Convert.ToInt32(Convert.ToString(Issue_list_GridView
                                                                  .Rows[Issue_list_GridView.SelectedRows[0].Index].Cells[0].Value));
                BuisinessLogicClass.SuperIssueId = CurrentIssueId;
                CurrentIssueName = Convert.ToString(Issue_list_GridView
                                                    .Rows[Issue_list_GridView.SelectedRows[0].Index].Cells[1].Value);
                if (CurrentIssueName.Length > 50)
                {
                    Text = "RC: " + CurrentIssueName.Substring(0, 50);
                }
                else
                {
                    Text = "RC: " + CurrentIssueName;
                }

                Issue_list_GridView.BackgroundColor = Color.WhiteSmoke;
                for (int i = 0; i < 5; i++)
                {
                    Issue_list_GridView.Rows[CurrentIssueDataGridRowId].Cells[i].Style.BackColor = Color.DarkGray;
                }
            }

            if (Start_timer_button.Text == "Start")
            {
                NewIssueSelectionAvailability = true;
            }
            if (CurrentIssueTimerTicking)
            {
                CurrentIssueTimer.Stop();
                CurrentIssueTimerTicking = false;
                AutoSaveTimer.Stop();
                Start_timer_button.Text = "Continue";
            }
            else
            {
                CurrentIssueTimer.Start();
                CurrentIssueTimerTicking = true;
                AutoSaveTimer.Start();
                Start_timer_button.Text       = "Pause";
                Commit_button.Enabled         = true;
                NewIssueSelectionAvailability = false;
            }
        }