private void LoadKompas3D_Click(object sender, EventArgs e) { if (LoadKompas3D.Enabled) { var errorCatcher = new ErrorCatcher(); _kompasApp = new KompasApplication(); if (_kompasApp == null) { errorCatcher.CatchError( ErrorCodes.KompasObjectCreatingError); } if (_kompasApp.LastErrorCode != ErrorCodes.OK) { errorCatcher.CatchError(_kompasApp.LastErrorCode); return; } SetAllInputsEnabledState(true); RunButton.Enabled = true; Defaults.Enabled = true; WithoutHoleRadioButton.Enabled = true; CrossheadScrewdriverRadioButton.Enabled = true; FlatheadScrewdriverRadioButton.Enabled = true; RegularPolygonScrewdriverRadioButton.Enabled = true; LoadKompas3D.Enabled = false; CloseKompas3D.Enabled = true; } }
private void LoadKompas3D_Click(object sender, EventArgs e) { if (LoadKompas3D.Enabled) { var errorCatcher = new ErrorCatcher(); // Создать образец приложения Kompas _kompasApp = new KompasApplication(); if (_kompasApp == null) { errorCatcher.CatchError(ErrorCodes.KompasObjectCreatingError); } if (_kompasApp.LastErrorCode != ErrorCodes.OK) { errorCatcher.CatchError(_kompasApp.LastErrorCode); return; } SetAllInputsEnabledState(true); RunButton.Enabled = true; LoadKompas3D.Enabled = false; CloseKompas3D.Enabled = true; } }