private void btnNewPackage_Click(object sender, EventArgs e) { if (_newPackageWizzardForm == null) { _newPackageWizzardForm = new NewPackageWizzardForm(); } _newPackageWizzardForm.NewPackageId = ""; _newPackageWizzardForm.NewPackageName = ""; var result = _newPackageWizzardForm.ShowDialog(); if (result == DialogResult.OK) { var exc = TryCreatePackage(_newPackageWizzardForm.NewPackageId, _newPackageWizzardForm.NewPackageName); if (exc != null) { MessageForm.ShowMessage(MessageFormType.Error, exc.Message, "Cannot create package", new ExceptionInfo(exc), MessageBoxButtons.OK); } else { LoadPackages(); UpdateButtons(); } } }