public DifficultySelector(Point start, int startingDiff) { InitializeComponent(); ControlBox = false; var tools = new NemoTools(); try { diffNoPart.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\nopart.png"); diff0.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\diff0.png"); diff1.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\diff1.png"); diff2.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\diff2.png"); diff3.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\diff3.png"); diff4.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\diff4.png"); diff5.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\diff5.png"); diff6.Image = tools.NemoLoadImage(Application.StartupPath + "\\res\\diff6.png"); } catch { MessageBox.Show("Looks like one or more of the images I use are missing.\nPlease re-download this program and don't delete\nthe 'res' folder next time.", "Missing Files", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } Difficulty = startingDiff; StartLocation = start; }
public FileIndexer(Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); Tools = new NemoTools(); Parser = new DTAParser(); Songs = new List <SongIndex>(); FilteredSongs = new List <SongIndex>(); config = Application.StartupPath + "\\bin\\config\\indexer.config"; LoadConfig(); var indexFolder = Application.StartupPath + "\\bin\\indexer\\"; if (!Directory.Exists(indexFolder)) { Directory.CreateDirectory(indexFolder); } Index = indexFolder + "index.c3"; var formButtons = new List <Button> { btnBuild, btnClear, btnDelete, btnNew, btnClearSearch }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } }
public SetlistDetails(Form xParent, Color ButtonBackColor, Color ButtonTextColor) { var setlist = xParent; InitializeComponent(); Tools = new NemoTools(); Parser = new DTAParser(); Stats = new List <ListViewItem>(); Left = setlist.Left + ((setlist.Width - Width) / 2); Top = setlist.Top + ((setlist.Height - Height) / 2); ControlBox = false; var formButtons = new List <Button> { btnExport, btnClose }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } }
public MidiTester(MainForm mainform, string MIDI) { InitializeComponent(); mMainForm = mainform; var skin = mMainForm == null ? "" : mMainForm.ActiveSkin; switch (skin) { case "colorful": SkinDefaults(); SkinButtonStyles(FlatStyle.Flat); SkinButtonText(Color.White); btnOpen.BackColor = Color.FromArgb(27, 178, 37); btnCleaner.BackColor = Color.FromArgb(196, 33, 34); btnClipboard.BackColor = Color.FromArgb(230, 216, 0); btnClose.BackColor = Color.FromArgb(39, 85, 196); break; case "custom": SkinDefaults(); SkinButtonStyles(mMainForm.SkinButtonStyle); SkinButtonText(mMainForm.SkinButtonTextColor); btnOpen.BackColor = mMainForm.SkinButtonBackgroundColor; btnCleaner.BackColor = mMainForm.SkinButtonBackgroundColor; btnClipboard.BackColor = mMainForm.SkinButtonBackgroundColor; btnClose.BackColor = mMainForm.SkinButtonBackgroundColor; break; } Tools = new NemoTools(); SilenceStereo44 = Application.StartupPath + "\\audio\\stereo44.wav"; BlankDryvox = Application.StartupPath + "\\audio\\blank_dryvox.wav"; BlankBacking44 = Application.StartupPath + "\\audio\\blank_backing44.wav"; MIDIfile = MIDI; }
/// <summary> /// Extracts images from Milo file and saves textures in "(miloDir)/ext_(milofilename)" /// as "texture(int)" starting from zero. /// </summary> /// <param name="inMilo">Milo file location</param> /// <param name="saveDDS">Save DDS?</param> /// <param name="saveTEX">Save TEX?</param> /// <param name="format">Format to output the images to</param> /// <param name="outTexCount">Number of textures in Milo file</param> public static void ExtractTextures(string inMilo, bool saveDDS, bool saveTEX, string format, out int outTexCount) { var texCount = 0; var Tools = new NemoTools(); var ext = Path.GetExtension(inMilo); if (string.IsNullOrWhiteSpace(ext)) { outTexCount = 0; return; } TexturesFolder = inMilo.Replace(ext, "_textures\\"); BlocksFolder = TexturesFolder + "blocks\\"; FilesFolder = TexturesFolder + "files\\"; try { // Reads first four bytes to check its compression type. var br = new BinaryReader(File.OpenRead(inMilo)); var firstFour = br.ReadBytes(4); br.Close(); string compressionType; if (firstFour.IsMilo(out compressionType)) { var count = 0; ProcessMilo(inMilo, compressionType, true, saveTEX, ref texCount, false, ref count, false, ref count); } } catch (Exception) {} outTexCount = texCount; //clean up afterwards if (outTexCount < 1) { Tools.DeleteFolder(TexturesFolder, true); } else { Tools.DeleteFolder(BlocksFolder, true); Tools.DeleteFolder(FilesFolder, true); var ddsfiles = Directory.GetFiles(TexturesFolder, "*.dds"); foreach (var dds in ddsfiles) { if (!string.IsNullOrWhiteSpace(format)) { Tools.ConvertRBImage(dds, dds, format); } if (!saveDDS) { Tools.DeleteFile(dds); } } } outTexCount = texCount; }
public QuickDTAEditor(string input_con = "") { InitializeComponent(); Tools = new NemoTools(); Parser = new DTAParser(); toolTip1.SetToolTip(lstLog, "This is the application log. Right click to export"); InitLog(); con = input_con; }
public FileSelector(BuildForm xParent, string fold, string ext) { InitializeComponent(); Tools = new NemoTools(); parent = xParent; folder = fold; extension = ext; starting = true; }
public bool ExtractDecryptMogg(string CON_file, bool bypass, NemoTools tools, DTAParser parser) { Initialize(); Tools = tools; Parser = parser; Tools.ReleaseStreamHandle(); if (!Parser.ExtractDTA(CON_file)) { ErrorLog.Add("Couldn't extract songs.dta file from that CON file"); return(false); } if (!Parser.ReadDTA(Parser.DTA) || !Parser.Songs.Any()) { ErrorLog.Add("Couldn't read that songs.dta file"); return(false); } if (Parser.Songs.Count > 1) { ErrorLog.Add("This feature does not support packs, only single songs\nUse the dePACK feature in C3 CON Tools' Quick Pack Editor to split this pack into single songs and try again"); return(false); } var internal_name = Parser.Songs[0].InternalName; var xCON = new STFSPackage(CON_file); if (!xCON.ParseSuccess) { ErrorLog.Add("Couldn't parse that CON file"); xCON.CloseIO(); return(false); } var xMogg = xCON.GetFile("songs/" + internal_name + "/" + internal_name + ".mogg"); if (xMogg == null) { ErrorLog.Add("Couldn't find the mogg file inside that CON file"); xCON.CloseIO(); return(false); } var mData = xMogg.Extract(); xCON.CloseIO(); if (mData == null || mData.Length == 0) { ErrorLog.Add("Couldn't extract the mogg file from that CON file"); return(false); } LoadLibraries(); if (Tools.DecM(mData, bypass, false, DecryptMode.ToMemory)) { return(true); } ErrorLog.Add("Mogg file is encrypted and I could not decrypt it, can't split it"); return(false); }
public BatchProcess(MainForm form, List <string> files, bool reverse = false) { InitializeComponent(); mMainForm = form; Tools = new NemoTools(); Parser = new DTAParser(); FilesToConvert = files; ProblemFiles = new List <string>(); SkippedFiles = new List <string>(); DoReverseBatch = reverse; }
public BatchExtractor(Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); Tools = new NemoTools(); Parser = new DTAParser(); inputFiles = new List <string>(); mMenuBackground = menuStrip1.BackColor; menuStrip1.Renderer = new DarkRenderer(); var formButtons = new List <Button> { btnRefresh, btnFolder, btnBegin, btnSelect, btnDeselect, btnConverter }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } //load last used directory if saved and still exists Log("Welcome to Batch Extractor"); Log("Drag and drop the CON /LIVE file(s) here"); Log("Or click 'Change Input Folder' to select the files"); config = Application.StartupPath + "\\bin\\config\\extractor.config"; if (!File.Exists(config)) { return; } var sr = new StreamReader(config); var line = sr.ReadLine(); sr.Dispose(); if (string.IsNullOrWhiteSpace(line)) { Tools.DeleteFile(config); } else if (line != "" && Directory.Exists(line)) { Log(""); Log("Loaded last directory used: " + line); txtFolder.Text = line; } else { Tools.DeleteFile(config); } if (string.IsNullOrWhiteSpace(txtFolder.Text)) { Log("Ready to begin"); } }
public AudioAnalyzer(string file) { InitializeComponent(); InputFile = file; InputFiles = new List <string>(); ChannelPanels = new List <Panel>(); ChannelLabels = new List <Label>(); Tools = new NemoTools(); Parser = new DTAParser(); PanelSize = panelBackground.Size; mMenuBackground = menuStrip1.BackColor; menuStrip1.Renderer = new DarkRenderer(); }
public LogViewer() { InitializeComponent(); Tools = new NemoTools(); EventsFolder = Application.StartupPath + "\\bin\\events\\"; Logs = new List <string>(); if (!Directory.Exists(EventsFolder)) { NothingToShow(); } }
public VideoPreparer(Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); inputFiles = new List <string>(); Tools = new NemoTools(); Parser = new DTAParser(); inputDir = Application.StartupPath + "\\videoprep_input\\"; groupBox1.AllowDrop = true; tempFolder = Application.StartupPath + "\\videoprep_temp\\"; Tools.DeleteFolder(tempFolder, true); toolTip1.SetToolTip(btnBegin, "Click to begin process"); toolTip1.SetToolTip(btnFolder, "Click to select the input folder"); toolTip1.SetToolTip(btnRefresh, "Click to refresh if the contents of the folder have changed"); toolTip1.SetToolTip(txtFolder, "This is the working directory"); toolTip1.SetToolTip(txtTitle, "Enter a title for your pack (visible in the Xbox dashboard)"); toolTip1.SetToolTip(lstLog, "This is the application log. Right click to export"); nextFriday = DateTime.Today; while (nextFriday.DayOfWeek != DayOfWeek.Friday) { nextFriday = nextFriday.AddDays(1D); } var month = "0" + nextFriday.Month; month = month.Substring(month.Length - 2, 2); var day = "0" + nextFriday.Day; day = day.Substring(day.Length - 2, 2); PackDate = month + "/" + day + "/" + nextFriday.Year.ToString(CultureInfo.InvariantCulture).Substring(2, 2); var formButtons = new List <Button> { btnFolder, btnRefresh, btnReset, btnView, btnBegin }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } if (!Directory.Exists(tempFolder)) { Directory.CreateDirectory(tempFolder); } }
public PS3Scanner() { InitializeComponent(); Tools = new NemoTools(); bigDTA = Application.StartupPath + "\\bin\\ps3dta"; PS3IP = Application.StartupPath + "\\bin\\ps3.ip"; DTAList = Application.StartupPath + "\\bin\\PS3_DTA_LIST.csv"; NTSCFolders = new List <string> { "BLUS30463", "BLUS30050", "BLUS30147" }; PALFolders = new List <string> { "BLES00986", "BLES00385", "BLES00228" }; }
public SaveFileImageEditor(Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); wimgt = Application.StartupPath + "\\bin\\wimgt.exe"; EditorFolder = Application.StartupPath + "\\editor\\"; if (!Directory.Exists(EditorFolder)) { Directory.CreateDirectory(EditorFolder); } Tools = new NemoTools(); for (var i = 1; i < 6; i++) { if (File.Exists(Application.StartupPath + "\\res\\bg" + i + ".png")) { cboBackgrounds.Items.Add("Background " + i); } } cboBackgrounds.SelectedIndex = 0; picCharacter.AllowDrop = true; picArt.AllowDrop = true; var formButtons = new List <Button> { btnExportArt, btnExportChar, btnReplaceArt, btnReplaceChar, btnRename }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } Tools.CurrentFolder = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); console = ""; Tools.SaveFileCharNames = new List <string>(); Log("Welcome to the Save File Image Editor"); Log("Click 'File' -> 'Open file' to select a save game file"); Log("Or drag and drop it anywhere on this form"); Log("Ready"); }
public RBAConverter(Color ButtonBackColor, Color ButtonTextColor, string inputfolder = "") { InitializeComponent(); Tools = new NemoTools(); Parser = new DTAParser(); FilesToConvert = new List <string>(); var formButtons = new List <Button> { btnRefresh, btnFolder, btnBegin }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } config = Application.StartupPath + "\\bin\\config\\rbaconverter.config"; StartupFolder = inputfolder; }
public PhaseShiftConverter(Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); //initialize Song = new PhaseShiftSong(); Tools = new NemoTools(); Parser = new DTAParser(); inputFiles = new List <string>(); inputDir = Application.StartupPath + "\\phaseshift\\"; if (!Directory.Exists(inputDir)) { Directory.CreateDirectory(inputDir); } var formButtons = new List <Button> { btnReset, btnRefresh, btnFolder, btnBegin }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } rar = Application.StartupPath + "\\bin\\rar.exe"; if (!File.Exists(rar)) { MessageBox.Show("Can't find rar.exe ... I won't be able to create RAR files for your songs without it", "Missing Executable", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); chkRAR.Checked = false; chkRAR.Enabled = false; } toolTip1.SetToolTip(btnBegin, "Click to begin process"); toolTip1.SetToolTip(btnFolder, "Click to select the input folder"); toolTip1.SetToolTip(btnRefresh, "Click to refresh if the contents of the folder have changed"); toolTip1.SetToolTip(txtFolder, "This is the working directory"); toolTip1.SetToolTip(lstLog, "This is the application log. Right click to export"); }
public CONExplorer(Color ButtonBackColor, Color ButtonTextColor, bool runningshortcut = false) { CheckForIllegalCrossThreadCalls = true; InitializeComponent(); mMenuBackground = contextMenuStrip1.BackColor; contextMenuStrip1.Renderer = new DarkRenderer(); picContent.AllowDrop = true; picPackage.AllowDrop = true; btnDTA.AllowDrop = true; btnMIDI.AllowDrop = true; btnMOGG.AllowDrop = true; btnPNG.AllowDrop = true; Tools = new NemoTools(); Parser = new DTAParser(); isRunningShortcut = runningshortcut; var formButtons = new List <Button> { btnExtract, btnSave, btnVisualize }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } toolTip1.SetToolTip(picContent, "Click here to select the Content Image (visible in here)"); toolTip1.SetToolTip(picPackage, "Click here to select the Package Image (visible in the Xbox dashboard)"); toolTip1.SetToolTip(radioCON, "Click to save as CON when rebuilding"); toolTip1.SetToolTip(radioLIVE, "Click to save as LIVE when rebuilding"); toolTip1.SetToolTip(btnExtract, "Click to extract the whole CON file"); toolTip1.SetToolTip(btnSave, "Click to sign and rebuild CON file"); toolTip1.SetToolTip(txtTitle, "Package Title (optional)"); toolTip1.SetToolTip(txtDescription, "Package Description (optional)"); toolTip1.SetToolTip(btnVisualize, "Click to open in Visualizer"); }
public ProUpgradeBundler(Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); Tools = new NemoTools(); Parser = new DTAParser(); SongInstruments = new List <string>(); UpgradeInstruments = new List <string>(); UpgradeMidis = new List <string>(); upgradeID = NA; songID = NA; song_int_name = NA; upgrade_int_name = NA; var formButtons = new List <Button> { btnReset, btnBundle }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } var bundlerFolder = Application.StartupPath + "\\bundler\\"; if (!Directory.Exists(bundlerFolder)) { Directory.CreateDirectory(bundlerFolder); } temp_folder = bundlerFolder + "temp\\"; if (!Directory.Exists(temp_folder)) { Directory.CreateDirectory(temp_folder); } }
public CONCreator(Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); Tools = new NemoTools(); var y = new List <PackageType>(); picContent.AllowDrop = true; picPackage.AllowDrop = true; btnCreate.BackColor = ButtonBackColor; btnCreate.ForeColor = ButtonTextColor; btnCreate.FlatAppearance.MouseOverBackColor = btnCreate.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(btnCreate.BackColor); moggs = new List <string>(); xsession = new CreateSTFS(); var x = (PackageType[])Enum.GetValues(typeof(PackageType)); y.AddRange(x); node1.DataKey = (ushort)0xFFFF; node1.NodeClick += xReturn_NodeClick; folderTree.SelectedIndex = 0; cboGameID.SelectedIndex = 2; toolTip1.SetToolTip(picContent, "Click here to select the Content Image (visible in here)"); toolTip1.SetToolTip(picPackage, "Click here to select the Package Image (visible in the Xbox dashboard)"); toolTip1.SetToolTip(btnCreate, "Click here to create the song package"); toolTip1.SetToolTip(radioCON, "Click here for use with retail consoles"); toolTip1.SetToolTip(radioLIVE, "Click here for use with modded consoles"); toolTip1.SetToolTip(txtDisplay, "Enter a title for your pack (visible in the Xbox dashboard)"); toolTip1.SetToolTip(txtDescription, "Enter a description for your pack (visible in here)"); toolTip1.SetToolTip(folderTree, "Add folders here"); toolTip1.SetToolTip(fileList, "Add files here"); toolTip1.SetToolTip(groupBox1, "Choose the format for your pack - default is CON"); AddFolder("songs"); }
public bool SeparateWithSoX(string mogg, SongData song) { Tools = new NemoTools(); try { if (Tools.MoggIsEncrypted(mogg)) { Tools.ObfM(mogg); ErrorLog.Add("Audio file " + Path.GetFileName(mogg) + " is encrypted and can't be separated, sorry"); return(false); } var ogg = Path.GetTempPath() + "o"; Tools.RemoveMHeader(mogg, DecryptMode.ToFile, ogg); var folder = Path.GetDirectoryName(mogg) + "\\"; var bass = folder + "rhythm.ogg"; var guitar = folder + "guitar.ogg"; var keys = folder + "keys.ogg"; var vocals = folder + "vocals.ogg"; var backing = folder + "song.ogg"; var crowd = folder + "crowd.ogg"; var drums = folder + "drums.ogg"; var drums1 = folder + "drums_1.ogg"; var drums2 = folder + "drums_2.ogg"; var drums3 = folder + "drums_3.ogg"; if (song.ChannelsDrums > 0) { switch (song.ChannelsDrums) { case 2: SendToSox(ogg, drums, song.AttenuationValues, 1, true); break; case 3: SendToSox(ogg, drums1, song.AttenuationValues, 1, false); SendToSox(ogg, drums2, song.AttenuationValues, 2, true); break; case 4: SendToSox(ogg, drums1, song.AttenuationValues, 1, false); SendToSox(ogg, drums2, song.AttenuationValues, 2, false); SendToSox(ogg, drums3, song.AttenuationValues, 3, true); break; case 5: SendToSox(ogg, drums1, song.AttenuationValues, 1, false); SendToSox(ogg, drums2, song.AttenuationValues, 2, true); SendToSox(ogg, drums3, song.AttenuationValues, 4, true); break; case 6: SendToSox(ogg, drums1, song.AttenuationValues, 1, true); SendToSox(ogg, drums2, song.AttenuationValues, 3, true); SendToSox(ogg, drums3, song.AttenuationValues, 5, true); break; } } var index = song.ChannelsDrums + 1; if (song.ChannelsBass > 0) { SendToSox(ogg, bass, song.AttenuationValues, index, song.ChannelsBass == 2); } index += song.ChannelsBass; if (song.ChannelsGuitar > 0) { SendToSox(ogg, guitar, song.AttenuationValues, index, song.ChannelsGuitar == 2); } index += song.ChannelsGuitar; if (song.ChannelsVocals > 0) { SendToSox(ogg, vocals, song.AttenuationValues, index, song.ChannelsVocals == 2); } index += song.ChannelsVocals; if (song.ChannelsKeys > 0) { SendToSox(ogg, keys, song.AttenuationValues, index, song.ChannelsKeys == 2); } index += song.ChannelsKeys; if (song.ChannelsBacking() > 0) { SendToSox(ogg, backing, song.AttenuationValues, index, song.ChannelsBacking() == 2); } index += song.ChannelsBacking(); if (song.ChannelsCrowd > 0) { SendToSox(ogg, crowd, song.AttenuationValues, index, song.ChannelsCrowd == 2); } return(true); } catch (Exception) { return(false); } }
public AdvancedArtConverter(string Folder, Color ButtonBackColor, Color ButtonTextColor) { InitializeComponent(); Tools = new NemoTools { TextureSize = 512 }; var formButtons = new List <Button> { btnRefresh, btnFolder, btnToPS3, btnFromPS3, btnToWii, btnFromWii, btnToXbox, btnFromXbox }; foreach (var button in formButtons) { button.BackColor = ButtonBackColor; button.ForeColor = ButtonTextColor; button.FlatAppearance.MouseOverBackColor = button.BackColor == Color.Transparent ? Color.FromArgb(127, Color.AliceBlue.R, Color.AliceBlue.G, Color.AliceBlue.B) : Tools.LightenColor(button.BackColor); } Log("Welcome to Advanced Art Converter"); Log("Drag and drop the file(s) to be converted here"); Log("Or click 'Change Input Folder' to select the files"); Log("Ready to begin"); //folder sent via command line is more important var pngDir = Folder != "" ? Folder : ""; //load last used directory if saved and still exists config = Application.StartupPath + "\\bin\\config\\art.config"; if (string.IsNullOrWhiteSpace(pngDir)) { if (File.Exists(config)) { var sr = new StreamReader(config); var line = sr.ReadLine(); sr.Dispose(); if (string.IsNullOrWhiteSpace(line)) { Tools.DeleteFile(config); } else if (line != "" && Directory.Exists(line)) { Log("Loaded last directory used"); pngDir = line; } else { Tools.DeleteFile(config); } } } txtFolder.Text = pngDir; imgCounter = 0; wimgt = Application.StartupPath + "\\bin\\wimgt.exe"; if (File.Exists(wimgt)) { return; } MessageBox.Show("Can't find wimgt.exe ... I won't be able to convert Wii files without it", "Missing Executable", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); tabWii.Enabled = false; }