예제 #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();
 }