// Gets called to create the UI context. It can be shared by any IFileTabContent in this tab.
		// Eg. there's only one text editor per tab, shared by all IFileTabContents that need a text
		// editor.
		public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) {
			// This custom view object is shared by all nodes of the same type. If we didn't want it
			// to be shared, we could use 'node' or 'this' as the key.
			var key = node.GetType();
			// var key = node;	// uncomment to not share it

			// If the UI object has already been created, use it, else create it. The object is
			// stored in a weak reference.
			return locator.Get(key, () => new AssemblyChildNodeUIContext());
		}
示例#2
0
        // Gets called to create the UI context. It can be shared by any IFileTabContent in this tab.
        // Eg. there's only one text editor per tab, shared by all IFileTabContents that need a text
        // editor.
        public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
        {
            // This custom view object is shared by all nodes of the same type. If we didn't want it
            // to be shared, we could use 'node' or 'this' as the key.
            var key = node.GetType();

            // var key = node;	// uncomment to not share it

            // If the UI object has already been created, use it, else create it. The object is
            // stored in a weak reference.
            return(locator.Get(key, () => new AssemblyChildNodeUIContext()));
        }
示例#3
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return(locator.Get(hexNode, () => new HexFileTabUIContext(hexNode.VMObject, hexNode.IsVirtualizingCollectionVM)));
 }
示例#4
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) => locator.Get <IDocumentViewer>();
示例#5
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return(locator.Get <ITextEditorUIContext>());
 }
示例#6
0
文件: AboutScreen.cs 项目: n017/dnSpy
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return locator.Get<ITextEditorUIContext>();
 }
示例#7
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) =>
 locator.Get(typeof(NullFileTabUIContext), () => new NullFileTabUIContext());
示例#8
0
		public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) {
			return locator.Get(hexDocument, () => new HexBoxFileTabUIContext(hexDocument, menuManager, hexEditorSettings, appSettings, hexBoxUndoManager.Value));
		}
示例#9
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return(locator.Get(hexDocument, () => new HexBoxFileTabUIContext(hexDocument, menuManager, hexEditorSettings, appSettings, hexBoxUndoManager.Value)));
 }
示例#10
0
		public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator) {
			return locator.Get(hexNode, () => new HexFileTabUIContext(hexNode.VMObject, hexNode.IsVirtualizingCollectionVM));
		}
示例#11
0
 public IFileTabUIContext CreateUIContext(IFileTabUIContextLocator locator)
 {
     return locator.Get(typeof(NullFileTabUIContext), () => new NullFileTabUIContext());
 }