Пример #1
0
		public IFileTabContent Deserialize(Guid guid, ISettingsSection section, IFileTabContentFactoryContext context) {
			if (guid != GUID_SerializedContent)
				return null;

			var filename = section.Attribute<string>("filename");
			return hexBoxFileTabContentCreator.Value.TryCreate(filename);
		}
Пример #2
0
		public IFileTabContent Create(IFileTabContentFactoryContext context) {
			if (context.Nodes.Length == 1) {
				var hexNode = context.Nodes[0] as HexNode;
				if (hexNode != null)
					return new HexFileTabContent(hexNode);
			}

			return null;
		}
Пример #3
0
		public IFileTabContent Deserialize(Guid guid, ISettingsSection section, IFileTabContentFactoryContext context) {
			if (guid != GUID_SerializedContent)
				return null;
			var hexNode = context.Nodes.Length != 1 ? null : context.Nodes[0] as HexNode;
			if (hexNode == null)
				return null;

			return new HexFileTabContent(hexNode);
		}
		public IFileTabContent Deserialize(Guid guid, ISettingsSection section, IFileTabContentFactoryContext context) {
			if (guid == GUID_SerializedContent) {
				// Serialize() doesn't add anything extra to 'section', but if it did, you'd have to
				// get that info here and return null if the serialized data wasn't found.
				var node = context.Nodes.Length == 1 ? context.Nodes[0] as AssemblyChildNode : null;
				if (node != null)
					return new AssemblyChildNodeTabContent(node);
			}
			return null;
		}
Пример #5
0
 public IFileTabContent Deserialize(Guid guid, ISettingsSection section, IFileTabContentFactoryContext context)
 {
     if (guid == GUID_SerializedContent)
         return new AboutScreenFileTabContent(appWindow, pluginManager);
     return null;
 }
Пример #6
0
 public IFileTabContent Create(IFileTabContentFactoryContext context)
 {
     return null;
 }
		// Called to create a new IFileTabContent. If it's our new tree node, create a new IFileTabContent for it
		public IFileTabContent Create(IFileTabContentFactoryContext context) {
			if (context.Nodes.Length == 1 && context.Nodes[0] is AssemblyChildNode)
				return new AssemblyChildNodeTabContent((AssemblyChildNode)context.Nodes[0]);
			return null;
		}
Пример #8
0
 public IFileTabContent Create(IFileTabContentFactoryContext context)
 {
     return(null);
 }
Пример #9
0
 public IFileTabContent Create(IFileTabContentFactoryContext context)
 {
     return(new DecompileFileTabContent(this, context.Nodes, languageManager.Language));
 }
Пример #10
0
        public IFileTabContent Deserialize(Guid guid, ISettingsSection section, IFileTabContentFactoryContext context)
        {
            if (guid != GUID_SerializedContent)
                return null;

            var langGuid = section.Attribute<Guid?>("Language") ?? LanguageConstants.LANGUAGE_CSHARP;
            var language = languageManager.FindOrDefault(langGuid);
            return new DecompileFileTabContent(this, context.Nodes, language);
        }
Пример #11
0
 public IFileTabContent Create(IFileTabContentFactoryContext context)
 {
     return new DecompileFileTabContent(this, context.Nodes, languageManager.Language);
 }
Пример #12
0
 public IFileTabContent Create(IFileTabContentFactoryContext context) =>
 new DecompileFileTabContent(this, context.Nodes, LanguageManager.Language);
Пример #13
0
 public IFileTabContent Create(IFileTabContentFactoryContext context) => null;
Пример #14
0
 public IFileTabContent Create(IFileTabContentFactoryContext context) =>
 new DecompileFileTabContent(this, context.Nodes, DecompilerManager.Decompiler);