mirror of
https://github.com/StudentBlake/XCI-Explorer
synced 2024-11-10 06:34:15 +00:00
Remove Fody and remaining warnings, add consistant spacing to some classes
This commit is contained in:
parent
afe9ebb6a3
commit
465bfa70a3
10 changed files with 45 additions and 73 deletions
BIN
Be.Windows.Forms.HexBox.dll
Normal file
BIN
Be.Windows.Forms.HexBox.dll
Normal file
Binary file not shown.
|
@ -1,10 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Costura>
|
||||
<ExcludeAssemblies>
|
||||
System
|
||||
System.Drawing
|
||||
System.Windows.Forms
|
||||
</ExcludeAssemblies>
|
||||
</Costura>
|
||||
</Weavers>
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuild. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Costura" minOccurs="0" maxOccurs="1" type="xs:anyType" />
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification on the target assembly after all weavers have been finished.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
|
@ -16,5 +16,5 @@ using System.Runtime.Versioning;
|
|||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: Guid("206c6c47-87b1-477f-b6e6-f7e7c1a92f8f")]
|
||||
[assembly: AssemblyFileVersion("1.4.4.0")]
|
||||
[assembly: AssemblyVersion("1.4.4.0")]
|
||||
[assembly: AssemblyFileVersion("1.4.5.0")]
|
||||
[assembly: AssemblyVersion("1.4.5.0")]
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="packages\Costura.Fody.3.1.6\build\Costura.Fody.props" Condition="Exists('packages\Costura.Fody.3.1.6\build\Costura.Fody.props')" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{89DBE891-22C7-40FF-A3D3-36F26224E09D}</ProjectGuid>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
|
@ -29,21 +28,25 @@
|
|||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<RootNamespace>XCI_Explorer</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Be.Windows.Forms.HexBox, Version=1.6.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Be.Windows.Forms.HexBox.1.6.1\lib\net40\Be.Windows.Forms.HexBox.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Costura, Version=3.1.6.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Costura.Fody.3.1.6\lib\net46\Costura.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms">
|
||||
<HintPath>C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<HintPath>C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System\v4.0_4.0.0.0__b77a5c561934e089\System.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing">
|
||||
<HintPath>C:\WINDOWS\Microsoft.NET\assembly\GAC_MSIL\System.Drawing\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Core">
|
||||
<HintPath>C:\WINDOWS\Microsoft.Net\assembly\GAC_MSIL\System.Core\v4.0_4.0.0.0__b77a5c561934e089\System.Core.dll</HintPath>
|
||||
|
@ -89,13 +92,8 @@
|
|||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Be.Windows.Forms.HexBox.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('packages\Costura.Fody.3.1.6\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Costura.Fody.3.1.6\build\Costura.Fody.props'))" />
|
||||
<Error Condition="!Exists('packages\Fody.3.3.2\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', 'packages\Fody.3.3.2\build\Fody.targets'))" />
|
||||
</Target>
|
||||
<Import Project="packages\Fody.3.3.2\build\Fody.targets" Condition="Exists('packages\Fody.3.3.2\build\Fody.targets')" />
|
||||
</Project>
|
|
@ -2,12 +2,9 @@
|
|||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace XCI_Explorer
|
||||
{
|
||||
internal static class CNMT
|
||||
{
|
||||
public class CNMT_Header
|
||||
{
|
||||
namespace XCI_Explorer {
|
||||
internal static class CNMT {
|
||||
public class CNMT_Header {
|
||||
public byte[] Data;
|
||||
public long TitleID;
|
||||
public int TitleVersion;
|
||||
|
@ -18,21 +15,19 @@ namespace XCI_Explorer
|
|||
public short MetaCount;
|
||||
public byte[] Reserved2;
|
||||
|
||||
public enum TitleType
|
||||
{
|
||||
SYSTEM_PROGRAMS = 0x01,
|
||||
public enum TitleType {
|
||||
SYSTEM_PROGRAMS = 0x01,
|
||||
SYSTEM_DATA_ARCHIVES,
|
||||
SYSTEM_UPDATE,
|
||||
FIRMWARE_PACKAGE_A,
|
||||
FIRMWARE_PACKAGE_B,
|
||||
REGULAR_APPLICATION = 0x80,
|
||||
REGULAR_APPLICATION = 0x80,
|
||||
UPDATE_TITLE,
|
||||
ADD_ON_CONTENT,
|
||||
DELTA_TITLE
|
||||
}
|
||||
|
||||
public CNMT_Header(byte[] data)
|
||||
{
|
||||
public CNMT_Header(byte[] data) {
|
||||
Data = data;
|
||||
TitleID = BitConverter.ToInt64(data, 0);
|
||||
TitleVersion = BitConverter.ToInt32(data, 8);
|
||||
|
@ -45,8 +40,7 @@ namespace XCI_Explorer
|
|||
}
|
||||
}
|
||||
|
||||
public class CNMT_Entry
|
||||
{
|
||||
public class CNMT_Entry {
|
||||
public byte[] Data;
|
||||
public byte[] Hash;
|
||||
public byte[] NcaId;
|
||||
|
@ -54,8 +48,7 @@ namespace XCI_Explorer
|
|||
public byte Type;
|
||||
public byte Reserved;
|
||||
|
||||
public enum ContentType
|
||||
{
|
||||
public enum ContentType {
|
||||
META,
|
||||
PROGRAM,
|
||||
DATA,
|
||||
|
@ -65,8 +58,7 @@ namespace XCI_Explorer
|
|||
GAME_UPDATE
|
||||
}
|
||||
|
||||
public CNMT_Entry(byte[] data)
|
||||
{
|
||||
public CNMT_Entry(byte[] data) {
|
||||
Data = data;
|
||||
Hash = Data.Skip(0).Take(32).ToArray();
|
||||
NcaId = Data.Skip(32).Take(16).ToArray();
|
||||
|
|
|
@ -6,7 +6,7 @@ using System.Windows.Forms;
|
|||
|
||||
namespace XCI_Explorer {
|
||||
public class CertForm : Form {
|
||||
private IContainer components;
|
||||
private IContainer components = null;
|
||||
private HexBox hbxHexView;
|
||||
|
||||
public CertForm(MainForm mainForm) {
|
||||
|
|
|
@ -56,7 +56,7 @@ namespace XCI_Explorer {
|
|||
public double UsedSize;
|
||||
private TreeViewFileSystem TV_Parti;
|
||||
private BetterTreeNode rootNode;
|
||||
private IContainer components;
|
||||
private IContainer components = null;
|
||||
private Button B_LoadROM;
|
||||
private TabControl TABC_Main;
|
||||
private TabPage TABP_XCI;
|
||||
|
@ -108,11 +108,7 @@ namespace XCI_Explorer {
|
|||
|
||||
// Set number of numbers in version number
|
||||
const int NUMBERSINVERSION = 3;
|
||||
|
||||
string assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
string[] versionArray = assemblyVersion.Split('.');
|
||||
assemblyVersion = string.Join(".", versionArray.Take(NUMBERSINVERSION));
|
||||
this.Text = "XCI Explorer v" + assemblyVersion;
|
||||
this.Text = "XCI Explorer v" + getAssemblyVersion(NUMBERSINVERSION);
|
||||
|
||||
LB_SelectedData.Text = "";
|
||||
LB_DataOffset.Text = "";
|
||||
|
@ -190,6 +186,15 @@ namespace XCI_Explorer {
|
|||
}
|
||||
}
|
||||
|
||||
private string getAssemblyVersion(int num) {
|
||||
string assemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
|
||||
string[] versionArray = assemblyVersion.Split('.');
|
||||
|
||||
assemblyVersion = string.Join(".", versionArray.Take(num));
|
||||
|
||||
return assemblyVersion;
|
||||
}
|
||||
|
||||
private void ProcessFile() {
|
||||
if (Path.GetExtension(TB_File.Text).ToLower() == ".nsp") {
|
||||
// Code needs refactoring
|
||||
|
@ -450,7 +455,7 @@ namespace XCI_Explorer {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(xmlVersion.Trim() == "") {
|
||||
if (xmlVersion.Trim() == "") {
|
||||
TB_GameRev.Text = NACP.NACP_Datas[0].GameVer.Replace("\0", "");
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -5,6 +5,16 @@ namespace XCI_Explorer {
|
|||
internal static class Program {
|
||||
[STAThread]
|
||||
private static void Main() {
|
||||
AppDomain.CurrentDomain.AssemblyResolve += (Object sender, ResolveEventArgs args) => {
|
||||
System.Reflection.AssemblyName embeddedAssembly = new System.Reflection.AssemblyName(args.Name);
|
||||
String resourceName = "XCI_Explorer" + "." + embeddedAssembly.Name + ".dll";
|
||||
|
||||
using (var stream = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName)) {
|
||||
Byte[] assemblyData = new Byte[stream.Length];
|
||||
stream.Read(assemblyData, 0, assemblyData.Length);
|
||||
return System.Reflection.Assembly.Load(assemblyData);
|
||||
}
|
||||
};
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Be.Windows.Forms.HexBox" version="1.6.1" targetFramework="net461" />
|
||||
<package id="Costura.Fody" version="3.1.6" targetFramework="net461" />
|
||||
<package id="Fody" version="3.3.2" targetFramework="net461" developmentDependency="true" />
|
||||
</packages>
|
Loading…
Reference in a new issue