// 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
 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());
 }