예제 #1
0
 public DefaultRunnerScreen(AlgRunner runner, Action callback = null)
 {
     Runner = runner;
     Runner.GetCube().SetUpPosition(Runner.GetCurrentPosNum());
     InitializeComponent();
     AlgLabel.Text    = Runner.GetAlgClient().GetAlg(Runner.GetCurrentPosNum());
     NumberLabel.Text = Runner.GetCurrentPosNum().ToString();
     StartPosition    = FormStartPosition.CenterScreen;
     AlgLabel.Hide();
     NumberLabel.Hide();
     HelpLabel.Text = helpLabels[0];
     _spacePressed  = DateTime.Now;
     _callback      = callback;
 }
예제 #2
0
        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            label3.Text = comboBox1.Text;
            if (comboBox1.Text == "Statics")
            {
                label4.Hide();
                label5.Hide();
                XaxiscomboBox.Hide();
                YaxiscomboBox.Hide();
                textBox1.Show();
                NumberLabel.Show();
                numBox.Hide();
                rangeBox.Hide();
                label6.Hide();
                label7.Hide();
                label8.Hide();
                label9.Hide();
                label10.Hide();
                xvalueBox.Hide();
                powerBox.Hide();
                comboBox2.Hide();
                label11.Hide();
            }
            else if (comboBox1.Text == "Peak")
            {
                label4.Show();
                label5.Show();
                XaxiscomboBox.Show();
                YaxiscomboBox.Show();
                textBox1.Hide();
                NumberLabel.Hide();
                numBox.Show();
                rangeBox.Show();
                label7.Show();
                label8.Show();
                label9.Hide();
                label10.Hide();
                xvalueBox.Hide();
                powerBox.Hide();
                comboBox2.Hide();
                label11.Hide();
            }
            else if (comboBox1.Text == "Two Peaks")
            {
                label4.Show();
                label5.Show();
                XaxiscomboBox.Show();
                YaxiscomboBox.Show();
                textBox1.Hide();
                NumberLabel.Hide();
                numBox.Show();
                rangeBox.Show();
                label7.Show();
                label8.Show();
                label9.Hide();
                label10.Hide();
                xvalueBox.Hide();
                powerBox.Hide();
                comboBox2.Hide();
                label11.Hide();
            }
            else if (comboBox1.Text == "Polynomial Fit")
            {
                label4.Show();
                label5.Show();
                XaxiscomboBox.Show();
                YaxiscomboBox.Show();
                textBox1.Hide();
                NumberLabel.Hide();
                numBox.Hide();
                rangeBox.Hide();
                label7.Hide();
                label8.Hide();
                label9.Show();
                label10.Show();
                xvalueBox.Show();
                powerBox.Show();
                comboBox2.Hide();
                label11.Hide();
            }
            else if (comboBox1.Text == "Normal Distribution Fit")
            {
                label4.Show();
                label5.Show();
                XaxiscomboBox.Show();
                YaxiscomboBox.Show();
                textBox1.Hide();
                NumberLabel.Hide();
                numBox.Hide();
                rangeBox.Hide();
                label7.Hide();
                label8.Hide();
                label9.Hide();
                label10.Show();
                xvalueBox.Show();
                powerBox.Hide();
                comboBox2.Hide();
                label11.Hide();
            }
            else if (comboBox1.Text == "Logistic Regression")
            {
                label4.Show();
                label5.Show();
                XaxiscomboBox.Show();
                YaxiscomboBox.Show();
                textBox1.Hide();
                NumberLabel.Hide();
                numBox.Hide();
                rangeBox.Show();
                label6.Hide();
                label7.Hide();
                label8.Show();
                label9.Show();
                label10.Show();
                xvalueBox.Show();
                powerBox.Show();
                comboBox2.Show();
                label11.Show();
                label4.Hide();
                label5.Hide();
                XaxiscomboBox.Hide();
                YaxiscomboBox.Hide();
            }

            if (comboBox1.Text == "Peak" || comboBox1.Text == "Two Peaks" || comboBox1.Text == "Polynomial Fit" || comboBox1.Text == "Normal Distribution Fit")
            {
                if (YaxiscomboBox.Text.Contains("#"))
                {
                    XaxiscomboBox.Hide();
                    label6.Show();
                }
                else
                {
                    label6.Hide();
                    XaxiscomboBox.Show();
                }
            }
            peak1Box.Hide();
            peak2Box.Hide();
            label13.Hide();
            label12.Hide();
        }