Ejemplo n.º 1
0
 private void dist_Control_ValueChanged(object sender, EventArgs e)
 {
     if (reading)
     {
         return;
     }
     BCMData.BCMInput input = currentBCM.InputList[inputListBox.SelectedIndex];
     input.RestrictionDistance = (float)dist_Control.Value;
     currentBCM.InputList[inputListBox.SelectedIndex] = input;
 }
Ejemplo n.º 2
0
 private void float_control2_ValueChanged(object sender, EventArgs e)
 {
     if (reading)
     {
         return;
     }
     BCMData.BCMInput input = currentBCM.InputList[inputListBox.SelectedIndex];
     input.UnknownFloat48 = (float)float_control1.Value;
     currentBCM.InputList[inputListBox.SelectedIndex] = input;
 }
Ejemplo n.º 3
0
 private void Anim_control_ValueChanged(object sender, EventArgs e)
 {
     if (reading)
     {
         return;
     }
     BCMData.BCMInput input = currentBCM.InputList[inputListBox.SelectedIndex];
     input.Animation = (UInt32)Anim_control.Value;
     currentBCM.InputList[inputListBox.SelectedIndex] = input;
 }
Ejemplo n.º 4
0
 private void Motion_comboBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (reading)
     {
         return;
     }
     BCMData.BCMInput input = currentBCM.InputList[inputListBox.SelectedIndex];
     input.Motion = (byte)((Motion_comboBox.SelectedIndex == 0) ? 255 : Motion_comboBox.SelectedIndex - 1);
     currentBCM.InputList[inputListBox.SelectedIndex] = input;
 }
Ejemplo n.º 5
0
 private void UltraMeterUsed_control_ValueChanged(object sender, EventArgs e)
 {
     if (reading)
     {
         return;
     }
     BCMData.BCMInput input = currentBCM.InputList[inputListBox.SelectedIndex];
     input.UltraMeterUsed = (short)UltraMeterUsed_control.Value;
     currentBCM.InputList[inputListBox.SelectedIndex] = input;
 }
Ejemplo n.º 6
0
 private void SuperMeter_control_ValueChanged(object sender, EventArgs e)
 {
     if (reading)
     {
         return;
     }
     BCMData.BCMInput input = currentBCM.InputList[inputListBox.SelectedIndex];
     input.SuperMeterRequired = (short)SuperMeterReq_control.Value;
     currentBCM.InputList[inputListBox.SelectedIndex] = input;
 }
Ejemplo n.º 7
0
        private void buttonsListBox_ItemCheck(object sender, EventArgs e)
        {
            if (reading)
            {
                return;
            }
            //UInt16 output = 0;
            List <Boolean> flags = new List <bool>();

            ItemCheckEventArgs a = (ItemCheckEventArgs)e;

            Log(a.Index.ToString());

            for (int i = 0; i < buttonsListBox.Items.Count; i++)
            {
                flags.Add(false);
            }
            for (int i = 0; i < buttonsListBox.CheckedIndices.Count; i++)
            {
                flags[buttonsListBox.CheckedIndices[i]] = true;
                // 1 (15) + 2 (14) + 4 (13) + 1024 (6)  + 16384 (1) + 32768 (0)
                //output += (UInt16)AEDataTools.IntPow(2, 15 - (uint)buttonsListBox.CheckedIndices[i]);
            }

            if (a != null)
            {
                if (a.NewValue == CheckState.Checked)
                {
                    flags[a.Index] = true;
                }
                else if (a.NewValue == CheckState.Unchecked)
                {
                    flags[a.Index] = false;
                }
            }

            BCMData.BCMInput input = currentBCM.InputList[inputListBox.SelectedIndex];
            input.Flags = flags;
            //input.ButtonsRequiredUInt16 = output;
            currentBCM.InputList[inputListBox.SelectedIndex] = input;
        }