public OptimusMiniKeyState(OptimusMiniController owner, byte keyIndex) { _Owner = owner; _KeyIndex = keyIndex; _LastKeyDownOn = 0; _LastKeyUpOn = 0; _DownOn = 0; }
public PluginManager(OptimusMiniController controller) { _Controller = controller; _Layouts = new List <PluginLayout>(); _DefaultLayout = new PluginLayout(); _PluginInstances = new List <PluginInstance>(); _Browser = new OptimusMiniPluginBrowser(); _LastRotate = Environment.TickCount; }
public Form1() { InitializeComponent(); _Device = new OptimusMiniController(); _Plugins = new OptimusMiniPluginBrowser(); _Settings = new OptimusMiniSettings(); _Device.SetPluginManager(new Toolz.OptimusMini.Plugins.PluginManager(_Device)); _ConnectionStateChanged = new ConnectionStateChangedDelegate(ConnectionStateChangedMethod); _Device.OnConnectionStateChanged += ConnectionStateChangedEventHandler; _KeyDown = new KeyEventDelegate(KeyDownMethod); _Device.OnKeyDown += KeyDownEventHandler; _KeyUp = new KeyEventDelegate(KeyUpMethod); _Device.OnKeyUp += KeyUpEventHandler; _KeyHold = new KeyEventDelegate(KeyHoldMethod); _Device.OnKeyHold += KeyHoldEventHandler; _KeyRelease = new KeyEventDelegate(KeyReleaseMethod); _Device.OnKeyRelease += KeyReleaseEventHandler; _KeyPress = new KeyEventDelegate(KeyPressMethod); _Device.OnKeyPress += KeyPressEventHandler; _KeyDoublePress = new KeyEventDelegate(KeyDoublePressMethod); _Device.OnKeyDoublePress += KeyDoublePressEventHandler; selectPlugin0.Items.Add(""); selectPlugin1.Items.Add(""); selectPlugin2.Items.Add(""); for (int i = 0; i < _Plugins.Count; i++) { selectPlugin0.Items.Add(_Plugins[i].Name); selectPlugin1.Items.Add(_Plugins[i].Name); selectPlugin2.Items.Add(_Plugins[i].Name); selectPluginToAdd.Items.Add(_Plugins[i].Name); } LoadSettings(); new Forms.Main().Show(); }
private void KeyUpEventHandler(OptimusMiniController sender, byte index) { this.Invoke(_KeyUp, index); }
private void KeyDoublePressEventHandler(OptimusMiniController sender, byte index) { this.Invoke(_KeyDoublePress, index); }
private void ConnectionStateChangedEventHandler(OptimusMiniController sender, bool connected) { this.Invoke(_ConnectionStateChanged, connected); }
public PluginManager(OptimusMiniController controller) { _Controller = controller; _Layouts = new List<PluginLayout>(); _DefaultLayout = new PluginLayout(); _PluginInstances = new List<PluginInstance>(); _Browser = new OptimusMiniPluginBrowser(); _LastRotate = Environment.TickCount; }
private void KeyReleaseEventHandler(OptimusMiniController sender, byte index) { this.Invoke(_KeyRelease, index); }
void OnConnectionStateChanged(OptimusMiniController sender, bool connected) { UpdateActions(); }
static void _Device_OnNotification(OptimusMiniController sender, OptimusMiniEventLog notification) { ShowErrorNotification(notification.Summary); }