public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams) {
            // here we need to show the UI for which file to download
            var form = new DownloadZipWindow();
            var result = form.ShowDialog();

            if (result.HasValue && result.Value) {
                // download the file
                string file = form.DownloadedFile;

                string tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
                if (!Directory.Exists(tempDir)) {
                    Directory.CreateDirectory(tempDir);
                }
                
                // unpack the file in temp
                ZipFile.ExtractToDirectory(file, tempDir);

                // copy the files to the project directory
            }

        }
Esempio n. 2
0
        public void RunStarted(object automationObject, Dictionary <string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            // here we need to show the UI for which file to download
            var form   = new DownloadZipWindow();
            var result = form.ShowDialog();

            if (result.HasValue && result.Value)
            {
                // download the file
                string file = form.DownloadedFile;

                string tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
                if (!Directory.Exists(tempDir))
                {
                    Directory.CreateDirectory(tempDir);
                }

                // unpack the file in temp
                ZipFile.ExtractToDirectory(file, tempDir);

                // copy the files to the project directory
            }
        }