示例#1
0
文件: Form1.cs 项目: kevinmiles/rc24
        void nodeParameterList_SetValue(object sender, Flobbster.Windows.Forms.PropertySpecEventArgs e)
        {
            string paramName = e.Property.Name;

            ccParameter param = activeNode.properties[paramName];

            byte[] cmd = param.buildSetCmd();

            if (cmd != null)
            {
                routedMessage msgValSet = new routedMessage(activeNode.address, cmd);
                SendRoutedMessage(msgValSet, SERIALCON);
                Debug.WriteLine(activeNode.name + ": set parameter: " + paramName + " to: " + param.Value.ToString());
            }
        }
示例#2
0
文件: Form1.cs 项目: kevinmiles/rc24
        void cmdButton_Click(object sender, EventArgs e)
        {
            //call void function(void) on remote device
            Button b = sender as Button;

            if (b != null)
            {
                ccParameter param = b.Tag as ccParameter;
                if (param != null)
                {
                    byte[] cmd = param.buildSetCmd();

                    if (cmd != null)
                    {
                        routedMessage msgValSet = new routedMessage(param.Owner.address, cmd);
                        SendRoutedMessage(msgValSet, SERIALCON);
                    }
                }
            }
        }