public void StartFunction() { Statistic.SendCommandStarting(new ModPlusConnector()); if (_mpDimJustif == null) { _mpDimJustif = new MpDimJustif(); _mpDimJustif.Closed += win_Closed; } if (_mpDimJustif.IsLoaded) { _mpDimJustif.Activate(); } else { AcApp.ShowModelessWindow(AcApp.MainWindow.Handle, _mpDimJustif); } }
private void win_Closed(object sender, EventArgs e) { _mpDimJustif = null; Autodesk.AutoCAD.Internal.Utils.SetFocusToDwgView(); }