public void DoAnalize(ModelViewSerializable srcModel) { if (SelectedModel == null) { SelectedModel = new ModelView(); } if ((SelectedEntity == null) || (SelectedDbContext == null)) { SelectedTreeViewItem = null; SelectedModel.ClearModelView(); } if ((SelectedEntity.CodeElementRef == null) || (SelectedDbContext.CodeElementRef == null)) { SelectedTreeViewItem = null; SelectedModel.ClearModelView(); } (SelectedEntity.CodeElementRef as CodeClass). DefineModelView(SelectedDbContext.CodeElementRef as CodeClass, SelectedModel, ViewNameSufix, PageViewNameSufix); SelectedModel.ViewProject = DestinationProject; SelectedModel.ViewDefaultProjectNameSpace = DefaultProjectNameSpace; SelectedModel.ViewFolder = DestinationFolder; if (srcModel != null) { srcModel.ModelViewSerializableAssingTo(SelectedModel, CurrentDbContext, false); } OnPropertyChanged("SelectedModel"); }
public void OnSelectedEntityChanged() { if (SelectedModel == null) { SelectedModel = new ModelView(); } SelectedTreeViewItem = null; SelectedModel.ClearModelView(); if (this.MainTreeViewRootItem != null) { this.MainTreeViewRootItem.IsSelected = true; HintVisibility = Visibility.Collapsed; RootVisibility = Visibility.Visible; } }