Example #1
0
        public void SetUserControl(ThresholdElement thresholdElement, SoundPlayer Sp)
        {
            soundPlayer         = Sp;
            ThresholdName.Text  = thresholdElement.ThresholdName[0];
            ThresholdName2.Text = thresholdElement.ThresholdName[1];
            ThresholdName3.Text = thresholdElement.ThresholdName[2];



            ThresholdTextbox.Text = String.Format("{0:0.##}", thresholdElement.ThresholdValue[0]);
            ThresholdValue2.Text  = String.Format("{0:0.##}", thresholdElement.ThresholdValue[1]);
            ThresholdValue3.Text  = String.Format("{0:0.##}", thresholdElement.ThresholdValue[2]);

            pictureBox1.BackColor = thresholdElement.Color;
            IDLabel.Text          = thresholdElement.ID.ToString();
        }
Example #2
0
        public ThresholdElement GetUserControl()
        {
            ThresholdElement thresholdElement = new ThresholdElement();

            thresholdElement.ThresholdName  = new string[3];
            thresholdElement.ThresholdValue = new double[3];

            thresholdElement.ThresholdName[0]  = ThresholdName.Text;
            thresholdElement.ThresholdValue[0] = double.Parse(ThresholdTextbox.Text);


            thresholdElement.ThresholdName[1]  = ThresholdName2.Text;
            thresholdElement.ThresholdValue[1] = double.Parse(ThresholdValue2.Text);


            thresholdElement.ThresholdName[2]  = ThresholdName3.Text;
            thresholdElement.ThresholdValue[2] = double.Parse(ThresholdValue3.Text);


            thresholdElement.Color = pictureBox1.BackColor;
            thresholdElement.ID    = int.Parse(IDLabel.Text);
            return(thresholdElement);
        }