mirror of
https://github.com/exelix11/SwitchThemeInjector.git
synced 2024-11-23 01:39:54 +00:00
Add files
This commit is contained in:
parent
34fdb7cdf6
commit
2e09853e17
25
SwitchThemes.sln
Normal file
25
SwitchThemes.sln
Normal file
@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.27703.2026
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SwitchThemes", "SwitchThemes\SwitchThemes.csproj", "{CFBF6EF0-8237-442A-8997-A30072F0B9F8}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{CFBF6EF0-8237-442A-8997-A30072F0B9F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CFBF6EF0-8237-442A-8997-A30072F0B9F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CFBF6EF0-8237-442A-8997-A30072F0B9F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CFBF6EF0-8237-442A-8997-A30072F0B9F8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {39DA1599-C227-462D-910F-490C734D5B41}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
6
SwitchThemes/App.config
Normal file
6
SwitchThemes/App.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
301
SwitchThemes/Form1.Designer.cs
generated
Normal file
301
SwitchThemes/Form1.Designer.cs
generated
Normal file
@ -0,0 +1,301 @@
|
||||
namespace SwitchThemes
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Variabile di progettazione necessaria.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Pulire le risorse in uso.
|
||||
/// </summary>
|
||||
/// <param name="disposing">ha valore true se le risorse gestite devono essere eliminate, false in caso contrario.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Codice generato da Progettazione Windows Form
|
||||
|
||||
/// <summary>
|
||||
/// Metodo necessario per il supporto della finestra di progettazione. Non modificare
|
||||
/// il contenuto del metodo con l'editor di codice.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.materialTabSelector1 = new MaterialSkin.Controls.MaterialTabSelector();
|
||||
this.materialTabControl1 = new MaterialSkin.Controls.MaterialTabControl();
|
||||
this.tabPage1 = new System.Windows.Forms.TabPage();
|
||||
this.materialRaisedButton1 = new MaterialSkin.Controls.MaterialRaisedButton();
|
||||
this.materialLabel1 = new MaterialSkin.Controls.MaterialLabel();
|
||||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.materialLabel3 = new MaterialSkin.Controls.MaterialLabel();
|
||||
this.materialFlatButton1 = new MaterialSkin.Controls.MaterialFlatButton();
|
||||
this.materialLabel2 = new MaterialSkin.Controls.MaterialLabel();
|
||||
this.tbBntxFile = new System.Windows.Forms.TextBox();
|
||||
this.materialRaisedButton2 = new MaterialSkin.Controls.MaterialRaisedButton();
|
||||
this.materialDivider1 = new MaterialSkin.Controls.MaterialDivider();
|
||||
this.materialRaisedButton3 = new MaterialSkin.Controls.MaterialRaisedButton();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.materialLabel4 = new MaterialSkin.Controls.MaterialLabel();
|
||||
this.materialTabControl1.SuspendLayout();
|
||||
this.tabPage1.SuspendLayout();
|
||||
this.tabPage2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// materialTabSelector1
|
||||
//
|
||||
this.materialTabSelector1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialTabSelector1.BaseTabControl = this.materialTabControl1;
|
||||
this.materialTabSelector1.Depth = 0;
|
||||
this.materialTabSelector1.Enabled = false;
|
||||
this.materialTabSelector1.Location = new System.Drawing.Point(-1, 103);
|
||||
this.materialTabSelector1.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialTabSelector1.Name = "materialTabSelector1";
|
||||
this.materialTabSelector1.Size = new System.Drawing.Size(665, 52);
|
||||
this.materialTabSelector1.TabIndex = 5;
|
||||
this.materialTabSelector1.Text = "materialTabSelector1";
|
||||
//
|
||||
// materialTabControl1
|
||||
//
|
||||
this.materialTabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialTabControl1.Controls.Add(this.tabPage1);
|
||||
this.materialTabControl1.Controls.Add(this.tabPage2);
|
||||
this.materialTabControl1.Depth = 0;
|
||||
this.materialTabControl1.Location = new System.Drawing.Point(-1, 151);
|
||||
this.materialTabControl1.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialTabControl1.Name = "materialTabControl1";
|
||||
this.materialTabControl1.SelectedIndex = 0;
|
||||
this.materialTabControl1.Size = new System.Drawing.Size(645, 269);
|
||||
this.materialTabControl1.TabIndex = 4;
|
||||
//
|
||||
// tabPage1
|
||||
//
|
||||
this.tabPage1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
|
||||
this.tabPage1.Controls.Add(this.materialRaisedButton1);
|
||||
this.tabPage1.Controls.Add(this.materialLabel1);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(637, 243);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "Extract resources";
|
||||
//
|
||||
// materialRaisedButton1
|
||||
//
|
||||
this.materialRaisedButton1.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.materialRaisedButton1.Depth = 0;
|
||||
this.materialRaisedButton1.Location = new System.Drawing.Point(248, 164);
|
||||
this.materialRaisedButton1.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialRaisedButton1.Name = "materialRaisedButton1";
|
||||
this.materialRaisedButton1.Primary = true;
|
||||
this.materialRaisedButton1.Size = new System.Drawing.Size(142, 36);
|
||||
this.materialRaisedButton1.TabIndex = 10;
|
||||
this.materialRaisedButton1.Text = "Export BNTX";
|
||||
this.materialRaisedButton1.UseVisualStyleBackColor = true;
|
||||
this.materialRaisedButton1.Click += new System.EventHandler(this.materialRaisedButton1_Click);
|
||||
//
|
||||
// materialLabel1
|
||||
//
|
||||
this.materialLabel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialLabel1.Depth = 0;
|
||||
this.materialLabel1.Font = new System.Drawing.Font("Roboto", 11F);
|
||||
this.materialLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.materialLabel1.Location = new System.Drawing.Point(9, 13);
|
||||
this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialLabel1.Name = "materialLabel1";
|
||||
this.materialLabel1.Size = new System.Drawing.Size(618, 148);
|
||||
this.materialLabel1.TabIndex = 0;
|
||||
this.materialLabel1.Text = resources.GetString("materialLabel1.Text");
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
this.tabPage2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(51)))), ((int)(((byte)(51)))));
|
||||
this.tabPage2.Controls.Add(this.materialLabel4);
|
||||
this.tabPage2.Controls.Add(this.materialLabel3);
|
||||
this.tabPage2.Controls.Add(this.materialFlatButton1);
|
||||
this.tabPage2.Controls.Add(this.materialLabel2);
|
||||
this.tabPage2.Controls.Add(this.tbBntxFile);
|
||||
this.tabPage2.Controls.Add(this.materialRaisedButton2);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(637, 243);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Inject & patch";
|
||||
//
|
||||
// materialLabel3
|
||||
//
|
||||
this.materialLabel3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialLabel3.Depth = 0;
|
||||
this.materialLabel3.Font = new System.Drawing.Font("Roboto", 11F);
|
||||
this.materialLabel3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.materialLabel3.Location = new System.Drawing.Point(11, 50);
|
||||
this.materialLabel3.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialLabel3.Name = "materialLabel3";
|
||||
this.materialLabel3.Size = new System.Drawing.Size(652, 148);
|
||||
this.materialLabel3.TabIndex = 5;
|
||||
this.materialLabel3.Text = resources.GetString("materialLabel3.Text");
|
||||
//
|
||||
// materialFlatButton1
|
||||
//
|
||||
this.materialFlatButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialFlatButton1.AutoSize = true;
|
||||
this.materialFlatButton1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.materialFlatButton1.Depth = 0;
|
||||
this.materialFlatButton1.Location = new System.Drawing.Point(607, 10);
|
||||
this.materialFlatButton1.Margin = new System.Windows.Forms.Padding(4, 6, 4, 6);
|
||||
this.materialFlatButton1.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialFlatButton1.Name = "materialFlatButton1";
|
||||
this.materialFlatButton1.Primary = false;
|
||||
this.materialFlatButton1.Size = new System.Drawing.Size(23, 36);
|
||||
this.materialFlatButton1.TabIndex = 3;
|
||||
this.materialFlatButton1.Text = "...";
|
||||
this.materialFlatButton1.UseVisualStyleBackColor = true;
|
||||
this.materialFlatButton1.Click += new System.EventHandler(this.materialFlatButton1_Click);
|
||||
//
|
||||
// materialLabel2
|
||||
//
|
||||
this.materialLabel2.AutoSize = true;
|
||||
this.materialLabel2.Depth = 0;
|
||||
this.materialLabel2.Font = new System.Drawing.Font("Roboto", 11F);
|
||||
this.materialLabel2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.materialLabel2.Location = new System.Drawing.Point(11, 18);
|
||||
this.materialLabel2.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialLabel2.Name = "materialLabel2";
|
||||
this.materialLabel2.Size = new System.Drawing.Size(71, 19);
|
||||
this.materialLabel2.TabIndex = 2;
|
||||
this.materialLabel2.Text = "Bntx file: ";
|
||||
//
|
||||
// tbBntxFile
|
||||
//
|
||||
this.tbBntxFile.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tbBntxFile.Location = new System.Drawing.Point(86, 17);
|
||||
this.tbBntxFile.Name = "tbBntxFile";
|
||||
this.tbBntxFile.Size = new System.Drawing.Size(514, 20);
|
||||
this.tbBntxFile.TabIndex = 1;
|
||||
//
|
||||
// materialRaisedButton2
|
||||
//
|
||||
this.materialRaisedButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialRaisedButton2.Depth = 0;
|
||||
this.materialRaisedButton2.Location = new System.Drawing.Point(457, 192);
|
||||
this.materialRaisedButton2.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialRaisedButton2.Name = "materialRaisedButton2";
|
||||
this.materialRaisedButton2.Primary = true;
|
||||
this.materialRaisedButton2.Size = new System.Drawing.Size(173, 39);
|
||||
this.materialRaisedButton2.TabIndex = 0;
|
||||
this.materialRaisedButton2.Text = "Patch and save";
|
||||
this.materialRaisedButton2.UseVisualStyleBackColor = true;
|
||||
this.materialRaisedButton2.Click += new System.EventHandler(this.materialRaisedButton2_Click);
|
||||
//
|
||||
// materialDivider1
|
||||
//
|
||||
this.materialDivider1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialDivider1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(55)))), ((int)(((byte)(71)))), ((int)(((byte)(79)))));
|
||||
this.materialDivider1.Depth = 0;
|
||||
this.materialDivider1.Location = new System.Drawing.Point(-1, 63);
|
||||
this.materialDivider1.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialDivider1.Name = "materialDivider1";
|
||||
this.materialDivider1.Size = new System.Drawing.Size(646, 52);
|
||||
this.materialDivider1.TabIndex = 6;
|
||||
this.materialDivider1.Text = "materialDivider1";
|
||||
this.materialDivider1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.materialDivider1_MouseDown);
|
||||
//
|
||||
// materialRaisedButton3
|
||||
//
|
||||
this.materialRaisedButton3.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.materialRaisedButton3.Depth = 0;
|
||||
this.materialRaisedButton3.Location = new System.Drawing.Point(252, 70);
|
||||
this.materialRaisedButton3.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialRaisedButton3.Name = "materialRaisedButton3";
|
||||
this.materialRaisedButton3.Primary = true;
|
||||
this.materialRaisedButton3.Size = new System.Drawing.Size(142, 36);
|
||||
this.materialRaisedButton3.TabIndex = 11;
|
||||
this.materialRaisedButton3.Text = "Open common.szs";
|
||||
this.materialRaisedButton3.UseVisualStyleBackColor = true;
|
||||
this.materialRaisedButton3.Click += new System.EventHandler(this.materialRaisedButton3_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(0, 409);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(113, 13);
|
||||
this.label1.TabIndex = 12;
|
||||
this.label1.Text = "Exelix @ Team Qcean";
|
||||
this.label1.Click += new System.EventHandler(this.label1_Click);
|
||||
//
|
||||
// materialLabel4
|
||||
//
|
||||
this.materialLabel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.materialLabel4.Depth = 0;
|
||||
this.materialLabel4.Font = new System.Drawing.Font("Roboto", 11F);
|
||||
this.materialLabel4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
|
||||
this.materialLabel4.Location = new System.Drawing.Point(3, 201);
|
||||
this.materialLabel4.MouseState = MaterialSkin.MouseState.HOVER;
|
||||
this.materialLabel4.Name = "materialLabel4";
|
||||
this.materialLabel4.Size = new System.Drawing.Size(448, 24);
|
||||
this.materialLabel4.TabIndex = 6;
|
||||
this.materialLabel4.Text = "This file has already been patched, only the bntx was added";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(645, 422);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.materialRaisedButton3);
|
||||
this.Controls.Add(this.materialTabSelector1);
|
||||
this.Controls.Add(this.materialDivider1);
|
||||
this.Controls.Add(this.materialTabControl1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(645, 422);
|
||||
this.Name = "Form1";
|
||||
this.Text = "Qcean\'s Switch theme injector - only for 5.1.0";
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.materialTabControl1.ResumeLayout(false);
|
||||
this.tabPage1.ResumeLayout(false);
|
||||
this.tabPage2.ResumeLayout(false);
|
||||
this.tabPage2.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MaterialSkin.Controls.MaterialTabSelector materialTabSelector1;
|
||||
private MaterialSkin.Controls.MaterialTabControl materialTabControl1;
|
||||
private System.Windows.Forms.TabPage tabPage1;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private MaterialSkin.Controls.MaterialDivider materialDivider1;
|
||||
private MaterialSkin.Controls.MaterialLabel materialLabel1;
|
||||
private MaterialSkin.Controls.MaterialRaisedButton materialRaisedButton1;
|
||||
private MaterialSkin.Controls.MaterialLabel materialLabel3;
|
||||
private MaterialSkin.Controls.MaterialFlatButton materialFlatButton1;
|
||||
private MaterialSkin.Controls.MaterialLabel materialLabel2;
|
||||
private System.Windows.Forms.TextBox tbBntxFile;
|
||||
private MaterialSkin.Controls.MaterialRaisedButton materialRaisedButton2;
|
||||
private MaterialSkin.Controls.MaterialRaisedButton materialRaisedButton3;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private MaterialSkin.Controls.MaterialLabel materialLabel4;
|
||||
}
|
||||
}
|
||||
|
515
SwitchThemes/Form1.cs
Normal file
515
SwitchThemes/Form1.cs
Normal file
@ -0,0 +1,515 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using EveryFileExplorer;
|
||||
using SARCExt;
|
||||
using Syroot.BinaryData;
|
||||
|
||||
namespace SwitchThemes
|
||||
{
|
||||
public partial class Form1 : MaterialSkin.Controls.MaterialForm
|
||||
{
|
||||
SarcData CommonSzs = null;
|
||||
int detectedVer = -1;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
MaterialSkin.MaterialSkinManager.Instance.Theme = MaterialSkin.MaterialSkinManager.Themes.DARK;
|
||||
materialLabel1.ForeColor = Color.White;
|
||||
}
|
||||
|
||||
private void materialRaisedButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!materialTabSelector1.Enabled || CommonSzs == null)
|
||||
{
|
||||
MessageBox.Show("Open a common.szs first");
|
||||
return;
|
||||
}
|
||||
if (detectedVer == -1)
|
||||
{
|
||||
MessageBox.Show("Version unsupported");
|
||||
return;
|
||||
}
|
||||
SaveFileDialog sav = new SaveFileDialog()
|
||||
{
|
||||
Filter = "bntx file|*.bntx",
|
||||
Title = "Save theme resources",
|
||||
FileName = "__Combined.bntx"
|
||||
};
|
||||
if (sav.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
File.WriteAllBytes(sav.FileName, CommonSzs.Files[@"timg/__Combined.bntx"]);
|
||||
MessageBox.Show("Done");
|
||||
}
|
||||
|
||||
private void materialDivider1_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
ReleaseCapture();
|
||||
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
|
||||
}
|
||||
}
|
||||
|
||||
private void materialRaisedButton3_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog opn = new OpenFileDialog()
|
||||
{
|
||||
Title = "open common.szs",
|
||||
Filter = "common.szs|*.szs|all files|*.*",
|
||||
};
|
||||
if (opn.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
if (!File.Exists(opn.FileName))
|
||||
{
|
||||
MessageBox.Show("Could not open file");
|
||||
return;
|
||||
}
|
||||
CommonSzs = SARCExt.SARC.UnpackRamN(YAZ0.Decompress(File.ReadAllBytes(opn.FileName)));
|
||||
|
||||
foreach (string k in CommonSzs.Files.Keys)
|
||||
{
|
||||
if (UTF8Encoding.Default.GetString(CommonSzs.Files[k]).Contains("White1x1A128^s"))
|
||||
{
|
||||
Console.WriteLine(k);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (CommonSzs.Files.ContainsKey(@"blyt/SystemAppletFader.bflyt")) detectedVer = 5;
|
||||
else if (CommonSzs.Files.ContainsKey(@"blyt/IconError.bflyt")) detectedVer = 6;
|
||||
|
||||
if (detectedVer != 5 ||
|
||||
!CommonSzs.Files.ContainsKey(@"timg/__Combined.bntx") ||
|
||||
!CommonSzs.Files.ContainsKey(@"blyt/BgNml.bflyt"))
|
||||
{
|
||||
MessageBox.Show("This is not a valid common.szs file, if it's from a newer firmware it's not compatible with this tool yet");
|
||||
CommonSzs = null;
|
||||
return;
|
||||
}
|
||||
|
||||
materialTabSelector1.Enabled = true;
|
||||
}
|
||||
|
||||
private void materialFlatButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog opn = new OpenFileDialog()
|
||||
{
|
||||
Title = "open resources file",
|
||||
Filter = "*.bntx|*.bntx|all files|*.*",
|
||||
};
|
||||
if (opn.ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
if (opn.FileName != "")
|
||||
tbBntxFile.Text = opn.FileName;
|
||||
}
|
||||
|
||||
private void materialRaisedButton2_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (tbBntxFile.Text.Trim() == "")
|
||||
{
|
||||
if (MessageBox.Show("Are you sure you want to continue without a bntx ? The theme will most likely crash on the console", "", MessageBoxButtons.YesNo) == DialogResult.No)
|
||||
return;
|
||||
}
|
||||
else if (!File.Exists(tbBntxFile.Text))
|
||||
{
|
||||
MessageBox.Show($"{tbBntxFile.Text} not found !");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
SaveFileDialog sav = new SaveFileDialog()
|
||||
{
|
||||
FileName = "common.szs",
|
||||
Filter = "szs file|*.szs"
|
||||
};
|
||||
if (sav.ShowDialog() != DialogResult.OK) return;
|
||||
|
||||
CommonSzs.Files[@"timg/__Combined.bntx"] = File.ReadAllBytes(tbBntxFile.Text);
|
||||
BflytFile f = new BflytFile(new MemoryStream(CommonSzs.Files[@"blyt/BgNml.bflyt"]));
|
||||
BflytFile.PatchResult res;
|
||||
if (detectedVer == 6)
|
||||
res = f.PatchMainLayout6x();
|
||||
else
|
||||
res = f.PatchMainLayout5x();
|
||||
|
||||
if (res == BflytFile.PatchResult.AlreadyPatched)
|
||||
MessageBox.Show("This file has already been patched, only the bntx will be replaced.\r\nIf you have issues try with an unmodified file");
|
||||
else if (res == BflytFile.PatchResult.Fail)
|
||||
{
|
||||
MessageBox.Show("Couldn't patch this file, it might have been already modified or it's from an unsupported system version.");
|
||||
return;
|
||||
}
|
||||
else if (res == BflytFile.PatchResult.CorruptedFile)
|
||||
{
|
||||
MessageBox.Show("This file has been already patched with another tool and is not compatible, you should get an unpatched layout (either one from your nand or one that has just color hacks).");
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
CommonSzs.Files[@"blyt/BgNml.bflyt"] = f.SaveFile();
|
||||
if (detectedVer == 6)
|
||||
{
|
||||
f = new BflytFile(new MemoryStream(CommonSzs.Files[@"blyt/IconError.bflyt"]));
|
||||
f.PatchIconError6x();
|
||||
CommonSzs.Files[@"blyt/IconError.bflyt"] = f.SaveFile();
|
||||
}
|
||||
else
|
||||
{
|
||||
f = new BflytFile(new MemoryStream(CommonSzs.Files[@"blyt/SystemAppletFader.bflyt"]));
|
||||
f.PatchFaderLayout5x();
|
||||
CommonSzs.Files[@"blyt/SystemAppletFader.bflyt"] = f.SaveFile();
|
||||
}
|
||||
}
|
||||
|
||||
var sarc = SARC.PackN(CommonSzs);
|
||||
File.WriteAllBytes(sav.FileName, YAZ0.Compress(sarc.Item2, 3, (uint)sarc.Item1));
|
||||
|
||||
MessageBox.Show("Done");
|
||||
}
|
||||
|
||||
private void label1_Click(object sender, EventArgs e)
|
||||
{
|
||||
MessageBox.Show("Team Qcean:\r\nCreatable, einso, GRAnimated, Traiver, Cellenseres, Vorphixx, SimonMKWii, Exelix\r\n\r\nDiscord invite code : GrKPJZt");
|
||||
}
|
||||
}
|
||||
|
||||
class BflytFile
|
||||
{
|
||||
public class BasePanel
|
||||
{
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Panel {name} len: 0x{length.ToString("X")}";
|
||||
}
|
||||
|
||||
public string name;
|
||||
public Int32 length;
|
||||
public byte[] data;
|
||||
|
||||
public BasePanel(string _name, int len)
|
||||
{
|
||||
name = _name;
|
||||
length = len;
|
||||
data = new byte[length - 8];
|
||||
}
|
||||
|
||||
public BasePanel(string _name, BinaryDataReader bin)
|
||||
{
|
||||
name = _name;
|
||||
length = bin.ReadInt32();
|
||||
data = bin.ReadBytes(length - 8);
|
||||
}
|
||||
|
||||
public virtual void WritePanel(BinaryDataWriter bin)
|
||||
{
|
||||
bin.Write(name, BinaryStringFormat.NoPrefixOrTermination);
|
||||
length = data.Length + 8;
|
||||
bin.Write(length);
|
||||
bin.Write(data);
|
||||
}
|
||||
}
|
||||
|
||||
public class TextureSection : BasePanel
|
||||
{
|
||||
public List<string> Textures = new List<string>();
|
||||
public TextureSection(BinaryDataReader bin) : base("txl1", bin)
|
||||
{
|
||||
BinaryDataReader dataReader = new BinaryDataReader(new MemoryStream(data));
|
||||
dataReader.ByteOrder = bin.ByteOrder;
|
||||
int texCount = dataReader.ReadInt32();
|
||||
uint BaseOff = (uint)dataReader.Position;
|
||||
var Offsets = dataReader.ReadInt32s(texCount);
|
||||
foreach (var off in Offsets)
|
||||
{
|
||||
dataReader.Position = BaseOff + off;
|
||||
Textures.Add(dataReader.ReadString(BinaryStringFormat.ZeroTerminated));
|
||||
}
|
||||
}
|
||||
|
||||
public override void WritePanel(BinaryDataWriter bin)
|
||||
{
|
||||
var newData = new MemoryStream();
|
||||
BinaryDataWriter dataWriter = new BinaryDataWriter(newData);
|
||||
dataWriter.ByteOrder = bin.ByteOrder;
|
||||
dataWriter.Write(Textures.Count);
|
||||
dataWriter.Write(new int[Textures.Count]);
|
||||
for (int i = 0; i < Textures.Count; i++)
|
||||
{
|
||||
uint off = (uint)dataWriter.Position;
|
||||
dataWriter.Write(Textures[i], BinaryStringFormat.ZeroTerminated);
|
||||
while (dataWriter.BaseStream.Position % 4 != 0)
|
||||
dataWriter.Write((byte)0);
|
||||
uint endPos = (uint)dataWriter.Position;
|
||||
dataWriter.Position = 4 + i * 4;
|
||||
dataWriter.Write(off - 4);
|
||||
dataWriter.Position = endPos;
|
||||
}
|
||||
data = newData.ToArray();
|
||||
base.WritePanel(bin);
|
||||
}
|
||||
}
|
||||
|
||||
public class MaterialsSection : BasePanel
|
||||
{
|
||||
public List<byte[]> Materials = new List<byte[]>();
|
||||
public MaterialsSection(BinaryDataReader bin) : base("mat1", bin)
|
||||
{
|
||||
BinaryDataReader dataReader = new BinaryDataReader(new MemoryStream(data));
|
||||
dataReader.ByteOrder = bin.ByteOrder;
|
||||
int matCount = dataReader.ReadInt32();
|
||||
var Offsets = dataReader.ReadInt32s(matCount);
|
||||
for (int i = 0; i < matCount; i++)
|
||||
{
|
||||
dataReader.Position = Offsets[i] - 8;
|
||||
int matLen = (i == matCount - 1 ? (int)dataReader.BaseStream.Length : Offsets[i + 1]) - (int)dataReader.Position;
|
||||
Materials.Add(dataReader.ReadBytes(matLen));
|
||||
}
|
||||
}
|
||||
|
||||
public override void WritePanel(BinaryDataWriter bin)
|
||||
{
|
||||
var newData = new MemoryStream();
|
||||
BinaryDataWriter dataWriter = new BinaryDataWriter(newData);
|
||||
dataWriter.ByteOrder = bin.ByteOrder;
|
||||
dataWriter.Write(Materials.Count);
|
||||
dataWriter.Write(new int[Materials.Count]);
|
||||
for (int i = 0; i < Materials.Count; i++)
|
||||
{
|
||||
uint off = (uint)dataWriter.Position;
|
||||
dataWriter.Write(Materials[i]);
|
||||
uint endPos = (uint)dataWriter.Position;
|
||||
dataWriter.Position = 4 + i * 4;
|
||||
dataWriter.Write(off + 8);
|
||||
dataWriter.Position = endPos;
|
||||
}
|
||||
data = newData.ToArray();
|
||||
base.WritePanel(bin);
|
||||
}
|
||||
}
|
||||
|
||||
public class PicturePanel : BasePanel
|
||||
{
|
||||
public string PanelName;
|
||||
public PicturePanel(BinaryDataReader bin) : base("pic1", bin)
|
||||
{
|
||||
BinaryDataReader dataReader = new BinaryDataReader(new MemoryStream(data));
|
||||
dataReader.ByteOrder = bin.ByteOrder;
|
||||
dataReader.ReadInt32(); //Unknown
|
||||
PanelName = "";
|
||||
for (int i = 0; i < 0x18; i++)
|
||||
{
|
||||
var c = dataReader.ReadChar();
|
||||
if (c == 0) break;
|
||||
PanelName += c;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"Picture {PanelName}";
|
||||
}
|
||||
}
|
||||
|
||||
public List<BasePanel> Panels = new List<BasePanel>();
|
||||
|
||||
UInt32 version;
|
||||
|
||||
public byte[] SaveFile()
|
||||
{
|
||||
var res = new MemoryStream();
|
||||
BinaryDataWriter bin = new BinaryDataWriter(res);
|
||||
bin.ByteOrder = ByteOrder.LittleEndian;
|
||||
bin.Write("FLYT", BinaryStringFormat.NoPrefixOrTermination);
|
||||
bin.Write((byte)0xFF);
|
||||
bin.Write((byte)0xFE); //Little endian
|
||||
bin.Write((UInt16)0x14); //Header size
|
||||
bin.Write(version);
|
||||
bin.Write((Int32)0);
|
||||
bin.Write((UInt16)Panels.Count);
|
||||
bin.Write((UInt16)0); //padding
|
||||
foreach (var p in Panels)
|
||||
p.WritePanel(bin);
|
||||
while (bin.BaseStream.Position % 4 != 0)
|
||||
bin.Write((byte)0);
|
||||
bin.BaseStream.Position = 0xC;
|
||||
bin.Write((uint)bin.BaseStream.Length);
|
||||
bin.BaseStream.Position = bin.BaseStream.Length;
|
||||
return res.ToArray();
|
||||
}
|
||||
|
||||
public enum PatchResult
|
||||
{
|
||||
AlreadyPatched,
|
||||
Fail,
|
||||
CorruptedFile,
|
||||
OK
|
||||
}
|
||||
|
||||
void PatchTextureName(string original, string _new)
|
||||
{
|
||||
var texSection = GetTex;
|
||||
for (int i = 0; i < texSection.Textures.Count; i++)
|
||||
{
|
||||
if (texSection.Textures[i] == original)
|
||||
{
|
||||
texSection.Textures[i] = _new;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void PatchFaderLayout5x() =>
|
||||
PatchTextureName("White1x1_180^r", "White1x1^r");
|
||||
|
||||
// blyt/IconError.bflyt
|
||||
public void PatchIconError6x() =>
|
||||
PatchTextureName("White1x1A128^s", "White1x1A64^t");
|
||||
|
||||
|
||||
public PatchResult PatchMainLayout6x()
|
||||
=> PatchMainLayout5x("White1x1A128^s");
|
||||
|
||||
public PatchResult PatchMainLayout5x(string TexName = "White1x1_180^r")
|
||||
{
|
||||
#region add picture
|
||||
foreach (var p in Panels.Where(x => x is PicturePanel))
|
||||
{
|
||||
if (((PicturePanel)p).name == "exelixBG") return PatchResult.AlreadyPatched;
|
||||
if (((PicturePanel)p).name == "3x3lxBG") return PatchResult.CorruptedFile;
|
||||
}
|
||||
int target = -1;
|
||||
int targetSkip = 1;
|
||||
for (int i = 0; i < Panels.Count -1; i++)
|
||||
{
|
||||
if (Panels[i] is PicturePanel && ((PicturePanel)Panels[i]).PanelName == "P_Bg_00")
|
||||
{
|
||||
target = i;
|
||||
targetSkip = Panels[i + 1].name == "usd1" ? 2 : 1; //use latest image panel
|
||||
}
|
||||
}
|
||||
if (target == -1) return PatchResult.Fail;
|
||||
using (BinaryDataWriter bin = new BinaryDataWriter(new MemoryStream(Panels[target].data)))
|
||||
{
|
||||
bin.ByteOrder = ByteOrder.LittleEndian;
|
||||
bin.BaseStream.Position = 0x24;
|
||||
bin.Write(5000f);
|
||||
bin.Write(60000f);
|
||||
bin.BaseStream.Position = 0x3C;
|
||||
bin.Write(100f);
|
||||
bin.Write(100f);
|
||||
bin.Write(1200f);
|
||||
bin.Write(700f);
|
||||
Panels[target].data = ((MemoryStream)bin.BaseStream).ToArray();
|
||||
}
|
||||
Panels.Insert(target + targetSkip, new BasePanel("pic1", 0x8));
|
||||
var MatSect = GetMat;
|
||||
var strm = new MemoryStream();
|
||||
using (BinaryDataWriter bin = new BinaryDataWriter(strm))
|
||||
{
|
||||
bin.ByteOrder = ByteOrder.LittleEndian;
|
||||
bin.Write((byte)0x01);
|
||||
bin.Write((byte)0x00);
|
||||
bin.Write((byte)0xFF);
|
||||
bin.Write((byte)0x04);
|
||||
bin.Write("exelixBG", BinaryStringFormat.NoPrefixOrTermination);
|
||||
bin.Write(new byte[0x30]);
|
||||
bin.Write(1f);
|
||||
bin.Write(1f);
|
||||
bin.Write(1280f);
|
||||
bin.Write(720f);
|
||||
bin.Write((UInt32)0xFFFFFFFF);
|
||||
bin.Write((UInt32)0xFFFFFFFF);
|
||||
bin.Write((UInt32)0xFFFFFFFF);
|
||||
bin.Write((UInt32)0xFFFFFFFF);
|
||||
bin.Write((UInt16)MatSect.Materials.Count);
|
||||
bin.Write((UInt16)1);
|
||||
bin.Write((UInt32)0);
|
||||
bin.Write((UInt32)0);
|
||||
bin.Write(1f);
|
||||
bin.Write((UInt32)0);
|
||||
bin.Write((UInt32)0);
|
||||
bin.Write(1f);
|
||||
bin.Write(1f);
|
||||
bin.Write(1f);
|
||||
Panels[target + 2].data = strm.ToArray();
|
||||
}
|
||||
#endregion
|
||||
#region AddTextures
|
||||
var texSection = GetTex;
|
||||
if (!texSection.Textures.Contains(TexName))
|
||||
texSection.Textures.Add(TexName);
|
||||
int texIndex = texSection.Textures.IndexOf(TexName);
|
||||
#endregion
|
||||
#region Add material
|
||||
{
|
||||
MemoryStream mem = new MemoryStream();
|
||||
using (BinaryDataWriter bin = new BinaryDataWriter(mem))
|
||||
{
|
||||
bin.ByteOrder = ByteOrder.LittleEndian;
|
||||
bin.Write("P_Custm", BinaryStringFormat.ZeroTerminated);
|
||||
bin.Write(new byte[0x14]);
|
||||
bin.Write((Int32)0x15);
|
||||
bin.Write((Int32)0x8040200);
|
||||
bin.Write((Int32)0);
|
||||
bin.Write((UInt32)0xFFFFFFFF);
|
||||
bin.Write((UInt16)texIndex);
|
||||
bin.Write((UInt16)0x0);
|
||||
bin.Write(new byte[0xC]);
|
||||
bin.Write(1f);
|
||||
bin.Write(1f);
|
||||
bin.Write(new byte[0x10]);
|
||||
MatSect.Materials.Add(mem.ToArray());
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
return PatchResult.OK;
|
||||
}
|
||||
|
||||
public TextureSection GetTex => (TextureSection)Panels.Find(x => x is TextureSection);
|
||||
public MaterialsSection GetMat => (MaterialsSection)Panels.Find(x => x is MaterialsSection);
|
||||
|
||||
public BflytFile(Stream file)
|
||||
{
|
||||
BinaryDataReader bin = new BinaryDataReader(file);
|
||||
bin.ByteOrder = ByteOrder.LittleEndian;
|
||||
if (bin.ReadString(4) != "FLYT") throw new Exception("Wrong signature");
|
||||
bin.ReadUInt16(); //BOM
|
||||
bin.ReadUInt16(); //HeaderSize
|
||||
version = bin.ReadUInt32();
|
||||
bin.ReadUInt32(); //File size
|
||||
var sectionCount = bin.ReadUInt16();
|
||||
bin.ReadUInt16(); //padding
|
||||
for (int i = 0; i < sectionCount; i++)
|
||||
{
|
||||
string name = bin.ReadString(4);
|
||||
switch (name)
|
||||
{
|
||||
case "txl1":
|
||||
Panels.Add(new TextureSection(bin));
|
||||
break;
|
||||
case "mat1":
|
||||
Panels.Add(new MaterialsSection(bin));
|
||||
break;
|
||||
case "pic1":
|
||||
Panels.Add(new PicturePanel(bin));
|
||||
break;
|
||||
default:
|
||||
Panels.Add(new BasePanel(name, bin));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
2465
SwitchThemes/Form1.resx
Normal file
2465
SwitchThemes/Form1.resx
Normal file
File diff suppressed because it is too large
Load Diff
22
SwitchThemes/Program.cs
Normal file
22
SwitchThemes/Program.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SwitchThemes
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// Punto di ingresso principale dell'applicazione.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
36
SwitchThemes/Properties/AssemblyInfo.cs
Normal file
36
SwitchThemes/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("Switch theme injector")]
|
||||
[assembly: AssemblyDescription("Switch custom themes !")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Exelix")]
|
||||
[assembly: AssemblyProduct("SwitchThemes")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
|
||||
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
|
||||
// COM, impostare su true l'attributo ComVisible per tale tipo.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
|
||||
[assembly: Guid("cfbf6ef0-8237-442a-8997-a30072f0b9f8")]
|
||||
|
||||
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
|
||||
//
|
||||
// Versione principale
|
||||
// Versione secondaria
|
||||
// Numero di build
|
||||
// Revisione
|
||||
//
|
||||
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
||||
// usando l'asterisco '*' come illustrato di seguito:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
71
SwitchThemes/Properties/Resources.Designer.cs
generated
Normal file
71
SwitchThemes/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,71 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Codice generato da uno strumento.
|
||||
// Versione runtime:4.0.30319.42000
|
||||
//
|
||||
// Le modifiche apportate a questo file possono causare un comportamento non corretto e andranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SwitchThemes.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
|
||||
/// </summary>
|
||||
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder
|
||||
// tramite uno strumento quale ResGen o Visual Studio.
|
||||
// Per aggiungere o rimuovere un membro, modificare il file .ResX, quindi eseguire di nuovo ResGen
|
||||
// con l'opzione /str oppure ricompilare il progetto VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce l'istanza di ResourceManager memorizzata nella cache e usata da questa classe.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SwitchThemes.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte
|
||||
/// le ricerche di risorse che utilizzano questa classe di risorse fortemente tipizzata.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
SwitchThemes/Properties/Resources.resx
Normal file
117
SwitchThemes/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
30
SwitchThemes/Properties/Settings.Designer.cs
generated
Normal file
30
SwitchThemes/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,30 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SwitchThemes.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
SwitchThemes/Properties/Settings.settings
Normal file
7
SwitchThemes/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
98
SwitchThemes/SwitchThemes.csproj
Normal file
98
SwitchThemes/SwitchThemes.csproj
Normal file
@ -0,0 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{CFBF6EF0-8237-442A-8997-A30072F0B9F8}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>SwitchThemes</RootNamespace>
|
||||
<AssemblyName>SwitchThemes</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MaterialSkin">
|
||||
<HintPath>C:\Users\Ermes\.nuget\packages\materialskin\0.2.1\lib\MaterialSkin.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SARCExt">
|
||||
<HintPath>..\..\EditorCoreProject\EditorCore\EditorCore\bin\Debug\Ext\SARCExt.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Syroot.BinaryData, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EditorCoreProject\EditorCore\EditorCore\bin\Debug\Ext\Syroot.BinaryData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
BIN
SwitchThemes/icon.ico
Normal file
BIN
SwitchThemes/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
Loading…
Reference in New Issue
Block a user