private void MainWindow1_KeyUp(object sender, KeyEventArgs e) { double _mult = Keyboard.Modifiers == ModifierKeys.Shift ? 10 : 1; double step = PointStepUpDn.Value.Value; switch (e.Key) { case Key.Q: MainCanvas.SelectNext(); break; case Key.W: MainCanvas.MoveCanvasSet(0, -step * _mult); break; case Key.S: MainCanvas.MoveCanvasSet(0, step * _mult); break; case Key.A: MainCanvas.MoveCanvasSet(-step * _mult, 0); break; case Key.D: MainCanvas.MoveCanvasSet(step * _mult, 0); break; case Key.F: MainCanvas.FixPosition(); break; case Key.OemPlus: break; case Key.Delete: // this.MainCanvas.RemoveSelectObject(); break; case Key.D1: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(2); } break; case Key.D2: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(3); } break; case Key.D3: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(4); } break; case Key.D4: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(5); } break; case Key.D5: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(6); } break; case Key.D6: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(7); } break; case Key.D7: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(8); } break; case Key.D8: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(9); } break; case Key.D9: if (Keyboard.Modifiers == ModifierKeys.Control) { DeviceBright(10); } break; case Key.Escape: MainCanvas.Canvas.MouseAction = CanvasObj.MouseAction.NoAction; break; } void DeviceBright(double TenPercent) { DevicePanel.Device.Alpha = (byte)(255 * TenPercent / 10); } }