Compare commits
No commits in common. "master" and "TransmitMii" have entirely different histories.
master
...
TransmitMi
@ -1,44 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomizeMii", "CustomizeMii\CustomizeMii.csproj", "{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ForwardMii", "ForwardMii\ForwardMii.csproj", "{20CB2CA7-6767-4758-97FA-97395F47CD6B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CustomizeMiiInstaller", "CustomizeMiiInstaller\CustomizeMiiInstaller.csproj", "{475F3ADF-B529-449F-89DA-BA5E8BE15DD5}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Debug|x86.Build.0 = Debug|x86
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Release|x86.ActiveCfg = Release|x86
|
||||
{46B7F0BC-101B-4167-95AD-4C5D78AA0A20}.Release|x86.Build.0 = Release|x86
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Debug|x86.Build.0 = Debug|x86
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Release|x86.ActiveCfg = Release|x86
|
||||
{20CB2CA7-6767-4758-97FA-97395F47CD6B}.Release|x86.Build.0 = Release|x86
|
||||
{475F3ADF-B529-449F-89DA-BA5E8BE15DD5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{475F3ADF-B529-449F-89DA-BA5E8BE15DD5}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{475F3ADF-B529-449F-89DA-BA5E8BE15DD5}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{475F3ADF-B529-449F-89DA-BA5E8BE15DD5}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{475F3ADF-B529-449F-89DA-BA5E8BE15DD5}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{475F3ADF-B529-449F-89DA-BA5E8BE15DD5}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,834 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Windows.Forms;
|
||||
using libWiiSharp;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_Main
|
||||
{
|
||||
private TransmitInfo transmitInfo;
|
||||
private WadCreationInfo wadCreationInfo;
|
||||
private bool internalSound;
|
||||
|
||||
private WAD sourceWad = new WAD();
|
||||
private U8 bannerBin = new U8();
|
||||
private U8 newBannerBin = new U8();
|
||||
private U8 iconBin = new U8();
|
||||
private U8 newIconBin = new U8();
|
||||
private byte[] newSoundBin = new byte[0];
|
||||
private byte[] newDol = new byte[0];
|
||||
private string replacedBanner = string.Empty;
|
||||
private string replacedIcon = string.Empty;
|
||||
private string replacedSound = string.Empty;
|
||||
|
||||
void bwBannerReplace_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
setControlText(tbReplace, replacedBanner);
|
||||
}
|
||||
|
||||
void bwBannerReplace_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwBannerReplace_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BackgroundWorker bwBannerReplace = sender as BackgroundWorker;
|
||||
replacedBanner = (string)e.Argument;
|
||||
|
||||
if (replacedBanner.ToLower().EndsWith(".bin"))
|
||||
{
|
||||
bwBannerReplace.ReportProgress(0, "Loading banner.bin...");
|
||||
newBannerBin.LoadFile(replacedBanner);
|
||||
}
|
||||
else if (replacedBanner.ToLower().EndsWith(".app"))
|
||||
{
|
||||
bwBannerReplace.ReportProgress(0, "Loading 00000000.app...");
|
||||
U8 tmpU8 = U8.Load(replacedBanner);
|
||||
|
||||
bwBannerReplace.ReportProgress(50, "Loading banner.bin...");
|
||||
for (int i = 0; i < tmpU8.NumOfNodes; i++)
|
||||
if (tmpU8.StringTable[i].ToLower() == "banner.bin")
|
||||
{ newBannerBin.LoadFile(tmpU8.Data[i]); break; }
|
||||
}
|
||||
else //wad
|
||||
{
|
||||
bwBannerReplace.ReportProgress(0, "Loading WAD...");
|
||||
WAD tmpWad = WAD.Load(replacedBanner);
|
||||
|
||||
if (!tmpWad.HasBanner)
|
||||
throw new Exception("CustomizeMii only handles Channel WADs!");
|
||||
|
||||
bwBannerReplace.ReportProgress(60, "Loading banner.bin...");
|
||||
for (int i = 0; i < tmpWad.BannerApp.NumOfNodes; i++)
|
||||
if (tmpWad.BannerApp.StringTable[i].ToLower() == "banner.bin")
|
||||
{ newBannerBin.LoadFile(tmpWad.BannerApp.Data[i]); break; }
|
||||
}
|
||||
|
||||
bannerTransparents.Clear();
|
||||
|
||||
addTpls();
|
||||
addBrlyts();
|
||||
addBrlans();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
replacedBanner = string.Empty;
|
||||
errorBox(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void bwIconReplace_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
setControlText(tbReplace, replacedIcon);
|
||||
}
|
||||
|
||||
void bwIconReplace_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwIconReplace_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BackgroundWorker bwIconReplace = sender as BackgroundWorker;
|
||||
replacedIcon = (string)e.Argument;
|
||||
|
||||
bwIconReplace.ReportProgress(0);
|
||||
|
||||
if (replacedIcon.ToLower().EndsWith(".bin"))
|
||||
{
|
||||
bwIconReplace.ReportProgress(0, "Loading icon.bin...");
|
||||
newIconBin.LoadFile(replacedIcon);
|
||||
}
|
||||
else if (replacedIcon.ToLower().EndsWith(".app"))
|
||||
{
|
||||
bwIconReplace.ReportProgress(0, "Loading 00000000.app...");
|
||||
U8 tmpU8 = U8.Load(replacedIcon);
|
||||
|
||||
bwIconReplace.ReportProgress(50, "Loading icon.bin...");
|
||||
for (int i = 0; i < tmpU8.NumOfNodes; i++)
|
||||
if (tmpU8.StringTable[i].ToLower() == "icon.bin")
|
||||
{ newIconBin.LoadFile(tmpU8.Data[i]); break; }
|
||||
}
|
||||
else //wad
|
||||
{
|
||||
bwIconReplace.ReportProgress(0, "Loading WAD...");
|
||||
WAD tmpWad = WAD.Load(replacedIcon);
|
||||
|
||||
if (!tmpWad.HasBanner)
|
||||
throw new Exception("CustomizeMii only handles Channel WADs!");
|
||||
|
||||
bwIconReplace.ReportProgress(60, "Loading icon.bin...");
|
||||
for (int i = 0; i < tmpWad.BannerApp.NumOfNodes; i++)
|
||||
if (tmpWad.BannerApp.StringTable[i].ToLower() == "icon.bin")
|
||||
{ newIconBin.LoadFile(tmpWad.BannerApp.Data[i]); break; }
|
||||
}
|
||||
|
||||
iconTransparents.Clear();
|
||||
|
||||
addTpls();
|
||||
addBrlyts();
|
||||
addBrlans();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
replacedIcon = string.Empty;
|
||||
errorBox(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void bwSoundReplace_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
setControlText(tbReplace, replacedSound);
|
||||
}
|
||||
|
||||
void bwSoundReplace_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwSoundReplace_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BackgroundWorker bwSoundReplace = sender as BackgroundWorker;
|
||||
replacedSound = (string)e.Argument;
|
||||
|
||||
bwSoundReplace.ReportProgress(0);
|
||||
|
||||
if (replacedSound.ToLower().EndsWith(".bin"))
|
||||
{
|
||||
bwSoundReplace.ReportProgress(0, "Loading sound.bin...");
|
||||
newSoundBin = File.ReadAllBytes(replacedSound);
|
||||
}
|
||||
else if (replacedSound.ToLower().EndsWith(".app"))
|
||||
{
|
||||
bwSoundReplace.ReportProgress(0, "Loading 00000000.app...");
|
||||
U8 tmpU8 = U8.Load(replacedSound);
|
||||
|
||||
bwSoundReplace.ReportProgress(80, "Loading sound.bin...");
|
||||
for (int i = 0; i < tmpU8.NumOfNodes; i++)
|
||||
if (tmpU8.StringTable[i].ToLower() == "sound.bin")
|
||||
{ newSoundBin = tmpU8.Data[i]; break; }
|
||||
}
|
||||
else
|
||||
{
|
||||
bwSoundReplace.ReportProgress(0, "Loading WAD...");
|
||||
WAD tmpWad = WAD.Load(replacedSound);
|
||||
|
||||
if (!tmpWad.HasBanner)
|
||||
throw new Exception("CustomizeMii only handles Channel WADs!");
|
||||
|
||||
bwSoundReplace.ReportProgress(90, "Loading sound.bin...");
|
||||
for (int i = 0; i < tmpWad.BannerApp.NumOfNodes; i++)
|
||||
if (tmpWad.BannerApp.StringTable[i].ToLower() == "sound.bin")
|
||||
{ newSoundBin = tmpWad.BannerApp.Data[i]; break; }
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
replacedSound = string.Empty;
|
||||
errorBox(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void bwConvertToBns_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(replacedSound))
|
||||
{
|
||||
if (internalSound == true)
|
||||
setControlText(tbSound, "BNS: Internal Sound");
|
||||
else
|
||||
setControlText(tbSound, "BNS: " + replacedSound);
|
||||
|
||||
btnBrowseSound.Text = "Clear";
|
||||
|
||||
if (cmbReplace.SelectedIndex == 2) setControlText(tbReplace, string.Empty);
|
||||
}
|
||||
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwConvertToBns_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
if (!string.IsNullOrEmpty((string)e.UserState)) currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bns_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwConvertToBns_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BackgroundWorker bwConvertToBns = sender as BackgroundWorker;
|
||||
BnsConversionInfo bnsInfo = (BnsConversionInfo)e.Argument;
|
||||
byte[] audioData = new byte[0];
|
||||
|
||||
if (bnsInfo.audioFile.ToLower() == "internal sound")
|
||||
{
|
||||
for (int i = 0; i < sourceWad.BannerApp.NumOfNodes; i++)
|
||||
{
|
||||
if (sourceWad.BannerApp.StringTable[i].ToLower() == "sound.bin")
|
||||
audioData = Headers.IMD5.RemoveHeader(sourceWad.BannerApp.Data[i]);
|
||||
}
|
||||
|
||||
internalSound = true;
|
||||
}
|
||||
else
|
||||
audioData = File.ReadAllBytes(bnsInfo.audioFile);
|
||||
|
||||
bool mp3 = bnsInfo.audioFile.EndsWith(".mp3");
|
||||
if (mp3 && bnsInfo.loopType == BnsConversionInfo.LoopType.FromWave) bnsInfo.loopType = BnsConversionInfo.LoopType.None;
|
||||
|
||||
if (mp3)
|
||||
{
|
||||
bwConvertToBns.ReportProgress(0, "Converting MP3...");
|
||||
|
||||
ProcessStartInfo lameI = new ProcessStartInfo(Application.StartupPath + Path.DirectorySeparatorChar + "lame.exe",
|
||||
string.Format("--decode \"{0}\" \"{1}\"", bnsInfo.audioFile, Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav"));
|
||||
lameI.CreateNoWindow = true;
|
||||
lameI.UseShellExecute = false;
|
||||
lameI.RedirectStandardError = true;
|
||||
|
||||
Process lame = Process.Start(lameI);
|
||||
|
||||
string thisLine = string.Empty;
|
||||
while (lame.HasExited == false)
|
||||
{
|
||||
thisLine = lame.StandardError.ReadLine();
|
||||
if (!string.IsNullOrEmpty(thisLine))
|
||||
{
|
||||
if (thisLine.StartsWith("Frame#"))
|
||||
{
|
||||
string thisFrame = thisLine.Remove(thisLine.IndexOf('/'));
|
||||
thisFrame = thisFrame.Remove(0, thisFrame.LastIndexOf(' ') + 1);
|
||||
string Frames = thisLine.Remove(0, thisLine.IndexOf('/') + 1);
|
||||
Frames = Frames.Remove(Frames.IndexOf(' '));
|
||||
|
||||
int thisProgress = (int)((Convert.ToDouble(thisFrame) / Convert.ToDouble(Frames)) * 100);
|
||||
bwConvertToBns.ReportProgress(thisProgress);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lame.WaitForExit();
|
||||
lame.Close();
|
||||
|
||||
if (File.Exists(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav"))
|
||||
{
|
||||
audioData = File.ReadAllBytes(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav");
|
||||
File.Delete(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav");
|
||||
}
|
||||
else throw new Exception("Error converting MP3...");
|
||||
}
|
||||
|
||||
bwConvertToBns.ReportProgress(0, "Converting to BNS...");
|
||||
|
||||
BNS bns = new BNS(audioData, bnsInfo.loopType == BnsConversionInfo.LoopType.FromWave);
|
||||
bns.Progress += new EventHandler<ProgressChangedEventArgs>(bns_ProgressChanged);
|
||||
|
||||
bns.StereoToMono = bnsInfo.stereoToMono;
|
||||
bns.Convert();
|
||||
|
||||
if (bnsInfo.loopType == BnsConversionInfo.LoopType.Manual && bnsInfo.loopStartSample > -1 && bnsInfo.loopStartSample < bns.TotalSampleCount)
|
||||
bns.SetLoop(bnsInfo.loopStartSample);
|
||||
|
||||
newSoundBin = Headers.IMD5.AddHeader(bns.ToByteArray());
|
||||
replacedSound = bnsInfo.audioFile;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
replacedSound = string.Empty;
|
||||
if (File.Exists(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav")) File.Delete(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav");
|
||||
errorBox("Error during conversion:\n" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void bwConvertMp3_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(replacedSound))
|
||||
{
|
||||
setControlText(tbSound, replacedSound);
|
||||
btnBrowseSound.Text = "Clear";
|
||||
|
||||
if (cmbReplace.SelectedIndex == 2) setControlText(tbReplace, string.Empty);
|
||||
}
|
||||
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwConvertMp3_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwConvertMp3_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BackgroundWorker bwConvertMp3 = sender as BackgroundWorker;
|
||||
|
||||
ProcessStartInfo lameI = new ProcessStartInfo(Application.StartupPath + Path.DirectorySeparatorChar + "lame.exe",
|
||||
string.Format("--decode \"{0}\" \"{1}\"", e.Argument, Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav"));
|
||||
lameI.CreateNoWindow = true;
|
||||
lameI.UseShellExecute = false;
|
||||
lameI.RedirectStandardError = true;
|
||||
|
||||
Process lame = Process.Start(lameI);
|
||||
|
||||
string thisLine = string.Empty;
|
||||
while (lame.HasExited == false)
|
||||
{
|
||||
thisLine = lame.StandardError.ReadLine();
|
||||
if (!string.IsNullOrEmpty(thisLine))
|
||||
{
|
||||
if (thisLine.StartsWith("Frame#"))
|
||||
{
|
||||
string thisFrame = thisLine.Remove(thisLine.IndexOf('/'));
|
||||
thisFrame = thisFrame.Remove(0, thisFrame.LastIndexOf(' ') + 1);
|
||||
|
||||
string Frames = thisLine.Remove(0, thisLine.IndexOf('/') + 1);
|
||||
Frames = Frames.Remove(Frames.IndexOf(' '));
|
||||
|
||||
int thisProgress = (int)((Convert.ToDouble(thisFrame) / Convert.ToDouble(Frames)) * 100);
|
||||
bwConvertMp3.ReportProgress(thisProgress, "Converting MP3...");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lame.WaitForExit();
|
||||
lame.Close();
|
||||
|
||||
if (File.Exists(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav"))
|
||||
{
|
||||
newSoundBin = Headers.IMD5.AddHeader(File.ReadAllBytes(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav"));
|
||||
File.Delete(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav");
|
||||
|
||||
replacedSound = (string)e.Argument;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
if (File.Exists(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav")) File.Delete(Application.StartupPath + Path.DirectorySeparatorChar + "customizemii_temp.wav");
|
||||
replacedSound = string.Empty;
|
||||
errorBox("Error during conversion:\n" + ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void bwLoadChannel_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwLoadChannel_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwLoadChannel_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BackgroundWorker bwLoadChannel = sender as BackgroundWorker;
|
||||
initialize();
|
||||
|
||||
if (e.Argument is string) setControlText(tbSourceWad, (string)e.Argument);
|
||||
else if (e.Argument is DownloadDataCompletedEventArgs) setControlText(tbSourceWad, (string)((DownloadDataCompletedEventArgs)e.Argument).UserState);
|
||||
|
||||
bwLoadChannel.ReportProgress(0, "Loading WAD...");
|
||||
|
||||
if (e.Argument is string) sourceWad.LoadFile((string)e.Argument);
|
||||
else if (e.Argument is DownloadDataCompletedEventArgs) sourceWad.LoadFile(((DownloadDataCompletedEventArgs)e.Argument).Result);
|
||||
|
||||
if (!sourceWad.HasBanner)
|
||||
throw new Exception("CustomizeMii only edits Channel WADs!");
|
||||
|
||||
int progressValue = 30;
|
||||
for (int i = 0; i < sourceWad.BannerApp.NumOfNodes; i++)
|
||||
{
|
||||
if (sourceWad.BannerApp.StringTable[i].ToLower() == "banner.bin")
|
||||
{
|
||||
progressValue += 20;
|
||||
bwLoadChannel.ReportProgress(progressValue, "Loading banner.bin...");
|
||||
bannerBin.LoadFile(sourceWad.BannerApp.Data[i]);
|
||||
}
|
||||
else if (sourceWad.BannerApp.StringTable[i].ToLower() == "icon.bin")
|
||||
{
|
||||
progressValue += 20;
|
||||
bwLoadChannel.ReportProgress(progressValue, "Loading icon.bin...");
|
||||
iconBin.LoadFile(sourceWad.BannerApp.Data[i]);
|
||||
}
|
||||
}
|
||||
|
||||
bwLoadChannel.ReportProgress(90, "Loading Channel Information...");
|
||||
setControlText(tbTitleID, sourceWad.UpperTitleID);
|
||||
setControlText(tbStartupIos, ((int)sourceWad.StartupIOS).ToString());
|
||||
|
||||
string[] channelTitles = ((Headers.IMET)sourceWad.BannerApp.Header).GetTitles();
|
||||
bool allLangs = true;
|
||||
|
||||
if (channelTitles[0] != channelTitles[1]) setControlText(tbJapanese, channelTitles[0]);
|
||||
else allLangs = false;
|
||||
if (channelTitles[2] != channelTitles[1]) setControlText(tbGerman, channelTitles[2]);
|
||||
else allLangs = false;
|
||||
if (channelTitles[3] != channelTitles[1]) setControlText(tbFrench, channelTitles[3]);
|
||||
else allLangs = false;
|
||||
if (channelTitles[4] != channelTitles[1]) setControlText(tbSpanish, channelTitles[4]);
|
||||
else allLangs = false;
|
||||
if (channelTitles[5] != channelTitles[1]) setControlText(tbItalian, channelTitles[5]);
|
||||
else allLangs = false;
|
||||
if (channelTitles[6] != channelTitles[1]) setControlText(tbDutch, channelTitles[6]);
|
||||
else allLangs = false;
|
||||
if (channelTitles[7] != channelTitles[1]) setControlText(tbKorean, channelTitles[7]);
|
||||
|
||||
if (allLangs) setControlText(tbEnglish, channelTitles[1]);
|
||||
else setControlText(tbAllLanguages, channelTitles[1]);
|
||||
|
||||
bwLoadChannel.ReportProgress(95, "Loading Footer...");
|
||||
if (sourceWad.CreationTimeUTC > new DateTime(1970, 1, 1))
|
||||
setControlText(lbCreatedValue, sourceWad.CreationTimeUTC.ToString() + " (UTC)");
|
||||
else setControlText(lbCreatedValue, "No Timestamp!");
|
||||
|
||||
addTpls();
|
||||
addBrlyts();
|
||||
addBrlans();
|
||||
|
||||
enableControls();
|
||||
|
||||
setControlText(btnBrowseSource, "Clear");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
setControlText(tbSourceWad, string.Empty);
|
||||
errorBox(ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
void bwTransmit_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
enableControls();
|
||||
|
||||
if (transmitInfo.timeElapsed > 0)
|
||||
{
|
||||
DialogResult dlg;
|
||||
|
||||
if (transmitInfo.compressionRatio > 0)
|
||||
dlg = MessageBox.Show(
|
||||
string.Format("Transmitted {0} kB in {1} milliseconds...\nCompression Ratio: {2}%\n\nDo you want to save the wad file?",
|
||||
transmitInfo.transmittedLength, transmitInfo.timeElapsed, transmitInfo.compressionRatio),
|
||||
"Save File?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
else
|
||||
dlg = MessageBox.Show(
|
||||
string.Format("Transmitted {0} kB in {1} milliseconds...\n\nDo you want to save the wad file?",
|
||||
transmitInfo.transmittedLength, transmitInfo.timeElapsed),
|
||||
"Save File?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
|
||||
|
||||
if (dlg == DialogResult.Yes)
|
||||
{
|
||||
SaveFileDialog sfd = new SaveFileDialog();
|
||||
sfd.Filter = "Wii Channels|*.wad";
|
||||
|
||||
if (!string.IsNullOrEmpty(tbAllLanguages.Text))
|
||||
sfd.FileName = tbAllLanguages.Text + " - " + tbTitleID.Text.ToUpper() + ".wad";
|
||||
else
|
||||
sfd.FileName = tbEnglish.Text + " - " + tbTitleID.Text.ToUpper() + ".wad";
|
||||
|
||||
if (sfd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (File.Exists(sfd.FileName)) File.Delete(sfd.FileName);
|
||||
File.WriteAllBytes(sfd.FileName, wadCreationInfo.wadFile);
|
||||
}
|
||||
}
|
||||
|
||||
initialize();
|
||||
}
|
||||
}
|
||||
|
||||
void bwTransmit_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwTransmit_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
BackgroundWorker bwTransmit = sender as BackgroundWorker;
|
||||
|
||||
//Insert wad into stub dol
|
||||
string fileName = "CMiiInstaller.dol";
|
||||
byte[] fileData = CustomizeMiiInstaller.InstallerHelper.CreateInstaller(wadCreationInfo.wadFile, (byte)wadCreationInfo.transmitIos).ToArray();
|
||||
|
||||
//Transmit installer
|
||||
Stopwatch transmitTimer = new Stopwatch();
|
||||
|
||||
HbcTransmitter transmitter = new HbcTransmitter(wadCreationInfo.transmitProtocol, wadCreationInfo.transmitIp);
|
||||
transmitter.Progress += new EventHandler<ProgressChangedEventArgs>(transmitter_Progress);
|
||||
|
||||
transmitter_Progress(null, new ProgressChangedEventArgs(0, null));
|
||||
transmitTimer.Start();
|
||||
|
||||
bool success = transmitter.TransmitFile(fileName, fileData);
|
||||
|
||||
transmitTimer.Stop();
|
||||
|
||||
if (!success) errorBox(transmitter.LastError);
|
||||
else
|
||||
{
|
||||
transmitInfo.timeElapsed = (int)transmitTimer.ElapsedMilliseconds;
|
||||
transmitInfo.compressionRatio = transmitter.CompressionRatio;
|
||||
transmitInfo.transmittedLength = Math.Round(transmitter.TransmittedLength * 0.0009765625, 2);
|
||||
}
|
||||
}
|
||||
catch (Exception ex) { errorBox(ex.Message); }
|
||||
}
|
||||
|
||||
void transmitter_Progress(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = "Sending File...";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwCreateWad_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
if (!wadCreationInfo.sendToWii)
|
||||
{
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
enableControls();
|
||||
|
||||
if (wadCreationInfo.success)
|
||||
initialize();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wadCreationInfo.sendWadReady == true)
|
||||
{
|
||||
//Start new BackgroundWorker to Transmit
|
||||
BackgroundWorker bwTransmit = new BackgroundWorker();
|
||||
bwTransmit.WorkerReportsProgress = true;
|
||||
bwTransmit.DoWork += new DoWorkEventHandler(bwTransmit_DoWork);
|
||||
bwTransmit.ProgressChanged += new ProgressChangedEventHandler(bwTransmit_ProgressChanged);
|
||||
bwTransmit.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bwTransmit_RunWorkerCompleted);
|
||||
bwTransmit.RunWorkerAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
currentProgress.progressValue = 100;
|
||||
currentProgress.progressState = " ";
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
enableControls();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void bwCreateWad_ProgressChanged(object sender, ProgressChangedEventArgs e)
|
||||
{
|
||||
currentProgress.progressValue = e.ProgressPercentage;
|
||||
currentProgress.progressState = (string)e.UserState;
|
||||
|
||||
this.Invoke(ProgressUpdate);
|
||||
}
|
||||
|
||||
void bwCreateWad_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
BackgroundWorker bwCreateWad = sender as BackgroundWorker;
|
||||
Stopwatch creationTimer = new Stopwatch();
|
||||
creationTimer.Start();
|
||||
|
||||
try
|
||||
{
|
||||
WadCreationInfo wadInfo = (WadCreationInfo)e.Argument;
|
||||
|
||||
|
||||
disableControls();
|
||||
|
||||
//Check Startup IOS
|
||||
if (wadInfo.startupIos < 0 || wadInfo.startupIos > 255)
|
||||
throw new Exception("Startup IOS must be between 0 and 255!");
|
||||
|
||||
wadInfo.success = false;
|
||||
wadInfo.sendWadReady = false;
|
||||
wadCreationInfo = wadInfo;
|
||||
|
||||
//Make TPLs transparent
|
||||
makeBannerTplsTransparent();
|
||||
makeIconTplsTransparent();
|
||||
|
||||
//Pack icon.bin
|
||||
bwCreateWad.ReportProgress(0, "Packing icon.bin...");
|
||||
if (string.IsNullOrEmpty(replacedIcon))
|
||||
{
|
||||
iconBin.AddHeaderImd5();
|
||||
iconBin.Lz77Compress = wadInfo.lz77;
|
||||
|
||||
for (int i = 0; i < sourceWad.BannerApp.NumOfNodes; i++)
|
||||
if (sourceWad.BannerApp.StringTable[i].ToLower() == "icon.bin")
|
||||
{ sourceWad.BannerApp.ReplaceFile(i, iconBin.ToByteArray()); break; }
|
||||
}
|
||||
else
|
||||
{
|
||||
newIconBin.AddHeaderImd5();
|
||||
newIconBin.Lz77Compress = wadInfo.lz77;
|
||||
|
||||
for (int i = 0; i < sourceWad.BannerApp.NumOfNodes; i++)
|
||||
if (sourceWad.BannerApp.StringTable[i].ToLower() == "icon.bin")
|
||||
{ sourceWad.BannerApp.ReplaceFile(i, newIconBin.ToByteArray()); break; }
|
||||
}
|
||||
|
||||
//Pack banner.bin
|
||||
bwCreateWad.ReportProgress(20, "Packing banner.bin...");
|
||||
if (string.IsNullOrEmpty(replacedBanner))
|
||||
{
|
||||
bannerBin.AddHeaderImd5();
|
||||
bannerBin.Lz77Compress = wadInfo.lz77;
|
||||
|
||||
for (int i = 0; i < sourceWad.BannerApp.NumOfNodes; i++)
|
||||
if (sourceWad.BannerApp.StringTable[i].ToLower() == "banner.bin")
|
||||
{ sourceWad.BannerApp.ReplaceFile(i, bannerBin.ToByteArray()); break; }
|
||||
}
|
||||
else
|
||||
{
|
||||
newBannerBin.AddHeaderImd5();
|
||||
bannerBin.Lz77Compress = wadInfo.lz77;
|
||||
|
||||
for (int i = 0; i < sourceWad.BannerApp.NumOfNodes; i++)
|
||||
if (sourceWad.BannerApp.StringTable[i].ToLower() == "banner.bin")
|
||||
{ sourceWad.BannerApp.ReplaceFile(i, newBannerBin.ToByteArray()); break; }
|
||||
}
|
||||
|
||||
//Pack sound.bin
|
||||
bwCreateWad.ReportProgress(40, "Packing sound.bin...");
|
||||
if (!string.IsNullOrEmpty(replacedSound) || !string.IsNullOrEmpty(wadInfo.sound))
|
||||
{
|
||||
for (int i = 0; i < sourceWad.BannerApp.NumOfNodes; i++)
|
||||
if (sourceWad.BannerApp.StringTable[i].ToLower() == "sound.bin")
|
||||
{ sourceWad.BannerApp.ReplaceFile(i, newSoundBin); break; }
|
||||
}
|
||||
|
||||
//Insert new dol
|
||||
if (!string.IsNullOrEmpty(wadInfo.dol))
|
||||
{
|
||||
bwCreateWad.ReportProgress(50, "Inserting DOL...");
|
||||
sourceWad.RemoveAllContents();
|
||||
|
||||
if (wadInfo.nandLoader == WadCreationInfo.NandLoader.comex)
|
||||
{
|
||||
sourceWad.AddContent(Properties.Resources.comex, 1, 1, ContentType.Normal);
|
||||
|
||||
if (wadInfo.dol.StartsWith("Simple Forwarder:"))
|
||||
sourceWad.AddContent(createForwarderSimple(), 2, 2, ContentType.Normal);
|
||||
else if (wadInfo.dol.StartsWith("Complex Forwarder"))
|
||||
{
|
||||
bwCreateWad.ReportProgress(55, "Compiling Forwarder...");
|
||||
sourceWad.AddContent(createForwarderComplex(), 2, 2, ContentType.Normal);
|
||||
}
|
||||
else
|
||||
sourceWad.AddContent(newDol, 2, 2, ContentType.Normal);
|
||||
|
||||
sourceWad.BootIndex = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
sourceWad.AddContent(Properties.Resources.Waninkoko, 2, 2, ContentType.Normal);
|
||||
|
||||
if (wadInfo.dol.StartsWith("Simple Forwarder:"))
|
||||
sourceWad.AddContent(createForwarderSimple(), 1, 1, ContentType.Normal);
|
||||
else if (wadInfo.dol.StartsWith("Complex Forwarder"))
|
||||
{
|
||||
bwCreateWad.ReportProgress(55, "Compiling Forwarder...");
|
||||
sourceWad.AddContent(createForwarderComplex(), 1, 1, ContentType.Normal);
|
||||
}
|
||||
else
|
||||
sourceWad.AddContent(newDol, 1, 1, ContentType.Normal);
|
||||
|
||||
sourceWad.BootIndex = 2;
|
||||
}
|
||||
}
|
||||
|
||||
//Change channel information
|
||||
for (int i = 0; i < wadInfo.titles.Length; i++)
|
||||
if (string.IsNullOrEmpty(wadInfo.titles[i]))
|
||||
wadInfo.titles[i] = wadInfo.allLangTitle;
|
||||
|
||||
bwCreateWad.ReportProgress(75, "Updating Channel Information...");
|
||||
sourceWad.ChangeStartupIOS(wadInfo.startupIos);
|
||||
sourceWad.ChangeChannelTitles(wadInfo.titles);
|
||||
if (!string.IsNullOrEmpty(wadInfo.titleId))
|
||||
sourceWad.ChangeTitleID(LowerTitleID.Channel, wadInfo.titleId);
|
||||
|
||||
sourceWad.FakeSign = true;
|
||||
sourceWad.ChangeTitleKey("GottaGetSomeBeer");
|
||||
|
||||
//Pack WAD
|
||||
bwCreateWad.ReportProgress(80, "Packing WAD...");
|
||||
if (!wadInfo.sendToWii) sourceWad.Save(wadInfo.outFile);
|
||||
else wadInfo.wadFile = sourceWad.ToByteArray();
|
||||
|
||||
bwCreateWad.ReportProgress(100, " ");
|
||||
creationTimer.Stop();
|
||||
|
||||
if (!wadInfo.sendToWii)
|
||||
{
|
||||
FileInfo fi = new FileInfo(wadInfo.outFile);
|
||||
double fileSize = Math.Round(fi.Length * 0.0009765625 * 0.0009765625, 2);
|
||||
|
||||
infoBox(string.Format("Successfully created custom channel!\nTime elapsed: {0} ms\nFilesize: {1} MB\nApprox. Blocks: {2}", creationTimer.ElapsedMilliseconds, fileSize, sourceWad.NandBlocks));
|
||||
}
|
||||
else wadInfo.sendWadReady = true;
|
||||
|
||||
wadCreationInfo = wadInfo;
|
||||
wadCreationInfo.success = true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
wadCreationInfo.sendWadReady = false;
|
||||
creationTimer.Stop();
|
||||
|
||||
enableControls();
|
||||
errorBox(ex.Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
462
CustomizeMii/CustomizeMii_BnsConvert.Designer.cs
generated
462
CustomizeMii/CustomizeMii_BnsConvert.Designer.cs
generated
@ -1,462 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_BnsConvert
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.btnConvert = new System.Windows.Forms.Button();
|
||||
this.lbAudioFile = new System.Windows.Forms.Label();
|
||||
this.tbAudioFile = new System.Windows.Forms.TextBox();
|
||||
this.btnBrowseAudioFile = new System.Windows.Forms.Button();
|
||||
this.gbLoop = new System.Windows.Forms.GroupBox();
|
||||
this.tbarLoopStartSample = new System.Windows.Forms.TrackBar();
|
||||
this.lbStartSample = new System.Windows.Forms.Label();
|
||||
this.tbLoopStart = new System.Windows.Forms.TextBox();
|
||||
this.rbEnterManually = new System.Windows.Forms.RadioButton();
|
||||
this.rbFromAudioFile = new System.Windows.Forms.RadioButton();
|
||||
this.rbNone = new System.Windows.Forms.RadioButton();
|
||||
this.gbWaveInfo = new System.Windows.Forms.GroupBox();
|
||||
this.lbStatusValue = new System.Windows.Forms.Label();
|
||||
this.lbLoopStartValue = new System.Windows.Forms.Label();
|
||||
this.lbLoopCountValue = new System.Windows.Forms.Label();
|
||||
this.lbFormatValue = new System.Windows.Forms.Label();
|
||||
this.lbChannelCountValue = new System.Windows.Forms.Label();
|
||||
this.lbSamplerateValue = new System.Windows.Forms.Label();
|
||||
this.lbBitdepthValue = new System.Windows.Forms.Label();
|
||||
this.lbStatus = new System.Windows.Forms.Label();
|
||||
this.lbLoopStart = new System.Windows.Forms.Label();
|
||||
this.lbLoopCount = new System.Windows.Forms.Label();
|
||||
this.lbFormat = new System.Windows.Forms.Label();
|
||||
this.lbChannelCount = new System.Windows.Forms.Label();
|
||||
this.lbSamplerate = new System.Windows.Forms.Label();
|
||||
this.lbBitdepth = new System.Windows.Forms.Label();
|
||||
this.cbSourceSound = new System.Windows.Forms.CheckBox();
|
||||
this.gbPrelisten = new System.Windows.Forms.GroupBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnPlay = new System.Windows.Forms.Button();
|
||||
this.gbLoop.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tbarLoopStartSample)).BeginInit();
|
||||
this.gbWaveInfo.SuspendLayout();
|
||||
this.gbPrelisten.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(186, 189);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(160, 23);
|
||||
this.btnCancel.TabIndex = 10;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// btnConvert
|
||||
//
|
||||
this.btnConvert.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.btnConvert.Location = new System.Drawing.Point(15, 189);
|
||||
this.btnConvert.Name = "btnConvert";
|
||||
this.btnConvert.Size = new System.Drawing.Size(160, 23);
|
||||
this.btnConvert.TabIndex = 9;
|
||||
this.btnConvert.Text = "Convert";
|
||||
this.btnConvert.UseVisualStyleBackColor = true;
|
||||
this.btnConvert.Click += new System.EventHandler(this.btnConvert_Click);
|
||||
//
|
||||
// lbAudioFile
|
||||
//
|
||||
this.lbAudioFile.AutoSize = true;
|
||||
this.lbAudioFile.Location = new System.Drawing.Point(12, 24);
|
||||
this.lbAudioFile.Name = "lbAudioFile";
|
||||
this.lbAudioFile.Size = new System.Drawing.Size(56, 13);
|
||||
this.lbAudioFile.TabIndex = 11;
|
||||
this.lbAudioFile.Text = "Audio File:";
|
||||
//
|
||||
// tbAudioFile
|
||||
//
|
||||
this.tbAudioFile.Location = new System.Drawing.Point(74, 21);
|
||||
this.tbAudioFile.Name = "tbAudioFile";
|
||||
this.tbAudioFile.ReadOnly = true;
|
||||
this.tbAudioFile.Size = new System.Drawing.Size(191, 20);
|
||||
this.tbAudioFile.TabIndex = 12;
|
||||
//
|
||||
// btnBrowseAudioFile
|
||||
//
|
||||
this.btnBrowseAudioFile.Location = new System.Drawing.Point(271, 20);
|
||||
this.btnBrowseAudioFile.Name = "btnBrowseAudioFile";
|
||||
this.btnBrowseAudioFile.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnBrowseAudioFile.TabIndex = 13;
|
||||
this.btnBrowseAudioFile.Text = "Browse...";
|
||||
this.btnBrowseAudioFile.UseVisualStyleBackColor = true;
|
||||
this.btnBrowseAudioFile.Click += new System.EventHandler(this.btnBrowseAudioFile_Click);
|
||||
//
|
||||
// gbLoop
|
||||
//
|
||||
this.gbLoop.Controls.Add(this.tbarLoopStartSample);
|
||||
this.gbLoop.Controls.Add(this.lbStartSample);
|
||||
this.gbLoop.Controls.Add(this.tbLoopStart);
|
||||
this.gbLoop.Controls.Add(this.rbEnterManually);
|
||||
this.gbLoop.Controls.Add(this.rbFromAudioFile);
|
||||
this.gbLoop.Controls.Add(this.rbNone);
|
||||
this.gbLoop.Location = new System.Drawing.Point(15, 70);
|
||||
this.gbLoop.Name = "gbLoop";
|
||||
this.gbLoop.Size = new System.Drawing.Size(331, 113);
|
||||
this.gbLoop.TabIndex = 14;
|
||||
this.gbLoop.TabStop = false;
|
||||
this.gbLoop.Text = "Loop";
|
||||
//
|
||||
// tbarLoopStartSample
|
||||
//
|
||||
this.tbarLoopStartSample.Enabled = false;
|
||||
this.tbarLoopStartSample.Location = new System.Drawing.Point(107, 62);
|
||||
this.tbarLoopStartSample.Maximum = 1059620;
|
||||
this.tbarLoopStartSample.Name = "tbarLoopStartSample";
|
||||
this.tbarLoopStartSample.Size = new System.Drawing.Size(142, 45);
|
||||
this.tbarLoopStartSample.TabIndex = 3;
|
||||
this.tbarLoopStartSample.TickStyle = System.Windows.Forms.TickStyle.None;
|
||||
this.tbarLoopStartSample.Scroll += new System.EventHandler(this.tbarLoopStartSample_Scroll);
|
||||
//
|
||||
// lbStartSample
|
||||
//
|
||||
this.lbStartSample.AutoSize = true;
|
||||
this.lbStartSample.Location = new System.Drawing.Point(35, 74);
|
||||
this.lbStartSample.Name = "lbStartSample";
|
||||
this.lbStartSample.Size = new System.Drawing.Size(66, 13);
|
||||
this.lbStartSample.TabIndex = 2;
|
||||
this.lbStartSample.Text = "(startsample)";
|
||||
//
|
||||
// tbLoopStart
|
||||
//
|
||||
this.tbLoopStart.Enabled = false;
|
||||
this.tbLoopStart.Location = new System.Drawing.Point(256, 66);
|
||||
this.tbLoopStart.Name = "tbLoopStart";
|
||||
this.tbLoopStart.Size = new System.Drawing.Size(60, 20);
|
||||
this.tbLoopStart.TabIndex = 1;
|
||||
this.tbLoopStart.Text = "0";
|
||||
this.tbLoopStart.TextChanged += new System.EventHandler(this.tbLoopStart_TextChanged);
|
||||
this.tbLoopStart.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbLoopStart_KeyPress);
|
||||
//
|
||||
// rbEnterManually
|
||||
//
|
||||
this.rbEnterManually.AutoSize = true;
|
||||
this.rbEnterManually.Location = new System.Drawing.Point(6, 59);
|
||||
this.rbEnterManually.Name = "rbEnterManually";
|
||||
this.rbEnterManually.Size = new System.Drawing.Size(95, 17);
|
||||
this.rbEnterManually.TabIndex = 0;
|
||||
this.rbEnterManually.Text = "Enter Manually";
|
||||
this.rbEnterManually.UseVisualStyleBackColor = true;
|
||||
this.rbEnterManually.CheckedChanged += new System.EventHandler(this.rbSelectionChanged);
|
||||
//
|
||||
// rbFromAudioFile
|
||||
//
|
||||
this.rbFromAudioFile.AutoSize = true;
|
||||
this.rbFromAudioFile.Enabled = false;
|
||||
this.rbFromAudioFile.Location = new System.Drawing.Point(6, 39);
|
||||
this.rbFromAudioFile.Name = "rbFromAudioFile";
|
||||
this.rbFromAudioFile.Size = new System.Drawing.Size(281, 17);
|
||||
this.rbFromAudioFile.TabIndex = 0;
|
||||
this.rbFromAudioFile.Text = "From Audio File (only works with pre-looped wave files)";
|
||||
this.rbFromAudioFile.UseVisualStyleBackColor = true;
|
||||
this.rbFromAudioFile.CheckedChanged += new System.EventHandler(this.rbSelectionChanged);
|
||||
//
|
||||
// rbNone
|
||||
//
|
||||
this.rbNone.AutoSize = true;
|
||||
this.rbNone.Checked = true;
|
||||
this.rbNone.Location = new System.Drawing.Point(6, 19);
|
||||
this.rbNone.Name = "rbNone";
|
||||
this.rbNone.Size = new System.Drawing.Size(51, 17);
|
||||
this.rbNone.TabIndex = 0;
|
||||
this.rbNone.TabStop = true;
|
||||
this.rbNone.Text = "None";
|
||||
this.rbNone.UseVisualStyleBackColor = true;
|
||||
this.rbNone.CheckedChanged += new System.EventHandler(this.rbSelectionChanged);
|
||||
//
|
||||
// gbWaveInfo
|
||||
//
|
||||
this.gbWaveInfo.Controls.Add(this.lbStatusValue);
|
||||
this.gbWaveInfo.Controls.Add(this.lbLoopStartValue);
|
||||
this.gbWaveInfo.Controls.Add(this.lbLoopCountValue);
|
||||
this.gbWaveInfo.Controls.Add(this.lbFormatValue);
|
||||
this.gbWaveInfo.Controls.Add(this.lbChannelCountValue);
|
||||
this.gbWaveInfo.Controls.Add(this.lbSamplerateValue);
|
||||
this.gbWaveInfo.Controls.Add(this.lbBitdepthValue);
|
||||
this.gbWaveInfo.Controls.Add(this.lbStatus);
|
||||
this.gbWaveInfo.Controls.Add(this.lbLoopStart);
|
||||
this.gbWaveInfo.Controls.Add(this.lbLoopCount);
|
||||
this.gbWaveInfo.Controls.Add(this.lbFormat);
|
||||
this.gbWaveInfo.Controls.Add(this.lbChannelCount);
|
||||
this.gbWaveInfo.Controls.Add(this.lbSamplerate);
|
||||
this.gbWaveInfo.Controls.Add(this.lbBitdepth);
|
||||
this.gbWaveInfo.Location = new System.Drawing.Point(363, 20);
|
||||
this.gbWaveInfo.Name = "gbWaveInfo";
|
||||
this.gbWaveInfo.Size = new System.Drawing.Size(135, 192);
|
||||
this.gbWaveInfo.TabIndex = 15;
|
||||
this.gbWaveInfo.TabStop = false;
|
||||
this.gbWaveInfo.Text = "Wave Info";
|
||||
//
|
||||
// lbStatusValue
|
||||
//
|
||||
this.lbStatusValue.Location = new System.Drawing.Point(75, 157);
|
||||
this.lbStatusValue.Name = "lbStatusValue";
|
||||
this.lbStatusValue.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbStatusValue.TabIndex = 7;
|
||||
//
|
||||
// lbLoopStartValue
|
||||
//
|
||||
this.lbLoopStartValue.Location = new System.Drawing.Point(75, 135);
|
||||
this.lbLoopStartValue.Name = "lbLoopStartValue";
|
||||
this.lbLoopStartValue.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbLoopStartValue.TabIndex = 7;
|
||||
//
|
||||
// lbLoopCountValue
|
||||
//
|
||||
this.lbLoopCountValue.Location = new System.Drawing.Point(75, 113);
|
||||
this.lbLoopCountValue.Name = "lbLoopCountValue";
|
||||
this.lbLoopCountValue.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbLoopCountValue.TabIndex = 7;
|
||||
//
|
||||
// lbFormatValue
|
||||
//
|
||||
this.lbFormatValue.Location = new System.Drawing.Point(75, 91);
|
||||
this.lbFormatValue.Name = "lbFormatValue";
|
||||
this.lbFormatValue.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbFormatValue.TabIndex = 7;
|
||||
//
|
||||
// lbChannelCountValue
|
||||
//
|
||||
this.lbChannelCountValue.Location = new System.Drawing.Point(75, 69);
|
||||
this.lbChannelCountValue.Name = "lbChannelCountValue";
|
||||
this.lbChannelCountValue.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbChannelCountValue.TabIndex = 7;
|
||||
//
|
||||
// lbSamplerateValue
|
||||
//
|
||||
this.lbSamplerateValue.Location = new System.Drawing.Point(75, 47);
|
||||
this.lbSamplerateValue.Name = "lbSamplerateValue";
|
||||
this.lbSamplerateValue.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbSamplerateValue.TabIndex = 7;
|
||||
//
|
||||
// lbBitdepthValue
|
||||
//
|
||||
this.lbBitdepthValue.Location = new System.Drawing.Point(75, 25);
|
||||
this.lbBitdepthValue.Name = "lbBitdepthValue";
|
||||
this.lbBitdepthValue.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbBitdepthValue.TabIndex = 7;
|
||||
//
|
||||
// lbStatus
|
||||
//
|
||||
this.lbStatus.AutoSize = true;
|
||||
this.lbStatus.Location = new System.Drawing.Point(6, 157);
|
||||
this.lbStatus.Name = "lbStatus";
|
||||
this.lbStatus.Size = new System.Drawing.Size(40, 13);
|
||||
this.lbStatus.TabIndex = 6;
|
||||
this.lbStatus.Text = "Status:";
|
||||
//
|
||||
// lbLoopStart
|
||||
//
|
||||
this.lbLoopStart.AutoSize = true;
|
||||
this.lbLoopStart.Location = new System.Drawing.Point(6, 135);
|
||||
this.lbLoopStart.Name = "lbLoopStart";
|
||||
this.lbLoopStart.Size = new System.Drawing.Size(59, 13);
|
||||
this.lbLoopStart.TabIndex = 5;
|
||||
this.lbLoopStart.Text = "Loop Start:";
|
||||
//
|
||||
// lbLoopCount
|
||||
//
|
||||
this.lbLoopCount.AutoSize = true;
|
||||
this.lbLoopCount.Location = new System.Drawing.Point(6, 113);
|
||||
this.lbLoopCount.Name = "lbLoopCount";
|
||||
this.lbLoopCount.Size = new System.Drawing.Size(39, 13);
|
||||
this.lbLoopCount.TabIndex = 4;
|
||||
this.lbLoopCount.Text = "Loops:";
|
||||
//
|
||||
// lbFormat
|
||||
//
|
||||
this.lbFormat.AutoSize = true;
|
||||
this.lbFormat.Location = new System.Drawing.Point(6, 91);
|
||||
this.lbFormat.Name = "lbFormat";
|
||||
this.lbFormat.Size = new System.Drawing.Size(42, 13);
|
||||
this.lbFormat.TabIndex = 3;
|
||||
this.lbFormat.Text = "Format:";
|
||||
//
|
||||
// lbChannelCount
|
||||
//
|
||||
this.lbChannelCount.AutoSize = true;
|
||||
this.lbChannelCount.Location = new System.Drawing.Point(6, 69);
|
||||
this.lbChannelCount.Name = "lbChannelCount";
|
||||
this.lbChannelCount.Size = new System.Drawing.Size(54, 13);
|
||||
this.lbChannelCount.TabIndex = 2;
|
||||
this.lbChannelCount.Text = "Channels:";
|
||||
//
|
||||
// lbSamplerate
|
||||
//
|
||||
this.lbSamplerate.AutoSize = true;
|
||||
this.lbSamplerate.Location = new System.Drawing.Point(6, 47);
|
||||
this.lbSamplerate.Name = "lbSamplerate";
|
||||
this.lbSamplerate.Size = new System.Drawing.Size(63, 13);
|
||||
this.lbSamplerate.TabIndex = 1;
|
||||
this.lbSamplerate.Text = "Samplerate:";
|
||||
//
|
||||
// lbBitdepth
|
||||
//
|
||||
this.lbBitdepth.AutoSize = true;
|
||||
this.lbBitdepth.Location = new System.Drawing.Point(6, 25);
|
||||
this.lbBitdepth.Name = "lbBitdepth";
|
||||
this.lbBitdepth.Size = new System.Drawing.Size(49, 13);
|
||||
this.lbBitdepth.TabIndex = 0;
|
||||
this.lbBitdepth.Text = "Bitdepth:";
|
||||
//
|
||||
// cbSourceSound
|
||||
//
|
||||
this.cbSourceSound.AutoSize = true;
|
||||
this.cbSourceSound.Enabled = false;
|
||||
this.cbSourceSound.Location = new System.Drawing.Point(15, 48);
|
||||
this.cbSourceSound.Name = "cbSourceSound";
|
||||
this.cbSourceSound.Size = new System.Drawing.Size(170, 17);
|
||||
this.cbSourceSound.TabIndex = 16;
|
||||
this.cbSourceSound.Text = "Take sound from source WAD";
|
||||
this.cbSourceSound.UseVisualStyleBackColor = true;
|
||||
this.cbSourceSound.CheckedChanged += new System.EventHandler(this.cbSourceSound_CheckedChanged);
|
||||
//
|
||||
// gbPrelisten
|
||||
//
|
||||
this.gbPrelisten.Controls.Add(this.label1);
|
||||
this.gbPrelisten.Controls.Add(this.btnPlay);
|
||||
this.gbPrelisten.Location = new System.Drawing.Point(519, 20);
|
||||
this.gbPrelisten.Name = "gbPrelisten";
|
||||
this.gbPrelisten.Size = new System.Drawing.Size(135, 192);
|
||||
this.gbPrelisten.TabIndex = 17;
|
||||
this.gbPrelisten.TabStop = false;
|
||||
this.gbPrelisten.Text = "Prelisten Loop";
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(6, 25);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(123, 118);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Note:\r\n\r\nYou will only hear the looped part, not the part before.\r\nAlso, the Loop" +
|
||||
" might be inaccurate (only a few samples)";
|
||||
//
|
||||
// btnPlay
|
||||
//
|
||||
this.btnPlay.Location = new System.Drawing.Point(6, 156);
|
||||
this.btnPlay.Name = "btnPlay";
|
||||
this.btnPlay.Size = new System.Drawing.Size(123, 23);
|
||||
this.btnPlay.TabIndex = 13;
|
||||
this.btnPlay.Text = "Play Loop";
|
||||
this.btnPlay.UseVisualStyleBackColor = true;
|
||||
this.btnPlay.Click += new System.EventHandler(this.btnPlay_Click);
|
||||
//
|
||||
// CustomizeMii_BnsConvert
|
||||
//
|
||||
this.AcceptButton = this.btnConvert;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(674, 230);
|
||||
this.Controls.Add(this.gbPrelisten);
|
||||
this.Controls.Add(this.cbSourceSound);
|
||||
this.Controls.Add(this.gbWaveInfo);
|
||||
this.Controls.Add(this.gbLoop);
|
||||
this.Controls.Add(this.btnBrowseAudioFile);
|
||||
this.Controls.Add(this.tbAudioFile);
|
||||
this.Controls.Add(this.lbAudioFile);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnConvert);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "CustomizeMii_BnsConvert";
|
||||
this.Text = "CustomizeMii_BnsConvert";
|
||||
this.Load += new System.EventHandler(this.CustomizeMii_BnsConvert_Load);
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CustomizeMii_BnsConvert_FormClosing);
|
||||
this.gbLoop.ResumeLayout(false);
|
||||
this.gbLoop.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.tbarLoopStartSample)).EndInit();
|
||||
this.gbWaveInfo.ResumeLayout(false);
|
||||
this.gbWaveInfo.PerformLayout();
|
||||
this.gbPrelisten.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.Button btnConvert;
|
||||
private System.Windows.Forms.Label lbAudioFile;
|
||||
private System.Windows.Forms.TextBox tbAudioFile;
|
||||
private System.Windows.Forms.Button btnBrowseAudioFile;
|
||||
private System.Windows.Forms.GroupBox gbLoop;
|
||||
private System.Windows.Forms.RadioButton rbNone;
|
||||
private System.Windows.Forms.RadioButton rbEnterManually;
|
||||
private System.Windows.Forms.RadioButton rbFromAudioFile;
|
||||
private System.Windows.Forms.TextBox tbLoopStart;
|
||||
private System.Windows.Forms.GroupBox gbWaveInfo;
|
||||
private System.Windows.Forms.Label lbBitdepth;
|
||||
private System.Windows.Forms.Label lbSamplerate;
|
||||
private System.Windows.Forms.Label lbChannelCount;
|
||||
private System.Windows.Forms.Label lbFormat;
|
||||
private System.Windows.Forms.Label lbLoopCount;
|
||||
private System.Windows.Forms.Label lbLoopStart;
|
||||
private System.Windows.Forms.Label lbStatus;
|
||||
private System.Windows.Forms.Label lbStatusValue;
|
||||
private System.Windows.Forms.Label lbLoopStartValue;
|
||||
private System.Windows.Forms.Label lbLoopCountValue;
|
||||
private System.Windows.Forms.Label lbFormatValue;
|
||||
private System.Windows.Forms.Label lbChannelCountValue;
|
||||
private System.Windows.Forms.Label lbSamplerateValue;
|
||||
private System.Windows.Forms.Label lbBitdepthValue;
|
||||
private System.Windows.Forms.CheckBox cbSourceSound;
|
||||
private System.Windows.Forms.GroupBox gbPrelisten;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnPlay;
|
||||
private System.Windows.Forms.Label lbStartSample;
|
||||
private System.Windows.Forms.TrackBar tbarLoopStartSample;
|
||||
|
||||
}
|
||||
}
|
@ -1,428 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.ComponentModel;
|
||||
using System.Media;
|
||||
using libWiiSharp;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
public partial class CustomizeMii_BnsConvert : Form
|
||||
{
|
||||
private bool lameExists;
|
||||
private int loopStartSample;
|
||||
private BackgroundWorker bwGatherInfo;
|
||||
private int bitDepth;
|
||||
private int sampleRate;
|
||||
private int channelCount;
|
||||
private int dataFormat;
|
||||
private int loopCount;
|
||||
private int loopStart;
|
||||
private bool error = false;
|
||||
private bool cancelled = false;
|
||||
private int sampleCount;
|
||||
private SoundPlayer sPlayer;
|
||||
private bool mp3LengthKnown = false;
|
||||
private byte[] sourceSound = new byte[0];
|
||||
|
||||
public string AudioFile { get { return tbAudioFile.Text; } }
|
||||
public bool LoopNone { get { return rbNone.Checked; } }
|
||||
public bool LoopFromAudio { get { return rbFromAudioFile.Checked; } }
|
||||
public bool LoopManually { get { return rbEnterManually.Checked; } }
|
||||
public int LoopStartSample { get { return loopStartSample; } }
|
||||
public int ChannelCount { get { return channelCount; } }
|
||||
public byte[] SourceSound { get { return sourceSound; } set { sourceSound = value; } }
|
||||
|
||||
public CustomizeMii_BnsConvert(bool lameExists)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.lameExists = lameExists;
|
||||
}
|
||||
|
||||
private void CustomizeMii_BnsConvert_Load(object sender, EventArgs e)
|
||||
{
|
||||
//this.Size = new System.Drawing.Size(358, 220);
|
||||
this.Size = new System.Drawing.Size(btnCancel.Location.X + btnCancel.Size.Width + 15, this.Size.Height);
|
||||
|
||||
this.CenterToParent();
|
||||
|
||||
bwGatherInfo = new BackgroundWorker();
|
||||
bwGatherInfo.WorkerSupportsCancellation = true;
|
||||
bwGatherInfo.DoWork += new DoWorkEventHandler(bwGatherInfo_DoWork);
|
||||
|
||||
if (sourceSound[0] == 'R' && sourceSound[1] == 'I' && sourceSound[2] == 'F' && sourceSound[3] == 'F')
|
||||
{ cbSourceSound.Enabled = true; }
|
||||
else if (sourceSound[0] == 'L' && sourceSound[1] == 'Z' && sourceSound[2] == '7' && sourceSound[3] == '7')
|
||||
if (sourceSound[9] == 'R' && sourceSound[10] == 'I' && sourceSound[11] == 'F' && sourceSound[12] == 'F')
|
||||
{ cbSourceSound.Enabled = true; }
|
||||
}
|
||||
|
||||
private void CustomizeMii_BnsConvert_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
cancelled = true;
|
||||
|
||||
if (bwGatherInfo.IsBusy)
|
||||
bwGatherInfo.CancelAsync();
|
||||
}
|
||||
|
||||
private void rbSelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
tbLoopStart.Enabled = rbEnterManually.Checked;
|
||||
if (tbAudioFile.Text.ToLower().EndsWith(".mp3")) { tbarLoopStartSample.Enabled = (rbEnterManually.Checked && mp3LengthKnown); }
|
||||
else { tbarLoopStartSample.Enabled = rbEnterManually.Checked; }
|
||||
|
||||
if (!rbNone.Checked && this.Size.Width > 400)
|
||||
this.Size = new System.Drawing.Size(gbPrelisten.Location.X + gbPrelisten.Size.Width + 15, this.Size.Height);
|
||||
else if (rbNone.Checked && this.Size.Width > 400)
|
||||
this.Size = new System.Drawing.Size(gbWaveInfo.Location.X + gbWaveInfo.Size.Width + 15, this.Size.Height);
|
||||
|
||||
}
|
||||
|
||||
private void tbLoopStart_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = !char.IsDigit(e.KeyChar) && e.KeyChar != '\b';
|
||||
}
|
||||
|
||||
private void btnConvert_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!File.Exists(tbAudioFile.Text) && tbAudioFile.Text != "Internal Sound")
|
||||
{
|
||||
tbAudioFile.Focus();
|
||||
tbAudioFile.SelectAll();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!int.TryParse(tbLoopStart.Text, out loopStartSample))
|
||||
{
|
||||
tbLoopStart.Focus();
|
||||
tbLoopStart.SelectAll();
|
||||
}
|
||||
|
||||
if (this.sPlayer != null) { this.sPlayer.Stop(); this.sPlayer.Dispose(); }
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.sPlayer != null) { this.sPlayer.Stop(); this.sPlayer.Dispose(); }
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void cbSourceSound_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cbSourceSound.Checked)
|
||||
{
|
||||
tbAudioFile.Text = "Internal Sound";
|
||||
|
||||
if (Lz77.IsLz77Compressed(sourceSound))
|
||||
{ Lz77 l = new Lz77(); sourceSound = l.Decompress(sourceSound); }
|
||||
|
||||
foreach (Label thisLabel in gbWaveInfo.Controls)
|
||||
if (thisLabel.Name.ToLower().Contains("value"))
|
||||
{
|
||||
thisLabel.ForeColor = System.Drawing.Color.Black;
|
||||
thisLabel.Text = "Gathering";
|
||||
}
|
||||
|
||||
bwGatherInfo.RunWorkerAsync(sourceSound);
|
||||
|
||||
//this.Size = new System.Drawing.Size(510, 220);
|
||||
this.Size = new System.Drawing.Size(gbWaveInfo.Location.X + gbWaveInfo.Size.Width + 15, this.Size.Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tbAudioFile.Text == "Internal Sound")
|
||||
tbAudioFile.Text = string.Empty;
|
||||
|
||||
//this.Size = new System.Drawing.Size(358, 220);
|
||||
this.Size = new System.Drawing.Size(btnCancel.Location.X + btnCancel.Size.Width + 15, this.Size.Height);
|
||||
}
|
||||
}
|
||||
|
||||
private void btnBrowseAudioFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
if (lameExists)
|
||||
{ ofd.Filter = "Wave|*.wav|MP3|*.mp3|All|*.wav;*.mp3"; ofd.FilterIndex = 3; }
|
||||
else
|
||||
{ ofd.Filter = "Wave|*.wav"; }
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (ofd.FileName != tbAudioFile.Text)
|
||||
{
|
||||
btnConvert.Enabled = false;
|
||||
tbarLoopStartSample.Enabled = false;
|
||||
mp3LengthKnown = false;
|
||||
|
||||
cbSourceSound.Checked = false;
|
||||
tbAudioFile.Text = ofd.FileName;
|
||||
|
||||
if (ofd.FileName.EndsWith(".wav"))
|
||||
{
|
||||
rbFromAudioFile.Enabled = true;
|
||||
|
||||
foreach (Label thisLabel in gbWaveInfo.Controls)
|
||||
if (thisLabel.Name.ToLower().Contains("value"))
|
||||
{
|
||||
thisLabel.ForeColor = System.Drawing.Color.Black;
|
||||
thisLabel.Text = "Gathering";
|
||||
}
|
||||
|
||||
bwGatherInfo.RunWorkerAsync(ofd.FileName);
|
||||
|
||||
this.Size = new System.Drawing.Size(gbWaveInfo.Location.X + gbWaveInfo.Size.Width + 15, this.Size.Height);
|
||||
}
|
||||
else if (ofd.FileName.EndsWith(".mp3"))
|
||||
{
|
||||
channelCount = 0;
|
||||
btnConvert.Enabled = true;
|
||||
|
||||
if (rbFromAudioFile.Checked) rbNone.Checked = true;
|
||||
rbFromAudioFile.Enabled = false;
|
||||
|
||||
this.Size = new System.Drawing.Size(btnCancel.Location.X + btnCancel.Size.Width + 15, this.Size.Height);
|
||||
|
||||
try
|
||||
{
|
||||
MP3Info mp3Info = new MP3Info(ofd.FileName);
|
||||
tbarLoopStartSample.Maximum = mp3Info.AudioSamples;
|
||||
mp3LengthKnown = true;
|
||||
if (rbEnterManually.Checked) tbarLoopStartSample.Enabled = true;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void bwGatherInfo_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
EventHandler UpdateValues = new EventHandler(this.UpdateValues);
|
||||
|
||||
try
|
||||
{
|
||||
Wave wave;
|
||||
if (e.Argument is byte[])
|
||||
{ wave = new Wave((byte[])e.Argument); }
|
||||
else
|
||||
{ wave = new Wave((string)e.Argument); }
|
||||
|
||||
try { this.sampleCount = wave.NumSamples; }
|
||||
catch { }
|
||||
|
||||
try { bitDepth = wave.BitDepth; }
|
||||
catch { bitDepth = -1; }
|
||||
|
||||
try { sampleRate = wave.SampleRate; }
|
||||
catch { sampleRate = -1; }
|
||||
|
||||
try { channelCount = wave.NumChannels; }
|
||||
catch { channelCount = -1; }
|
||||
|
||||
try { dataFormat = wave.DataFormat; }
|
||||
catch { dataFormat = -1; }
|
||||
|
||||
try { loopCount = wave.NumLoops; }
|
||||
catch { loopCount = -1; }
|
||||
|
||||
try { loopStart = wave.LoopStart; }
|
||||
catch { loopStart = -1; }
|
||||
|
||||
if (!cancelled)
|
||||
this.Invoke(UpdateValues);
|
||||
}
|
||||
catch
|
||||
{
|
||||
error = true;
|
||||
|
||||
if (!cancelled)
|
||||
this.Invoke(UpdateValues);
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateValues(object sender, EventArgs e)
|
||||
{
|
||||
if (error == true)
|
||||
{
|
||||
foreach (Label thisLabel in gbWaveInfo.Controls)
|
||||
if (thisLabel.Name.ToLower().Contains("value"))
|
||||
{
|
||||
thisLabel.Text = "Error";
|
||||
thisLabel.ForeColor = System.Drawing.Color.Red;
|
||||
}
|
||||
|
||||
error = false;
|
||||
return;
|
||||
}
|
||||
|
||||
bool statusOk = true;
|
||||
tbarLoopStartSample.Maximum = this.sampleCount;
|
||||
if (rbEnterManually.Checked) tbarLoopStartSample.Enabled = true;
|
||||
|
||||
if (bitDepth == -1) lbBitdepthValue.Text = "Error";
|
||||
else lbBitdepthValue.Text = bitDepth.ToString();
|
||||
|
||||
if (sampleRate == -1) lbSamplerateValue.Text = "Error";
|
||||
else lbSamplerateValue.Text = sampleRate.ToString();
|
||||
|
||||
if (dataFormat == -1) lbFormatValue.Text = "Error";
|
||||
else if (dataFormat == 1) lbFormatValue.Text = "1 (PCM)";
|
||||
else lbFormatValue.Text = dataFormat.ToString();
|
||||
|
||||
if (channelCount == -1) lbChannelCountValue.Text = "Error";
|
||||
else if (channelCount == 1) lbChannelCountValue.Text = "1 (Mono)";
|
||||
else if (channelCount == 2) lbChannelCountValue.Text = "2 (Stereo)";
|
||||
else lbChannelCountValue.Text = channelCount.ToString();
|
||||
|
||||
if (loopCount == -1) lbLoopCountValue.Text = "Error";
|
||||
else lbLoopCountValue.Text = loopCount.ToString();
|
||||
|
||||
if (loopCount == -1) lbLoopStartValue.Text = "Error";
|
||||
else if (loopCount == 1) { lbLoopStartValue.Text = loopStart == -1 ? "Error" : loopStart.ToString(); }
|
||||
else lbLoopStartValue.Text = "-";
|
||||
|
||||
|
||||
|
||||
if (lbBitdepthValue.Text == "Error" || bitDepth != 16)
|
||||
{
|
||||
lbBitdepthValue.ForeColor = System.Drawing.Color.Red;
|
||||
statusOk = false;
|
||||
}
|
||||
else lbBitdepthValue.ForeColor = System.Drawing.Color.Green;
|
||||
|
||||
if (lbSamplerateValue.Text == "Error")
|
||||
{
|
||||
lbSamplerateValue.ForeColor = System.Drawing.Color.Red;
|
||||
statusOk = false;
|
||||
}
|
||||
else lbSamplerateValue.ForeColor = System.Drawing.Color.Green;
|
||||
|
||||
if (lbFormatValue.Text == "Error" || dataFormat != 1)
|
||||
{
|
||||
lbFormatValue.ForeColor = System.Drawing.Color.Red;
|
||||
statusOk = false;
|
||||
}
|
||||
else lbFormatValue.ForeColor = System.Drawing.Color.Green;
|
||||
|
||||
if (lbChannelCountValue.Text == "Error" || (channelCount > 2 || channelCount < 1))
|
||||
{
|
||||
lbChannelCountValue.ForeColor = System.Drawing.Color.Red;
|
||||
statusOk = false;
|
||||
}
|
||||
else lbChannelCountValue.ForeColor = System.Drawing.Color.Green;
|
||||
|
||||
if (lbLoopCountValue.Text == "Error" || loopCount > 1)
|
||||
lbLoopCountValue.ForeColor = System.Drawing.Color.Orange;
|
||||
else lbLoopCountValue.ForeColor = System.Drawing.Color.Green;
|
||||
|
||||
if (lbLoopStartValue.Text == "Error" || lbLoopStartValue.Text == "-")
|
||||
lbLoopStartValue.ForeColor = System.Drawing.Color.Orange;
|
||||
else lbLoopStartValue.ForeColor = System.Drawing.Color.Green;
|
||||
|
||||
if (!statusOk)
|
||||
{
|
||||
lbStatusValue.Text = "Not OK!";
|
||||
lbStatusValue.ForeColor = System.Drawing.Color.Red;
|
||||
|
||||
btnConvert.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
btnConvert.Enabled = true;
|
||||
|
||||
if (lbLoopCountValue.ForeColor == System.Drawing.Color.Orange ||
|
||||
lbLoopStartValue.ForeColor == System.Drawing.Color.Orange)
|
||||
{
|
||||
lbStatusValue.Text = "No Loop!";
|
||||
lbStatusValue.ForeColor = System.Drawing.Color.Orange;
|
||||
|
||||
if (rbFromAudioFile.Checked) rbNone.Checked = true;
|
||||
rbFromAudioFile.Enabled = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
rbFromAudioFile.Enabled = true;
|
||||
|
||||
lbStatusValue.Text = "OK!";
|
||||
lbStatusValue.ForeColor = System.Drawing.Color.Green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void btnPlay_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (btnPlay.Text == "Stop")
|
||||
{
|
||||
if (sPlayer != null)
|
||||
{
|
||||
sPlayer.Stop();
|
||||
sPlayer = null;
|
||||
|
||||
btnPlay.Text = "Play Loop";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
int loopStart = rbFromAudioFile.Checked ? int.Parse(lbLoopStartValue.Text) : int.Parse(tbLoopStart.Text);
|
||||
|
||||
Wave wave;
|
||||
if (cbSourceSound.Checked)
|
||||
wave = new Wave(sourceSound);
|
||||
else
|
||||
wave = new Wave(tbAudioFile.Text);
|
||||
|
||||
wave.TrimStart(loopStart);
|
||||
MemoryStream waveFile = wave.ToMemoryStream();
|
||||
wave.Dispose();
|
||||
|
||||
waveFile.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
sPlayer = new SoundPlayer(waveFile);
|
||||
sPlayer.PlayLooping();
|
||||
|
||||
btnPlay.Text = "Stop";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
sPlayer = null;
|
||||
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tbarLoopStartSample_Scroll(object sender, EventArgs e)
|
||||
{
|
||||
try { tbLoopStart.Text = tbarLoopStartSample.Value.ToString(); }
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void tbLoopStart_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (tbarLoopStartSample.Enabled)
|
||||
try { tbarLoopStartSample.Value = int.Parse(tbLoopStart.Text); }
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
524
CustomizeMii/CustomizeMii_ComplexForwarder.Designer.cs
generated
524
CustomizeMii/CustomizeMii_ComplexForwarder.Designer.cs
generated
@ -1,524 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_ComplexForwarder
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tb1 = new System.Windows.Forms.TextBox();
|
||||
this.cbImage43 = new System.Windows.Forms.CheckBox();
|
||||
this.cbImage169 = new System.Windows.Forms.CheckBox();
|
||||
this.tbImage43 = new System.Windows.Forms.TextBox();
|
||||
this.tbImage169 = new System.Windows.Forms.TextBox();
|
||||
this.btnBrowseImage43 = new System.Windows.Forms.Button();
|
||||
this.btnBrowseImage169 = new System.Windows.Forms.Button();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.tb2 = new System.Windows.Forms.TextBox();
|
||||
this.tb3 = new System.Windows.Forms.TextBox();
|
||||
this.tb4 = new System.Windows.Forms.TextBox();
|
||||
this.tabPaths = new System.Windows.Forms.TabControl();
|
||||
this.tabRequired = new System.Windows.Forms.TabPage();
|
||||
this.tabOptional1 = new System.Windows.Forms.TabPage();
|
||||
this.cbPack1 = new System.Windows.Forms.CheckBox();
|
||||
this.tb5 = new System.Windows.Forms.TextBox();
|
||||
this.tb6 = new System.Windows.Forms.TextBox();
|
||||
this.tb7 = new System.Windows.Forms.TextBox();
|
||||
this.tb8 = new System.Windows.Forms.TextBox();
|
||||
this.tabOptional2 = new System.Windows.Forms.TabPage();
|
||||
this.cbPack2 = new System.Windows.Forms.CheckBox();
|
||||
this.tb9 = new System.Windows.Forms.TextBox();
|
||||
this.tb10 = new System.Windows.Forms.TextBox();
|
||||
this.tb11 = new System.Windows.Forms.TextBox();
|
||||
this.tb12 = new System.Windows.Forms.TextBox();
|
||||
this.tabOptional3 = new System.Windows.Forms.TabPage();
|
||||
this.cbPack3 = new System.Windows.Forms.CheckBox();
|
||||
this.tb13 = new System.Windows.Forms.TextBox();
|
||||
this.tb14 = new System.Windows.Forms.TextBox();
|
||||
this.tb15 = new System.Windows.Forms.TextBox();
|
||||
this.tb16 = new System.Windows.Forms.TextBox();
|
||||
this.tabPaths.SuspendLayout();
|
||||
this.tabRequired.SuspendLayout();
|
||||
this.tabOptional1.SuspendLayout();
|
||||
this.tabOptional2.SuspendLayout();
|
||||
this.tabOptional3.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tb1
|
||||
//
|
||||
this.tb1.Location = new System.Drawing.Point(6, 17);
|
||||
this.tb1.Name = "tb1";
|
||||
this.tb1.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb1.TabIndex = 1;
|
||||
this.tb1.Text = "SD:/apps/example/boot.dol";
|
||||
this.tb1.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// cbImage43
|
||||
//
|
||||
this.cbImage43.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.cbImage43.AutoSize = true;
|
||||
this.cbImage43.Location = new System.Drawing.Point(15, 282);
|
||||
this.cbImage43.Name = "cbImage43";
|
||||
this.cbImage43.Size = new System.Drawing.Size(73, 17);
|
||||
this.cbImage43.TabIndex = 3;
|
||||
this.cbImage43.Text = "Image 4:3";
|
||||
this.cbImage43.UseVisualStyleBackColor = true;
|
||||
this.cbImage43.CheckedChanged += new System.EventHandler(this.cbImage43_CheckedChanged);
|
||||
//
|
||||
// cbImage169
|
||||
//
|
||||
this.cbImage169.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.cbImage169.AutoSize = true;
|
||||
this.cbImage169.Location = new System.Drawing.Point(15, 312);
|
||||
this.cbImage169.Name = "cbImage169";
|
||||
this.cbImage169.Size = new System.Drawing.Size(79, 17);
|
||||
this.cbImage169.TabIndex = 3;
|
||||
this.cbImage169.Text = "Image 16:9";
|
||||
this.cbImage169.UseVisualStyleBackColor = true;
|
||||
this.cbImage169.CheckedChanged += new System.EventHandler(this.cbImage169_CheckedChanged);
|
||||
//
|
||||
// tbImage43
|
||||
//
|
||||
this.tbImage43.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.tbImage43.Enabled = false;
|
||||
this.tbImage43.Location = new System.Drawing.Point(94, 280);
|
||||
this.tbImage43.Name = "tbImage43";
|
||||
this.tbImage43.ReadOnly = true;
|
||||
this.tbImage43.Size = new System.Drawing.Size(171, 20);
|
||||
this.tbImage43.TabIndex = 4;
|
||||
//
|
||||
// tbImage169
|
||||
//
|
||||
this.tbImage169.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.tbImage169.Enabled = false;
|
||||
this.tbImage169.Location = new System.Drawing.Point(94, 309);
|
||||
this.tbImage169.Name = "tbImage169";
|
||||
this.tbImage169.ReadOnly = true;
|
||||
this.tbImage169.Size = new System.Drawing.Size(171, 20);
|
||||
this.tbImage169.TabIndex = 5;
|
||||
//
|
||||
// btnBrowseImage43
|
||||
//
|
||||
this.btnBrowseImage43.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnBrowseImage43.Enabled = false;
|
||||
this.btnBrowseImage43.Location = new System.Drawing.Point(271, 280);
|
||||
this.btnBrowseImage43.Name = "btnBrowseImage43";
|
||||
this.btnBrowseImage43.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnBrowseImage43.TabIndex = 6;
|
||||
this.btnBrowseImage43.Text = "Browse...";
|
||||
this.btnBrowseImage43.UseVisualStyleBackColor = true;
|
||||
this.btnBrowseImage43.Click += new System.EventHandler(this.btnBrowse_Click);
|
||||
//
|
||||
// btnBrowseImage169
|
||||
//
|
||||
this.btnBrowseImage169.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnBrowseImage169.Enabled = false;
|
||||
this.btnBrowseImage169.Location = new System.Drawing.Point(271, 309);
|
||||
this.btnBrowseImage169.Name = "btnBrowseImage169";
|
||||
this.btnBrowseImage169.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnBrowseImage169.TabIndex = 6;
|
||||
this.btnBrowseImage169.Text = "Browse...";
|
||||
this.btnBrowseImage169.UseVisualStyleBackColor = true;
|
||||
this.btnBrowseImage169.Click += new System.EventHandler(this.btnBrowse_Click);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.label1.Location = new System.Drawing.Point(0, 232);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(358, 40);
|
||||
this.label1.TabIndex = 7;
|
||||
this.label1.Text = "The images must be 640 x 480, else they will be resized!\r\nThe 16:9 image should b" +
|
||||
"e made in 832 x 480 and resized\r\nto 640 x 480, it will be streched on the Wii!";
|
||||
this.label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnOK.Location = new System.Drawing.Point(15, 347);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(160, 23);
|
||||
this.btnOK.TabIndex = 8;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(186, 347);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(160, 23);
|
||||
this.btnCancel.TabIndex = 8;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.label2.Location = new System.Drawing.Point(0, 15);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(358, 40);
|
||||
this.label2.TabIndex = 7;
|
||||
this.label2.Text = "The forwarder will try to load in this order.\r\nEntries must begin with \"SD:/\" or " +
|
||||
"\"USB:/\" and end with \".dol\" or \".elf\"!\r\nYou may enter whatever path you want.";
|
||||
this.label2.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// tb2
|
||||
//
|
||||
this.tb2.Location = new System.Drawing.Point(6, 46);
|
||||
this.tb2.Name = "tb2";
|
||||
this.tb2.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb2.TabIndex = 1;
|
||||
this.tb2.Text = "SD:/apps/example/boot.elf";
|
||||
this.tb2.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb3
|
||||
//
|
||||
this.tb3.Location = new System.Drawing.Point(6, 75);
|
||||
this.tb3.Name = "tb3";
|
||||
this.tb3.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb3.TabIndex = 1;
|
||||
this.tb3.Text = "USB:/apps/example/boot.dol";
|
||||
this.tb3.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb4
|
||||
//
|
||||
this.tb4.Location = new System.Drawing.Point(6, 104);
|
||||
this.tb4.Name = "tb4";
|
||||
this.tb4.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb4.TabIndex = 1;
|
||||
this.tb4.Text = "USB:/apps/example/boot.elf";
|
||||
this.tb4.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tabPaths
|
||||
//
|
||||
this.tabPaths.Controls.Add(this.tabRequired);
|
||||
this.tabPaths.Controls.Add(this.tabOptional1);
|
||||
this.tabPaths.Controls.Add(this.tabOptional2);
|
||||
this.tabPaths.Controls.Add(this.tabOptional3);
|
||||
this.tabPaths.Location = new System.Drawing.Point(15, 62);
|
||||
this.tabPaths.Name = "tabPaths";
|
||||
this.tabPaths.SelectedIndex = 0;
|
||||
this.tabPaths.Size = new System.Drawing.Size(331, 159);
|
||||
this.tabPaths.TabIndex = 9;
|
||||
//
|
||||
// tabRequired
|
||||
//
|
||||
this.tabRequired.Controls.Add(this.tb1);
|
||||
this.tabRequired.Controls.Add(this.tb2);
|
||||
this.tabRequired.Controls.Add(this.tb3);
|
||||
this.tabRequired.Controls.Add(this.tb4);
|
||||
this.tabRequired.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabRequired.Name = "tabRequired";
|
||||
this.tabRequired.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabRequired.Size = new System.Drawing.Size(323, 133);
|
||||
this.tabRequired.TabIndex = 0;
|
||||
this.tabRequired.Text = "Required";
|
||||
this.tabRequired.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// tabOptional1
|
||||
//
|
||||
this.tabOptional1.Controls.Add(this.cbPack1);
|
||||
this.tabOptional1.Controls.Add(this.tb5);
|
||||
this.tabOptional1.Controls.Add(this.tb6);
|
||||
this.tabOptional1.Controls.Add(this.tb7);
|
||||
this.tabOptional1.Controls.Add(this.tb8);
|
||||
this.tabOptional1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabOptional1.Name = "tabOptional1";
|
||||
this.tabOptional1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabOptional1.Size = new System.Drawing.Size(323, 133);
|
||||
this.tabOptional1.TabIndex = 1;
|
||||
this.tabOptional1.Text = "Optional 1";
|
||||
this.tabOptional1.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbPack1
|
||||
//
|
||||
this.cbPack1.AutoSize = true;
|
||||
this.cbPack1.Location = new System.Drawing.Point(6, 6);
|
||||
this.cbPack1.Name = "cbPack1";
|
||||
this.cbPack1.Size = new System.Drawing.Size(59, 17);
|
||||
this.cbPack1.TabIndex = 6;
|
||||
this.cbPack1.Text = "Enable";
|
||||
this.cbPack1.UseVisualStyleBackColor = true;
|
||||
this.cbPack1.CheckedChanged += new System.EventHandler(this.cbPack1_CheckedChanged);
|
||||
//
|
||||
// tb5
|
||||
//
|
||||
this.tb5.Enabled = false;
|
||||
this.tb5.Location = new System.Drawing.Point(6, 29);
|
||||
this.tb5.Name = "tb5";
|
||||
this.tb5.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb5.TabIndex = 4;
|
||||
this.tb5.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb6
|
||||
//
|
||||
this.tb6.Enabled = false;
|
||||
this.tb6.Location = new System.Drawing.Point(6, 54);
|
||||
this.tb6.Name = "tb6";
|
||||
this.tb6.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb6.TabIndex = 5;
|
||||
this.tb6.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb7
|
||||
//
|
||||
this.tb7.Enabled = false;
|
||||
this.tb7.Location = new System.Drawing.Point(6, 79);
|
||||
this.tb7.Name = "tb7";
|
||||
this.tb7.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb7.TabIndex = 2;
|
||||
this.tb7.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb8
|
||||
//
|
||||
this.tb8.Enabled = false;
|
||||
this.tb8.Location = new System.Drawing.Point(6, 104);
|
||||
this.tb8.Name = "tb8";
|
||||
this.tb8.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb8.TabIndex = 3;
|
||||
this.tb8.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tabOptional2
|
||||
//
|
||||
this.tabOptional2.Controls.Add(this.cbPack2);
|
||||
this.tabOptional2.Controls.Add(this.tb9);
|
||||
this.tabOptional2.Controls.Add(this.tb10);
|
||||
this.tabOptional2.Controls.Add(this.tb11);
|
||||
this.tabOptional2.Controls.Add(this.tb12);
|
||||
this.tabOptional2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabOptional2.Name = "tabOptional2";
|
||||
this.tabOptional2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabOptional2.Size = new System.Drawing.Size(323, 133);
|
||||
this.tabOptional2.TabIndex = 2;
|
||||
this.tabOptional2.Text = "Optional 2";
|
||||
this.tabOptional2.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbPack2
|
||||
//
|
||||
this.cbPack2.AutoSize = true;
|
||||
this.cbPack2.Location = new System.Drawing.Point(6, 6);
|
||||
this.cbPack2.Name = "cbPack2";
|
||||
this.cbPack2.Size = new System.Drawing.Size(59, 17);
|
||||
this.cbPack2.TabIndex = 11;
|
||||
this.cbPack2.Text = "Enable";
|
||||
this.cbPack2.UseVisualStyleBackColor = true;
|
||||
this.cbPack2.CheckedChanged += new System.EventHandler(this.cbPack2_CheckedChanged);
|
||||
//
|
||||
// tb9
|
||||
//
|
||||
this.tb9.Enabled = false;
|
||||
this.tb9.Location = new System.Drawing.Point(6, 29);
|
||||
this.tb9.Name = "tb9";
|
||||
this.tb9.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb9.TabIndex = 9;
|
||||
this.tb9.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb10
|
||||
//
|
||||
this.tb10.Enabled = false;
|
||||
this.tb10.Location = new System.Drawing.Point(6, 54);
|
||||
this.tb10.Name = "tb10";
|
||||
this.tb10.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb10.TabIndex = 10;
|
||||
this.tb10.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb11
|
||||
//
|
||||
this.tb11.Enabled = false;
|
||||
this.tb11.Location = new System.Drawing.Point(6, 79);
|
||||
this.tb11.Name = "tb11";
|
||||
this.tb11.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb11.TabIndex = 7;
|
||||
this.tb11.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb12
|
||||
//
|
||||
this.tb12.Enabled = false;
|
||||
this.tb12.Location = new System.Drawing.Point(6, 104);
|
||||
this.tb12.Name = "tb12";
|
||||
this.tb12.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb12.TabIndex = 8;
|
||||
this.tb12.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tabOptional3
|
||||
//
|
||||
this.tabOptional3.Controls.Add(this.cbPack3);
|
||||
this.tabOptional3.Controls.Add(this.tb13);
|
||||
this.tabOptional3.Controls.Add(this.tb14);
|
||||
this.tabOptional3.Controls.Add(this.tb15);
|
||||
this.tabOptional3.Controls.Add(this.tb16);
|
||||
this.tabOptional3.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabOptional3.Name = "tabOptional3";
|
||||
this.tabOptional3.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabOptional3.Size = new System.Drawing.Size(323, 133);
|
||||
this.tabOptional3.TabIndex = 3;
|
||||
this.tabOptional3.Text = "Optional 3";
|
||||
this.tabOptional3.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// cbPack3
|
||||
//
|
||||
this.cbPack3.AutoSize = true;
|
||||
this.cbPack3.Location = new System.Drawing.Point(6, 6);
|
||||
this.cbPack3.Name = "cbPack3";
|
||||
this.cbPack3.Size = new System.Drawing.Size(59, 17);
|
||||
this.cbPack3.TabIndex = 11;
|
||||
this.cbPack3.Text = "Enable";
|
||||
this.cbPack3.UseVisualStyleBackColor = true;
|
||||
this.cbPack3.CheckedChanged += new System.EventHandler(this.cbPack3_CheckedChanged);
|
||||
//
|
||||
// tb13
|
||||
//
|
||||
this.tb13.Enabled = false;
|
||||
this.tb13.Location = new System.Drawing.Point(6, 29);
|
||||
this.tb13.Name = "tb13";
|
||||
this.tb13.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb13.TabIndex = 9;
|
||||
this.tb13.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb14
|
||||
//
|
||||
this.tb14.Enabled = false;
|
||||
this.tb14.Location = new System.Drawing.Point(6, 54);
|
||||
this.tb14.Name = "tb14";
|
||||
this.tb14.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb14.TabIndex = 10;
|
||||
this.tb14.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb15
|
||||
//
|
||||
this.tb15.Enabled = false;
|
||||
this.tb15.Location = new System.Drawing.Point(6, 79);
|
||||
this.tb15.Name = "tb15";
|
||||
this.tb15.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb15.TabIndex = 7;
|
||||
this.tb15.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// tb16
|
||||
//
|
||||
this.tb16.Enabled = false;
|
||||
this.tb16.Location = new System.Drawing.Point(6, 104);
|
||||
this.tb16.Name = "tb16";
|
||||
this.tb16.Size = new System.Drawing.Size(311, 20);
|
||||
this.tb16.TabIndex = 8;
|
||||
this.tb16.TextChanged += new System.EventHandler(this.tb_TextChanged);
|
||||
//
|
||||
// CustomizeMii_ComplexForwarder
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(358, 383);
|
||||
this.Controls.Add(this.tabPaths);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.btnBrowseImage169);
|
||||
this.Controls.Add(this.btnBrowseImage43);
|
||||
this.Controls.Add(this.tbImage169);
|
||||
this.Controls.Add(this.tbImage43);
|
||||
this.Controls.Add(this.cbImage169);
|
||||
this.Controls.Add(this.cbImage43);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "CustomizeMii_ComplexForwarder";
|
||||
this.Text = "CustomizeMii_ComplexForwarder";
|
||||
this.Load += new System.EventHandler(this.CustomizeMii_ComplexForwarder_Load);
|
||||
this.tabPaths.ResumeLayout(false);
|
||||
this.tabRequired.ResumeLayout(false);
|
||||
this.tabRequired.PerformLayout();
|
||||
this.tabOptional1.ResumeLayout(false);
|
||||
this.tabOptional1.PerformLayout();
|
||||
this.tabOptional2.ResumeLayout(false);
|
||||
this.tabOptional2.PerformLayout();
|
||||
this.tabOptional3.ResumeLayout(false);
|
||||
this.tabOptional3.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
public System.Windows.Forms.TextBox tb1;
|
||||
public System.Windows.Forms.CheckBox cbImage43;
|
||||
public System.Windows.Forms.CheckBox cbImage169;
|
||||
public System.Windows.Forms.TextBox tbImage43;
|
||||
public System.Windows.Forms.TextBox tbImage169;
|
||||
public System.Windows.Forms.Button btnBrowseImage43;
|
||||
public System.Windows.Forms.Button btnBrowseImage169;
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.Label label2;
|
||||
public System.Windows.Forms.TextBox tb2;
|
||||
public System.Windows.Forms.TextBox tb3;
|
||||
public System.Windows.Forms.TextBox tb4;
|
||||
private System.Windows.Forms.TabControl tabPaths;
|
||||
private System.Windows.Forms.TabPage tabRequired;
|
||||
private System.Windows.Forms.TabPage tabOptional1;
|
||||
private System.Windows.Forms.TabPage tabOptional2;
|
||||
private System.Windows.Forms.TabPage tabOptional3;
|
||||
public System.Windows.Forms.TextBox tb5;
|
||||
public System.Windows.Forms.TextBox tb6;
|
||||
public System.Windows.Forms.TextBox tb7;
|
||||
public System.Windows.Forms.TextBox tb8;
|
||||
public System.Windows.Forms.TextBox tb9;
|
||||
public System.Windows.Forms.TextBox tb10;
|
||||
public System.Windows.Forms.TextBox tb11;
|
||||
public System.Windows.Forms.TextBox tb12;
|
||||
public System.Windows.Forms.TextBox tb13;
|
||||
public System.Windows.Forms.TextBox tb14;
|
||||
public System.Windows.Forms.TextBox tb15;
|
||||
public System.Windows.Forms.TextBox tb16;
|
||||
public System.Windows.Forms.CheckBox cbPack1;
|
||||
public System.Windows.Forms.CheckBox cbPack2;
|
||||
public System.Windows.Forms.CheckBox cbPack3;
|
||||
}
|
||||
}
|
@ -1,180 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
public partial class CustomizeMii_ComplexForwarder : Form
|
||||
{
|
||||
public CustomizeMii_ComplexForwarder()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CustomizeMii_ComplexForwarder_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.CenterToParent();
|
||||
}
|
||||
|
||||
private void cbImage43_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
tbImage43.Enabled = cbImage43.Checked;
|
||||
btnBrowseImage43.Enabled = cbImage43.Checked;
|
||||
}
|
||||
|
||||
private void cbImage169_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
tbImage169.Enabled = cbImage169.Checked;
|
||||
btnBrowseImage169.Enabled = cbImage169.Checked;
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
TextBox[] tbPack1 = new TextBox[] { tb1, tb2, tb3, tb4 };
|
||||
TextBox[] tbPack2 = new TextBox[] { tb5, tb6, tb7, tb8 };
|
||||
TextBox[] tbPack3 = new TextBox[] { tb9, tb10, tb11, tb12 };
|
||||
TextBox[] tbPack4 = new TextBox[] { tb13, tb14, tb15, tb16 };
|
||||
|
||||
foreach (TextBox tbThis in tbPack1)
|
||||
{
|
||||
if ((!tbThis.Text.StartsWith("USB:/") && !tbThis.Text.StartsWith("SD:/")) ||
|
||||
(!tbThis.Text.EndsWith(".dol") && !tbThis.Text.EndsWith(".elf")))
|
||||
{ tabPaths.SelectedTab = tabRequired; tbThis.Focus(); tbThis.SelectAll(); return; }
|
||||
}
|
||||
|
||||
if (cbPack1.Checked)
|
||||
{
|
||||
foreach (TextBox tbThis in tbPack2)
|
||||
{
|
||||
if ((!tbThis.Text.StartsWith("USB:/") && !tbThis.Text.StartsWith("SD:/")) ||
|
||||
(!tbThis.Text.EndsWith(".dol") && !tbThis.Text.EndsWith(".elf")))
|
||||
{ tabPaths.SelectedTab = tabOptional1; tbThis.Focus(); tbThis.SelectAll(); return; }
|
||||
}
|
||||
}
|
||||
|
||||
if (cbPack2.Checked)
|
||||
{
|
||||
foreach (TextBox tbThis in tbPack3)
|
||||
{
|
||||
if ((!tbThis.Text.StartsWith("USB:/") && !tbThis.Text.StartsWith("SD:/")) ||
|
||||
(!tbThis.Text.EndsWith(".dol") && !tbThis.Text.EndsWith(".elf")))
|
||||
{ tabPaths.SelectedTab = tabOptional2; tbThis.Focus(); tbThis.SelectAll(); return; }
|
||||
}
|
||||
}
|
||||
|
||||
if (cbPack3.Checked)
|
||||
{
|
||||
foreach (TextBox tbThis in tbPack4)
|
||||
{
|
||||
if ((!tbThis.Text.StartsWith("USB:/") && !tbThis.Text.StartsWith("SD:/")) ||
|
||||
(!tbThis.Text.EndsWith(".dol") && !tbThis.Text.EndsWith(".elf")))
|
||||
{ tabPaths.SelectedTab = tabOptional3; tbThis.Focus(); tbThis.SelectAll(); return; }
|
||||
}
|
||||
}
|
||||
|
||||
if (!File.Exists(tbImage43.Text)) tbImage43.Text = string.Empty;
|
||||
if (!File.Exists(tbImage169.Text)) tbImage169.Text = string.Empty;
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnBrowse_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.Filter = "PNG|*.png|JPG|*.jpg|GIF|*.gif|BMP|*.bmp|All|*.png;*.jpg;*.gif;*.bmp";
|
||||
ofd.FilterIndex = 5;
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
if (sender == btnBrowseImage43) tbImage43.Text = ofd.FileName;
|
||||
else tbImage169.Text = ofd.FileName;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbPack1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
TextBox[] tbPack2 = new TextBox[] { tb5, tb6, tb7, tb8 };
|
||||
|
||||
foreach (TextBox thisTb in tbPack2)
|
||||
{
|
||||
thisTb.Enabled = cbPack1.Checked;
|
||||
if (!cbPack1.Checked) thisTb.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbPack2_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
TextBox[] tbPack3 = new TextBox[] { tb9, tb10, tb11, tb12 };
|
||||
|
||||
foreach (TextBox thisTb in tbPack3)
|
||||
{
|
||||
thisTb.Enabled = cbPack2.Checked;
|
||||
if (!cbPack2.Checked) thisTb.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbPack3_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
TextBox[] tbPack4 = new TextBox[] { tb13, tb14, tb15, tb16 };
|
||||
|
||||
foreach (TextBox thisTb in tbPack4)
|
||||
{
|
||||
thisTb.Enabled = cbPack3.Checked;
|
||||
if (!cbPack3.Checked) thisTb.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
private void tb_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
TextBox tbSender = sender as TextBox;
|
||||
|
||||
int curPos = tbSender.SelectionStart;
|
||||
|
||||
if (tbSender.Text.Contains("\\"))
|
||||
tbSender.Text = tbSender.Text.Replace("\\", "/");
|
||||
|
||||
if (tbSender.Text.Contains("sd:"))
|
||||
tbSender.Text = tbSender.Text.Replace("sd:", "SD:");
|
||||
|
||||
if (tbSender.Text.Contains("usb:"))
|
||||
tbSender.Text = tbSender.Text.Replace("usb:", "USB:");
|
||||
|
||||
if (tbSender.Text.Contains(".DOL"))
|
||||
tbSender.Text = tbSender.Text.Replace(".DOL", ".dol");
|
||||
|
||||
if (tbSender.Text.Contains(".ELF"))
|
||||
tbSender.Text = tbSender.Text.Replace(".ELF", ".elf");
|
||||
|
||||
tbSender.SelectionStart = curPos;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
@ -1,258 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using System.Collections.Generic;
|
||||
using libWiiSharp;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_Main
|
||||
{
|
||||
private void CustomizeMii_Main_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) && pbProgress.Value == 100)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (data.Length == 1 && data[0].ToLower().EndsWith(".wad"))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
}
|
||||
|
||||
private void CustomizeMii_Main_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (data.Length == 1 && data[0].ToLower().EndsWith(".wad"))
|
||||
{
|
||||
loadChannel(data[0]);
|
||||
}
|
||||
}
|
||||
|
||||
private void tbReplace_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tbSourceWad.Text))
|
||||
{
|
||||
if (pbProgress.Value == 100 && e.Data.GetDataPresent(DataFormats.FileDrop))
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (data.Length == 1)
|
||||
{
|
||||
if (data[0].ToLower().EndsWith(".wad") ||
|
||||
data[0].ToLower().EndsWith("00000000.app"))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
else if ((cmbReplace.SelectedIndex == 2 && data[0].ToLower().EndsWith("sound.bin")) ||
|
||||
(cmbReplace.SelectedIndex == 1 && data[0].ToLower().EndsWith("icon.bin")) ||
|
||||
(cmbReplace.SelectedIndex == 0 && data[0].ToLower().EndsWith("banner.bin")))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tbReplace_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (data.Length == 1 && (data[0].ToLower().EndsWith(".wad") ||
|
||||
data[0].ToLower().EndsWith("00000000.app") ||
|
||||
data[0].ToLower().EndsWith("sound.bin") ||
|
||||
data[0].ToLower().EndsWith("icon.bin") ||
|
||||
data[0].ToLower().EndsWith("banner.bin")))
|
||||
{
|
||||
replacePart(data[0]);
|
||||
}
|
||||
}
|
||||
|
||||
private void tbDol_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) && pbProgress.Value == 100)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (data.Length == 1 && (data[0].ToLower().EndsWith(".wad") || data[0].ToLower().EndsWith(".dol")))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
}
|
||||
|
||||
private void tbDol_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (data[0].ToLower().EndsWith(".wad"))
|
||||
{
|
||||
try
|
||||
{
|
||||
WAD tmpWad = WAD.Load(data[0]);
|
||||
|
||||
if (tmpWad.NumOfContents == 3)
|
||||
{
|
||||
int appIndex = 0;
|
||||
if (tmpWad.BootIndex == 1) appIndex = 2;
|
||||
else if (tmpWad.BootIndex == 2) appIndex = 1;
|
||||
|
||||
if (appIndex > 0)
|
||||
{
|
||||
newDol = tmpWad.Contents[appIndex];
|
||||
setControlText(tbDol, data[0]);
|
||||
btnBrowseDol.Text = "Clear";
|
||||
}
|
||||
else errorBox("The DOL file couldn't be found!");
|
||||
}
|
||||
else errorBox("The DOL file couldn't be found!");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
setControlText(tbDol, string.Empty);
|
||||
btnBrowseDol.Text = "Browse...";
|
||||
errorBox(ex.Message);
|
||||
}
|
||||
}
|
||||
else if (data[0].ToLower().EndsWith(".dol"))
|
||||
{
|
||||
newDol = File.ReadAllBytes(data[0]);
|
||||
setControlText(tbDol, data[0]);
|
||||
btnBrowseDol.Text = "Clear";
|
||||
}
|
||||
}
|
||||
|
||||
private void tbSound_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) && pbProgress.Value == 100)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (File.Exists(Application.StartupPath + Path.DirectorySeparatorChar + "lame.exe"))
|
||||
{
|
||||
if (data.Length == 1 && (data[0].ToLower().EndsWith(".wav") ||
|
||||
data[0].ToLower().EndsWith(".bns") ||
|
||||
data[0].ToLower().EndsWith(".mp3")))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (data.Length == 1 && (data[0].ToLower().EndsWith(".wav") ||
|
||||
data[0].ToLower().EndsWith(".bns")))
|
||||
e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void tbSound_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
|
||||
if (data[0].ToLower().EndsWith(".mp3"))
|
||||
{
|
||||
convertMp3ToWave(data[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
replacedSound = data[0];
|
||||
setControlText(tbSound, data[0]);
|
||||
btnBrowseSound.Text = "Clear";
|
||||
|
||||
newSoundBin = Headers.IMD5.AddHeader(File.ReadAllBytes(data[0]));
|
||||
|
||||
if (cmbReplace.SelectedIndex == 2) setControlText(tbReplace, string.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
private void lbxBannerTpls_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) && pbProgress.Value == 100)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
bool correct = true;
|
||||
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
if (!(data[0].ToLower().EndsWith(".tpl") ||
|
||||
data[0].ToLower().EndsWith(".png") ||
|
||||
data[0].ToLower().EndsWith(".jpg") ||
|
||||
data[0].ToLower().EndsWith(".gif") ||
|
||||
data[0].ToLower().EndsWith(".bmp")))
|
||||
correct = false;
|
||||
|
||||
if (correct) e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
}
|
||||
|
||||
private void lbxBannerTpls_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
List<string> errors = new List<string>();
|
||||
|
||||
foreach (string thisFile in data)
|
||||
{
|
||||
try
|
||||
{
|
||||
addTpl(lbxBannerTpls, thisFile);
|
||||
}
|
||||
catch { errors.Add(thisFile); }
|
||||
}
|
||||
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
errorBox(string.Format("These files were not added, because either they already exist or an error occured during conversion:\n\n{0}", string.Join("\n", (errors.ToArray()))));
|
||||
}
|
||||
}
|
||||
|
||||
private void lbxIconTpls_DragEnter(object sender, DragEventArgs e)
|
||||
{
|
||||
if (e.Data.GetDataPresent(DataFormats.FileDrop) && pbProgress.Value == 100)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
bool correct = true;
|
||||
|
||||
for (int i = 0; i < data.Length; i++)
|
||||
if (!(data[0].ToLower().EndsWith(".tpl") ||
|
||||
data[0].ToLower().EndsWith(".png") ||
|
||||
data[0].ToLower().EndsWith(".jpg") ||
|
||||
data[0].ToLower().EndsWith(".gif") ||
|
||||
data[0].ToLower().EndsWith(".bmp")))
|
||||
correct = false;
|
||||
|
||||
if (correct) e.Effect = DragDropEffects.Copy;
|
||||
}
|
||||
}
|
||||
|
||||
private void lbxIconTpls_DragDrop(object sender, DragEventArgs e)
|
||||
{
|
||||
string[] data = (string[])e.Data.GetData(DataFormats.FileDrop);
|
||||
List<string> errors = new List<string>();
|
||||
|
||||
foreach (string thisFile in data)
|
||||
{
|
||||
try
|
||||
{
|
||||
addTpl(lbxIconTpls, thisFile);
|
||||
}
|
||||
catch { errors.Add(thisFile); }
|
||||
}
|
||||
|
||||
if (errors.Count > 0)
|
||||
{
|
||||
errorBox(string.Format("These files were not added, because either they already exist or an error occured during conversion:\n\n{0}", string.Join("\n", (errors.ToArray()))));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,114 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using ForwardMii;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
namespace Forwarder
|
||||
{
|
||||
//Let's use this kind of wrapper, so CustomizeMii can still run, if the ForwardMii.dll is missing...
|
||||
|
||||
internal class Complex
|
||||
{
|
||||
private string[] paths = new string[16];
|
||||
private bool[] packs = new bool[3];
|
||||
private string image43;
|
||||
private string image169;
|
||||
public bool[] Packs { get { return packs; } set { packs = value; } }
|
||||
public string[] Paths { get { return paths; } set { paths = value; } }
|
||||
public string Image43 { get { return image43; } set { image43 = value; } }
|
||||
public string Image169 { get { return image169; } set { image169 = value; } }
|
||||
|
||||
public Complex()
|
||||
{
|
||||
paths[0] = "SD:/apps/example/boot.dol";
|
||||
paths[1] = "SD:/apps/example/boot.elf";
|
||||
paths[2] = "USB:/apps/example/boot.dol";
|
||||
paths[3] = "USB:/apps/example/boot.elf";
|
||||
}
|
||||
|
||||
public string GetPath(int pathNum)
|
||||
{
|
||||
return paths[pathNum];
|
||||
}
|
||||
|
||||
public void SetPath(int pathNum, string forwardPath)
|
||||
{
|
||||
paths[pathNum] = forwardPath;
|
||||
}
|
||||
|
||||
public void Save(string Destination)
|
||||
{
|
||||
GXForwarder Forwarder = new GXForwarder(image43, image169, paths);
|
||||
Forwarder.Save(Destination, true);
|
||||
}
|
||||
|
||||
public byte[] ToByteArray()
|
||||
{
|
||||
GXForwarder Forwarder = new GXForwarder(image43, image169, paths);
|
||||
return Forwarder.ToByteArray();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
paths[0] = "SD:/apps/example/boot.dol";
|
||||
paths[1] = "SD:/apps/example/boot.elf";
|
||||
paths[2] = "USB:/apps/example/boot.dol";
|
||||
paths[3] = "USB:/apps/example/boot.elf";
|
||||
|
||||
packs[0] = false;
|
||||
packs[1] = false;
|
||||
packs[2] = false;
|
||||
|
||||
for (int i = 4; i < paths.Length; i++)
|
||||
paths[i] = string.Empty;
|
||||
|
||||
image43 = string.Empty;
|
||||
image169 = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
internal class Simple
|
||||
{
|
||||
private string thisAppFolder;
|
||||
private bool toElf = false;
|
||||
public string AppFolder { get { return thisAppFolder; } set { thisAppFolder = value; } }
|
||||
public bool ForwardToElf { get { return toElf; } set { toElf = value; } }
|
||||
|
||||
public Simple() { }
|
||||
|
||||
public void Save(string Destination)
|
||||
{
|
||||
SDSDHC_Forwarder Forwarder = new SDSDHC_Forwarder(thisAppFolder, toElf);
|
||||
Forwarder.Save(Destination, true);
|
||||
}
|
||||
|
||||
public byte[] ToByteArray()
|
||||
{
|
||||
SDSDHC_Forwarder Forwarder = new SDSDHC_Forwarder(thisAppFolder, toElf);
|
||||
return Forwarder.ToByteArray();
|
||||
}
|
||||
|
||||
public void Clear()
|
||||
{
|
||||
thisAppFolder = string.Empty;
|
||||
toElf = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
151
CustomizeMii/CustomizeMii_InputBox.Designer.cs
generated
151
CustomizeMii/CustomizeMii_InputBox.Designer.cs
generated
@ -1,151 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_InputBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.tbInput = new System.Windows.Forms.TextBox();
|
||||
this.lbInfo = new System.Windows.Forms.Label();
|
||||
this.btnOK = new System.Windows.Forms.Button();
|
||||
this.btnExit = new System.Windows.Forms.Button();
|
||||
this.cbElf = new System.Windows.Forms.CheckBox();
|
||||
this.tbInput2 = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tbInput
|
||||
//
|
||||
this.tbInput.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.tbInput.Location = new System.Drawing.Point(7, 34);
|
||||
this.tbInput.MaxLength = 3;
|
||||
this.tbInput.Name = "tbInput";
|
||||
this.tbInput.Size = new System.Drawing.Size(222, 20);
|
||||
this.tbInput.TabIndex = 0;
|
||||
//
|
||||
// lbInfo
|
||||
//
|
||||
this.lbInfo.Anchor = System.Windows.Forms.AnchorStyles.Top;
|
||||
this.lbInfo.Location = new System.Drawing.Point(4, 9);
|
||||
this.lbInfo.Name = "lbInfo";
|
||||
this.lbInfo.Size = new System.Drawing.Size(225, 32);
|
||||
this.lbInfo.TabIndex = 1;
|
||||
this.lbInfo.Text = "Please enter \"45e\" to create the Common-Key";
|
||||
this.lbInfo.TextAlign = System.Drawing.ContentAlignment.TopCenter;
|
||||
//
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnOK.Location = new System.Drawing.Point(7, 62);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(108, 23);
|
||||
this.btnOK.TabIndex = 2;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.UseVisualStyleBackColor = true;
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
//
|
||||
// btnExit
|
||||
//
|
||||
this.btnExit.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.btnExit.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnExit.Location = new System.Drawing.Point(121, 62);
|
||||
this.btnExit.Name = "btnExit";
|
||||
this.btnExit.Size = new System.Drawing.Size(108, 23);
|
||||
this.btnExit.TabIndex = 3;
|
||||
this.btnExit.Text = "Exit";
|
||||
this.btnExit.UseVisualStyleBackColor = true;
|
||||
this.btnExit.Click += new System.EventHandler(this.btnExit_Click);
|
||||
//
|
||||
// cbElf
|
||||
//
|
||||
this.cbElf.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.cbElf.AutoSize = true;
|
||||
this.cbElf.Location = new System.Drawing.Point(61, 16);
|
||||
this.cbElf.Name = "cbElf";
|
||||
this.cbElf.Size = new System.Drawing.Size(114, 17);
|
||||
this.cbElf.TabIndex = 4;
|
||||
this.cbElf.Text = "Forward to boot.elf";
|
||||
this.cbElf.UseVisualStyleBackColor = true;
|
||||
this.cbElf.Visible = false;
|
||||
//
|
||||
// tbInput2
|
||||
//
|
||||
this.tbInput2.Location = new System.Drawing.Point(121, 34);
|
||||
this.tbInput2.Name = "tbInput2";
|
||||
this.tbInput2.Size = new System.Drawing.Size(108, 20);
|
||||
this.tbInput2.TabIndex = 1;
|
||||
this.tbInput2.Visible = false;
|
||||
//
|
||||
// CustomizeMii_InputBox
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.CancelButton = this.btnExit;
|
||||
this.ClientSize = new System.Drawing.Size(238, 92);
|
||||
this.Controls.Add(this.tbInput2);
|
||||
this.Controls.Add(this.cbElf);
|
||||
this.Controls.Add(this.btnExit);
|
||||
this.Controls.Add(this.btnOK);
|
||||
this.Controls.Add(this.tbInput);
|
||||
this.Controls.Add(this.lbInfo);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "CustomizeMii_InputBox";
|
||||
this.ShowInTaskbar = false;
|
||||
this.Text = "InputBox";
|
||||
this.Load += new System.EventHandler(this.CustomizeMii_InputBox_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button btnOK;
|
||||
public System.Windows.Forms.Label lbInfo;
|
||||
public System.Windows.Forms.TextBox tbInput;
|
||||
public System.Windows.Forms.Button btnExit;
|
||||
public System.Windows.Forms.CheckBox cbElf;
|
||||
public System.Windows.Forms.TextBox tbInput2;
|
||||
}
|
||||
}
|
@ -1,88 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
public partial class CustomizeMii_InputBox : Form
|
||||
{
|
||||
//Wow, need to change this whole thing, but too lazy ~~
|
||||
|
||||
public bool CommonKeyMode = true;
|
||||
public string Input { get { return tbInput.Text; } set { tbInput.Text = value; } }
|
||||
public string Description { get { return lbInfo.Text; } set { lbInfo.Text = value; } }
|
||||
public string Input2 { get { return tbInput2.Text; } set { tbInput2.Text = value; } }
|
||||
|
||||
public CustomizeMii_InputBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public CustomizeMii_InputBox(bool CommonKeyMode)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.CommonKeyMode = CommonKeyMode;
|
||||
}
|
||||
|
||||
private void CustomizeMii_InputBox_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.CenterToParent();
|
||||
if (this.Location.X == 0 && this.Location.Y == 0) this.CenterToScreen();
|
||||
}
|
||||
|
||||
private void btnExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (CommonKeyMode == true)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
else this.Close();
|
||||
}
|
||||
|
||||
private void btnOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (this.CommonKeyMode == true)
|
||||
{
|
||||
if (tbInput.Text == "45e")
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
tbInput.Focus();
|
||||
tbInput.SelectAll();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (tbInput.Text.Length > 0)
|
||||
{
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
tbInput.Focus();
|
||||
tbInput.SelectAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
1840
CustomizeMii/CustomizeMii_Main.Designer.cs
generated
1840
CustomizeMii/CustomizeMii_Main.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,154 +0,0 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
||||
<data name="lbCreditThanks.Text" xml:space="preserve">
|
||||
<value>Thanks:
|
||||
Xuzz for his idea and hard work
|
||||
WiiCrazy / I.R.on for CustomizeMii Installer
|
||||
Xuzz, SquidMan, megazig, Matt_P, Omega and The Lemon Man for Wii.py
|
||||
megazig for his BNS conversion code
|
||||
SquidMan for Zetsubou
|
||||
Andre Perrot for gbalzss
|
||||
comex and Waninkoko for both their NAND Loader
|
||||
djdynamite123 for his forwarder base files
|
||||
The USB Loader GX Team for their forwarder source
|
||||
wilsoff for helping me debugging 3.0</value>
|
||||
</data>
|
||||
<metadata name="cmTpls.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>559, 14</value>
|
||||
</metadata>
|
||||
<metadata name="ssMain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 12</value>
|
||||
</metadata>
|
||||
<metadata name="cmForwarder.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>104, 12</value>
|
||||
</metadata>
|
||||
<metadata name="cmOptionsExtract.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>230, 12</value>
|
||||
</metadata>
|
||||
<metadata name="cmSound.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>369, 15</value>
|
||||
</metadata>
|
||||
<metadata name="cmDol.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>474, 13</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>42</value>
|
||||
</metadata>
|
||||
</root>
|
100
CustomizeMii/CustomizeMii_PaletteFormatBox.Designer.cs
generated
100
CustomizeMii/CustomizeMii_PaletteFormatBox.Designer.cs
generated
@ -1,100 +0,0 @@
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_PaletteFormatBox
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.btnIA8 = new System.Windows.Forms.Button();
|
||||
this.btnRGB5A3 = new System.Windows.Forms.Button();
|
||||
this.btnRGB565 = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(12, 9);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(307, 83);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "You\'re converting to an indexed format, please choose a format\r\nfor the Palette:\r" +
|
||||
"\n\r\nIA8: Black & White + Alpha\r\nRGB5A3: Color + Alpha\r\nRGB565: Color";
|
||||
//
|
||||
// btnIA8
|
||||
//
|
||||
this.btnIA8.Location = new System.Drawing.Point(12, 101);
|
||||
this.btnIA8.Name = "btnIA8";
|
||||
this.btnIA8.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnIA8.TabIndex = 1;
|
||||
this.btnIA8.Text = "IA8";
|
||||
this.btnIA8.UseVisualStyleBackColor = true;
|
||||
this.btnIA8.Click += new System.EventHandler(this.btnIA8_Click);
|
||||
//
|
||||
// btnRGB5A3
|
||||
//
|
||||
this.btnRGB5A3.Location = new System.Drawing.Point(128, 101);
|
||||
this.btnRGB5A3.Name = "btnRGB5A3";
|
||||
this.btnRGB5A3.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnRGB5A3.TabIndex = 1;
|
||||
this.btnRGB5A3.Text = "RGB5A3";
|
||||
this.btnRGB5A3.UseVisualStyleBackColor = true;
|
||||
this.btnRGB5A3.Click += new System.EventHandler(this.btnRGB5A3_Click);
|
||||
//
|
||||
// btnRGB565
|
||||
//
|
||||
this.btnRGB565.Location = new System.Drawing.Point(244, 101);
|
||||
this.btnRGB565.Name = "btnRGB565";
|
||||
this.btnRGB565.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnRGB565.TabIndex = 1;
|
||||
this.btnRGB565.Text = "RGB565";
|
||||
this.btnRGB565.UseVisualStyleBackColor = true;
|
||||
this.btnRGB565.Click += new System.EventHandler(this.btnRGB565_Click);
|
||||
//
|
||||
// CustomizeMii_PaletteFormatBox
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(331, 137);
|
||||
this.Controls.Add(this.btnRGB565);
|
||||
this.Controls.Add(this.btnRGB5A3);
|
||||
this.Controls.Add(this.btnIA8);
|
||||
this.Controls.Add(this.label1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "CustomizeMii_PaletteFormatBox";
|
||||
this.Text = "CustomizeMii_PaletteFormatBox";
|
||||
this.Load += new System.EventHandler(this.CustomizeMii_PaletteFormatBox_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btnIA8;
|
||||
private System.Windows.Forms.Button btnRGB5A3;
|
||||
private System.Windows.Forms.Button btnRGB565;
|
||||
}
|
||||
}
|
@ -1,40 +0,0 @@
|
||||
using System.Windows.Forms;
|
||||
using libWiiSharp;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
public partial class CustomizeMii_PaletteFormatBox : Form
|
||||
{
|
||||
private TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
|
||||
public TPL_PaletteFormat PaletteFormat { get { return pFormat; } }
|
||||
|
||||
public CustomizeMii_PaletteFormatBox()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void btnIA8_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
pFormat = TPL_PaletteFormat.IA8;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnRGB5A3_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnRGB565_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
pFormat = TPL_PaletteFormat.RGB565;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void CustomizeMii_PaletteFormatBox_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
CenterToParent();
|
||||
}
|
||||
}
|
||||
}
|
650
CustomizeMii/CustomizeMii_Preview.Designer.cs
generated
650
CustomizeMii/CustomizeMii_Preview.Designer.cs
generated
@ -1,650 +0,0 @@
|
||||
/* This file is part of ShowMiiWads
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* ShowMiiWads is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* ShowMiiWads is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_Preview
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.Panel = new System.Windows.Forms.Panel();
|
||||
this.cbCheckerBoard = new System.Windows.Forms.CheckBox();
|
||||
this.btnReplace = new System.Windows.Forms.Button();
|
||||
this.btnClose = new System.Windows.Forms.Button();
|
||||
this.cbIcon = new System.Windows.Forms.ComboBox();
|
||||
this.lbIcon = new System.Windows.Forms.Label();
|
||||
this.lbBanner = new System.Windows.Forms.Label();
|
||||
this.cbBanner = new System.Windows.Forms.ComboBox();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.lbFormat = new System.Windows.Forms.Label();
|
||||
this.lbFormatText = new System.Windows.Forms.Label();
|
||||
this.lbSize = new System.Windows.Forms.Label();
|
||||
this.lbSizeText = new System.Windows.Forms.Label();
|
||||
this.pbPic = new System.Windows.Forms.PictureBox();
|
||||
this.cmFormat = new System.Windows.Forms.ContextMenuStrip();
|
||||
this.cmRGBA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmRGB565 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmRGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmIA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmIA4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmI8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmI4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.cmChangeFormat = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToRGBA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToRGB565 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToRGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToIA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToIA4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToI8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToI4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.lbNoPreview = new System.Windows.Forms.Label();
|
||||
this.cmCI8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmCI4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmCI8RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmCI8RGB565 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmCI8IA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmCI4RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmCI4RGB565 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmCI4IA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.lbTip = new System.Windows.Forms.Label();
|
||||
this.cmToCI8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToCI4 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToCI8RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToCI8RGB565 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToCI8IA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToCI4RGB5A3 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToCI4RGB565 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.cmToCI4IA8 = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.Panel.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbPic)).BeginInit();
|
||||
this.cmFormat.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Panel
|
||||
//
|
||||
this.Panel.Controls.Add(this.cbCheckerBoard);
|
||||
this.Panel.Controls.Add(this.btnReplace);
|
||||
this.Panel.Controls.Add(this.btnClose);
|
||||
this.Panel.Controls.Add(this.cbIcon);
|
||||
this.Panel.Controls.Add(this.lbIcon);
|
||||
this.Panel.Controls.Add(this.lbBanner);
|
||||
this.Panel.Controls.Add(this.cbBanner);
|
||||
this.Panel.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.Panel.Location = new System.Drawing.Point(0, 434);
|
||||
this.Panel.Name = "Panel";
|
||||
this.Panel.Size = new System.Drawing.Size(817, 28);
|
||||
this.Panel.TabIndex = 0;
|
||||
//
|
||||
// cbCheckerBoard
|
||||
//
|
||||
this.cbCheckerBoard.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
|
||||
this.cbCheckerBoard.AutoSize = true;
|
||||
this.cbCheckerBoard.Checked = true;
|
||||
this.cbCheckerBoard.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbCheckerBoard.Location = new System.Drawing.Point(390, 7);
|
||||
this.cbCheckerBoard.Name = "cbCheckerBoard";
|
||||
this.cbCheckerBoard.Size = new System.Drawing.Size(93, 17);
|
||||
this.cbCheckerBoard.TabIndex = 4;
|
||||
this.cbCheckerBoard.Text = "Checkerboard";
|
||||
this.cbCheckerBoard.UseVisualStyleBackColor = true;
|
||||
this.cbCheckerBoard.CheckedChanged += new System.EventHandler(this.cbCheckerBoard_CheckedChanged);
|
||||
//
|
||||
// btnReplace
|
||||
//
|
||||
this.btnReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnReplace.Location = new System.Drawing.Point(513, 4);
|
||||
this.btnReplace.Name = "btnReplace";
|
||||
this.btnReplace.Size = new System.Drawing.Size(137, 21);
|
||||
this.btnReplace.TabIndex = 3;
|
||||
this.btnReplace.Text = "Replace";
|
||||
this.btnReplace.UseVisualStyleBackColor = true;
|
||||
this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);
|
||||
//
|
||||
// btnClose
|
||||
//
|
||||
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnClose.Location = new System.Drawing.Point(670, 4);
|
||||
this.btnClose.Name = "btnClose";
|
||||
this.btnClose.Size = new System.Drawing.Size(137, 21);
|
||||
this.btnClose.TabIndex = 3;
|
||||
this.btnClose.Text = "Close";
|
||||
this.btnClose.UseVisualStyleBackColor = true;
|
||||
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
|
||||
//
|
||||
// cbIcon
|
||||
//
|
||||
this.cbIcon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.cbIcon.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbIcon.FormattingEnabled = true;
|
||||
this.cbIcon.Location = new System.Drawing.Point(234, 4);
|
||||
this.cbIcon.MaxDropDownItems = 20;
|
||||
this.cbIcon.Name = "cbIcon";
|
||||
this.cbIcon.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbIcon.TabIndex = 1;
|
||||
this.cbIcon.SelectedIndexChanged += new System.EventHandler(this.cbIcon_SelectedIndexChanged);
|
||||
//
|
||||
// lbIcon
|
||||
//
|
||||
this.lbIcon.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lbIcon.AutoSize = true;
|
||||
this.lbIcon.Location = new System.Drawing.Point(198, 7);
|
||||
this.lbIcon.Name = "lbIcon";
|
||||
this.lbIcon.Size = new System.Drawing.Size(31, 13);
|
||||
this.lbIcon.TabIndex = 2;
|
||||
this.lbIcon.Text = "Icon:";
|
||||
//
|
||||
// lbBanner
|
||||
//
|
||||
this.lbBanner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.lbBanner.AutoSize = true;
|
||||
this.lbBanner.Location = new System.Drawing.Point(3, 7);
|
||||
this.lbBanner.Name = "lbBanner";
|
||||
this.lbBanner.Size = new System.Drawing.Size(44, 13);
|
||||
this.lbBanner.TabIndex = 1;
|
||||
this.lbBanner.Text = "Banner:";
|
||||
//
|
||||
// cbBanner
|
||||
//
|
||||
this.cbBanner.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.cbBanner.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cbBanner.FormattingEnabled = true;
|
||||
this.cbBanner.Location = new System.Drawing.Point(51, 4);
|
||||
this.cbBanner.MaxDropDownItems = 20;
|
||||
this.cbBanner.Name = "cbBanner";
|
||||
this.cbBanner.Size = new System.Drawing.Size(121, 21);
|
||||
this.cbBanner.TabIndex = 0;
|
||||
this.cbBanner.SelectedIndexChanged += new System.EventHandler(this.cbBanner_SelectedIndexChanged);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.lbTip);
|
||||
this.panel1.Controls.Add(this.lbFormat);
|
||||
this.panel1.Controls.Add(this.lbFormatText);
|
||||
this.panel1.Controls.Add(this.lbSize);
|
||||
this.panel1.Controls.Add(this.lbSizeText);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(817, 22);
|
||||
this.panel1.TabIndex = 2;
|
||||
//
|
||||
// lbFormat
|
||||
//
|
||||
this.lbFormat.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbFormat.AutoSize = true;
|
||||
this.lbFormat.Location = new System.Drawing.Point(729, 5);
|
||||
this.lbFormat.Name = "lbFormat";
|
||||
this.lbFormat.Size = new System.Drawing.Size(43, 13);
|
||||
this.lbFormat.TabIndex = 3;
|
||||
this.lbFormat.Text = "RGBA8";
|
||||
//
|
||||
// lbFormatText
|
||||
//
|
||||
this.lbFormatText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.lbFormatText.Location = new System.Drawing.Point(523, 5);
|
||||
this.lbFormatText.Name = "lbFormatText";
|
||||
this.lbFormatText.RightToLeft = System.Windows.Forms.RightToLeft.No;
|
||||
this.lbFormatText.Size = new System.Drawing.Size(205, 13);
|
||||
this.lbFormatText.TabIndex = 2;
|
||||
this.lbFormatText.Text = "Texture Format:";
|
||||
this.lbFormatText.TextAlign = System.Drawing.ContentAlignment.TopRight;
|
||||
//
|
||||
// lbSize
|
||||
//
|
||||
this.lbSize.AutoSize = true;
|
||||
this.lbSize.Location = new System.Drawing.Point(39, 5);
|
||||
this.lbSize.Name = "lbSize";
|
||||
this.lbSize.Size = new System.Drawing.Size(30, 13);
|
||||
this.lbSize.TabIndex = 1;
|
||||
this.lbSize.Text = "0 x 0";
|
||||
//
|
||||
// lbSizeText
|
||||
//
|
||||
this.lbSizeText.AutoSize = true;
|
||||
this.lbSizeText.Location = new System.Drawing.Point(4, 5);
|
||||
this.lbSizeText.Name = "lbSizeText";
|
||||
this.lbSizeText.Size = new System.Drawing.Size(30, 13);
|
||||
this.lbSizeText.TabIndex = 0;
|
||||
this.lbSizeText.Text = "Size:";
|
||||
//
|
||||
// pbPic
|
||||
//
|
||||
this.pbPic.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
|
||||
this.pbPic.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pbPic.Location = new System.Drawing.Point(0, 22);
|
||||
this.pbPic.Name = "pbPic";
|
||||
this.pbPic.Size = new System.Drawing.Size(817, 412);
|
||||
this.pbPic.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
|
||||
this.pbPic.TabIndex = 3;
|
||||
this.pbPic.TabStop = false;
|
||||
//
|
||||
// cmFormat
|
||||
//
|
||||
this.cmFormat.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cmRGBA8,
|
||||
this.cmRGB565,
|
||||
this.cmRGB5A3,
|
||||
this.cmIA8,
|
||||
this.cmIA4,
|
||||
this.cmI8,
|
||||
this.cmI4,
|
||||
this.cmCI8,
|
||||
this.cmCI4,
|
||||
this.toolStripSeparator1,
|
||||
this.cmChangeFormat});
|
||||
this.cmFormat.Name = "cmFormat";
|
||||
this.cmFormat.Size = new System.Drawing.Size(267, 252);
|
||||
//
|
||||
// cmRGBA8
|
||||
//
|
||||
this.cmRGBA8.Name = "cmRGBA8";
|
||||
this.cmRGBA8.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmRGBA8.Tag = "rgba8";
|
||||
this.cmRGBA8.Text = "As RGBA8 (High Quality with Alpha)";
|
||||
this.cmRGBA8.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmRGB565
|
||||
//
|
||||
this.cmRGB565.Name = "cmRGB565";
|
||||
this.cmRGB565.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmRGB565.Tag = "rgb565";
|
||||
this.cmRGB565.Text = "As RGB565 (Moderate Quality)";
|
||||
this.cmRGB565.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmRGB5A3
|
||||
//
|
||||
this.cmRGB5A3.Name = "cmRGB5A3";
|
||||
this.cmRGB5A3.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmRGB5A3.Tag = "rgb5a3";
|
||||
this.cmRGB5A3.Text = "As RGB5A3 (Low Quality with Alpha)";
|
||||
this.cmRGB5A3.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmIA8
|
||||
//
|
||||
this.cmIA8.Name = "cmIA8";
|
||||
this.cmIA8.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmIA8.Tag = "ia8";
|
||||
this.cmIA8.Text = "As IA8 (B/W with Alpha)";
|
||||
this.cmIA8.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmIA4
|
||||
//
|
||||
this.cmIA4.Name = "cmIA4";
|
||||
this.cmIA4.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmIA4.Tag = "ia4";
|
||||
this.cmIA4.Text = "As IA4 (B/W with Alpha)";
|
||||
this.cmIA4.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmI8
|
||||
//
|
||||
this.cmI8.Name = "cmI8";
|
||||
this.cmI8.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmI8.Tag = "i8";
|
||||
this.cmI8.Text = "As I8 (B/W)";
|
||||
this.cmI8.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmI4
|
||||
//
|
||||
this.cmI4.Name = "cmI4";
|
||||
this.cmI4.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmI4.Tag = "i4";
|
||||
this.cmI4.Text = "As I4 (B/W)";
|
||||
this.cmI4.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(263, 6);
|
||||
//
|
||||
// cmChangeFormat
|
||||
//
|
||||
this.cmChangeFormat.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cmToRGBA8,
|
||||
this.cmToRGB565,
|
||||
this.cmToRGB5A3,
|
||||
this.cmToIA8,
|
||||
this.cmToIA4,
|
||||
this.cmToI8,
|
||||
this.cmToI4,
|
||||
this.cmToCI8,
|
||||
this.cmToCI4});
|
||||
this.cmChangeFormat.Name = "cmChangeFormat";
|
||||
this.cmChangeFormat.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmChangeFormat.Text = "Change Format";
|
||||
//
|
||||
// cmToRGBA8
|
||||
//
|
||||
this.cmToRGBA8.Name = "cmToRGBA8";
|
||||
this.cmToRGBA8.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToRGBA8.Tag = "rgba8";
|
||||
this.cmToRGBA8.Text = "To RGBA8 (High Quality with Alpha)";
|
||||
this.cmToRGBA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToRGB565
|
||||
//
|
||||
this.cmToRGB565.Name = "cmToRGB565";
|
||||
this.cmToRGB565.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToRGB565.Tag = "rgb565";
|
||||
this.cmToRGB565.Text = "To RGB565 (Moderate Quality)";
|
||||
this.cmToRGB565.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToRGB5A3
|
||||
//
|
||||
this.cmToRGB5A3.Name = "cmToRGB5A3";
|
||||
this.cmToRGB5A3.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToRGB5A3.Tag = "rgb5a3";
|
||||
this.cmToRGB5A3.Text = "To RGB5A3 (Low Quality with Alpha)";
|
||||
this.cmToRGB5A3.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToIA8
|
||||
//
|
||||
this.cmToIA8.Name = "cmToIA8";
|
||||
this.cmToIA8.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToIA8.Tag = "ia8";
|
||||
this.cmToIA8.Text = "To IA8 (B/W with Alpha)";
|
||||
this.cmToIA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToIA4
|
||||
//
|
||||
this.cmToIA4.Name = "cmToIA4";
|
||||
this.cmToIA4.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToIA4.Tag = "ia4";
|
||||
this.cmToIA4.Text = "To IA4 (B/W with Alpha)";
|
||||
this.cmToIA4.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToI8
|
||||
//
|
||||
this.cmToI8.Name = "cmToI8";
|
||||
this.cmToI8.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToI8.Tag = "i8";
|
||||
this.cmToI8.Text = "To I8 (B/W)";
|
||||
this.cmToI8.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToI4
|
||||
//
|
||||
this.cmToI4.Name = "cmToI4";
|
||||
this.cmToI4.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToI4.Tag = "i4";
|
||||
this.cmToI4.Text = "To I4 (B/W)";
|
||||
this.cmToI4.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// lbNoPreview
|
||||
//
|
||||
this.lbNoPreview.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.lbNoPreview.Location = new System.Drawing.Point(0, 22);
|
||||
this.lbNoPreview.Name = "lbNoPreview";
|
||||
this.lbNoPreview.Size = new System.Drawing.Size(817, 412);
|
||||
this.lbNoPreview.TabIndex = 4;
|
||||
this.lbNoPreview.Text = "No Preview";
|
||||
this.lbNoPreview.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.lbNoPreview.Visible = false;
|
||||
//
|
||||
// cmCI8
|
||||
//
|
||||
this.cmCI8.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cmCI8RGB5A3,
|
||||
this.cmCI8RGB565,
|
||||
this.cmCI8IA8});
|
||||
this.cmCI8.Name = "cmCI8";
|
||||
this.cmCI8.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmCI8.Text = "As CI8 (Indexed, max. 256 Colors)";
|
||||
//
|
||||
// cmCI4
|
||||
//
|
||||
this.cmCI4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cmCI4RGB5A3,
|
||||
this.cmCI4RGB565,
|
||||
this.cmCI4IA8});
|
||||
this.cmCI4.Name = "cmCI4";
|
||||
this.cmCI4.Size = new System.Drawing.Size(266, 22);
|
||||
this.cmCI4.Text = "As CI4 (Indexed, max. 16 Colors)";
|
||||
//
|
||||
// cmCI8RGB5A3
|
||||
//
|
||||
this.cmCI8RGB5A3.Name = "cmCI8RGB5A3";
|
||||
this.cmCI8RGB5A3.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmCI8RGB5A3.Tag = "ci8rgb5a3";
|
||||
this.cmCI8RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
|
||||
this.cmCI8RGB5A3.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmCI8RGB565
|
||||
//
|
||||
this.cmCI8RGB565.Name = "cmCI8RGB565";
|
||||
this.cmCI8RGB565.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmCI8RGB565.Tag = "ci8rgb565";
|
||||
this.cmCI8RGB565.Text = "With RGB565 Palette (Color)";
|
||||
this.cmCI8RGB565.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmCI8IA8
|
||||
//
|
||||
this.cmCI8IA8.Name = "cmCI8IA8";
|
||||
this.cmCI8IA8.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmCI8IA8.Tag = "ci8ia8";
|
||||
this.cmCI8IA8.Text = "With IA8 Palette (B/W with Alpha)";
|
||||
this.cmCI8IA8.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmCI4RGB5A3
|
||||
//
|
||||
this.cmCI4RGB5A3.Name = "cmCI4RGB5A3";
|
||||
this.cmCI4RGB5A3.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmCI4RGB5A3.Tag = "ci4rgb5a3";
|
||||
this.cmCI4RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
|
||||
this.cmCI4RGB5A3.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmCI4RGB565
|
||||
//
|
||||
this.cmCI4RGB565.Name = "cmCI4RGB565";
|
||||
this.cmCI4RGB565.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmCI4RGB565.Tag = "ci4rgb565";
|
||||
this.cmCI4RGB565.Text = "With RGB565 Palette (Color)";
|
||||
this.cmCI4RGB565.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// cmCI4IA8
|
||||
//
|
||||
this.cmCI4IA8.Name = "cmCI4IA8";
|
||||
this.cmCI4IA8.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmCI4IA8.Tag = "ci4ia8";
|
||||
this.cmCI4IA8.Text = "With IA8 Palette (B/W with Alpha)";
|
||||
this.cmCI4IA8.Click += new System.EventHandler(this.cmFormat_Click);
|
||||
//
|
||||
// lbTip
|
||||
//
|
||||
this.lbTip.AutoSize = true;
|
||||
this.lbTip.ForeColor = System.Drawing.Color.Red;
|
||||
this.lbTip.Location = new System.Drawing.Point(149, 6);
|
||||
this.lbTip.Name = "lbTip";
|
||||
this.lbTip.Size = new System.Drawing.Size(470, 13);
|
||||
this.lbTip.TabIndex = 4;
|
||||
this.lbTip.Text = "Tip: Reduce the colors of an image with Photoshop or GIMP to gain better results " +
|
||||
"with CI formats...";
|
||||
this.lbTip.Visible = false;
|
||||
//
|
||||
// cmToCI8
|
||||
//
|
||||
this.cmToCI8.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cmToCI8RGB5A3,
|
||||
this.cmToCI8RGB565,
|
||||
this.cmToCI8IA8});
|
||||
this.cmToCI8.Name = "cmToCI8";
|
||||
this.cmToCI8.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToCI8.Text = "To CI8 (Indexed, max. 256 Colors)";
|
||||
//
|
||||
// cmToCI4
|
||||
//
|
||||
this.cmToCI4.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.cmToCI4RGB5A3,
|
||||
this.cmToCI4RGB565,
|
||||
this.cmToCI4IA8});
|
||||
this.cmToCI4.Name = "cmToCI4";
|
||||
this.cmToCI4.Size = new System.Drawing.Size(267, 22);
|
||||
this.cmToCI4.Text = "To CI4 (Indexed, max. 16 Colors)";
|
||||
//
|
||||
// cmToCI8RGB5A3
|
||||
//
|
||||
this.cmToCI8RGB5A3.Name = "cmToCI8RGB5A3";
|
||||
this.cmToCI8RGB5A3.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmToCI8RGB5A3.Tag = "ci8rgb5a3";
|
||||
this.cmToCI8RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
|
||||
this.cmToCI8RGB5A3.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToCI8RGB565
|
||||
//
|
||||
this.cmToCI8RGB565.Name = "cmToCI8RGB565";
|
||||
this.cmToCI8RGB565.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmToCI8RGB565.Tag = "ci8rgb565";
|
||||
this.cmToCI8RGB565.Text = "With RGB565 Palette (Color)";
|
||||
this.cmToCI8RGB565.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToCI8IA8
|
||||
//
|
||||
this.cmToCI8IA8.Name = "cmToCI8IA8";
|
||||
this.cmToCI8IA8.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmToCI8IA8.Tag = "ci8ia8";
|
||||
this.cmToCI8IA8.Text = "With IA8 Palette (B/W with Alpha)";
|
||||
this.cmToCI8IA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToCI4RGB5A3
|
||||
//
|
||||
this.cmToCI4RGB5A3.Name = "cmToCI4RGB5A3";
|
||||
this.cmToCI4RGB5A3.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmToCI4RGB5A3.Tag = "ci4rgb5a3";
|
||||
this.cmToCI4RGB5A3.Text = "With RGB5A3 Palette (Color with Alpha)";
|
||||
this.cmToCI4RGB5A3.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToCI4RGB565
|
||||
//
|
||||
this.cmToCI4RGB565.Name = "cmToCI4RGB565";
|
||||
this.cmToCI4RGB565.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmToCI4RGB565.Tag = "ci4rgb565";
|
||||
this.cmToCI4RGB565.Text = "With RGB565 Palette (Color)";
|
||||
this.cmToCI4RGB565.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// cmToCI4IA8
|
||||
//
|
||||
this.cmToCI4IA8.Name = "cmToCI4IA8";
|
||||
this.cmToCI4IA8.Size = new System.Drawing.Size(283, 22);
|
||||
this.cmToCI4IA8.Tag = "ci4ia8";
|
||||
this.cmToCI4IA8.Text = "With IA8 Palette (B/W with Alpha)";
|
||||
this.cmToCI4IA8.Click += new System.EventHandler(this.cmChangeFormat_Click);
|
||||
//
|
||||
// CustomizeMii_Preview
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnClose;
|
||||
this.ClientSize = new System.Drawing.Size(817, 462);
|
||||
this.Controls.Add(this.lbNoPreview);
|
||||
this.Controls.Add(this.pbPic);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.Panel);
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(833, 500);
|
||||
this.Name = "CustomizeMii_Preview";
|
||||
this.Text = "Preview";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Preview_FormClosing);
|
||||
this.Load += new System.EventHandler(this.Preview_Load);
|
||||
this.Panel.ResumeLayout(false);
|
||||
this.Panel.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pbPic)).EndInit();
|
||||
this.cmFormat.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel Panel;
|
||||
private System.Windows.Forms.Label lbIcon;
|
||||
private System.Windows.Forms.Label lbBanner;
|
||||
public System.Windows.Forms.ComboBox cbBanner;
|
||||
public System.Windows.Forms.Button btnClose;
|
||||
public System.Windows.Forms.ComboBox cbIcon;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.PictureBox pbPic;
|
||||
private System.Windows.Forms.Label lbSize;
|
||||
private System.Windows.Forms.Label lbFormat;
|
||||
public System.Windows.Forms.Label lbSizeText;
|
||||
public System.Windows.Forms.Label lbFormatText;
|
||||
public System.Windows.Forms.Button btnReplace;
|
||||
private System.Windows.Forms.ContextMenuStrip cmFormat;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmRGBA8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmRGB565;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmRGB5A3;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmIA8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmIA4;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmI8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmI4;
|
||||
private System.Windows.Forms.Label lbNoPreview;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmChangeFormat;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToRGBA8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToRGB565;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToRGB5A3;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToIA8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToIA4;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToI8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToI4;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.CheckBox cbCheckerBoard;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI4;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI8RGB5A3;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI8RGB565;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI8IA8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI4RGB5A3;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI4RGB565;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmCI4IA8;
|
||||
private System.Windows.Forms.Label lbTip;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI4;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI8RGB5A3;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI8RGB565;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI8IA8;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI4RGB5A3;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI4RGB565;
|
||||
private System.Windows.Forms.ToolStripMenuItem cmToCI4IA8;
|
||||
}
|
||||
}
|
@ -1,500 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using libWiiSharp;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
public partial class CustomizeMii_Preview : Form
|
||||
{
|
||||
private TplImage[][] images = new TplImage[2][];
|
||||
private U8 bannerBin;
|
||||
private U8 iconBin;
|
||||
private string startTPL;
|
||||
private bool startIcon = false;
|
||||
Timer tipTimer = new Timer();
|
||||
|
||||
public U8 BannerBin { get { return bannerBin; } set { bannerBin = value; } }
|
||||
public U8 IconBin { get { return iconBin; } set { iconBin = value; } }
|
||||
public string StartTPL { get { return startTPL; } set { startTPL = value; } }
|
||||
public bool StartIcon { get { return startIcon; } set { startIcon = value; } }
|
||||
|
||||
public CustomizeMii_Preview()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Icon = global::CustomizeMii.Properties.Resources.CustomizeMii;
|
||||
}
|
||||
|
||||
private void btnClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void Preview_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
images = null;
|
||||
cbBanner.Items.Clear();
|
||||
cbIcon.Items.Clear();
|
||||
}
|
||||
|
||||
private void Preview_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.CenterToParent();
|
||||
cbBanner.Items.Clear();
|
||||
cbIcon.Items.Clear();
|
||||
|
||||
int startIndex = -1;
|
||||
|
||||
List<TplImage> bannerImages = new List<TplImage>();
|
||||
List<TplImage> iconImages = new List<TplImage>();
|
||||
|
||||
for (int i = 0; i < bannerBin.NumOfNodes; i++)
|
||||
{
|
||||
if (bannerBin.StringTable[i].ToLower().EndsWith(".tpl"))
|
||||
{
|
||||
TplImage tmpImage = new TplImage();
|
||||
TPL tmpTpl = TPL.Load(bannerBin.Data[i]);
|
||||
|
||||
if (i == 10) { }
|
||||
|
||||
tmpImage.fileName = bannerBin.StringTable[i];
|
||||
tmpImage.tplFormat = tmpTpl.GetTextureFormat(0).ToString();
|
||||
tmpImage.tplImage = tmpTpl.ExtractTexture();
|
||||
tmpImage.checkerBoard = createCheckerBoard(tmpImage.tplImage.Width, tmpImage.tplImage.Height);
|
||||
|
||||
if (tmpImage.tplFormat.StartsWith("CI"))
|
||||
tmpImage.tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
|
||||
|
||||
bannerImages.Add(tmpImage);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < iconBin.NumOfNodes; i++)
|
||||
{
|
||||
if (iconBin.StringTable[i].ToLower().EndsWith(".tpl"))
|
||||
{
|
||||
TplImage tmpImage = new TplImage();
|
||||
TPL tmpTpl = TPL.Load(iconBin.Data[i]);
|
||||
|
||||
tmpImage.fileName = iconBin.StringTable[i];
|
||||
tmpImage.tplFormat = tmpTpl.GetTextureFormat(0).ToString();
|
||||
tmpImage.tplImage = tmpTpl.ExtractTexture();
|
||||
tmpImage.checkerBoard = createCheckerBoard(tmpImage.tplImage.Width, tmpImage.tplImage.Height);
|
||||
|
||||
if (tmpImage.tplFormat.StartsWith("CI"))
|
||||
tmpImage.tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
|
||||
|
||||
iconImages.Add(tmpImage);
|
||||
}
|
||||
}
|
||||
|
||||
images[0] = bannerImages.ToArray();
|
||||
images[1] = iconImages.ToArray();
|
||||
|
||||
for (int i = 0; i < images[0].Length; i++)
|
||||
{
|
||||
cbBanner.Items.Add(images[0][i].fileName);
|
||||
if (!startIcon)
|
||||
if (images[0][i].fileName.ToLower() == startTPL.ToLower())
|
||||
startIndex = i;
|
||||
}
|
||||
|
||||
for (int i = 0; i < images[1].Length; i++)
|
||||
{
|
||||
cbIcon.Items.Add(images[1][i].fileName);
|
||||
if (startIcon)
|
||||
if (images[1][i].fileName.ToLower() == startTPL.ToLower())
|
||||
startIndex = i;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (startIndex != -1)
|
||||
if (!startIcon)
|
||||
cbBanner.SelectedIndex = startIndex;
|
||||
else
|
||||
cbIcon.SelectedIndex = startIndex;
|
||||
}
|
||||
catch { }
|
||||
|
||||
if (cbBanner.SelectedIndex != -1) cbBanner.Select();
|
||||
else if (cbIcon.SelectedIndex != -1) cbIcon.Select();
|
||||
|
||||
tipTimer.Interval = 7000;
|
||||
tipTimer.Tag = 0;
|
||||
tipTimer.Tick += new EventHandler(tipTimer_Tick);
|
||||
}
|
||||
|
||||
void tipTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
lbTip.Visible = false;
|
||||
tipTimer.Stop();
|
||||
}
|
||||
|
||||
private void cbBanner_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cbBanner.SelectedIndex != -1)
|
||||
{
|
||||
pbPic.Image = images[0][cbBanner.SelectedIndex].tplImage;
|
||||
lbFormat.Text = images[0][cbBanner.SelectedIndex].tplFormat;
|
||||
lbSize.Text = string.Format("{0} x {1}", images[0][cbBanner.SelectedIndex].tplImage.Width, images[0][cbBanner.SelectedIndex].tplImage.Height);
|
||||
|
||||
if (cbCheckerBoard.Checked) pbPic.BackgroundImage = images[0][cbBanner.SelectedIndex].checkerBoard;
|
||||
|
||||
cbIcon.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbIcon_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cbIcon.SelectedIndex != -1)
|
||||
{
|
||||
pbPic.Image = images[1][cbIcon.SelectedIndex].tplImage;
|
||||
lbFormat.Text = images[1][cbIcon.SelectedIndex].tplFormat;
|
||||
lbSize.Text = string.Format("{0} x {1}", images[1][cbIcon.SelectedIndex].tplImage.Width, images[1][cbIcon.SelectedIndex].tplImage.Height);
|
||||
|
||||
if (cbCheckerBoard.Checked) pbPic.BackgroundImage = images[1][cbIcon.SelectedIndex].checkerBoard;
|
||||
|
||||
cbBanner.SelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
private Image resizeImage(Image img, int x, int y)
|
||||
{
|
||||
Image newimage = new Bitmap(x, y);
|
||||
|
||||
using (Graphics gfx = Graphics.FromImage(newimage))
|
||||
gfx.DrawImage(img, 0, 0, x, y);
|
||||
|
||||
return newimage;
|
||||
}
|
||||
|
||||
private Image createCheckerBoard(int w, int h)
|
||||
{
|
||||
Color darkColor = Color.DarkGray;
|
||||
Color lightColor = Color.White;
|
||||
int tileSize = 10;
|
||||
|
||||
Bitmap img = new Bitmap(w, h);
|
||||
|
||||
using (Graphics g = Graphics.FromImage(img))
|
||||
{
|
||||
g.Clear(lightColor);
|
||||
|
||||
for (int col = 0; col < w; col += tileSize)
|
||||
{
|
||||
for (int row = 0; row < h; row += tileSize)
|
||||
{
|
||||
Color curColor;
|
||||
|
||||
if ((col / tileSize) % 2 == 0)
|
||||
curColor = (row / tileSize) % 2 == 0 ? darkColor : lightColor;
|
||||
else
|
||||
curColor = (row / tileSize) % 2 == 0 ? lightColor : darkColor;
|
||||
|
||||
|
||||
if (curColor == lightColor) continue;
|
||||
|
||||
Rectangle rect = new Rectangle(col, row, tileSize, tileSize);
|
||||
g.FillRectangle(new SolidBrush(darkColor), rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (Image)img;
|
||||
}
|
||||
|
||||
private void btnReplace_Click(object sender, EventArgs e)
|
||||
{
|
||||
cmFormat.Show(MousePosition);
|
||||
}
|
||||
|
||||
private void cmFormat_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFileDialog ofd = new OpenFileDialog();
|
||||
ofd.Filter = "PNG|*.png|JPG|*.jpg|GIF|*.gif|BMP|*.bmp|TPL|*.tpl|All|*.png;*.jpg;*.gif;*.bmp;*.tpl";
|
||||
ofd.FilterIndex = 6;
|
||||
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
try
|
||||
{
|
||||
string tplName;
|
||||
TPL tmpTpl = new TPL();
|
||||
Image newImg;
|
||||
|
||||
if (cbIcon.SelectedIndex == -1)
|
||||
{
|
||||
tplName = cbBanner.SelectedItem.ToString().ToLower();
|
||||
tmpTpl.LoadFile(bannerBin.Data[bannerBin.GetNodeIndex(tplName)]);
|
||||
}
|
||||
else
|
||||
{
|
||||
tplName = cbIcon.SelectedItem.ToString().ToLower();
|
||||
tmpTpl.LoadFile(iconBin.Data[iconBin.GetNodeIndex(tplName)]);
|
||||
}
|
||||
|
||||
if (!ofd.FileName.ToLower().EndsWith(".tpl")) newImg = Image.FromFile(ofd.FileName);
|
||||
else
|
||||
{
|
||||
TPL newTpl = TPL.Load(ofd.FileName);
|
||||
newImg = newTpl.ExtractTexture();
|
||||
}
|
||||
|
||||
Size tplSize = tmpTpl.GetTextureSize(0);
|
||||
|
||||
if (newImg.Width != tplSize.Width ||
|
||||
newImg.Height != tplSize.Height)
|
||||
newImg = resizeImage(newImg, tplSize.Width, tplSize.Height);
|
||||
|
||||
ToolStripMenuItem cmSender = sender as ToolStripMenuItem;
|
||||
TPL_TextureFormat tplFormat;
|
||||
TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
|
||||
switch (cmSender.Tag.ToString().ToLower())
|
||||
{
|
||||
case "i4":
|
||||
tplFormat = TPL_TextureFormat.I4;
|
||||
break;
|
||||
case "i8":
|
||||
tplFormat = TPL_TextureFormat.I8;
|
||||
break;
|
||||
case "ia4":
|
||||
tplFormat = TPL_TextureFormat.IA4;
|
||||
break;
|
||||
case "ia8":
|
||||
tplFormat = TPL_TextureFormat.IA8;
|
||||
break;
|
||||
case "rgb565":
|
||||
tplFormat = TPL_TextureFormat.RGB565;
|
||||
break;
|
||||
case "rgb5a3":
|
||||
tplFormat = TPL_TextureFormat.RGB5A3;
|
||||
break;
|
||||
case "ci8rgb5a3":
|
||||
tplFormat = TPL_TextureFormat.CI8;
|
||||
pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
break;
|
||||
case "ci8rgb565":
|
||||
tplFormat = TPL_TextureFormat.CI8;
|
||||
pFormat = TPL_PaletteFormat.RGB565;
|
||||
break;
|
||||
case "ci8ia8":
|
||||
tplFormat = TPL_TextureFormat.CI8;
|
||||
pFormat = TPL_PaletteFormat.IA8;
|
||||
break;
|
||||
case "ci4rgb5a3":
|
||||
tplFormat = TPL_TextureFormat.CI4;
|
||||
pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
break;
|
||||
case "ci4rgb565":
|
||||
tplFormat = TPL_TextureFormat.CI4;
|
||||
pFormat = TPL_PaletteFormat.RGB565;
|
||||
break;
|
||||
case "ci4ia8":
|
||||
tplFormat = TPL_TextureFormat.CI4;
|
||||
pFormat = TPL_PaletteFormat.IA8;
|
||||
break;
|
||||
default:
|
||||
tplFormat = TPL_TextureFormat.RGBA8;
|
||||
break;
|
||||
}
|
||||
|
||||
tmpTpl.RemoveTexture(0);
|
||||
tmpTpl.AddTexture(newImg, tplFormat, pFormat);
|
||||
|
||||
if (cbBanner.SelectedIndex != -1)
|
||||
{
|
||||
bannerBin.ReplaceFile(bannerBin.GetNodeIndex(tplName), tmpTpl.ToByteArray());
|
||||
images[0][cbBanner.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
|
||||
images[0][cbBanner.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
|
||||
|
||||
if (images[0][cbBanner.SelectedIndex].tplFormat.StartsWith("CI"))
|
||||
images[0][cbBanner.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
|
||||
|
||||
pbPic.Image = images[0][cbBanner.SelectedIndex].tplImage;
|
||||
lbFormat.Text = images[0][cbBanner.SelectedIndex].tplFormat;
|
||||
lbSize.Text = string.Format("{0} x {1}", images[0][cbBanner.SelectedIndex].tplImage.Width, images[0][cbBanner.SelectedIndex].tplImage.Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
iconBin.ReplaceFile(iconBin.GetNodeIndex(tplName), tmpTpl.ToByteArray());
|
||||
images[1][cbIcon.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
|
||||
images[1][cbIcon.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
|
||||
|
||||
if (images[1][cbIcon.SelectedIndex].tplFormat.StartsWith("CI"))
|
||||
images[1][cbIcon.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
|
||||
|
||||
pbPic.Image = images[1][cbIcon.SelectedIndex].tplImage;
|
||||
lbFormat.Text = images[1][cbIcon.SelectedIndex].tplFormat;
|
||||
lbSize.Text = string.Format("{0} x {1}", images[1][cbIcon.SelectedIndex].tplImage.Width, images[1][cbIcon.SelectedIndex].tplImage.Height);
|
||||
}
|
||||
|
||||
if (cbBanner.SelectedIndex != -1) cbBanner.Select();
|
||||
else if (cbIcon.SelectedIndex != -1) cbIcon.Select();
|
||||
|
||||
if (tplFormat == TPL_TextureFormat.CI4 || tplFormat == TPL_TextureFormat.CI8)
|
||||
{
|
||||
lbTip.Visible = true;
|
||||
tipTimer.Start();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{ MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
|
||||
}
|
||||
}
|
||||
|
||||
private void cmChangeFormat_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
string tplName;
|
||||
TPL tmpTpl = new TPL();
|
||||
Image newImg;
|
||||
|
||||
if (cbIcon.SelectedIndex == -1)
|
||||
{
|
||||
tplName = cbBanner.SelectedItem.ToString().ToLower();
|
||||
tmpTpl.LoadFile(bannerBin.Data[bannerBin.GetNodeIndex(tplName)]);
|
||||
}
|
||||
else
|
||||
{
|
||||
tplName = cbIcon.SelectedItem.ToString().ToLower();
|
||||
tmpTpl.LoadFile(iconBin.Data[iconBin.GetNodeIndex(tplName)]);
|
||||
}
|
||||
|
||||
newImg = tmpTpl.ExtractTexture();
|
||||
TPL_TextureFormat tplFormat;
|
||||
TPL_PaletteFormat pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
|
||||
ToolStripMenuItem cmSender = sender as ToolStripMenuItem;
|
||||
switch (cmSender.Tag.ToString().ToLower())
|
||||
{
|
||||
case "i4":
|
||||
tplFormat = TPL_TextureFormat.I4;
|
||||
break;
|
||||
case "i8":
|
||||
tplFormat = TPL_TextureFormat.I8;
|
||||
break;
|
||||
case "ia4":
|
||||
tplFormat = TPL_TextureFormat.IA4;
|
||||
break;
|
||||
case "ia8":
|
||||
tplFormat = TPL_TextureFormat.IA8;
|
||||
break;
|
||||
case "rgb565":
|
||||
tplFormat = TPL_TextureFormat.RGB565;
|
||||
break;
|
||||
case "rgb5a3":
|
||||
tplFormat = TPL_TextureFormat.RGB5A3;
|
||||
break;
|
||||
case "ci8rgb5a3":
|
||||
tplFormat = TPL_TextureFormat.CI8;
|
||||
pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
break;
|
||||
case "ci8rgb565":
|
||||
tplFormat = TPL_TextureFormat.CI8;
|
||||
pFormat = TPL_PaletteFormat.RGB565;
|
||||
break;
|
||||
case "ci8ia8":
|
||||
tplFormat = TPL_TextureFormat.CI8;
|
||||
pFormat = TPL_PaletteFormat.IA8;
|
||||
break;
|
||||
case "ci4rgb5a3":
|
||||
tplFormat = TPL_TextureFormat.CI4;
|
||||
pFormat = TPL_PaletteFormat.RGB5A3;
|
||||
break;
|
||||
case "ci4rgb565":
|
||||
tplFormat = TPL_TextureFormat.CI4;
|
||||
pFormat = TPL_PaletteFormat.RGB565;
|
||||
break;
|
||||
case "ci4ia8":
|
||||
tplFormat = TPL_TextureFormat.CI4;
|
||||
pFormat = TPL_PaletteFormat.IA8;
|
||||
break;
|
||||
default:
|
||||
tplFormat = TPL_TextureFormat.RGBA8;
|
||||
break;
|
||||
}
|
||||
|
||||
if (tmpTpl.GetTextureFormat(0) == tplFormat) return;
|
||||
|
||||
tmpTpl.RemoveTexture(0);
|
||||
tmpTpl.AddTexture(newImg, tplFormat, pFormat);
|
||||
|
||||
if (cbBanner.SelectedIndex != -1)
|
||||
{
|
||||
bannerBin.ReplaceFile(bannerBin.GetNodeIndex(tplName), tmpTpl.ToByteArray());
|
||||
images[0][cbBanner.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
|
||||
images[0][cbBanner.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
|
||||
|
||||
if (images[0][cbBanner.SelectedIndex].tplFormat.StartsWith("CI"))
|
||||
images[0][cbBanner.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
|
||||
|
||||
pbPic.Image = images[0][cbBanner.SelectedIndex].tplImage;
|
||||
lbFormat.Text = images[0][cbBanner.SelectedIndex].tplFormat;
|
||||
lbSize.Text = string.Format("{0} x {1}", images[0][cbBanner.SelectedIndex].tplImage.Width, images[0][cbBanner.SelectedIndex].tplImage.Height);
|
||||
}
|
||||
else
|
||||
{
|
||||
iconBin.ReplaceFile(iconBin.GetNodeIndex(tplName), tmpTpl.ToByteArray());
|
||||
images[1][cbIcon.SelectedIndex].tplImage = tmpTpl.ExtractTexture();
|
||||
images[1][cbIcon.SelectedIndex].tplFormat = tmpTpl.GetTextureFormat(0).ToString();
|
||||
|
||||
if (images[1][cbIcon.SelectedIndex].tplFormat.StartsWith("CI"))
|
||||
images[1][cbIcon.SelectedIndex].tplFormat += " + " + tmpTpl.GetPaletteFormat(0);
|
||||
|
||||
pbPic.Image = images[1][cbIcon.SelectedIndex].tplImage;
|
||||
lbFormat.Text = images[1][cbIcon.SelectedIndex].tplFormat;
|
||||
lbSize.Text = string.Format("{0} x {1}", images[1][cbIcon.SelectedIndex].tplImage.Width, images[1][cbIcon.SelectedIndex].tplImage.Height);
|
||||
}
|
||||
|
||||
if (cbBanner.SelectedIndex != -1) cbBanner.Select();
|
||||
else if (cbIcon.SelectedIndex != -1) cbIcon.Select();
|
||||
|
||||
if (tplFormat == TPL_TextureFormat.CI4 || tplFormat == TPL_TextureFormat.CI8)
|
||||
{
|
||||
lbTip.Visible = true;
|
||||
tipTimer.Start();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{ MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); }
|
||||
}
|
||||
|
||||
private void cbCheckerBoard_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (cbCheckerBoard.Checked)
|
||||
{
|
||||
if (cbBanner.SelectedIndex != -1)
|
||||
pbPic.BackgroundImage = images[0][cbBanner.SelectedIndex].checkerBoard;
|
||||
else
|
||||
pbPic.BackgroundImage = images[1][cbIcon.SelectedIndex].checkerBoard;
|
||||
}
|
||||
else pbPic.BackgroundImage = null;
|
||||
|
||||
if (cbBanner.SelectedIndex != -1)
|
||||
cbBanner.Focus();
|
||||
else
|
||||
cbIcon.Focus();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
||||
<metadata name="cmFormat.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>14, 7</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>36</value>
|
||||
</metadata>
|
||||
</root>
|
File diff suppressed because it is too large
Load Diff
@ -1,82 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
public struct TplImage
|
||||
{
|
||||
public System.Drawing.Image tplImage;
|
||||
public System.Drawing.Image checkerBoard;
|
||||
public string tplFormat;
|
||||
public string fileName;
|
||||
}
|
||||
|
||||
public struct TransmitInfo
|
||||
{
|
||||
public double compressionRatio;
|
||||
public double transmittedLength;
|
||||
public int timeElapsed;
|
||||
}
|
||||
|
||||
public struct BnsConversionInfo
|
||||
{
|
||||
public enum LoopType
|
||||
{
|
||||
None,
|
||||
FromWave,
|
||||
Manual
|
||||
}
|
||||
|
||||
public LoopType loopType;
|
||||
public int loopStartSample;
|
||||
public string audioFile;
|
||||
public bool stereoToMono;
|
||||
}
|
||||
|
||||
public struct WadCreationInfo
|
||||
{
|
||||
public enum NandLoader : int
|
||||
{
|
||||
comex = 0,
|
||||
Waninkoko = 1,
|
||||
}
|
||||
|
||||
public string titleId;
|
||||
public string[] titles;
|
||||
public string allLangTitle;
|
||||
public int startupIos;
|
||||
public string sound;
|
||||
public string dol;
|
||||
public string outFile;
|
||||
public NandLoader nandLoader;
|
||||
public bool sendToWii;
|
||||
public libWiiSharp.Protocol transmitProtocol;
|
||||
public string transmitIp;
|
||||
public int transmitIos;
|
||||
public bool saveAfterTransmit;
|
||||
public bool success;
|
||||
public bool sendWadReady;
|
||||
public byte[] wadFile;
|
||||
public bool lz77;
|
||||
}
|
||||
|
||||
public struct Progress
|
||||
{
|
||||
public int progressValue;
|
||||
public string progressState;
|
||||
}
|
||||
}
|
169
CustomizeMii/CustomizeMii_Transmit.Designer.cs
generated
169
CustomizeMii/CustomizeMii_Transmit.Designer.cs
generated
@ -1,169 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
partial class CustomizeMii_Transmit
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.lbProtocol = new System.Windows.Forms.Label();
|
||||
this.cmbProtocol = new System.Windows.Forms.ComboBox();
|
||||
this.lbIP = new System.Windows.Forms.Label();
|
||||
this.tbIP = new System.Windows.Forms.TextBox();
|
||||
this.lbIOS = new System.Windows.Forms.Label();
|
||||
this.tbIOS = new System.Windows.Forms.TextBox();
|
||||
this.btnTransmit = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// lbProtocol
|
||||
//
|
||||
this.lbProtocol.AutoSize = true;
|
||||
this.lbProtocol.Location = new System.Drawing.Point(12, 16);
|
||||
this.lbProtocol.Name = "lbProtocol";
|
||||
this.lbProtocol.Size = new System.Drawing.Size(49, 13);
|
||||
this.lbProtocol.TabIndex = 0;
|
||||
this.lbProtocol.Text = "Protocol:";
|
||||
//
|
||||
// cmbProtocol
|
||||
//
|
||||
this.cmbProtocol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cmbProtocol.FormattingEnabled = true;
|
||||
this.cmbProtocol.Items.AddRange(new object[] {
|
||||
"Homebrew Channel 1.0.5+ (JODI)",
|
||||
"Homebrew Channel -1.0.4 (HAXX)"});
|
||||
this.cmbProtocol.Location = new System.Drawing.Point(67, 13);
|
||||
this.cmbProtocol.Name = "cmbProtocol";
|
||||
this.cmbProtocol.Size = new System.Drawing.Size(194, 21);
|
||||
this.cmbProtocol.TabIndex = 1;
|
||||
//
|
||||
// lbIP
|
||||
//
|
||||
this.lbIP.AutoSize = true;
|
||||
this.lbIP.Location = new System.Drawing.Point(12, 48);
|
||||
this.lbIP.Name = "lbIP";
|
||||
this.lbIP.Size = new System.Drawing.Size(61, 13);
|
||||
this.lbIP.TabIndex = 2;
|
||||
this.lbIP.Text = "IP Address:";
|
||||
//
|
||||
// tbIP
|
||||
//
|
||||
this.tbIP.Location = new System.Drawing.Point(79, 45);
|
||||
this.tbIP.Name = "tbIP";
|
||||
this.tbIP.Size = new System.Drawing.Size(182, 20);
|
||||
this.tbIP.TabIndex = 3;
|
||||
//
|
||||
// lbIOS
|
||||
//
|
||||
this.lbIOS.AutoSize = true;
|
||||
this.lbIOS.Location = new System.Drawing.Point(12, 78);
|
||||
this.lbIOS.Name = "lbIOS";
|
||||
this.lbIOS.Size = new System.Drawing.Size(127, 13);
|
||||
this.lbIOS.TabIndex = 4;
|
||||
this.lbIOS.Text = "IOS to use for installation:";
|
||||
//
|
||||
// tbIOS
|
||||
//
|
||||
this.tbIOS.Location = new System.Drawing.Point(145, 75);
|
||||
this.tbIOS.Name = "tbIOS";
|
||||
this.tbIOS.Size = new System.Drawing.Size(116, 20);
|
||||
this.tbIOS.TabIndex = 5;
|
||||
this.tbIOS.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tbIOS_KeyPress);
|
||||
//
|
||||
// btnTransmit
|
||||
//
|
||||
this.btnTransmit.Location = new System.Drawing.Point(15, 109);
|
||||
this.btnTransmit.Name = "btnTransmit";
|
||||
this.btnTransmit.Size = new System.Drawing.Size(120, 23);
|
||||
this.btnTransmit.TabIndex = 6;
|
||||
this.btnTransmit.Text = "Transmit";
|
||||
this.btnTransmit.UseVisualStyleBackColor = true;
|
||||
this.btnTransmit.Click += new System.EventHandler(this.btnTransmit_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(141, 109);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(120, 23);
|
||||
this.btnCancel.TabIndex = 6;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// CustomizeMii_Transmit
|
||||
//
|
||||
this.AcceptButton = this.btnTransmit;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(273, 145);
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.Controls.Add(this.btnTransmit);
|
||||
this.Controls.Add(this.tbIOS);
|
||||
this.Controls.Add(this.lbIOS);
|
||||
this.Controls.Add(this.tbIP);
|
||||
this.Controls.Add(this.lbIP);
|
||||
this.Controls.Add(this.cmbProtocol);
|
||||
this.Controls.Add(this.lbProtocol);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "CustomizeMii_Transmit";
|
||||
this.Text = "CustomizeMii_Transmit";
|
||||
this.Load += new System.EventHandler(this.CustomizeMii_Transmit_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label lbProtocol;
|
||||
private System.Windows.Forms.ComboBox cmbProtocol;
|
||||
private System.Windows.Forms.Label lbIP;
|
||||
private System.Windows.Forms.TextBox tbIP;
|
||||
private System.Windows.Forms.Label lbIOS;
|
||||
private System.Windows.Forms.TextBox tbIOS;
|
||||
private System.Windows.Forms.Button btnTransmit;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
}
|
||||
}
|
@ -1,92 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace CustomizeMii
|
||||
{
|
||||
public partial class CustomizeMii_Transmit : Form
|
||||
{
|
||||
public int Protocol { get { return cmbProtocol.SelectedIndex; } set { cmbProtocol.SelectedIndex = value; } }
|
||||
public string IPAddress { get { return tbIP.Text; } set { tbIP.Text = value; } }
|
||||
public string IOS { get { return tbIOS.Text; } set { tbIOS.Text = value; } }
|
||||
|
||||
public CustomizeMii_Transmit()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void CustomizeMii_Transmit_Load(object sender, System.EventArgs e)
|
||||
{
|
||||
this.CenterToParent();
|
||||
|
||||
try
|
||||
{
|
||||
cmbProtocol.SelectedIndex = Properties.Settings.Default.Protocol;
|
||||
tbIP.Text = Properties.Settings.Default.IP;
|
||||
tbIOS.Text = Properties.Settings.Default.IOS;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
private void btnCancel_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btnTransmit_Click(object sender, System.EventArgs e)
|
||||
{
|
||||
string IpPattern = @"([01]?\d\d?|2[0-4]\d|25[0-5])\." +
|
||||
@"([01]?\d\d?|2[0-4]\d|25[0-5])\." +
|
||||
@"([01]?\d\d?|2[0-4]\d|25[0-5])\." +
|
||||
@"([01]?\d\d?|2[0-4]\d|25[0-5])";
|
||||
Regex IpAdress = new Regex(IpPattern);
|
||||
|
||||
if (IpAdress.IsMatch(tbIP.Text))
|
||||
{
|
||||
int tmp = int.Parse(tbIOS.Text);
|
||||
if (tmp > 0 && tmp < 255)
|
||||
{
|
||||
Properties.Settings.Default.Protocol = cmbProtocol.SelectedIndex;
|
||||
Properties.Settings.Default.IP = tbIP.Text;
|
||||
Properties.Settings.Default.IOS = tbIOS.Text;
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
tbIOS.Focus();
|
||||
tbIOS.SelectAll();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
tbIP.Focus();
|
||||
tbIP.SelectAll();
|
||||
}
|
||||
}
|
||||
|
||||
private void tbIOS_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
e.Handled = !char.IsDigit(e.KeyChar) && e.KeyChar != '\b';
|
||||
}
|
||||
}
|
||||
}
|
@ -1,120 +0,0 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
@ -1,138 +0,0 @@
|
||||
These are some basic instructions for CustomizeMii.
|
||||
|
||||
At the very beginning, let me say this again: Don't install any WADs without a proper brick protection!
|
||||
|
||||
Ok, so you want to create your own custom channels?
|
||||
First it is important to understand how the creation of a custom channel with CustomizeMii works.
|
||||
Skip this if you already know.
|
||||
|
||||
Basically, you can't create a channel from scratch. Well, you could, but not with this application.
|
||||
You need a base WAD which you can modify. You can either download one within this application or use
|
||||
any WAD (must be a channel of course) from anywhere.
|
||||
You can then edit the WAD file.
|
||||
The editing of animations is for advanced users, so if you're not familiar with brlyt's and brlan's
|
||||
(I guess you're not unless you created your own animations), get a static base WAD or one with the
|
||||
animation you want.
|
||||
|
||||
So, let's start to create a channel. Download a base WAD through the application or load one from your HDD.
|
||||
You can preview the downloadable WADs through the preview button.
|
||||
All options below are optional!
|
||||
|
||||
|
||||
|
||||
MIXING BANNER, ICON AND SOUND
|
||||
|
||||
The options below the downloadable base WADs are the "replace" options.
|
||||
Let's say you have loaded WAD A as a base, but you want the icon of WAD B and you have a 00000000.app that
|
||||
contains a sound that you want to use.
|
||||
No problem! Just use the dropdownbox which yet says "Banner" and choose "Icon". Click on the browse button
|
||||
next to it and choose WAD B. The icon of WAD B will replace the icon of WAD A.
|
||||
After that, choose "Sound" from the dropdownbox and browse for the 00000000.app, the sound.bin will be
|
||||
extracted and used instead of the one within WAD A.
|
||||
|
||||
Note: These features are non-destructive, i.e. you can always use the clear button to get back to the
|
||||
banner/icon/sound of WAD A!
|
||||
|
||||
|
||||
|
||||
CHANNEL INFORMATION
|
||||
|
||||
You may want to change the channel information, i.e. the title and ID.
|
||||
Let's change the channel title first. It's the text that will be displayed when you hold your cursor
|
||||
over the channel. Goto the "Title" tab and enter a title for all languages. If you want to change the
|
||||
title for a specific language, just use the language's textbox. If you want a different title for every
|
||||
language, you don't need to fill in a title for all languages.
|
||||
You may also use the translate "Channel" button. Enter the english name in the all languages textbox
|
||||
(e.g. "MPlayer Channel"). Click translate and it will be automatically translated to each language.
|
||||
Now, the title ID. Open the "Options" tab and you'll see a textbox for the ID. The ID is 4 characters long
|
||||
and only contains letters and numerics. Lower case letters will automatically converted to upper case.
|
||||
Change it to a unique(!) ID, because channels will overwrite existing channles with the same ID!
|
||||
|
||||
I recommend not to use any title ID beginning with the following characters, because official channels
|
||||
use these and thus your channel may overwrite them:
|
||||
C, E, F, H, J, L, M, N, P, Q, W
|
||||
|
||||
|
||||
|
||||
INSERTING A NEW DOL
|
||||
|
||||
Let's bring some life into the channel. In the "Options" tab, use the browse button for a new DOL.
|
||||
Either load a forwarder, the DOL of any application or a WAD to use it's DOL. Note that some applications
|
||||
require more than just a DOL and thus may not work in a channel (e.g. MPlayer CE).
|
||||
Choose a NAND loader or just stick with the one selected (both will do fine).
|
||||
|
||||
You can also use the built-in forwarder creation by using the forwarder button right below the browse button
|
||||
for DOLs.
|
||||
You need the ForwardMii.dll in order to use the forwarder creation.
|
||||
|
||||
|
||||
|
||||
INSERTING A NEW SOUND
|
||||
|
||||
For the sound, you can either use a wave or mp3 (needs lame.exe) file or the sound replace function to use
|
||||
the sound of an existing sound.bin/00000000.app/WAD.
|
||||
If you want looped sound, open your wave file with wavosaur and add loop points before.
|
||||
|
||||
To save space, you can convert your wav or mp3 files to BNS. You can take the loop from a prelooped wave file
|
||||
or enter the loop start point manually. Wave files must be 16bit PCM.
|
||||
It is possible to directly convert stereo Wave files to mono BNS files, note that only the left channel of
|
||||
the Wave will be taken.
|
||||
|
||||
|
||||
|
||||
EDITING THE BANNER/ICON (If you're an advanced user and want to edit the brlyt/brlan, do that first!)
|
||||
|
||||
So, let's begin with the real customization. I will only talk about the banner here, the instructions
|
||||
are the same for the icon.
|
||||
Goto the "Banner" tab. You shouldn't touch the add and remove buttons, they're for advanced users that
|
||||
change the animation. (However, they can't really harm your channel, as CustomizeMii will check for missing
|
||||
and unneeded TPLs while creating a WAD).
|
||||
You will see a list with all TPLs inside the banner.bin. When you select a TPL,
|
||||
it's current format will be shown in the "Format" dropdownbox. Note that CustomizeMii can read 8 different
|
||||
TPL formats, but only write 3 (RGBA8, RGB565 and RGB5A3), that should be enough for your needs.
|
||||
You can use the preview button to preview a TPL (obvious, right?), but you get one more important info,
|
||||
the image size. It will be shown in the title of the preview window. If your images aren't the same size,
|
||||
they will be resized! So be sure to have at least the correct aspect ratio, so your images wont be
|
||||
squeezed or whatever.
|
||||
Before replacing the image, choose a format from the dropdownbox.
|
||||
(RGBA8 = High Quality, Big Size --- RGB565 = Moderate Quality, Small Size --- RGB5A3 = Bad Quality, Small Size)
|
||||
Now you can use the replace button to insert your image. Preview the TPL after replacing to check the
|
||||
image. Maybe you want to use another format though? No problem, just replace the TPL again.
|
||||
|
||||
Note: You can use the "Make Transparent" checkbox to make a TPL transparent, e.g. if you don't like
|
||||
one piece of an animation (It's non-destructive, i.e. you can always uncheck the box).
|
||||
|
||||
|
||||
|
||||
EDITING THE ANIMATION (Advanced users only!)
|
||||
|
||||
Skip this part, if you don't really know what brlyt and brlan files are and how they're structured.
|
||||
Goto the "Layout" tab. You will see the banner.brlyt and icon.brlyt there.
|
||||
Above the buttons is a text that will indicate whether you're doing actions on the "Banner" or
|
||||
the "Icon" (When you select the banner.brlyt, you're editing the "Banner" and vice versa).
|
||||
Now, just replace the banner.brlyt and icon.brlyt files as you want. You can use the list TPLs button
|
||||
afterwards to see all TPLs that are required by the banner.brlyt/icon.brlyt (Don't worry, CustomizeMii
|
||||
won't let you create a WAD, if you forgot a required TPL).
|
||||
Now, goto the "Animation" tab. It's similar to the "Layout" tab. You shouldn't touch the add or delete button
|
||||
unless your base WAD only has a banner.brlan and you want to use a banner_Start.brlan and banner_Loop.brlan.
|
||||
In this case, first add the two files and then delete the old banner.brlan.
|
||||
Else just replace the files with yours. Be absolutely sure the your brlan files only refer to panes that are
|
||||
indicated in your brlyt files!
|
||||
That's it, here's nothing left to do.
|
||||
|
||||
|
||||
|
||||
CREATING THE WAD (OR SENDING IT TO THE WII)
|
||||
|
||||
Well, your channel should be ready to be created.
|
||||
Just click on the create WAD button.
|
||||
CustomizeMii will do some failure checks and if all went fine, a save dialog will pop up.
|
||||
If you get an error or warning, read the message carefully. It should give you enough information to fix
|
||||
the problem yourself.
|
||||
You can also send the Channel directly to the Wii. For it to work, the Channel must be less than 4 MB of space.
|
||||
Make sure the Homebrew Channel is running and connected. Click the send WAD button. Choose a protocol
|
||||
and enter your Wii's IP and the IOS to use for installation. Click on transmit to start the creation and
|
||||
transmission process. After the channel was sent, you will be asked if you want to save the Channel.
|
||||
|
||||
So, if you got down to here, you're done by now. Please, if you find any bugs or have suggestions, take some
|
||||
seconds to report them at the issue tracker: http://code.google.com/p/customizemii/issues/list
|
@ -1,245 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.IO;
|
||||
|
||||
class MP3Info
|
||||
{
|
||||
//Private Variables
|
||||
private int fileSize;
|
||||
private int headerPos;
|
||||
private BitArray bitHeader;
|
||||
private MpegVersion mpegVersion;
|
||||
private MpegLayer mpegLayer;
|
||||
private int bitrate;
|
||||
private int frequency;
|
||||
private bool paddingBit;
|
||||
private int frameLength;
|
||||
private int frameCount;
|
||||
private double secLength;
|
||||
private int waveSamples;
|
||||
|
||||
//Public Variables
|
||||
public int FileSize { get { return fileSize; } }
|
||||
public MpegVersion MPEGVersion { get { return mpegVersion; } }
|
||||
public MpegLayer MPEGLayer { get { return mpegLayer; } }
|
||||
public int Bitrate { get { return bitrate; } }
|
||||
public int Frequency { get { return frequency; } }
|
||||
public int FrameLength { get { return frameLength; } }
|
||||
public int FrameCount { get { return frameCount; } }
|
||||
public double Seconds { get { return secLength; } }
|
||||
public int AudioSamples { get { return waveSamples; } }
|
||||
|
||||
//Public Functions
|
||||
public MP3Info(string mp3File)
|
||||
{
|
||||
FileInfo fi = new FileInfo(mp3File);
|
||||
this.fileSize = (int)fi.Length;
|
||||
|
||||
FileStream fs = fi.OpenRead();
|
||||
fs.Seek(0, SeekOrigin.Begin);
|
||||
|
||||
this.headerPos = SearchHeader(fs);
|
||||
|
||||
byte[] header = new byte[4];
|
||||
fs.Seek(this.headerPos, SeekOrigin.Begin);
|
||||
fs.Read(header, 0, header.Length);
|
||||
fs.Close();
|
||||
|
||||
GetHeaderBits(header);
|
||||
LoadHeader();
|
||||
}
|
||||
|
||||
public MP3Info(byte[] mp3Header)
|
||||
{
|
||||
GetHeaderBits(mp3Header);
|
||||
LoadHeader();
|
||||
}
|
||||
|
||||
//Private Functions
|
||||
private void ShowHeader()
|
||||
{
|
||||
//For debugging
|
||||
if (this.bitHeader != null)
|
||||
{
|
||||
string strBits = string.Empty;
|
||||
foreach (bool x in this.bitHeader)
|
||||
if (x) strBits += "1"; else strBits += "0";
|
||||
|
||||
for (int i = strBits.Length - 8; i >= 0; i -= 8)
|
||||
strBits = strBits.Insert(i, " ");
|
||||
|
||||
System.Windows.Forms.MessageBox.Show(strBits);
|
||||
}
|
||||
}
|
||||
|
||||
private int SearchHeader(Stream fileStream)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
while ((tmp = fileStream.ReadByte()) != -1)
|
||||
{
|
||||
if (tmp == 255)
|
||||
{
|
||||
tmp = fileStream.ReadByte();
|
||||
BitArray tmpBits = new BitArray(new int[] { tmp });
|
||||
if (tmpBits[7] && tmpBits[6] && tmpBits[5]) return (int)(fileStream.Position - 2);
|
||||
}
|
||||
}
|
||||
|
||||
throw new Exception("Frame Header couldn't be found!");
|
||||
}
|
||||
|
||||
private void GetHeaderBits(byte[] fourBytes)
|
||||
{
|
||||
BitArray tmp = new BitArray(fourBytes);
|
||||
this.bitHeader = new BitArray(4 * 8);
|
||||
int count = 0;
|
||||
|
||||
for (int i = 0; i < 32; i += 8)
|
||||
for (int j = 7; j >= 0; j--)
|
||||
this.bitHeader[count++] = tmp[i + j];
|
||||
}
|
||||
|
||||
private void LoadHeader()
|
||||
{
|
||||
GetVersion(this.bitHeader[11], this.bitHeader[12]);
|
||||
if (this.mpegVersion == MpegVersion.Reserved) throw new NotSupportedException("Unsupported MPEG Version!");
|
||||
GetLayer(this.bitHeader[13], this.bitHeader[14]);
|
||||
if (this.mpegLayer == MpegLayer.Reserved) throw new NotSupportedException("Unsupported MPEG Layer!");
|
||||
GetBitrate(this.bitHeader[16], this.bitHeader[17], this.bitHeader[18], this.bitHeader[19]);
|
||||
if (this.bitrate == 0) throw new NotSupportedException("Unsupported Bitrate!");
|
||||
GetFrequency(this.bitHeader[20], this.bitHeader[21]);
|
||||
if (this.frequency == -1) throw new NotSupportedException("Unsupported Frequency");
|
||||
this.paddingBit = this.bitHeader[22];
|
||||
|
||||
GetFrameLength();
|
||||
GetFrameCount();
|
||||
GetSeconds();
|
||||
GetWaveSamples();
|
||||
}
|
||||
|
||||
private void GetVersion(params bool[] twoBits)
|
||||
{
|
||||
if (twoBits[0] && twoBits[1]) this.mpegVersion = MpegVersion.MpegVersion1;
|
||||
else if (twoBits[0] && !twoBits[1]) this.mpegVersion = MpegVersion.MpegVersion2;
|
||||
else if (!twoBits[0] && twoBits[1]) this.mpegVersion = MpegVersion.Reserved;
|
||||
else if (!twoBits[0] && !twoBits[1]) this.mpegVersion = MpegVersion.MpegVersion25;
|
||||
}
|
||||
|
||||
private void GetLayer(params bool[] twoBits)
|
||||
{
|
||||
if (twoBits[0] && twoBits[1]) this.mpegLayer = MpegLayer.I;
|
||||
else if (twoBits[0] && !twoBits[1]) this.mpegLayer = MpegLayer.II;
|
||||
else if (!twoBits[0] && twoBits[1]) this.mpegLayer = MpegLayer.III;
|
||||
else if (!twoBits[0] && !twoBits[1]) this.mpegLayer = MpegLayer.Reserved;
|
||||
}
|
||||
|
||||
private void GetBitrate(params bool[] fourBits)
|
||||
{
|
||||
int[] bitrateTable = GetBitrateTable();
|
||||
|
||||
Array.Reverse(fourBits);
|
||||
BitArray bArray = new BitArray(fourBits);
|
||||
byte[] index = new byte[1];
|
||||
bArray.CopyTo(index, 0);
|
||||
|
||||
this.bitrate = bitrateTable[index[0]];
|
||||
}
|
||||
|
||||
private int[] GetBitrateTable()
|
||||
{
|
||||
if (this.mpegVersion == MpegVersion.MpegVersion1)
|
||||
{
|
||||
if (this.mpegLayer == MpegLayer.I) return new int[] { 0, 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 448, 0 };
|
||||
if (this.mpegLayer == MpegLayer.II) return new int[] { 0, 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 384, 0 };
|
||||
if (this.mpegLayer == MpegLayer.III) return new int[] { 0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320, 0 };
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.mpegLayer == MpegLayer.I) return new int[] { 0, 32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, 192, 224, 256, 0 };
|
||||
if (this.mpegLayer == MpegLayer.II ||
|
||||
this.mpegLayer == MpegLayer.III) return new int[] { 0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160, 0 };
|
||||
}
|
||||
|
||||
throw new NotSupportedException("Unsupported MPEG Version or Layer!");
|
||||
}
|
||||
|
||||
private void GetFrequency(params bool[] twoBits)
|
||||
{
|
||||
int[] frequencyTable = GetFrequencyTable();
|
||||
|
||||
Array.Reverse(twoBits);
|
||||
BitArray bArray = new BitArray(twoBits);
|
||||
byte[] index = new byte[1];
|
||||
bArray.CopyTo(index, 0);
|
||||
|
||||
this.frequency = frequencyTable[index[0]];
|
||||
}
|
||||
|
||||
private int[] GetFrequencyTable()
|
||||
{
|
||||
if (this.mpegVersion == MpegVersion.MpegVersion1)
|
||||
return new int[] { 44100, 48000, 32000, -1 };
|
||||
else if (this.mpegVersion == MpegVersion.MpegVersion2)
|
||||
return new int[] { 22050, 24000, 16000, -1 };
|
||||
else if (this.mpegVersion == MpegVersion.MpegVersion25)
|
||||
return new int[] { 32000, 16000, 8000, -1 };
|
||||
else
|
||||
return new int[] { 0, 0, 0, -1 };
|
||||
}
|
||||
|
||||
private void GetFrameLength()
|
||||
{
|
||||
double frmSize = (double)((this.mpegLayer == MpegLayer.I ? 12 : 144) * ((1000.0 * (float)this.bitrate / (float)this.frequency)));
|
||||
this.frameLength = (int)Math.Ceiling(frmSize);
|
||||
}
|
||||
|
||||
private void GetFrameCount()
|
||||
{
|
||||
this.frameCount = (this.fileSize - this.headerPos) / this.frameLength;
|
||||
}
|
||||
|
||||
private void GetSeconds()
|
||||
{
|
||||
this.secLength = ((this.fileSize - this.headerPos) * 8.00) / (1000.00 * this.bitrate);
|
||||
}
|
||||
|
||||
private void GetWaveSamples()
|
||||
{
|
||||
this.waveSamples = this.frameCount * 1125;
|
||||
}
|
||||
|
||||
//Structs & Enums
|
||||
public enum MpegVersion : int
|
||||
{
|
||||
Reserved = 0,
|
||||
MpegVersion1 = 1,
|
||||
MpegVersion25 = 2,
|
||||
MpegVersion2 = 3
|
||||
}
|
||||
|
||||
public enum MpegLayer : int
|
||||
{
|
||||
Reserved = 0,
|
||||
I = 1,
|
||||
II = 2,
|
||||
III = 3
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
/* This file is part of CustomizeMii
|
||||
* Copyright (C) 2009 Leathl
|
||||
*
|
||||
* CustomizeMii is free software: you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as published
|
||||
* by the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* CustomizeMii is distributed in the hope that it will be
|
||||
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Resources;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die mit einer Assembly verknüpft sind.
|
||||
[assembly: AssemblyTitle("CustomizeMii")]
|
||||
[assembly: AssemblyDescription("A custom channel creator for the Wii")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CustomizeMii")]
|
||||
[assembly: AssemblyCopyright("Copyright © Leathl 2009")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("b8292272-5915-44f7-a7b1-a347bea3ecd5")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.1.1.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1.0")]
|
||||
[assembly: NeutralResourcesLanguageAttribute("en")]
|
@ -1,139 +0,0 @@
|
||||
<?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.Runtime.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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<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" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</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>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="btnCreate" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\btnCreate.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="btnSend" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\btnSend.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="comex" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\comex.app;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name="CustomizeMii" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\CustomizeMii.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Instructions" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\instructions.rtf;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
|
||||
</data>
|
||||
<data name="Waninkoko" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\resources\waninkoko.app;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
@ -1,152 +0,0 @@
|
||||
CustomizeMii is a custom channel creator for the Wii.
|
||||
The .NET Framework 2.0 is required to run this application!
|
||||
|
||||
For any further information, see: http://customizemii.googlecode.com
|
||||
Please use the issue tracker there to report any occuring bugs.
|
||||
|
||||
Thanks to icefire / Xuzz for the basic idea of this application!
|
||||
|
||||
-----------------------------------------------------------------------------------------
|
||||
Changelog:
|
||||
|
||||
Version 3.11
|
||||
- Updated libWiiSharp to 0.21
|
||||
=> - Fixed detection of loops in wave files
|
||||
|
||||
Version 3.1
|
||||
- Updated libWiiSharp to 0.2
|
||||
=> - Speed up in TPL conversion
|
||||
=> - Fixed IA8 TPL code (from/to)
|
||||
=> - Fixed CI14X2 TPL code (from)
|
||||
=> - Added conversion to CI4 / CI8
|
||||
=> - Added BNS to Wave conversion (Extract -> Sound -> As Audiofile)
|
||||
- Added option to make the sound silent
|
||||
|
||||
Version 3.0
|
||||
- Switched backend to libWiiSharp (http://libwiisharp.googlecode.com)
|
||||
- Speed improvements through using RAM instead of temp files on HDD
|
||||
- No separate Mono version anymore, the normal version works with Mono (even compiling forwarders!)
|
||||
- Fixed complex forwarder loading screen to be fullscreen (thanks wilsoff / tantric!)
|
||||
- Fixed bug where startup IOS was set to 0 when sending channel to Wii
|
||||
- Doesn't require common-key.bin anymore
|
||||
- Added checkerboard for transparent areas in images (preview window)
|
||||
- Added ability to change a TPLs format (preview window)
|
||||
- Added ability to rename and resize TPLs (right click on listbox)
|
||||
|
||||
Version 2.31
|
||||
- Fixed sending to Wii
|
||||
|
||||
Version 2.3
|
||||
- Fixed bug when extracting icon images
|
||||
- Added ability to change the startup IOS (IOS used to launch the title)
|
||||
- Added support for Korean channel title (reading and writing)
|
||||
- Added TPL width and height to Banner and Icon list
|
||||
- Added ability to replace multiple TPLs at once (images must have the same filename!)
|
||||
|
||||
Version 2.2
|
||||
- Fixed some bugs with the preview window
|
||||
- Fixed Complex Forwarder in combination with Waninkoko's NAND Loader
|
||||
- Fixed saving of base WADs
|
||||
- Fixed saving of WAD after sending it to the Wii
|
||||
- Fixed CMP TPL code (thanks pbsds)
|
||||
- Added conversion to IA8 (thanks pbsds), IA4, I8 and I4
|
||||
- Fixed conversion from IA8 and I4
|
||||
- Fixed some general TPL bugs (format detection, ...)
|
||||
- Added additional paths to the Complex Forwarder (max. 16)
|
||||
|
||||
Version 2.1
|
||||
- Added CustomizeMii Installer (by WiiCrazy / I.R.on)
|
||||
- Fixed rough edges (artifacts) on images (will be fixed automatically)
|
||||
- Replaced the TPL preview window with the one from ShowMiiWads for easier handling
|
||||
- Added loop prelistening to the BNS conversion window (only for wave files)
|
||||
- Added drag & drop ability cause the file dialogs kept bothering me
|
||||
- Improvement in startup speed (thanks shadow1643)
|
||||
- Added creation/last edited time (only for CustomizeMii 2.1+ channels)
|
||||
- Added a button to translate the word "Channel" to every language
|
||||
- Improved detection of required TPLs
|
||||
- Little improvements and fixes
|
||||
- Changed the complex forwarder to be more configurable (choose any path you want)
|
||||
- ForwardMii is now bundled with CustomizeMii
|
||||
|
||||
Version 2.01
|
||||
- Base WAD downloading works again
|
||||
|
||||
Version 2.0
|
||||
- Added BNS conversion (Mono and Stereo, with and without loop)
|
||||
- Fixed MP3 conversion (some files didn't convert)
|
||||
- Lz77 checkbox is now ticked by default
|
||||
- Removed Lz77 compression of sound.bin as most sounds will get bigger
|
||||
- Added ability to insert DOLs from any channel WAD
|
||||
- Added ability to re-add the interal DOL (To switch the NAND Loader)
|
||||
- Added ability to extract the contents, DOL, sound and all images
|
||||
- Added displaying of approx. blocks to the success-message
|
||||
- Deleted some functions of the complex forwarder as they weren't working properly
|
||||
- Some bugfixes and improvements
|
||||
|
||||
Version 1.2
|
||||
- Fixed writing/reading of channel titles, so japanese characters will work now
|
||||
- Added checkbox (Options tab) to turn security checks off
|
||||
- Added built-in forwarder creator (Needs the ForwardMii.dll which is separately avaiable)
|
||||
- You can choose MP3 files as channel sound (Needs lame.exe in application directory)
|
||||
- Bugfixes
|
||||
|
||||
Version 1.1
|
||||
- Note: License upgraded to GNU GPL v3!
|
||||
- Sound is working now
|
||||
- Added brlan and brlyt tabs (for advanced users)
|
||||
- Added displaying of image width and height in preview window
|
||||
- Added "Make Transparent" checkbox for TPLs
|
||||
- Fixed IA8 previewing / extracting
|
||||
- Improved bricksafety (hopefully!)
|
||||
- Added Tooltips
|
||||
- Added update check at startup
|
||||
- Wrote basic instructions (see Instructions.txt or help tab)
|
||||
|
||||
Version 1.0
|
||||
- Initial Release
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------
|
||||
Disclaimer:
|
||||
|
||||
Editing WAD files can result in a brick of your Wii.
|
||||
Only use this application if you have a bricksafe Wii, meaning either Preloader or
|
||||
BootMii/boot2 is installed, and if you know what you're doing.
|
||||
|
||||
This application comes without any express or implied warranty.
|
||||
The author can't be held responsible for any damages arising from the use of it.
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------
|
||||
Thanks:
|
||||
|
||||
Xuzz for his idea and hard work
|
||||
WiiCrazy / I.R.on for CustomizeMii Installer
|
||||
Xuzz, SquidMan, megazig, Matt_P, Omega and The Lemon Man for Wii.py
|
||||
megazig for his BNS conversion code
|
||||
SquidMan for Zetsubou
|
||||
Andre Perrot for gbalzss
|
||||
comex and Waninkoko for both their NAND Loader
|
||||
djdynamite123 for the forwarder base files
|
||||
The USB Loader GX Team for their forwarder source
|
||||
wilsoff for helping me debugging 3.0
|
||||
-----------------------------------------------------------------------------------------
|
||||
|
||||
-----------------------------------------------------------------------------------------
|
||||
License:
|
||||
|
||||
Copyright (C) 2009 Leathl
|
||||
|
||||
CustomizeMii is free software: you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
CustomizeMii is distributed in the hope that it will be
|
||||
useful, but WITHOUT ANY WARRANTY; without even the implied warranty
|
||||
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-----------------------------------------------------------------------------------------
|
Binary file not shown.
Before Width: | Height: | Size: 87 KiB |
@ -1,138 +0,0 @@
|
||||
{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}
|
||||
{\colortbl ;\red255\green0\blue0;\red0\green0\blue255;}
|
||||
{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\sl276\slmult1\b\f0\fs17 These are some basic instructions for CustomizeMii.\b0\par
|
||||
\par
|
||||
\cf1 At the very beginning, let me say this again: Don't install any WADs without a proper brick protection!\cf0\par
|
||||
\par
|
||||
Ok, so you want to create your own custom channels?\par
|
||||
First it is important to understand how the creation of a custom channel with CustomizeMii works.\par
|
||||
Skip this if you already know.\par
|
||||
\par
|
||||
Basically, you can't create a channel from scratch. Well, you could, but not with this application.\par
|
||||
You need a base WAD which you can modify. You can either download one within this application or use\par
|
||||
any WAD (must be a channel of course) from anywhere.\par
|
||||
You can then edit the WAD file.\par
|
||||
The editing of animations is for advanced users, so if you're not familiar with brlyt's and brlan's\par
|
||||
(I guess you're not unless you created your own animations), get a static base WAD or one with the\par
|
||||
animation you want.\par
|
||||
\par
|
||||
So, let's start to create a channel. Download a base WAD through the application or load one from your HDD.\par
|
||||
You can preview the downloadable WADs through the preview button.\par
|
||||
All options below are optional!\par
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\b MIXING BANNER, ICON AND SOUND\b0\par
|
||||
\par
|
||||
The options below the downloadable base WADs are the "replace" options.\par
|
||||
Let's say you have loaded WAD A as a base, but you want the icon of WAD B and you have a 00000000.app that\par
|
||||
contains a sound that you want to use.\par
|
||||
No problem! Just use the dropdownbox which yet says "Banner" and choose "Icon". Click on the browse button\par
|
||||
next to it and choose WAD B. The icon of WAD B will replace the icon of WAD A.\par
|
||||
After that, choose "Sound" from the dropdownbox and browse for the 00000000.app, the sound.bin will be\par
|
||||
extracted and used instead of the one within WAD A.\par
|
||||
\par
|
||||
Note: These features are non-destructive, i.e. you can always use the clear button to get back to the\par
|
||||
banner/icon/sound of WAD A!\par
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\b CHANNEL INFORMATION\b0\par
|
||||
\par
|
||||
You may want to change the channel information, i.e. the title and ID.\par
|
||||
Let's change the channel title first. It's the text that will be displayed when you hold your cursor\par
|
||||
over the channel. Goto the "Title" tab and enter a title for all languages. If you want to change the\par
|
||||
title for a specific language, just use the language's textbox. If you want a different title for every\par
|
||||
language, you don't need to fill in a title for all languages.\par
|
||||
You may also use the translate "Channel" button. Enter the english name in the all languages textbox\par
|
||||
(e.g. "MPlayer Channel"). Click translate and it will be automatically translated to each language.\par
|
||||
Now, the title ID. Open the "Options" tab and you'll see a textbox for the ID. The ID is 4 characters long\par
|
||||
and only contains letters and numerics. Lower case letters will automatically converted to upper case.\par
|
||||
Change it to a unique(!) ID, because channels will overwrite existing channles with the same ID!\par
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\b INSERTING A NEW DOL\b0\par
|
||||
\par
|
||||
Let's bring some life into the channel. In the "Options" tab, use the browse button for a new DOL.\par
|
||||
Either load a forwarder, the DOL of any application or a WAD to use it's DOL. Note that some applications\par
|
||||
require more than just a DOL and thus may not work in a channel (e.g. MPlayer CE).\par
|
||||
Choose a NAND loader or just stick with the one selected (both will do fine).\par
|
||||
\par
|
||||
You can also use the built-in forwarder creation by using the forwarder button right below the browse button\par
|
||||
for DOLs.\par
|
||||
You need the ForwardMii.dll in order to use the forwarder creation.\par
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\b INSERTING A NEW SOUND\b0\par
|
||||
\par
|
||||
For the sound, you can either use a wave or mp3 (needs lame.exe) file or the sound replace function to use\par
|
||||
the sound of an existing sound.bin/00000000.app/WAD.\par
|
||||
If you want looped sound, open your wave file with wavosaur and add loop points before.\par
|
||||
\par
|
||||
To save space, you can convert your wav or mp3 files to BNS. You can take the loop from a prelooped wave file\par
|
||||
or enter the loop start point manually. Wave files must be 16bit PCM.\par
|
||||
It is possible to directly convert stereo Wave files to mono BNS files, note that only the left channel of\par
|
||||
the Wave will be taken.\par
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\b EDITING THE BANNER/ICON (If you're an advanced user and want to edit the brlyt/brlan, do that first!)\b0\par
|
||||
\par
|
||||
So, let's begin with the real customization. I will only talk about the banner here, the instructions\par
|
||||
are the same for the icon.\par
|
||||
Goto the "Banner" tab. You shouldn't touch the add and remove buttons, they're for advanced users that\par
|
||||
change the animation. (However, they can't really harm your channel, as CustomizeMii will check for missing\par
|
||||
and unneeded TPLs while creating a WAD).\par
|
||||
You will see a list with all TPLs inside the banner.bin. When you select a TPL,\par
|
||||
it's current format will be shown in the "Format" dropdownbox. Note that CustomizeMii can read 8 different\par
|
||||
TPL formats, but only write 3 (RGBA8, RGB565 and RGB5A3), that should be enough for your needs.\par
|
||||
You can use the preview button to preview a TPL (obvious, right?), but you get one more important info,\par
|
||||
the image size. It will be shown in the title of the preview window. If your images aren't the same size,\par
|
||||
they will be resized! So be sure to have at least the correct aspect ratio, so your images wont be\par
|
||||
squeezed or whatever.\par
|
||||
Before replacing the image, choose a format from the dropdownbox.\par
|
||||
(RGBA8 = High Quality, Big Size --- RGB565 = Moderate Quality, Small Size --- RGB5A3 = Bad Quality, Small Size)\par
|
||||
Now you can use the replace button to insert your image. Preview the TPL after replacing to check the\par
|
||||
image. Maybe you want to use another format though? No problem, just replace the TPL again.\par
|
||||
\par
|
||||
Note: You can use the "Make Transparent" checkbox to make a TPL transparent, e.g. if you don't like\par
|
||||
one piece of an animation (It's non-destructive, i.e. you can always uncheck the box).\par
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\b EDITING THE ANIMATION (Advanced users only!)\b0\par
|
||||
\par
|
||||
Skip this part, if you don't really know what brlyt and brlan files are and how they're structured.\par
|
||||
Goto the "Layout" tab. You will see the banner.brlyt and icon.brlyt there.\par
|
||||
Above the buttons is a text that will indicate whether you're doing actions on the "Banner" or\par
|
||||
the "Icon" (When you select the banner.brlyt, you're editing the "Banner" and vice versa).\par
|
||||
Now, just replace the banner.brlyt and icon.brlyt files as you want. You can use the list TPLs button\par
|
||||
afterwards to see all TPLs that are required by the banner.brlyt/icon.brlyt (Don't worry, CustomizeMii\par
|
||||
won't let you create a WAD, if you forgot a required TPL).\par
|
||||
Now, goto the "Animation" tab. It's similar to the "Layout" tab. You shouldn't touch the add or delete button\par
|
||||
unless your base WAD only has a banner.brlan and you want to use a banner_Start.brlan and banner_Loop.brlan.\par
|
||||
In this case, first add the two files and then delete the old banner.brlan.\par
|
||||
Else just replace the files with yours. Be absolutely sure the your brlan files only refer to panes that are\par
|
||||
indicated in your brlyt files!\par
|
||||
That's it, here's nothing left to do.\par
|
||||
\par
|
||||
\par
|
||||
\par
|
||||
\b CREATING THE WAD\b0\par
|
||||
\par
|
||||
Well, your channel should be ready to be created.\par
|
||||
Just click on the create WAD button.\par
|
||||
CustomizeMii will do some failure checks and if all went fine, a save dialog will pop up.\par
|
||||
If you get an error or warning, read the message carefully. It should give you enough information to fix\par
|
||||
the problem yourself.\par
|
||||
You can also send the Channel directly to the Wii. For it to work, the Channel must be less than 4 MB of space.\par
|
||||
Make sure the Homebrew Channel is running and connected. Click the send WAD button. Choose a protocol\par
|
||||
and enter your Wii's IP and the IOS to use for installation. Click on transmit to start the creation and\par
|
||||
transmission process. After the channel was sent, you will be asked if you want to save the Channel.\par
|
||||
\par
|
||||
So, if you got down to here, you're done by now. Please, if you find any bugs or have suggestions, take some\par
|
||||
seconds to report them at the issue tracker: {\field{\*\fldinst{HYPERLINK "http://code.google.com/p/customizemii/issues/list"}}{\fldrslt{\ul\cf2 http://code.google.com/p/customizemii/issues/list}}}\lang7\i\f0\fs17\par
|
||||
}
|
||||
|