private void pictureBoxMain_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { panAndZoom.OnKeyDown(e.KeyCode, ModifierKeys); // Module's key handling. if (currModule != null && currModule.KeyDown != null) { currModule.KeyDown(sender, new KeyEventArgs(e.KeyData)); } }
private void pictureBoxMain_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e) { panAndZoom.OnKeyDown(e.KeyCode, ModifierKeys); // MT-safe currentModule. IRasterModule cm = currModuleSafe(); // Module's key handling. if (cm != null && cm.KeyDown != null) { cm.KeyDown(sender, new KeyEventArgs(e.KeyData)); } }