本文整理匯總了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) {}
}