Beispiel #1
0
        public void FlashFlashCommand(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
        {
            SetTipValue("");

            if (e.command == "power")
            {
                if (e.args == "off" || e.args == "acc")
                {
                }
                else if (BbValue.BaseValue != "" && RbValue.BaseValue != "")
                {
                    UpdateRBValue();
                }
                else
                {
                    SetTipValue("");
                }
            }
            else if (e.command == "BB")
            {
                if (e.args != "")
                {
                    BbValue.BaseValue = e.args;
                    UpdateRBValue();
                }
                else
                {
                    BbValue.Reset();
                    SetTipValue("");
                }
            }
            else if (e.command == "RB")
            {
                if (e.args != "")
                {
                    RbValue.BaseValue = e.args;
                    UpdateRBValue();
                }
                else
                {
                    RbValue.Reset();
                    SetTipValue("");
                }
            }
            else if (e.command == "ZL")
            {
                Record();
            }

            ShowValue();

            Console.WriteLine("e.command = " + e.command);
            Console.WriteLine("e.args = " + e.args);
        }
        public void FlashFlashCommand(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FSCommandEvent e)
        {
            if (e.command == "power" || e.command == "sc" || e.command == "youmeng" || e.command == "speed")
            {
                if (BbValue.BaseValue != "" && RbValue.BaseValue != "")
                {
                    UpdateRBValue();
                }
            }
            else if (e.command == "vt")
            {
                ValueType = int.Parse(e.args);
                SetTipValue(0);

                if (ValueType == 1)
                {
                    if (BbValue.BaseValue != "" && RbValue.BaseValue != "")
                    {
                        UpdateRBValue();
                    }
                }

                if (ValueType == 0)
                {
                    StopTime();
                }
                else
                {
                    StartTime();
                }
            }
            else if (e.command == "BB")
            {
                if (e.args != "")
                {
                    BbValue.BaseValue = e.args;
                    UpdateRBValue();
                }
                else
                {
                    BbValue.Reset();
                    SetTipValue(0);
                }
            }
            else if (e.command == "RB")
            {
                if (e.args != "")
                {
                    RbValue.BaseValue = e.args;
                    UpdateRBValue();
                }
                else
                {
                    RbValue.Reset();
                    SetTipValue(0);
                }
            }
            else if (e.command == "ZL")
            {
                Record();
            }
            else if (e.args == "ZXJC" ||
                     e.args == "JC")
            {
                DataTable dataTable = AccessHelper.GetInstance().GetDataTableFromDB("SELECT * FROM Element WHERE ID ='" + e.command + "'");
                DataRow[] rows      = dataTable.Select();

                Target = rows[0];
            }

            ShowValue();
        }