Exemple #1
0
        private void back_button_Click(object sender, EventArgs e)
        {
            // Safely close connection to Motor
            //////////////////////////////////// TODO FIX /////////////////////////////////////
            if (motorConnect)
            {
                //xAxisEventObj.Stop();
                //xAxisAmp.HaltMove();
                xAxisAmp.Disable();
                canOpen.Close();
            }

            // Safely closes Serial Port to Arduino
            if (arduinoPort.IsOpen)
            {
                arduinoPort.Dispose();
                arduinoPort.Close();
            }


            d.add_to_whistory("JOSE", 0, time, "0", totalReps, (int)max_weight, (int)avg_weight);

            this.Hide();
            var choose_workout_screen = new choose_workout_screen();

            choose_workout_screen.FormClosed += (s, args) => this.Close();
            choose_workout_screen.Show();
        }
        private void workout_button_Click(object sender, EventArgs e)
        {
            this.Hide();
            var choose_workout_screen = new choose_workout_screen();

            choose_workout_screen.FormClosed += (s, args) => this.Close();
            choose_workout_screen.Show();
        }