Ejemplo n.º 1
0
        private void Recovery_Click(object sender, RoutedEventArgs e)
        {
            if (Global.Recovery == false)
            {
                Global.BetterMessageBoxLauched    = true;
                Global.BetterMessageBoxErrorIndex = 3;
                BetterPopUpBox BetterMessageBox = new BetterPopUpBox();
                BetterMessageBox.Show();
                Global.BetterMessageBoxLauched = false;
            }

            if (Global.Recovery == true)
            {
                List <string> instructionsRaw = Positions.RecoveryPos.Split('*').ToList();
                List <double> instructions    = new List <double>();

                foreach (var item in instructionsRaw)
                {
                    instructions.Add(Convert.ToDouble(item));
                }

                movement.baseMovemend.Update(instructions[0], 1);
                movement.elbow0.Update(instructions[1], 1);
                movement.elbow1.Update(instructions[2], 1);
                movement.elbow2.Update(instructions[3], 1);
                movement.griperRotation.Update(instructions[4], 1);
                movement.griper.Update(instructions[5], 1);

                DrawDataAndUpdateModel();
                Global.Recovery = false;
            }
        }
Ejemplo n.º 2
0
        private void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) //Global exception if something goes wrong
        {
            Global.BetterMessageBoxLauched    = true;
            Global.BetterMessageBoxErrorIndex = 2;
            BetterPopUpBox BetterMessageBox = new BetterPopUpBox();

            BetterMessageBox.Show();
        }