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


C# ViewModels.DynamoViewModel类代码示例

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


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


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