Exemple #1
0
        private void download_Click(object sender, EventArgs e)
        {
            Main.StartLoading("Installing " + package.name + "...");
            // Download Tweak
            string downloadsDir = Path.Combine(CurrentDirectory, @"downloads");
            string url          = WebAPI.GetDownload(package.name);

            if (!Directory.Exists(downloadsDir))
            {
                Directory.CreateDirectory(downloadsDir);
            }

            string    fileDir = Path.Combine(downloadsDir, package.name + "_" + package.version + ".deb");
            WebClient Client  = new WebClient();

            Client.DownloadFile(url, fileDir);

            // Install Tweak
            Base.install(fileDir);

            MessageBox.Show(package.display + " has been installed successfully!", "Tweak Installer");

            download.Location = new Point(61, 372);
            uninstall.Show();
            Main.StopLoading();
        }