• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ViewModels.DynamoViewModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



DynamoViewModel类属于Dynamo.ViewModels命名空间,在下文中一共展示了DynamoViewModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GalleryViewModel

        public GalleryViewModel(DynamoViewModel dynamoViewModel)
        {
            dvm = dynamoViewModel;
            var pathManager = dynamoViewModel.Model.PathManager;
            var galleryFilePath = pathManager.GalleryFilePath;
            var galleryDirectory = Path.GetDirectoryName(galleryFilePath);

            var version = dynamoViewModel.Model.UpdateManager.ProductVersion;

            DynamoVersion = string.Format(Properties.Resources.GalleryDynamoVersion,
                            version.FileMajor, 
                            version.FileMinor, 
                            version.FileBuild);

            contents = GalleryContents.Load(galleryFilePath).GalleryUiContents;

            //Set image path relative to gallery Directory
            SetImagePath(galleryDirectory);

            currentContent = contents.FirstOrDefault();
            if (currentContent != null) //if contents is not empty
            {
                currentContent.IsCurrent = true;
            }


            MoveNextCommand = new DelegateCommand(p => MoveIndex(true), o => contents.Count > 1);
            MovePrevCommand = new DelegateCommand(p => MoveIndex(false), o => contents.Count > 1);
            CloseGalleryCommand = new DelegateCommand(p => dvm.CloseGalleryCommand.Execute(null), o => true);
        }
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:30,代码来源:GalleryViewModel.cs


示例2: InstalledPackagesViewModel

 public InstalledPackagesViewModel(DynamoViewModel dynamoViewModel, PackageLoader model)
 {
     this.Model = model;
     this.dynamoViewModel = dynamoViewModel;
     
     InitializeLocalPackages();
 }
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:7,代码来源:InstalledPackagesViewModel.cs


示例3: CrashPrompt

        public CrashPrompt(CrashPromptArgs args, DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();

            productName = dynamoViewModel.BrandingResourceProvider.ProductName;
            Title = string.Format(Wpf.Properties.Resources.CrashPromptDialogTitle, productName);
            txtOverridingText.Text = string.Format(Wpf.Properties.Resources.CrashPromptDialogCrashMessage, productName);

            if (args.HasDetails())
            {
                this.details = args.Details;
                this.CrashDetailsContent.Text = args.Details;
                this.btnDetails.Visibility = Visibility.Visible;
            }

            if (args.IsFilePath())
            {
                folderPath = Path.GetDirectoryName(args.FilePath);
                btnOpenFolder.Visibility = Visibility.Visible;
            }

            if (args.IsDefaultTextOverridden())
            {
                string overridingText = args.OverridingText;

                if (args.IsFilePath())
                    overridingText = overridingText.Replace("[FILEPATH]", args.FilePath);

                ConvertFormattedTextIntoTextblock(this.txtOverridingText, overridingText);
            }
        }
开发者ID:Conceptual-Design,项目名称:Dynamo,代码行数:31,代码来源:CrashPrompt.xaml.cs


示例4: UsageReportingAgreementPrompt

        public UsageReportingAgreementPrompt(IBrandingResourceProvider resourceProvider, DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();
            Title = resourceProvider.GetString(Wpf.Interfaces.ResourceNames.ConsentForm.Title);

            ConsentFormImageRectangle.Fill = new ImageBrush(
                resourceProvider.GetImageSource(Wpf.Interfaces.ResourceNames.ConsentForm.Image));

            viewModel = dynamoViewModel;

            var instrumentationFile = "InstrumentationConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref instrumentationFile))
                InstrumentationContent.File = instrumentationFile;

            var googleAnalyticsFile = "GoogleAnalyticsConsent.rtf";

            if (viewModel.Model.PathManager.ResolveDocumentPath(ref googleAnalyticsFile))
                GoogleAnalyticsContent.File = googleAnalyticsFile;

            AcceptUsageReportingTextBlock.Text =
                string.Format(Wpf.Properties.Resources.ConsentFormInstrumentationCheckBoxContent,
                    dynamoViewModel.BrandingResourceProvider.ProductName);
            AcceptUsageReportingCheck.IsChecked = UsageReportingManager.Instance.IsUsageReportingApproved;
            AcceptAnalyticsReportingCheck.IsChecked = UsageReportingManager.Instance.IsAnalyticsReportingApproved;

        }
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:27,代码来源:UsageReportingAgreementPrompt.xaml.cs


示例5: AbstractMutator

 protected AbstractMutator(Random rand)
 {
     this.Rand = rand;
     this.Controller = dynSettings.Controller;
     this.DynamoViewModel = Controller.DynamoViewModel;
     this.DynamoModel = Controller.DynamoModel;
 }
