private void button1_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { output = new Output(openFileDialog1.FileName); tbSource.Lines = output.Lines; UpdateText(sender, e); lbStatus.Text = openFileDialog1.FileName; } }
public StageForm(ITypeSystem typeSystem, string methodname) { this.methodname = methodname; //Mosa.Tools.CompilerHelper.CompilerHelper.FilterMethod(methodname); Mosa.Tools.CompilerHelper.CompilerHelper.SetLogger(sl); this.typeSystem = typeSystem; InitializeComponent(); RunMosaCompiler(); output = new Output(sl.GetFullLog()); tbSource.Lines = output.Lines; UpdateText(null, null); int methodindex = cbMethods.FindString(methodname); cbMethods.SelectedIndex = methodindex; cbMethods_SelectionChangeCommitted(null, null); }
public StageForm(string sourcecode, string methodname) { this.methodname = methodname; InitializeComponent(); settings.CodeSource = sourcecode; settings.AddReference("mscorlib.dll"); settings.AddReference("Mosa.Kernel.dll"); string assembly = RunCodeDomCompiler(settings); Mosa.Tools.CompilerHelper.CompilerHelper.SetLogger(sl); RunMosaCompiler(settings, assembly); output = new Output(sl.GetFullLog()); tbSource.Lines = output.Lines; UpdateText(null, null); int methodindex = cbMethods.FindString(methodname); cbMethods.SelectedIndex = methodindex; cbMethods_SelectionChangeCommitted(null, null); }
private void button1_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { output = new Output(openFileDialog1.FileName); tbSource.Lines = output.Lines; cbMethods.Items.Clear(); foreach (string item in output.GetMethods()) cbMethods.Items.Add(item); cbMethods.SelectedIndex = 0; cbMethods_SelectionChangeCommitted(sender, e); lbStatus.Text = openFileDialog1.FileName; } }
private void tbSource_TextChanged(object sender, EventArgs e) { output = new Output(tbSource.Lines); UpdateText(sender, e); lbStatus.Text = DateTime.Now.ToString(); }