Subversion Repositories group.electronics

Rev

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

Rev 164 Rev 165
Line 78... Line 78...
78
        public override string ToString() {
78
        public override string ToString() {
79
            return "VKey:" + key.ToString() + ":" + base.value + "\n";
79
            return "VKey:" + key.ToString() + ":" + base.value + "\n";
80
        }
80
        }
81
    }
81
    }
82
 
82
 
-
 
83
    public class CommandMouseButton : Command {
-
 
84
 
-
 
85
        public static int MB_LEFT = 1;
-
 
86
        public static int MB_RIGHT = 2;
-
 
87
        // 1 = Left
-
 
88
        // 2 = Right
-
 
89
        // 3 = ?
-
 
90
        int button = 0;
-
 
91
 
-
 
92
        public CommandMouseButton(int button) : base() {
-
 
93
            this.button = button;
-
 
94
            
-
 
95
        }
-
 
96
 
-
 
97
        public override int Send() {
-
 
98
            if (button == 0)
-
 
99
                return 1;
-
 
100
            
-
 
101
            switch (button) {
-
 
102
                case 1:
-
 
103
                    if (this.value == 1)
-
 
104
                        Globals.SendKey.Mouse.LeftButtonDown();
-
 
105
                    else
-
 
106
                        Globals.SendKey.Mouse.LeftButtonUp();
-
 
107
                    break;
-
 
108
                case 2:
-
 
109
                    if (this.value == 1)
-
 
110
                        Globals.SendKey.Mouse.RightButtonDown();
-
 
111
                    else
-
 
112
                        Globals.SendKey.Mouse.RightButtonUp();
-
 
113
                    break;
-
 
114
                case 3:
-
 
115
                    if (this.value == 1)
-
 
116
                        Globals.SendKey.Mouse.XButtonDown(0);
-
 
117
                    else
-
 
118
                        Globals.SendKey.Mouse.XButtonUp(0);
-
 
119
                    break;
-
 
120
            }
-
 
121
            return 0;
-
 
122
        }
-
 
123
 
-
 
124
        public override int Send(uint value) {
-
 
125
            this.value = value;
-
 
126
            return this.Send();
-
 
127
        }
-
 
128
 
-
 
129
        public override string ToString() {
-
 
130
            return "Mouse:" + this.button + "=" + base.value + "\n";
-
 
131
        }
-
 
132
    }
-
 
133
 
83
    public class CommandTrackIRKey : Command {
134
    public class CommandTrackIRKey : Command {
84
        VirtualKeyCode key;
135
        VirtualKeyCode key;
85
 
136
 
86
        public CommandTrackIRKey(VirtualKeyCode vkey)
137
        public CommandTrackIRKey(VirtualKeyCode vkey)
87
            : base() {
138
            : base() {