Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsGravix committed Jan 29, 2018
1 parent daf560a commit 52965e8
Show file tree
Hide file tree
Showing 211 changed files with 135,961 additions and 477 deletions.
Binary file modified .vs/Tweak Installer/v15/.suo
Binary file not shown.
Empty file.
Binary file not shown.
Binary file added 800258_package_512x512_TZ3_icon.ico
Binary file not shown.
10 changes: 9 additions & 1 deletion App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
303 changes: 303 additions & 0 deletions Controls/PackageCard.Designer.cs

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions Controls/PackageCard.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Net;
using System.IO;
using Tweak_Installer.Core;

namespace Tweak_Installer.Controls {
public partial class PackageCard : UserControl {
static string CurrentDirectory = Path.GetDirectoryName(Application.ExecutablePath);

public Package package;

public PackageCard(Package package) {
InitializeComponent();

this.package = package;

if (package.display == null)
download.Enabled = false;

display.Text = package.display;
author.Text = "by " + package.author;
version.Text = "Version: " + package.version;
size.Text = "Size: " + package.size;
description.Text = package.summary;

if (package.section.Contains("Themes")) {
download.Enabled = false;
}

pictureBox1.Load("http://cydia.saurik.com/icon@2x/" + package.name + ".png");

if (Base.UninstallerExists(package)) {
download.Location = new Point(61, 372);
uninstall.Show();
}
}

private void bunifuSeparator4_Load(object sender, EventArgs e) {

}

private void bunifuCards1_Paint(object sender, PaintEventArgs e) {

}

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();
}

private void bunifuFlatButton1_Click(object sender, EventArgs e) {
Main.StartLoading("Uninstalling " + package.name + "...");
Base.uninstall(package);
MessageBox.Show(package.display + " has been uninstalled successfully!", "Tweak Installer");

download.Location = new Point(166, 372);
uninstall.Hide();
Main.StopLoading();
}
}
}
787 changes: 787 additions & 0 deletions Controls/PackageCard.resx

Large diffs are not rendered by default.

Loading

0 comments on commit 52965e8

Please sign in to comment.