private bool GetErrorMessage(CharacterException e, Error error) { DialogResult dialog = DialogResult.Yes; if (e != null) { switch (error) { case Error.Empty: MessageBox.Show(e.Message, "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error); break; case Error.InvalidData: dialog = MessageBox.Show(string.Concat(e.Message, Environment.NewLine, Environment.NewLine, "Voulez-vous effacer le contenu ?"), "Erreur", MessageBoxButtons.YesNo, MessageBoxIcon.Error); break; default: break; } if (dialog == DialogResult.Yes) { ClearTextBox(); } return(true); } return(false); }
public Mod(string directoryName, CharacterException exception) { nutFiles = Directory.GetFiles(directoryName, "*.nut", SearchOption.AllDirectories); nudFiles = Directory.GetFiles(directoryName, "*.nud", SearchOption.AllDirectories); switch (exception) { case CharacterException.Pacman_WiiU: mtaFiles = Directory.GetFiles(directoryName, "model.mta", SearchOption.AllDirectories); break; case CharacterException.Robin_WiiU: mtaFiles = Directory.GetFiles(directoryName, "FitRefletBodyMainbook.mta", SearchOption.AllDirectories); break; } }
public static void ChangeTextureID(string directoryName, int charID, ushort id) { CharacterException exc = CharacterException.None; if (charID == 0x2C && !SmashProjectManager.instance.CurrentProject.IsSwitch) { exc = CharacterException.Robin_WiiU; } if (charID == 0x31 && !SmashProjectManager.instance.CurrentProject.IsSwitch) { exc = CharacterException.Pacman_WiiU; } Mod mod = new Mod(directoryName, exc); ChangeTextureID(mod, id); }