2using System.Collections.Generic;
3using System.ComponentModel;
8using System.Windows.Forms;
9using System.Runtime.InteropServices;
10using System.Diagnostics;
11using System.Threading.Tasks;
25 public partial class Form1 : Form
30 InitializeComponent();
31 this.ControlBox =
false;
34 private void RunGams()
36 MethodInvoker action = delegate
38 bu_run.Enabled =
false;
39 bu_close.Enabled =
false;
42 this.BeginInvoke(action);
52 opt.AllModelTypes =
"soplex";
57 bu_cancel.Enabled =
true;
59 this.BeginInvoke(action);
61 currentJob.
Run(opt, tbw);
67 richTextBox1.AppendText(e.Message);
69 this.BeginInvoke(action);
78 bu_run.Enabled =
true;
79 bu_close.Enabled =
true;
80 bu_cancel.Enabled =
false;
82 this.BeginInvoke(action);
85 private void bu_run_Click(
object sender, EventArgs e)
87 Task.Factory.StartNew(() => RunGams());
90 private void bu_cancel_Click(
object sender, EventArgs e)
95 private void bu_close_Click(
object sender, EventArgs e)
void Run(GAMSOptions gamsOptions=null, GAMSCheckpoint checkpoint=null, TextWriter output=null, Boolean createOutDB=true)
void GamsLib(string model)
GAMSJob AddJobFromFile(string fileName, GAMSCheckpoint checkpoint=null, string jobName=null)
GAMSOptions AddOptions(GAMSOptions optFrom=null)