예제 #1
0
        public LightAnimator4Pi()
        {
            InitializeComponent();
            //whichpi.Items.Add("custom");

            SupportedPis[] values = (SupportedPis[])Enum.GetValues(typeof(SupportedPis));

            for (int i = 0; i < values.Length; i++)
            {
                SupportedPis supported = values[i];
                whichpi.Items.Add(supported.ToString());
            }

            for (int i = 0; i < pinDatas.Length; i++)
            {
                PinData pinData = new PinData(i);
                pinDatas[i] = pinData;
            }

            frameInt = (int)frame.Value;

            selectedPinData = pinDatas[(int)selectedpin.Value];

            selectedPinData.GetFrames().Add(new PinData.FrameData(frameInt, PinData.Pinmode.OFF));

            whichpi.SelectedIndex = 0;
            fps.Value = 10;

            logBox.Scrollable = true;


            statusLabel.Text = "The current status is not set";
        }
예제 #2
0
 private void numericUpDown1_ValueChanged(object sender, EventArgs e)
 {
     selectedPinData = pinDatas[(int)selectedpin.Value];
     updateLog();
 }