diff options
author | Jakob Stendahl <jakob.stendahl@outlook.com> | 2018-01-09 15:01:04 +0100 |
---|---|---|
committer | Jakob Stendahl <jakob.stendahl@outlook.com> | 2018-01-09 15:01:04 +0100 |
commit | bb6e704ab011a497ac8c735afc0fd4c52a1425ce (patch) | |
tree | bed462d18c4f976f30c690b529d6de8b2a6ba2ff /love2dToAPK/Forms/frmOutput.cs | |
parent | d2c375c015fe3e216234a887ab75e08d40f5f5db (diff) | |
download | Love2dToAPK-bb6e704ab011a497ac8c735afc0fd4c52a1425ce.tar.gz Love2dToAPK-bb6e704ab011a497ac8c735afc0fd4c52a1425ce.zip |
Added old project
Diffstat (limited to 'love2dToAPK/Forms/frmOutput.cs')
-rw-r--r-- | love2dToAPK/Forms/frmOutput.cs | 52 |
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"); + } + + } +} |