1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
public override void Action_ExecuteFile_Effective_Begin(DreamWorkerEngine target, ListersComponentFilesDescriptors descriptor, IVFSFile runtime_file, string target_path, string actionName, ref string realAction, ref bool execute)
{
base.Action_ExecuteFile_Effective_Begin(target, descriptor, runtime_file, target_path, actionName, ref realAction, ref execute);
if (runtime_file.Name.Equals("NOM_DU_FICHIER.DB", StringComparison.OrdinalIgnoreCase))
{
switch (realAction.ToLower())
{
/* Création, etc
* En gros, tu ne veux pas remplacer la base de donnée si elle existe apparament
* */
default:
{
execute = !File.Exists(target_path);
break;
}
case "uninstall":
case "delete":
{
execute = System.Windows.Forms.MessageBox.Show("Voulez-vous supprimer la base de donnée ?",
"blabla", System.Windows.Forms.MessageBoxButtons.YesNo,
System.Windows.Forms.MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes;
break;
}
}
}
} |
Partager