Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Walden committed Jan 22, 2018
0 parents commit 4e51fe8
Show file tree
Hide file tree
Showing 34 changed files with 799 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto
6 changes: 6 additions & 0 deletions App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>
187 changes: 187 additions & 0 deletions Main.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

76 changes: 76 additions & 0 deletions Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
using SevenZipExtractor;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Tweak_Installer
{
public partial class Main : Form
{
public Main()
{
InitializeComponent();
}

private void select_Click(object sender, EventArgs e)
{
var f = openFileDialog.ShowDialog();
switch (f)
{
case DialogResult.OK:
{
deb.Text = openFileDialog.FileName;
break;
}
}
}

private void install_Click(object sender, EventArgs e)
{
Process.Start("tic.exe", "install \"" + deb.Text + "\"");
}

private void Uninstall_Click(object sender, EventArgs e)
{
Process.Start("tic.exe", "uninstall \"" + deb.Text + "\"");
}

private void Main_Load(object sender, EventArgs e)
{
string[] data = File.ReadAllLines("settings"); //get ssh settings
for (int i = 0; i != data.Length; i++)
{
data[i] = data[i].Split('#')[0];
}
host.Text = data[0];
username.Text = data[1];
pass.Text = data[2];
}

private void host_TextChanged(object sender, EventArgs e)
{
string[] data = { host.Text, username.Text, pass.Text };
File.WriteAllLines("settings", data);
}

private void username_TextChanged(object sender, EventArgs e)
{
string[] data = { host.Text, username.Text, pass.Text };
File.WriteAllLines("settings", data);
}

private void pass_TextChanged(object sender, EventArgs e)
{
string[] data = { host.Text, username.Text, pass.Text };
File.WriteAllLines("settings", data);
}
}
}
Loading

0 comments on commit 4e51fe8

Please sign in to comment.