예제 #1
0
        private void DownloadComplete()
        {
            DownloadCompleted?.Invoke(this, new EventArgs());

            var lzma = WorkingPath + "\\javatemp.lzma";
            var zip  = WorkingPath + "\\javatemp.zip";

            SevenZipWrapper.DecompressFileLZMA(lzma, zip);
            using (var extractor = ZipFile.Read(zip))
            {
                extractor.ExtractAll(RuntimeDirectory, ExtractExistingFileAction.OverwriteSilently);
            }

            if (!File.Exists(RuntimeDirectory + "\\bin\\javaw.exe"))
            {
                try
                {
                    DeleteDirectory(RuntimeDirectory);
                }
                catch { }
                throw new Exception("Failed Download");
            }

            UnzipCompleted?.Invoke(this, new EventArgs());
        }
예제 #2
0
 protected virtual void OnUnzipCompleted(string fileName)
 {
     UnzipCompleted?.Invoke(this, new EventArgs <string>(fileName));
 }