protected override void Execute(CodeActivityContext context) { string inputFolderPath = InputFolderPath.Get(context); string outputFolderPath = OutputFolderPath.Get(context); string outPutFileName = OutPutFileName.Get(context); HelperMethod method = new HelperMethod(); method.mergeExcels(inputFolderPath, outputFolderPath, outPutFileName); }
/*--------------------------------------------------------------*/ /*------------------------METHODS-------------------------------*/ /* * Méthode appelée lorsqu'on change le dossier du mod principal pour effectuer les changements de modid, etc... */ public void OnOutputPathChanged() { /* * UPDATE du modid lorsqu'on change de dossier de mod */ string[] pathPieces = OutputFolderPath.Split('\\'); Modid = pathPieces[pathPieces.Length - 1].ToLower().Replace(' ', '_'); Console.WriteLine(pathManager.Assets); Console.WriteLine(pathManager.Blockstates); Console.WriteLine(pathManager.Blocks); Console.WriteLine(pathManager.Items); Directory.CreateDirectory(pathManager.Blockstates); Directory.CreateDirectory(pathManager.Blocks); Directory.CreateDirectory(pathManager.Items); }
protected override void Execute(CodeActivityContext context) { string zipPath = ZipPath.Get(context); string outputFolderPath = OutputFolderPath.Get(context); bool result; try { ZipFile.ExtractToDirectory(zipPath, outputFolderPath); result = true; } catch (Exception ex) { result = false; } Result.Set(context, result); }