开发者ID:heegwon,项目名称:Dynamo,代码行数:7,代码来源:AbstractMutator.cs


示例6: AboutWindow

 public AboutWindow(DynamoViewModel dynamoViewModel)
 {
     InitializeComponent();
     InstallNewUpdate = false;
     PreviewKeyDown += new KeyEventHandler(HandleEsc);
     DataContext = dynamoViewModel;
 }
开发者ID:RobertiF,项目名称:Dynamo,代码行数:7,代码来源:AboutWindow.xaml.cs


示例7: Cleanup

        public override void Cleanup()
        {
            try
            {
                preloader = null;
                DynamoSelection.Instance.ClearSelection();

                if (ViewModel == null)
                    return;

                var shutdownParams = new DynamoViewModel.ShutdownParams(
                    shutdownHost: false,
                    allowCancellation: false);

                ViewModel.PerformShutdownSequence(shutdownParams);
                ViewModel.RequestUserSaveWorkflow -= RequestUserSaveWorkflow;
                ViewModel = null;
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.StackTrace);
            }

            base.Cleanup();
        }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:25,代码来源:DynamoViewModelUnitTest.cs


示例8: OnRequestAboutWindow

 public virtual void OnRequestAboutWindow(DynamoViewModel vm)
 {
     if (RequestAboutWindow != null)
     {
         RequestAboutWindow(vm);
     }
 }
开发者ID:nmeek,项目名称:Dynamo,代码行数:7,代码来源:DynamoViewModelEvents.cs


示例9: ViewStartupParams

 internal ViewStartupParams(DynamoViewModel dynamoVM) :
     base(dynamoVM.Model.AuthenticationManager.AuthProvider,
         dynamoVM.Model.PathManager,
         dynamoVM.Model.CustomNodeManager)
 {
     dynamoViewModel = dynamoVM;
 }
开发者ID:RevitLution,项目名称:Dynamo,代码行数:7,代码来源:ViewStartupParams.cs


示例10: CodeBlockEditor

        public CodeBlockEditor(NodeViewModel nodeViewModel)
        {
            InitializeComponent();

            this.nodeViewModel = nodeViewModel;
            this.dynamoViewModel = nodeViewModel.DynamoViewModel;
            this.DataContext = nodeViewModel.NodeModel;
            this.nodeModel = nodeViewModel.NodeModel as CodeBlockNodeModel;

            // Register text editing events
            this.InnerTextEditor.TextChanged += InnerTextEditor_TextChanged;
            this.InnerTextEditor.TextArea.LostFocus += TextArea_LostFocus;

            // the code block should not be in focus upon undo/redo actions on node
            if (this.nodeModel.ShouldFocus)
            {
                this.Loaded += (obj, args) => this.InnerTextEditor.TextArea.Focus();
            }

            // Register auto-completion callbacks
            this.InnerTextEditor.TextArea.TextEntering += OnTextAreaTextEntering;
            this.InnerTextEditor.TextArea.TextEntered += OnTextAreaTextEntered;

            InitializeSyntaxHighlighter();
        }
开发者ID:whztt07,项目名称:Dynamo,代码行数:25,代码来源:CodeBlockEditor.xaml.cs


示例11: PackageDownloadHandle

 public PackageDownloadHandle(DynamoViewModel dynamoViewModel, Greg.Responses.PackageHeader header, PackageVersion version)
 {
     this.dynamoViewModel = dynamoViewModel;
     this.Header = header;
     this.DownloadPath = "";
     this.VersionName = version.version;
 }
开发者ID:jbenoit44,项目名称:Dynamo,代码行数:7,代码来源:PackageDownloadHandle.cs


示例12: PackageManagerClientViewModel

 public PackageManagerClientViewModel(DynamoViewModel dynamoViewModel, PackageManagerClient packageManagerClient )
 {
     this.dynamoViewModel = dynamoViewModel;
     this.packageManagerClient = packageManagerClient;
     this.CachedPackageList = new List<PackageManagerSearchElement>();
     this.packageManagerClient.RequestAuthentication +=
         dynamoViewModel.OnRequestAuthentication;
 }
开发者ID:RobertiF,项目名称:Dynamo,代码行数:8,代码来源:PackageManagerClientViewModel.cs


示例13: AboutWindow

 public AboutWindow(DynamoLogger logger, DynamoViewModel model)
 {
     InitializeComponent();
     this.logger = logger;
     this.InstallNewUpdate = false;
     this.PreviewKeyDown += new KeyEventHandler(HandleEsc);
     this.DataContext = model;
 }
开发者ID:parchjs,项目名称:Dynamo,代码行数:8,代码来源:AboutWindow.xaml.cs


