summaryrefslogtreecommitdiff
path: root/love2dToAPK/Forms/frmOutput.cs
diff options
context:
space:
mode:
Diffstat (limited to 'love2dToAPK/Forms/frmOutput.cs')
-rw-r--r--love2dToAPK/Forms/frmOutput.cs52
1 files changed, 52 insertions, 0 deletions
diff --git a/love2dToAPK/Forms/frmOutput.cs b/love2dToAPK/Forms/frmOutput.cs
new file mode 100644
index 0000000..5d63b71
--- /dev/null
+++ b/love2dToAPK/Forms/frmOutput.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.IO.Compression;
+using System.Threading;
+using System.Windows.Forms;
+
+namespace love2dToAPK.Forms {
+ public partial class frmOutput : love2dToAPK.Forms.baseForm {
+
+ public string projectPath { get; set; }
+ public string responseCode { get; set; }
+
+ private Thread _compilerThread;
+ private string _toolsPath = AppDomain.CurrentDomain.BaseDirectory;
+
+ public frmOutput() {
+ InitializeComponent();
+
+ WindowTitle = "Output";
+ MinimizeAble = false;
+ txtOutput.ScrollBars = ScrollBars.Vertical;
+ }
+
+ private void frmOutput_Load(object sender, EventArgs e) {
+ _compilerThread = new Thread(compileRoutine);
+ _compilerThread.Start();
+
+ this.TopMost = Properties.Settings.Default.alwaysOnTop;
+ }
+
+ private void compileRoutine() {
+ Compiler compiler = new Compiler(projectPath);
+ compiler.compile();
+
+ if (compiler.BuildSuccessful && Properties.Settings.Default.closeOnSuccess) {
+ this.Invoke((MethodInvoker)delegate {
+ this.Close();
+ });
+ }
+ }
+
+ public void log(string str) {
+ if (InvokeRequired) {
+ this.Invoke(new Action<string>(log), new object[] { str });
+ return;
+ }
+ txtOutput.AppendText(str + "\r\n");
+ }
+
+ }
+}