Subversion Repositories group.NITPanels

Rev

Rev 3 | Rev 19 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3 Rev 16
Line 15... Line 15...
15
 
15
 
16
        public NITAudioSelForm() {
16
        public NITAudioSelForm() {
17
            InitializeComponent();
17
            InitializeComponent();
18
 
18
 
19
            this.controlStatus(false);
19
            this.controlStatus(false);
-
 
20
            this.lstAudioDevices.Items.Clear();
20
        }
21
        }
21
 
22
 
22
        private void controlStatus(bool status) {
23
        private void controlStatus(bool status) {
23
            cmdUpdate.Enabled = status;
24
            cmdUpdate.Enabled = status;
24
            inputTimer.Enabled = status;
25
            inputTimer.Enabled = status;
Line 52... Line 53...
52
            this.led5.On = device.isLedSet(5);
53
            this.led5.On = device.isLedSet(5);
53
            this.led6.On = device.isLedSet(6);
54
            this.led6.On = device.isLedSet(6);
54
            this.led7.On = device.isLedSet(7);
55
            this.led7.On = device.isLedSet(7);
55
        }
56
        }
56
 
57
 
-
 
58
        private void cmdUpdate_Click(object sender, EventArgs e) {
-
 
59
            //VolumeControl vc = new VolumeControl();
-
 
60
            //txtVol.Text = Convert.ToString(device.volcontrol.deviceCount);
-
 
61
            device.volcontrol.setDeviceVolume(1, 0.80F);
-
 
62
            txtName.Text = Convert.ToString(device.volcontrol.getDeviceVolume(1));
-
 
63
 
-
 
64
        }
-
 
65
 
57
        public void setDevice(NITAudioSelDevice audiosel) {
66
        public void setDevice(NITAudioSelDevice audiosel) {
58
            this.device = audiosel;
67
            this.device = audiosel;
59
 
68
 
-
 
69
            foreach (string audio in device.volcontrol.devices) {
-
 
70
                lstAudioDevices.Items.Add(audio);
-
 
71
            }
-
 
72
 
60
            if (!this.device.isOpen())
73
            if (!this.device.isOpen())
61
                this.device.Open();
74
                this.device.Open();
62
 
75
 
63
            if (this.device.isOpen())
76
            if (this.device.isOpen())
64
                this.controlStatus(true);
77
                this.controlStatus(true);
Line 120... Line 133...
120
        private void led7_Click(object sender, EventArgs e) {
133
        private void led7_Click(object sender, EventArgs e) {
121
            bool status = this.device.isLedSet(7);
134
            bool status = this.device.isLedSet(7);
122
            this.device.setLed(7, !status);
135
            this.device.setLed(7, !status);
123
            this.device.UpdateDisplay();
136
            this.device.UpdateDisplay();
124
        }
137
        }
125
 
-
 
126
    }
138
    }
127
}
139
}