private void YesBtn_Click(object sender, EventArgs e) { if (User_Requirements == false) { CheckForFile.Start(); string path = Path.GetTempPath() + "\\STZ-RAID-TOOL\\"; if (Directory.Exists(path)) { Directory.Delete(path, true); } Directory.CreateDirectory(path); string exePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\"; string finalPath = exePath.Replace("file:\\", ""); Utils.DownloadFile("https://anarchyteam.dev/voice_binaries.zip", path + "voice_binaries.zip"); ZipArchive archive = ZipFile.Open(path + "\\voice_binaries.zip", ZipArchiveMode.Update); archive.ExtractToDirectory(finalPath); archive.Dispose(); System.IO.File.Delete(path + "\\voice_binaries.zip"); SystemSounds.Beep.Play(); } else { MessageBox.Show("You already have the voice binaries you can continue."); } }
private void CheckForFile_Tick(object sender, EventArgs e) { string exePath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) + "\\voice_binaries\\"; string finalPath = exePath.Replace("file:\\", ""); if (File.Exists(finalPath + "opus.dll") && File.Exists(finalPath + "libsodium.dll") && File.Exists(finalPath + "ffmpeg.exe")) { User_Requirements = true; } else { User_Requirements = false; } if (User_Requirements == true) { CheckForFile.Stop(); } }