当前位置: 首页>>代码示例>>C#>>正文


C# DynamoViewModel.BeginCommandPlayback方法代码示例

本文整理汇总了C#中Dynamo.ViewModels.DynamoViewModel.BeginCommandPlayback方法的典型用法代码示例。如果您正苦于以下问题:C# DynamoViewModel.BeginCommandPlayback方法的具体用法?C# DynamoViewModel.BeginCommandPlayback怎么用?C# DynamoViewModel.BeginCommandPlayback使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Dynamo.ViewModels.DynamoViewModel的用法示例。


在下文中一共展示了DynamoViewModel.BeginCommandPlayback方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DynamoView_Loaded

        private void DynamoView_Loaded(object sender, EventArgs e)
        {
            // Do an initial load of the cursor collection
            CursorLibrary.GetCursor(CursorSet.ArcSelect);

            //Backing up IsFirstRun to determine whether to show Gallery
            var isFirstRun = dynamoViewModel.Model.PreferenceSettings.IsFirstRun;
            // If first run, Collect Info Prompt will appear
            UsageReportingManager.Instance.CheckIsFirstRun(this, dynamoViewModel.BrandingResourceProvider);

            WorkspaceTabs.SelectedIndex = 0;
            dynamoViewModel = (DataContext as DynamoViewModel);
            dynamoViewModel.Model.RequestLayoutUpdate += vm_RequestLayoutUpdate;
            dynamoViewModel.RequestViewOperation += DynamoViewModelRequestViewOperation;
            dynamoViewModel.PostUiActivationCommand.Execute(null);

            _timer.Stop();
            dynamoViewModel.Model.Logger.Log(String.Format(Wpf.Properties.Resources.MessageLoadingTime,
                                                                     _timer.Elapsed, dynamoViewModel.BrandingResourceProvider.ProductName));
            InitializeLogin();
            InitializeShortcutBar();
            InitializeStartPage(isFirstRun);

#if !__NO_SAMPLES_MENU
            LoadSamplesMenu();
#endif
            #region Search initialization

            var search = new SearchView(
                dynamoViewModel.SearchViewModel,
                dynamoViewModel);
            sidebarGrid.Children.Add(search);
            dynamoViewModel.SearchViewModel.Visible = true;

            #endregion

            #region Package manager

            dynamoViewModel.RequestPackagePublishDialog += DynamoViewModelRequestRequestPackageManagerPublish;
            dynamoViewModel.RequestManagePackagesDialog += DynamoViewModelRequestShowInstalledPackages;
            dynamoViewModel.RequestPackageManagerSearchDialog += DynamoViewModelRequestShowPackageManagerSearch;
            dynamoViewModel.RequestPackagePathsDialog += DynamoViewModelRequestPackagePaths;

            #endregion

            #region Node view injection

            // scan for node view overrides



            #endregion

            //FUNCTION NAME PROMPT
            dynamoViewModel.Model.RequestsFunctionNamePrompt += DynamoViewModelRequestsFunctionNamePrompt;

            //Preset Name Prompt
            dynamoViewModel.Model.RequestPresetsNamePrompt += DynamoViewModelRequestPresetNamePrompt;
            dynamoViewModel.RequestPresetsWarningPrompt += DynamoViewModelRequestPresetWarningPrompt;

            dynamoViewModel.RequestClose += DynamoViewModelRequestClose;
            dynamoViewModel.RequestSaveImage += DynamoViewModelRequestSaveImage;
            dynamoViewModel.SidebarClosed += DynamoViewModelSidebarClosed;

            dynamoViewModel.Model.RequestsCrashPrompt += Controller_RequestsCrashPrompt;
            dynamoViewModel.Model.RequestTaskDialog += Controller_RequestTaskDialog;

            DynamoSelection.Instance.Selection.CollectionChanged += Selection_CollectionChanged;

            dynamoViewModel.RequestUserSaveWorkflow += DynamoViewModelRequestUserSaveWorkflow;

            dynamoViewModel.Model.ClipBoard.CollectionChanged += ClipBoard_CollectionChanged;

            //ABOUT WINDOW
            dynamoViewModel.RequestAboutWindow += DynamoViewModelRequestAboutWindow;

            //SHOW or HIDE GALLERY
            dynamoViewModel.RequestShowHideGallery += DynamoViewModelRequestShowHideGallery;

            LoadNodeViewCustomizations();
            SubscribeNodeViewCustomizationEvents();

            // Kick start the automation run, if possible.
            dynamoViewModel.BeginCommandPlayback(this);

            var loadedParams = new ViewLoadedParams(this, dynamoViewModel);

            foreach (var ext in viewExtensionManager.ViewExtensions)
            {
                try
                {
                    ext.Loaded(loadedParams);
                }
                catch (Exception exc)
                {
                    Log(ext.Name + ": " + exc.Message);
                }
            }

            BackgroundPreview = new Watch3DView {Name = BackgroundPreviewName};
//.........这里部分代码省略.........
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:101,代码来源:DynamoView.xaml.cs

示例2: dynBench_Activated

        private void dynBench_Activated(object sender, EventArgs e)
        {
            // If first run, Collect Info Prompt will appear
            UsageReportingManager.Instance.CheckIsFirstRun();

            this.WorkspaceTabs.SelectedIndex = 0;
            _vm = (DataContext as DynamoViewModel);
            _vm.Model.RequestLayoutUpdate += vm_RequestLayoutUpdate;
            _vm.PostUiActivationCommand.Execute(null);

            _timer.Stop();
            dynSettings.Controller.DynamoLogger.Log(String.Format("{0} elapsed for loading Dynamo main window.",
                                                                     _timer.Elapsed));
            InitializeShortcutBar();

#if !__NO_SAMPLES_MENU
            LoadSamplesMenu();
#endif
            #region Search initialization

            var search = new SearchView { DataContext = dynSettings.Controller.SearchViewModel };
            sidebarGrid.Children.Add(search);
            dynSettings.Controller.SearchViewModel.Visible = true;

            #endregion

            //PACKAGE MANAGER
            _vm.RequestPackagePublishDialog += _vm_RequestRequestPackageManagerPublish;
            _vm.RequestManagePackagesDialog += _vm_RequestShowInstalledPackages;
            _vm.RequestPackageManagerSearchDialog += _vm_RequestShowPackageManagerSearch;

            //FUNCTION NAME PROMPT
            _vm.RequestsFunctionNamePrompt += _vm_RequestsFunctionNamePrompt;

            _vm.RequestClose += _vm_RequestClose;
            _vm.RequestSaveImage += _vm_RequestSaveImage;
            _vm.SidebarClosed += _vm_SidebarClosed;

            dynSettings.Controller.RequestsCrashPrompt += Controller_RequestsCrashPrompt;
            dynSettings.Controller.RequestTaskDialog += Controller_RequestTaskDialog;

            DynamoSelection.Instance.Selection.CollectionChanged += Selection_CollectionChanged;

            _vm.RequestUserSaveWorkflow += _vm_RequestUserSaveWorkflow;

            dynSettings.Controller.ClipBoard.CollectionChanged += ClipBoard_CollectionChanged;

            //ABOUT WINDOW
            _vm.RequestAboutWindow += _vm_RequestAboutWindow;

            //ABOUT WINDOW
            _vm.RequestAboutWindow += _vm_RequestAboutWindow;

            // Kick start the automation run, if possible.
            _vm.BeginCommandPlayback(this);
        }
开发者ID:algobasket,项目名称:Dynamo,代码行数:56,代码来源:DynamoView.xaml.cs

示例3: dynBench_Activated

        private void dynBench_Activated(object sender, EventArgs e)
        {
            this.WorkspaceTabs.SelectedIndex = 0;
            _vm = (DataContext as DynamoViewModel);
            _vm.Model.RequestLayoutUpdate += vm_RequestLayoutUpdate;
            _vm.PostUiActivationCommand.Execute(null);

            _timer.Stop();
            DynamoLogger.Instance.Log(String.Format("{0} elapsed for loading Dynamo main window.",
                                                                     _timer.Elapsed));
            LoadSamplesMenu();

            #region Search initialization

            var search = new SearchView { DataContext = dynSettings.Controller.SearchViewModel };
            sidebarGrid.Children.Add(search);
            dynSettings.Controller.SearchViewModel.Visible = true;

            #endregion

            //PACKAGE MANAGER
            _vm.RequestPackagePublishDialog += _vm_RequestRequestPackageManagerPublish;
            _vm.RequestManagePackagesDialog += new EventHandler(_vm_RequestShowInstalledPackages);
            _vm.RequestPackageManagerSearchDialog += new EventHandler(_vm_RequestShowPackageManagerSearch);

            //FUNCTION NAME PROMPT
            _vm.Model.RequestsFunctionNamePrompt += _vm_RequestsFunctionNamePrompt;

            _vm.SidebarClosed += new EventHandler(_vm_SidebarClosed);
            _vm.RequestClose += new EventHandler(_vm_RequestClose);
            _vm.RequestSaveImage += new ImageSaveEventHandler(_vm_RequestSaveImage);

            dynSettings.Controller.RequestsCrashPrompt += new DynamoController.CrashPromptHandler(Controller_RequestsCrashPrompt);

            DynamoSelection.Instance.Selection.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(Selection_CollectionChanged);

            _vm.RequestUserSaveWorkflow += new WorkspaceSaveEventHandler(_vm_RequestUserSaveWorkflow);

            dynSettings.Controller.ClipBoard.CollectionChanged += new System.Collections.Specialized.NotifyCollectionChangedEventHandler(ClipBoard_CollectionChanged);

            // Kick start the automation run, if possible.
            _vm.BeginCommandPlayback(this);
        }
开发者ID:Zhengzi,项目名称:Dynamo,代码行数:43,代码来源:DynamoView.xaml.cs

示例4: DynamoView_Loaded

        private void DynamoView_Loaded(object sender, EventArgs e)
        {
            // Do an initial load of the cursor collection
            CursorLibrary.GetCursor(CursorSet.ArcSelect);

            //Backing up IsFirstRun to determine whether to show Gallery
            var isFirstRun = dynamoViewModel.Model.PreferenceSettings.IsFirstRun;
            // If first run, Collect Info Prompt will appear
            UsageReportingManager.Instance.CheckIsFirstRun(this, dynamoViewModel.BrandingResourceProvider);

            WorkspaceTabs.SelectedIndex = 0;
            dynamoViewModel = (DataContext as DynamoViewModel);
            dynamoViewModel.Model.RequestLayoutUpdate += vm_RequestLayoutUpdate;
            dynamoViewModel.RequestViewOperation += DynamoViewModelRequestViewOperation;
            dynamoViewModel.PostUiActivationCommand.Execute(null);

            _timer.Stop();
            dynamoViewModel.Model.Logger.Log(String.Format(Wpf.Properties.Resources.MessageLoadingTime,
                                                                     _timer.Elapsed, dynamoViewModel.BrandingResourceProvider.ProductName));
            InitializeLogin();
            InitializeShortcutBar();
            InitializeStartPage(isFirstRun);

#if !__NO_SAMPLES_MENU
            LoadSamplesMenu();
#endif
            #region Search initialization

            var search = new SearchView(
                dynamoViewModel.SearchViewModel,
                dynamoViewModel);
            sidebarGrid.Children.Add(search);
            dynamoViewModel.SearchViewModel.Visible = true;

            #endregion

            #region Package manager

            dynamoViewModel.RequestPackagePublishDialog += DynamoViewModelRequestRequestPackageManagerPublish;
            dynamoViewModel.RequestManagePackagesDialog += DynamoViewModelRequestShowInstalledPackages;
            dynamoViewModel.RequestPackageManagerSearchDialog += DynamoViewModelRequestShowPackageManagerSearch;

            #endregion

            #region Node view injection

            // scan for node view overrides



            #endregion

            //FUNCTION NAME PROMPT
            dynamoViewModel.Model.RequestsFunctionNamePrompt += DynamoViewModelRequestsFunctionNamePrompt;

            dynamoViewModel.RequestClose += DynamoViewModelRequestClose;
            dynamoViewModel.RequestSaveImage += DynamoViewModelRequestSaveImage;
            dynamoViewModel.SidebarClosed += DynamoViewModelSidebarClosed;

            dynamoViewModel.Model.RequestsCrashPrompt += Controller_RequestsCrashPrompt;
            dynamoViewModel.Model.RequestTaskDialog += Controller_RequestTaskDialog;

            DynamoSelection.Instance.Selection.CollectionChanged += Selection_CollectionChanged;

            dynamoViewModel.RequestUserSaveWorkflow += DynamoViewModelRequestUserSaveWorkflow;

            dynamoViewModel.Model.ClipBoard.CollectionChanged += ClipBoard_CollectionChanged;

            //ABOUT WINDOW
            dynamoViewModel.RequestAboutWindow += DynamoViewModelRequestAboutWindow;

            //SHOW or HIDE GALLERY
            dynamoViewModel.RequestShowHideGallery += DynamoViewModelRequestShowHideGallery;

            LoadNodeViewCustomizations();
            SubscribeNodeViewCustomizationEvents();

            // Kick start the automation run, if possible.
            dynamoViewModel.BeginCommandPlayback(this);

            watchSettingsControl.DataContext = background_preview;
        }
开发者ID:junmendoza,项目名称:Dynamo,代码行数:82,代码来源:DynamoView.xaml.cs


注:本文中的Dynamo.ViewModels.DynamoViewModel.BeginCommandPlayback方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。