コード例 #1
0
        public void OnSaved(WpfConfiguration configurationControl)
        {
            var config = configurationControl as PhidgetDigitalOutputConfig;

            index      = config.Index;
            outputType = config.OutputType;
        }
コード例 #2
0
ファイル: DigitalOutput.cs プロジェクト: Cacowned/mayhem
 protected override void OnLoadDefaults()
 {
     index         = 0;
     outputType    = DigitalOutputType.Toggle;
     portName      = "";
     this.phrase   = string.Empty;
     this.settings = new SerialSettings(9600, Parity.Even, StopBits.One, 8);
 }
コード例 #3
0
        public PhidgetDigitalOutputConfig(int index, DigitalOutputType outputType)
        {
            Index = index;

            OutputType = outputType;

            InitializeComponent();
        }
コード例 #4
0
ファイル: DigitalOutput.cs プロジェクト: Cacowned/mayhem
        public void OnSaved(WpfConfiguration ConfigurationControl)
        {
            var config = ConfigurationControl as ArduinoDigitalOutputConfig;

            index      = config.Index;
            outputType = config.OutputType;
            port       = config.Port;
            portName   = config.PortName;
        }
コード例 #5
0
        public MSP430DigitalOutputConfig(int index, DigitalOutputType outputType, string port, string portName)
        {
            OutputType = outputType;
            Index      = index;
            Port       = port;
            PortName   = portName;

            CanSave = true;
            InitializeComponent();
        }
コード例 #6
0
        public override void OnSave()
        {
            Index = OutputBox.SelectedIndex;

            ComboBoxItem item = ControlBox.SelectedItem as ComboBoxItem;

            switch (item.Content.ToString())
            {
            case "Toggle": OutputType = DigitalOutputType.Toggle;
                break;

            case "Turn On": OutputType = DigitalOutputType.On;
                break;

            case "Turn Off": OutputType = DigitalOutputType.Off;
                break;
            }
        }
コード例 #7
0
 protected override void OnLoadDefaults()
 {
     index      = 0;
     outputType = DigitalOutputType.Toggle;
 }
コード例 #8
0
 internal DigitalOutput(RexDevice rex, DigitalOutputType type, int index)
 {
     this.Rex   = rex;
     this.Type  = type;
     this.Index = index;
 }