Browse Source

EDMDesignerViewContent.cs crash if no Project is selected. ShowInputBox asks for default namespace

4.1
peterforstmeier 14 years ago
parent
commit
598e881c2d
  1. 13
      src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/EDMDesignerViewContent.cs

13
src/AddIns/DisplayBindings/Data/ICSharpCode.Data.EDMDesigner.Core.UI/DisplayBinding/EDMDesignerViewContent.cs

@ -113,7 +113,18 @@ namespace ICSharpCode.Data.EDMDesigner.Core.UI.DisplayBinding @@ -113,7 +113,18 @@ namespace ICSharpCode.Data.EDMDesigner.Core.UI.DisplayBinding
if (_edmView.EDM.IsEmpty)
{
edmxElement = null;
EDMWizardWindow wizard = RunWizard(file, ProjectService.CurrentProject.RootNamespace);
string ns = String.Empty;
if (ProjectService.CurrentProject == null)
{
ns = ICSharpCode.Core.MessageService.ShowInputBox("EDMDesigner","Enter NameSpace","DefaultNamespace");
}
else
{
ns = ProjectService.CurrentProject.RootNamespace;
}
EDMWizardWindow wizard = RunWizard(file, ns);
if (wizard.DialogResult == true)
_edmView = new EDMView(wizard.EDMXDocument, readMoreAction);

Loading…
Cancel
Save