コード例 #1
0
        /// <summary>
        /// Adds a view model as a child model of this view model.
        /// </summary>
        /// <param name="viewModel">View model to add to the children collection.</param>
        public void AddAdditionalViewModel(BaseDiagramSurfaceViewModel viewModel)
        {
            this.allDiagramSurfaceModels.Add(viewModel);
            this.additionalDiagramSurfaceModels.Add(viewModel);

            this.MainViewModel.AddViewModel(viewModel);
        }
コード例 #2
0
        /// <summary>
        /// Adds a view model as a child model of this view model.
        /// </summary>
        /// <param name="viewModel">View model to add to the children collection.</param>
        public void AddPluginViewModel(BaseDiagramSurfaceViewModel viewModel)
        {
            this.allDiagramSurfaceModels.Add(viewModel);
            this.pluginDiagramSurfaceModels.Add(viewModel);

            this.MainViewModel.AddViewModel(viewModel);

            if (this == this.MainViewModel.SelectedModelContextViewModel)
            {
                this.MainViewModel.ShowPluginIfShownBefore(viewModel);

            }

            this.OnPropertyChanged("PluginDiagramSurfaceModels");
            this.OnPropertyChanged("HasPluginDiagramSurfaceModels");
        }
コード例 #3
0
 /// <summary>
 /// Show plugin if it was shown before (layout manager stores the information).
 /// </summary>
 /// <param name="viewModel"></param>
 public override void ShowPluginIfShownBefore(BaseDiagramSurfaceViewModel viewModel)
 {
     if (this.LayoutManager != null)
         this.LayoutManager.ShowWindowBasedOnConfiguraion(viewModel);
 }