private void OnDisable() { this.onDefineOrientation = null; this.onDefineOrientation2 = null; if (OwnerWindow != null) { OwnerWindow.Repaint(); OwnerWindow = null; } }