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


C# ExportProvider.GetExport方法代码示例

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


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

示例1: ExampleForm

		public ExampleForm(ExportProvider exportProvider)
		{
            _shaderFragments = exportProvider.GetExport<ShaderFragmentArchive.Archive>().Value;
            _nodeCreator = exportProvider.GetExport<NodeEditorCore.IShaderFragmentNodeCreator>().Value;
            _modelConversion = exportProvider.GetExport<NodeEditorCore.IModelConversion>().Value;

			InitializeComponent();

            _hyperGraphModel = new HyperGraph.GraphModel();
            _hyperGraphModel.CompatibilityStrategy = _nodeCreator.CreateCompatibilityStrategy();

            _graphAdapter = new HyperGraph.GraphControl();
            _graphAdapter.Attach(graphControl);
            _graphAdapter.HighlightCompatible = true;
            _graphAdapter.LargeGridStep = 160F;
            _graphAdapter.LargeStepGridColor = System.Drawing.Color.FromArgb(((int)(((byte)(90)))), ((int)(((byte)(90)))), ((int)(((byte)(90)))));
            _graphAdapter.ShowLabels = false;
            _graphAdapter.SmallGridStep = 20F;
            _graphAdapter.SmallStepGridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));

            _graphAdapter.Model = _hyperGraphModel;
            _graphAdapter.Selection = new GraphSelection();
            _graphAdapter.Selection.SelectionChanged += OnFocusChanged;

            graphControl.MouseEnter += OnGraphMouseEnter;
            graphControl.Paint += graphControl_Paint;

            _tabGroupTextureNode = new RibbonTabGroup(_ribbon, (uint)RibbonMarkupCommands.cmdTabGroupTextureNode);

            _showLabels = new RibbonLib.Controls.RibbonCheckBox(_ribbon, (uint)RibbonMarkupCommands.cmdShowLabels);
            _showLabels.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnShowLabelsChanged);

            _generateTestScript = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdButtonTestScript);
            _generateTestScript.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnGenerateTestScript);

            _saveAsButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdSaveAs);
            _saveAsButton.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnSaveAs);

            _loadButton = new RibbonLib.Controls.RibbonButton(_ribbon, (uint)RibbonMarkupCommands.cmdLoad);
            _loadButton.ExecuteEvent += new EventHandler<ExecuteEventArgs>(OnLoad);

            var fragmentTreeModel = exportProvider.GetExport<NodeEditorCore.ShaderFragmentArchiveModel>().Value;
            _fragmentTree.Model = new Aga.Controls.Tree.SortedTreeModel(fragmentTreeModel);
            _fragmentTree.ItemDrag += new ItemDragEventHandler(OnFragmentTreeItemDrag);
            _fragmentTree.NodeMouseDoubleClick += new EventHandler<Aga.Controls.Tree.TreeNodeAdvMouseEventArgs>(OnFragmentTreeItemDoubleClick);

            // _materialParametersGrid.SelectedObject = new DictionaryPropertyGridAdapter(_document.PreviewMaterialState);

            try
            {
                LoadFile("defaultload.sh");
            }
            catch(System.Exception) {}
		}
开发者ID:coreafive,项目名称:XLE,代码行数:54,代码来源:ExampleForm.cs


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