private void CurrentActionPressed()
        {
            if (!Activity.OnActivity())
            {
                Speak("Let's start")
                .ConfigureAwait(false);
                StartListening()
                .ConfigureAwait(false);
                Activity.Start();
                Model.OnActivity     = true;
                Model.CurrentColspan = 1;
                Model.CurrentAction  = "Pausar";
                return;
            }

            Activity.Toggle();
            if (Activity.IsRunning())
            {
                Model.CurrentAction = "Pausar";
                Speak("Resumed")
                .ConfigureAwait(false);
            }
            else
            {
                Model.CurrentAction = "Resumir";
                Speak("Paused")
                .ConfigureAwait(false);
            }
        }
예제 #2
0
 /// <summary>
 /// Logic for mouse enter mainwindow event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 internal static void Interface_MouseEnter(object sender, MouseEventArgs e)
 {
     if (!ActivityTimer.Enabled || Scroll.IsAutoScrolling)
     {
         ActivityTimer.Start();
     }
 }
예제 #3
0
        //on client form load
        private void ClientForm_Load(object sender, EventArgs e)
        {
            //set up activity timer
            ActivityTimer.Tick += new System.EventHandler(ActivityTimer_Tick);
            ActivityTimer.Start();

            //defaults message recipient to all
            privateMessageBox.SelectedIndex = 0;
        }
예제 #4
0
        private void StartTimingActivity()
        {
            LytCurrentActivity.Children.Clear();
            ActivityView aView = new ActivityView(CurrentActivity);

            aView.AsTimerView();
            LytCurrentActivity.Children.Add(aView);

            LytIndicator.IsVisible = false;
            LytTimer.IsVisible     = true;

            ActivityTimer.Start();
        }
예제 #5
0
        internal static void ShowMinimalInterface()
        {
            ShowTopandBottom(false);
            ShowNavigation(true);
            ShowShortcuts(true);

            Properties.Settings.Default.ShowInterface = false;

            if (ActivityTimer != null)
            {
                ActivityTimer.Start();
            }
        }
예제 #6
0
        //submit button clicked
        private void SubmitButtonClick(object sender, EventArgs e)
        {
            //if message is set to send to all then send username and message to all clients
            if (privateMessageBox.SelectedIndex == 0)
            {
                mClient.SendChatMessage(InputField.Text, UsernameInput.Text);
            }
            //send message and username to the user ID selected
            else
            {
                mClient.SendPrivateMessage(InputField.Text, UsernameInput.Text, privateMessageBox.SelectedIndex - 1);
            }

            //clear input text
            InputField.Clear();

            //reset activity timer
            ActivityTimer.Stop();
            ActivityTimer.Start();
        }
예제 #7
0
 private void RestartTimer()
 {
     MyActivityCounter = 0;
     ActivityTimer.Start();
     ShowTimeLeft();
 }
예제 #8
0
 /// <summary>
 /// Starts the timer that controls the stepping of activities.
 /// </summary>
 protected virtual void StartActivityTimer()
 {
     ActivityTimer.Start();
 }