diff --git a/download-resources/Qcma.zip b/download-resources/Qcma.zip
new file mode 100644
index 0000000..3f963ed
Binary files /dev/null and b/download-resources/Qcma.zip differ
diff --git a/h-encore-auto/AutoMode.xaml b/h-encore-auto/AutoMode.xaml
new file mode 100644
index 0000000..7ff5a96
--- /dev/null
+++ b/h-encore-auto/AutoMode.xaml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
diff --git a/h-encore-auto/AutoMode.xaml.cs b/h-encore-auto/AutoMode.xaml.cs
new file mode 100644
index 0000000..7cf5e9f
--- /dev/null
+++ b/h-encore-auto/AutoMode.xaml.cs
@@ -0,0 +1,69 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace h_encore_auto
+{
+ ///
+ /// Interaction logic for AutoMode.xaml
+ ///
+ public partial class AutoMode : Window
+ {
+ public AutoMode()
+ {
+ InitializeComponent();
+ }
+
+ string ProgramFilesx86 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86);
+ string ProgramFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
+ bool tempCreated = false;
+ string longAID = null;
+ string shortAID = null;
+ string path7z = Ref.tempDir + "7za.exe";
+ string pathPsvimg = Ref.tempDir + "psvimgtools.zip";
+ string pathPkg = Ref.tempDir + "pkg2zip.zip";
+ string pathEnc = Ref.tempDir + "h-encore.zip";
+ string pathEntry = Ref.tempDir + "entryPoint.pkg";
+
+ private void Window_Closed(object sender, EventArgs e)
+ {
+ var newForm = new MainWindow();
+ newForm.Visibility = Visibility.Visible;
+ }
+
+ private void buttonStart_Click(object sender, RoutedEventArgs e)
+ {
+ // 7ZIP Download and extraction
+ Util.dlFile(Ref.url7zr, "7zr.exe");
+ Util.dlFile(Ref.url7za, "7z-extra.7z");
+
+ Process process = new Process();
+ ProcessStartInfo startInfo = new ProcessStartInfo();
+ startInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ startInfo.FileName = "cmd.exe";
+ startInfo.WorkingDirectory = Ref.tempDir;
+
+ startInfo.Arguments = "/C 7zr.exe x 7z-extra.7z";
+ process.StartInfo = startInfo;
+ process.Start();
+ process.WaitForExit();
+
+ //Rest of the tool downloads
+ Util.dlFile(Ref.urlPsvimg, "psvimgtools.zip");
+ Util.dlFile(Ref.urlPkg, "pkg2zip.zip");
+ Util.dlFile(Ref.urlEnc, "h-encore.zip");
+ Util.dlFile(Ref.urlEntry, "entryPoint.pkg");
+ }
+ }
+}
diff --git a/h-encore-auto/MainWindow.xaml b/h-encore-auto/MainWindow.xaml
index 3941468..308b42b 100644
--- a/h-encore-auto/MainWindow.xaml
+++ b/h-encore-auto/MainWindow.xaml
@@ -5,28 +5,29 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:h_encore_auto"
mc:Ignorable="d"
- Title="h-encore-auto" Width="789.733" Height="391.819">
+ Title="ZUGABE" Width="789.733" Height="403.621" ResizeMode="CanMinimize" Closed="Window_Closed">
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
+
diff --git a/h-encore-auto/MainWindow.xaml.cs b/h-encore-auto/MainWindow.xaml.cs
index c292bb5..a2ee1e2 100644
--- a/h-encore-auto/MainWindow.xaml.cs
+++ b/h-encore-auto/MainWindow.xaml.cs
@@ -327,5 +327,17 @@ namespace h_encore_auto
boxPathEntry.Text = path;
}
}
+
+ private void buttonAuto_Click(object sender, RoutedEventArgs e)
+ {
+ var newForm = new AutoMode();
+ newForm.Show();
+ this.Visibility = Visibility.Collapsed;
+ }
+
+ private void Window_Closed(object sender, EventArgs e)
+ {
+ Util.cleanup();
+ }
}
}
diff --git a/h-encore-auto/Util.cs b/h-encore-auto/Util.cs
index e2b1b38..1de82c2 100644
--- a/h-encore-auto/Util.cs
+++ b/h-encore-auto/Util.cs
@@ -1,6 +1,6 @@
-using System;
-using System.Net;
-using System.Net.Http;
+using System;
+using System.Net;
+using System.Net.Http;
using System.IO;
using System.Windows.Markup;
using System.Windows;
@@ -9,7 +9,7 @@ namespace h_encore_auto
{
public class Util
{
- private static WebClient web = new WebClient();
+ private static WebClient web = new WebClient();
private static HttpClient http = new HttpClient();
public static string GetEncKey(string aid)
@@ -58,7 +58,6 @@ namespace h_encore_auto
public static void cleanup()
{
Util.DeleteDirectory(Ref.tempDir);
- MessageBox.Show("Done.");
System.Environment.Exit(0);
}
}
diff --git a/h-encore-auto/h-encore-auto.csproj b/h-encore-auto/h-encore-auto.csproj
index 8b750a4..f92a593 100644
--- a/h-encore-auto/h-encore-auto.csproj
+++ b/h-encore-auto/h-encore-auto.csproj
@@ -79,8 +79,15 @@
MSBuild:Compile
Designer
+
+ AutoMode.xaml
+
+
+ Designer
+ MSBuild:Compile
+
MSBuild:Compile
Designer