From bb6e704ab011a497ac8c735afc0fd4c52a1425ce Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Tue, 9 Jan 2018 15:01:04 +0100 Subject: Added old project --- love2dToAPK/Forms/frmOutput.cs | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 love2dToAPK/Forms/frmOutput.cs (limited to 'love2dToAPK/Forms/frmOutput.cs') 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(log), new object[] { str }); + return; + } + txtOutput.AppendText(str + "\r\n"); + } + + } +} -- cgit v1.2.3