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);
		}
Beispiel #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;
		}
Beispiel #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;
		}
Beispiel #5
0
 public IFileTabContent Deserialize(Guid guid, ISettingsSection section, IFileTabContentFactoryContext context)
 {
     if (guid == GUID_SerializedContent)
         return new AboutScreenFileTabContent(appWindow, pluginManager);
     return null;
 }
Beispiel #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;
		}
Beispiel #8
0
 public IFileTabContent Create(IFileTabContentFactoryContext context)
 {
     return(null);
 }
 public IFileTabContent Create(IFileTabContentFactoryContext context)
 {
     return(new DecompileFileTabContent(this, context.Nodes, languageManager.Language));
 }
        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);
        }
 public IFileTabContent Create(IFileTabContentFactoryContext context)
 {
     return new DecompileFileTabContent(this, context.Nodes, languageManager.Language);
 }
Beispiel #12
0
 public IFileTabContent Create(IFileTabContentFactoryContext context) =>
 new DecompileFileTabContent(this, context.Nodes, LanguageManager.Language);
Beispiel #13
0
 public IFileTabContent Create(IFileTabContentFactoryContext context) => null;
Beispiel #14
0
 public IFileTabContent Create(IFileTabContentFactoryContext context) =>
 new DecompileFileTabContent(this, context.Nodes, DecompilerManager.Decompiler);