Пример #1
0
        private void showInfo(Model.Fan_v1 target)
        {
            if (target == null)
            {
                MessageBox.Show("Nothing to Make");
            }
            else
            {
                string spec = "";
                spec += "Wing Counts : " + target.wing.count.ToString() + "\n";
                spec += "Motor : " + target.motor.motorTypeByString + "\n";
                spec += "Activate : ";
                if ((target.roateFunction.rotation_Enable & 0x02) != 0)
                {
                    spec += " Horizental ";
                }
                if ((target.roateFunction.rotation_Enable & 0x01) != 0)
                {
                    spec += " Vertical ";
                }
                spec += "\n";

                spec += "Wind Power : " + target.windPower.step + "\n";
                MessageBox.Show(spec);
            }
        }
Пример #2
0
        private void SetFan(object sender, EventArgs e)
        {
            fan_V1 = new Model.Fan_v1();

            fan_V1.wing       = new Model.Wing();
            fan_V1.wing.count = Convert.ToUInt32(textBoxWingCount.Text);

            fan_V1.motor = new Model.Motor();
            fan_V1.motor.motorTypeByNum = comboBoxMotorSelect.SelectedIndex;

            fan_V1.roateFunction = new Model.RoateFunction();
            int rotateFuntionNum = 0;

            if (checkBoxHorizental.Checked)
            {
                rotateFuntionNum += (1 << 1);
            }
            if (checkBoxVertical.Checked)
            {
                rotateFuntionNum += (1 << 0);
            }
            fan_V1.roateFunction.rotation_Enable = rotateFuntionNum;

            fan_V1.windPower      = new Model.WindPower();
            fan_V1.windPower.step = (ushort)(comboBoxPowerSelect.SelectedIndex + 1);

            fans.Add(fan_V1);
        }