private void AddNewDataContext(object param)
        {
            CreateDataContextDialog dialog = new CreateDataContextDialog();

            Model.DataContextName = GenerateDefaultDataContextTypeName();
            MvcDataContextViewModel viewModel = new MvcDataContextViewModel(Model);

            dialog.DataContext = viewModel;

            if (dialog.ShowModal() == true)
            {
                DataContextType     = AddNewDataContext(viewModel.DataContextName);
                DataContextTypeName = DataContextType.DisplayName;
            }
            else
            {
                DataContextType     = null;
                DataContextTypeName = null;
            }
        }
Пример #2
0
        private void AddNewDataContext(object param)
        {
            CreateDataContextDialog dialog = new CreateDataContextDialog();

            Model.DataContextName = GenerateDefaultDataContextTypeName();
            MvcDataContextViewModel viewModel = new MvcDataContextViewModel(Model);
            dialog.DataContext = viewModel;

            if (dialog.ShowModal() == true)
            {
                DataContextType = AddNewDataContext(viewModel.DataContextName);
                DataContextTypeName = DataContextType.DisplayName;
            }
            else
            {
                DataContextType = null;
                DataContextTypeName = null;
            }
        }