示例14: DynamoOpenFileDialog

 public DynamoOpenFileDialog(DynamoViewModel model)
 {
     this.model = model;
     _dialog = new NativeFileOpenDialog();
     IFileDialogCustomize customize = (IFileDialogCustomize) _dialog;
     customize.AddCheckButton(RunManualCheckboxId, 
         Dynamo.Wpf.Properties.Resources.FileDialogManualMode,
         model.PreferenceSettings.OpenFileInManualExecutionMode);
 }
开发者ID:DynamoDS,项目名称:Dynamo,代码行数:9,代码来源:DynamoOpenFileDialog.cs


示例15: ViewStartupParams

        internal ViewStartupParams(DynamoViewModel dynamoVM) :
            base(dynamoVM.Model.AuthenticationManager.AuthProvider,
                dynamoVM.Model.PathManager,
                new ExtensionLibraryLoader(dynamoVM.Model), 
				dynamoVM.Model.CustomNodeManager,
                dynamoVM.Model.GetType().Assembly.GetName().Version)
        {
            dynamoViewModel = dynamoVM;
        }
开发者ID:tauyoung,项目名称:Dynamo,代码行数:9,代码来源:ViewStartupParams.cs


示例16: AboutWindow

        public AboutWindow(DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();
            InstallNewUpdate = false;
            PreviewKeyDown += new KeyEventHandler(HandleEsc);
            DataContext = dynamoViewModel;

            Title = string.Format(Dynamo.Wpf.Properties.Resources.AboutWindowTitle,dynamoViewModel.BrandingResourceProvider.ProductName);
            DynamoWebsiteButton.Content = string.Format(Dynamo.Wpf.Properties.Resources.AboutWindowDynamoWebsiteButton, dynamoViewModel.BrandingResourceProvider.ProductName);
        }
开发者ID:ankushraizada,项目名称:Dynamo,代码行数:10,代码来源:AboutWindow.xaml.cs


示例17: AboutWindow

        public AboutWindow(ILogger logger, DynamoViewModel model)
        {
            InitializeComponent();
            this.logger = logger;
            InstallNewUpdate = false;
            PreviewKeyDown += new KeyEventHandler(HandleEsc);
            DataContext = model;

            Dispatcher.ShutdownStarted += Dispatcher_ShutdownStarted;
        }
开发者ID:heegwon,项目名称:Dynamo,代码行数:10,代码来源:AboutWindow.xaml.cs


示例18: AboutWindow

        public AboutWindow(DynamoViewModel dynamoViewModel)
        {
            InitializeComponent();
            InstallNewUpdate = false;
            PreviewKeyDown += new KeyEventHandler(HandleEsc);
            DataContext = dynamoViewModel;

#if ENABLE_DYNAMO_SCHEDULER
            // SCHEDULER: Temporary way to tell that scheduler is enabled.
            VersionNumber.Foreground = new SolidColorBrush(Colors.Yellow);
#endif
        }
开发者ID:whztt07,项目名称:Dynamo,代码行数:12,代码来源:AboutWindow.xaml.cs


示例19: Watch3DViewModelStartupParams

 public Watch3DViewModelStartupParams(DynamoModel model, DynamoViewModel viewModel, string name)
 {
     Model = model;
     Scheduler = model.Scheduler;
     Logger = model.Logger;
     Preferences = model.PreferenceSettings;
     EngineControllerManager = model;
     RenderPackageFactory = viewModel.RenderPackageFactoryViewModel.Factory;
     ViewModel = viewModel;
     RenderPackageFactoryViewModel = viewModel.RenderPackageFactoryViewModel;
     Name = name;
 }
开发者ID:joespiff,项目名称:Dynamo,代码行数:12,代码来源:Watch3DViewModelBase.cs


示例20: ParameterEditor

        public ParameterEditor(NodeViewModel nodeViewModel)
        {
            InitializeComponent();

            this.nodeViewModel = nodeViewModel;
            this.dynamoViewModel = nodeViewModel.DynamoViewModel;
            this.DataContext = nodeViewModel.NodeModel;
            this.InnerTextEditor.TextArea.LostFocus += OnTextAreaLostFocus;
            this.InnerTextEditor.TextArea.TextEntering += OnTextAreaTextEntering;
            this.InnerTextEditor.TextArea.TextEntered += OnTextAreaTextEntered;

            InitializeSyntaxHighlighter();
        }
开发者ID:norbertzsiros,项目名称:Dynamo,代码行数:13,代码来源:ParameterEditor.xaml.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ViewModels.NodeCategoryViewModel类代码示例发布时间:2022-05-24
下一篇:
C# Utilities.Point2D类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap