本文整理汇总了C#中Dynamo.Models.DynamoModel.GetPackageManagerExtension方法的典型用法代码示例。如果您正苦于以下问题:C# DynamoModel.GetPackageManagerExtension方法的具体用法?C# DynamoModel.GetPackageManagerExtension怎么用?C# DynamoModel.GetPackageManagerExtension使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dynamo.Models.DynamoModel
的用法示例。
在下文中一共展示了DynamoModel.GetPackageManagerExtension方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DynamoViewModel
protected DynamoViewModel(StartConfiguration startConfiguration)
{
this.ShowLogin = startConfiguration.ShowLogin;
// initialize core data structures
this.model = startConfiguration.DynamoModel;
this.model.CommandStarting += OnModelCommandStarting;
this.model.CommandCompleted += OnModelCommandCompleted;
UsageReportingManager.Instance.InitializeCore(this);
this.WatchHandler = startConfiguration.WatchHandler;
var pmExtension = model.GetPackageManagerExtension();
this.PackageManagerClientViewModel = new PackageManagerClientViewModel(this, pmExtension.PackageManagerClient);
this.SearchViewModel = new SearchViewModel(this);
// Start page should not show up during test mode.
this.ShowStartPage = !DynamoModel.IsTestMode;
this.BrandingResourceProvider = startConfiguration.BrandingResourceProvider ?? new DefaultBrandingResourceProvider();
// commands should be initialized before adding any WorkspaceViewModel
InitializeDelegateCommands();
//add the initial workspace and register for future
//updates to the workspaces collection
var homespaceViewModel = new HomeWorkspaceViewModel(model.CurrentWorkspace as HomeWorkspaceModel, this);
workspaces.Add(homespaceViewModel);
currentWorkspaceViewModel = homespaceViewModel;
model.WorkspaceAdded += WorkspaceAdded;
model.WorkspaceRemoved += WorkspaceRemoved;
SubscribeModelCleaningUpEvent();
SubscribeModelUiEvents();
SubscribeModelChangedHandlers();
SubscribeUpdateManagerHandlers();
InitializeAutomationSettings(startConfiguration.CommandFilePath);
SubscribeLoggerHandlers();
DynamoSelection.Instance.Selection.CollectionChanged += SelectionOnCollectionChanged;
InitializeRecentFiles();
UsageReportingManager.Instance.PropertyChanged += CollectInfoManager_PropertyChanged;
WatchIsResizable = false;
SubscribeDispatcherHandlers();
RenderPackageFactoryViewModel = new RenderPackageFactoryViewModel(Model.PreferenceSettings);
RenderPackageFactoryViewModel.PropertyChanged += RenderPackageFactoryViewModel_PropertyChanged;
BackgroundPreviewViewModel = startConfiguration.Watch3DViewModel;
BackgroundPreviewViewModel.PropertyChanged += Watch3DViewModelPropertyChanged;
RegisterWatch3DViewModel(BackgroundPreviewViewModel, RenderPackageFactoryViewModel.Factory);
}
示例2: DynamoViewModel
protected DynamoViewModel(StartConfiguration startConfiguration)
{
this.ShowLogin = startConfiguration.ShowLogin;
// initialize core data structures
this.model = startConfiguration.DynamoModel;
this.model.CommandStarting += OnModelCommandStarting;
this.model.CommandCompleted += OnModelCommandCompleted;
UsageReportingManager.Instance.InitializeCore(this);
this.WatchHandler = startConfiguration.WatchHandler;
var pmExtension = model.GetPackageManagerExtension();
this.PackageManagerClientViewModel = new PackageManagerClientViewModel(this, pmExtension.PackageManagerClient);
this.SearchViewModel = new SearchViewModel(this);
// Start page should not show up during test mode.
this.ShowStartPage = !DynamoModel.IsTestMode;
this.BrandingResourceProvider = startConfiguration.BrandingResourceProvider ?? new DefaultBrandingResourceProvider();
//add the initial workspace and register for future
//updates to the workspaces collection
var homespaceViewModel = new HomeWorkspaceViewModel(model.CurrentWorkspace as HomeWorkspaceModel, this);
workspaces.Add(homespaceViewModel);
currentWorkspaceViewModel = homespaceViewModel;
model.WorkspaceAdded += WorkspaceAdded;
model.WorkspaceRemoved += WorkspaceRemoved;
SubscribeModelCleaningUpEvent();
SubscribeModelUiEvents();
SubscribeModelChangedHandlers();
SubscribeUpdateManagerHandlers();
InitializeAutomationSettings(startConfiguration.CommandFilePath);
InitializeDelegateCommands();
SubscribeLoggerHandlers();
DynamoSelection.Instance.Selection.CollectionChanged += SelectionOnCollectionChanged;
InitializeRecentFiles();
UsageReportingManager.Instance.PropertyChanged += CollectInfoManager_PropertyChanged;
WatchIsResizable = false;
SubscribeDispatcherHandlers();
RenderPackageFactoryViewModel = new RenderPackageFactoryViewModel(Model.PreferenceSettings);
RenderPackageFactoryViewModel.PropertyChanged += RenderPackageFactoryViewModel_PropertyChanged;
var backgroundPreviewParams = new Watch3DViewModelStartupParams(Model, this, Resources.BackgroundPreviewName);
// TODO: http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-8736
Watch3DViewModelBase watch3DViewModel;
try
{
watch3DViewModel = HelixWatch3DViewModel.Start(backgroundPreviewParams);
}
catch (Exception ex)
{
Model.Logger.Log(ex.Message);
Model.Logger.Log("Failed to create Watch3DViewModel. Creating base view model.");
watch3DViewModel = Watch3DViewModelBase.Start(backgroundPreviewParams);
}
BackgroundPreviewViewModel = watch3DViewModel;
Watch3DViewModels.Add(watch3DViewModel);
watch3DViewModel.PropertyChanged += Watch3DViewModelPropertyChanged;
}