示例#1
0
 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;
     }
 }
示例#2
0
 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);
 }
示例#3
0
 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);
 }
示例#4
0
文件: Form1.cs 项目: hj1980/Mosa
        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;
            }
        }
示例#5
0
 private void tbSource_TextChanged(object sender, EventArgs e)
 {
     output = new Output(tbSource.Lines);
     UpdateText(sender, e);
     lbStatus.Text = DateTime.Now.ToString();
 }