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);
            }
        }
Example #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();
     }
 }
        //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;
        }
        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();
        }
Example #5
0
        internal static void ShowMinimalInterface()
        {
            ShowTopandBottom(false);
            ShowNavigation(true);
            ShowShortcuts(true);

            Properties.Settings.Default.ShowInterface = false;

            if (ActivityTimer != null)
            {
                ActivityTimer.Start();
            }
        }
        //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();
        }
Example #7
0
 private void RestartTimer()
 {
     MyActivityCounter = 0;
     ActivityTimer.Start();
     ShowTimeLeft();
 }
Example #8
0
 /// <summary>
 /// Starts the timer that controls the stepping of activities.
 /// </summary>
 protected virtual void StartActivityTimer()
 {
     ActivityTimer.Start();
 }