Exemplo n.º 1
0
        private void comboboxDelayms_Leave(object sender, EventArgs e)
        {
            bool success = Int32.TryParse(comboboxDelayms.Text, out int result);

            if (!success || result < 0)
            {
                comboboxDelayms.Text = InitialSettings.ms_delay().ToString();
            }
            else
            {
                comboboxDelayms.Text = result.ToString();
            }
        }
Exemplo n.º 2
0
 private void comboboxDelayms_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         bool success = Int32.TryParse(comboboxDelayms.Text, out int result);
         if (!success || result < InitialSettings.ms_delay())
         {
             comboboxDelayms.Text = InitialSettings.ms_delay().ToString();
         }
         else
         {
             comboboxDelayms.Text = result.ToString();
         }
     }
 }
Exemplo n.º 3
0
        static public PictureBoard picture_board;  //Stored seperately from the algorithm state because this board will store PictureSquares

        static FormsHandler()
        {
            picture_board = new PictureBoard();
            loaded_state  = new AlgorithmState();

            lock_index_change_events = false;
            halted = false;
            //Pass textboxes to the board, so it can manage them.

            link_handler_to_form();

            //Initialize dropdown boxes
            control_progress_steps.SelectedIndex = 0;
            control_progress_episodes.Text       = "0";;
            control_progress_delay.Text          = InitialSettings.ms_delay().ToString();

            foreach (var i in list_qmatrix_comboboxes)
            {
                i.Value.SelectedIndex = -1;
            }

            DisplayInitialSettings();
        }