Subversion Repositories group.electronics

Rev

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

Rev 162 Rev 164
Line 41... Line 41...
41
        public override int Send(uint value) {
41
        public override int Send(uint value) {
42
            if (this.cmd.Equals(""))
42
            if (this.cmd.Equals(""))
43
                return -1;
43
                return -1;
44
 
44
 
45
            this.value = value;
45
            this.value = value;
46
 
-
 
47
            return Globals.bios.SendData(this.ToString());
46
            Globals.bios.SendData(this.ToString());
-
 
47
            return 0;
-
 
48
                
48
        }
49
        }
49
 
50
 
50
        public override string ToString() {
51
        public override string ToString() {
51
            return cmd + " " + base.value + "\n";
52
            return cmd + " " + base.value + "\n";
52
        }
53
        }
Line 60... Line 61...
60
                this.key = vkey;
61
                this.key = vkey;
61
 
62
 
62
        }
63
        }
63
 
64
 
64
        public override int Send() {
65
        public override int Send() {
-
 
66
            if (this.value == 1) {
65
            Globals.SendKey.Keyboard.KeyPress(key);
67
                Globals.SendKey.Keyboard.KeyPress(key);
-
 
68
                return 0;
-
 
69
            }
66
            return 1;
70
            return 1;
67
        }
71
        }
68
 
72
 
69
        public override int Send(uint value) {
73
        public override int Send(uint value) {
70
            this.value = value;
74
            this.value = value;
71
            if (this.value == 1)
-
 
72
                this.Send();
75
            return this.Send();
73
            else return 1;
-
 
74
            return 0;
-
 
75
        }
76
        }
76
 
77
 
77
        public override string ToString() {
78
        public override string ToString() {
78
            return "VKey:" + key.ToString() + ":" + base.value + "\n";
79
            return "VKey:" + key.ToString() + ":" + base.value + "\n";
79
        }
80
        }
Line 87... Line 88...
87
            this.key = vkey;
88
            this.key = vkey;
88
 
89
 
89
        }
90
        }
90
 
91
 
91
        public override int Send() {
92
        public override int Send() {
-
 
93
            if (this.value == 1) {
92
            Globals.SendKey.Keyboard.KeyDown(VirtualKeyCode.CONTROL);
94
                Globals.SendKey.Keyboard.KeyDown(VirtualKeyCode.CONTROL);
93
            Utils.delayms(1);
95
                Utils.delayms(1);
94
            Globals.SendKey.Keyboard.KeyPress(key);
96
                Globals.SendKey.Keyboard.KeyPress(key);
95
            Globals.SendKey.Keyboard.KeyUp(VirtualKeyCode.CONTROL);
97
                Globals.SendKey.Keyboard.KeyUp(VirtualKeyCode.CONTROL);
-
 
98
                return 0;
-
 
99
            }
96
            return 1;
100
            return 1;
97
        }
101
        }
98
 
102
 
99
        public override int Send(uint value) {
103
        public override int Send(uint value) {
100
            this.value = value;
104
            this.value = value;
101
            if (this.value == 1)
-
 
102
                this.Send();
105
            return this.Send();
103
            else 
-
 
104
                return 1;
-
 
105
            return 0;
-
 
106
        }
106
        }
107
 
107
 
108
        public override string ToString() {
108
        public override string ToString() {
109
            return "TrackIR:" + key.ToString() + ":" + base.value + "\n";
109
            return "TrackIR:" + key.ToString() + ":" + base.value + "\n";
110
        }
110
        }
Line 128... Line 128...
128
            if (opts.TryGetValue(ctl.value, out cmd)) {
128
            if (opts.TryGetValue(ctl.value, out cmd)) {
129
                cmd.value = this.value;
129
                cmd.value = this.value;
130
                cmd.data = this.data;
130
                cmd.data = this.data;
131
                cmd.Send(this.value);
131
                cmd.Send(this.value);
132
                Console.Write(cmd.ToString());
132
                Console.Write(cmd.ToString());
133
                return 1;
133
                return 0;
134
            }
134
            }
135
            return 0;
135
            return 1;
136
        }
136
        }
137
 
137
 
138
        public override int Send(uint value) {
138
        public override int Send(uint value) {
139
            this.value = value;
139
            this.value = value;
140
            if (this.value == 1)
-
 
141
                this.Send();
140
            return this.Send();
142
            return 1;
-
 
143
        }
141
        }
144
 
142
 
145
        public override string ToString() {
143
        public override string ToString() {
146
            return "";
144
            return "";
147
            //return "CommandIf:" + this.value + "\n";
145
            //return "CommandIf:" + this.value + "\n";