Beispiel #1
0
        private void startWatch_Menu(object sender, RoutedEventArgs e)
        {
            //Console.WriteLine(sender.ToString());
            MenuItem item = (System.Windows.Controls.MenuItem)sender;

            if ((string)item.Header == "_Start Timer")
            {
                item.Header = "_Stop Timer";

                this.timer.start();
            }
            else if ((string)item.Header == "_Stop Timer")
            {
                SubmitTime subWindow = new SubmitTime();
                subWindow.Rp = this.rp;
                subWindow.Te = new TimeEvent(timer.getTimeSpan(), null);
                subWindow.Show();
                item.Header = "_Start Timer";
            }
        }
Beispiel #2
0
        private void startWatch_Button(object sender, RoutedEventArgs e)
        {
            Issue selectedIssue = (Issue)issues_ListBox.SelectedItem;

            if (!timer.Activated)
            {
                this.timer.start();
                timerLabel.Content  = "Tracking " + selectedIssue.Subject;
                timerButton.Content = "Stop tracking";
            }
            else if (timer.Activated)
            {
                SubmitTime subWindow = new SubmitTime();
                subWindow.Rp = this.rp;
                subWindow.Te = new TimeEvent(timer.getTimeSpan(), (Issue)issues_ListBox.SelectedItem);
                subWindow.Show();
                timerButton.Content = "Start tracking";
                timerLabel.Content  = "";
                timer.Activated     = false;
            }
        }
 private void startWatch_Button(object sender, RoutedEventArgs e)
 {
     Issue selectedIssue = (Issue)issues_ListBox.SelectedItem;
     if (!timer.Activated)
     {
         this.timer.start();
         timerLabel.Content = "Tracking " + selectedIssue.Subject;
         timerButton.Content = "Stop tracking";
     }
     else if (timer.Activated)
     {
         SubmitTime subWindow = new SubmitTime();
         subWindow.Rp = this.rp;
         subWindow.Te = new TimeEvent(timer.getTimeSpan(), (Issue)issues_ListBox.SelectedItem);
         subWindow.Show();
         timerButton.Content = "Start tracking";
         timerLabel.Content = "";
         timer.Activated = false;
     }
 }
        private void startWatch_Menu(object sender, RoutedEventArgs e)
        {
            //Console.WriteLine(sender.ToString());
            MenuItem item = (System.Windows.Controls.MenuItem)sender;
            if((string)item.Header == "_Start Timer") {
                item.Header = "_Stop Timer";

                this.timer.start();
            } else if((string)item.Header == "_Stop Timer")
            {
                SubmitTime subWindow = new SubmitTime();
                subWindow.Rp = this.rp;
                subWindow.Te = new TimeEvent(timer.getTimeSpan(), null);
                subWindow.Show();
                item.Header = "_Start Timer";
            }
        }