Ejemplo n.º 1
0
        //Listbox event
        private void Bit_List_Box_MouseClick(object sender, MouseEventArgs e)
        {
            int index = this.Bit_List_Box.IndexFromPoint(e.Location);

            if (index != System.Windows.Forms.ListBox.NoMatches)
            {
                MessageBox.Show(disp_bits[index].ToString() + "\n\n" + boolean_parsed[index].ToString() +
                                "\n \n Number of user inputs required: " + user_input_num[index]);
            }

            Ladder_Logic logic = new Ladder_Logic();

            logic.input_info(disp_bits[index].ToString(), boolean_parsed[index].ToString(), user_input_num[index]);

            logic.Show();
        }
        private void listBox1_MouseClick(object sender, MouseEventArgs e)
        {
            int index = this.listBox1.IndexFromPoint(e.Location);

            if (index != System.Windows.Forms.ListBox.NoMatches)
            {
                MessageBox.Show(Simulation.disp_bits_static[index].ToString() + "\n\n" + Simulation.boolean_parsed_static[index].ToString() +
                                "\n \n Number of user inputs required: " + Simulation.user_input_num_static[index]);
            }

            Ladder_Logic logic = new Ladder_Logic();

            logic.input_info(Simulation.disp_bits_static[index].ToString(), Simulation.boolean_parsed_static[index].ToString(),
                             Simulation.user_input_num_static[index]);

            logic.Show();
        }