Esempio n. 1
0
        public bool Apply()
        {
            Compiler.Options.CheckOverflow           = overflow.Checked;
            Compiler.Options.Debug                   = debug.Checked;
            Compiler.Options.Optimize                = Options.Checked;
            Compiler.Options.AllowUnsafe             = allowunsafe.Checked;
            Compiler.Options.WarningLevel            = warnings.SelectedIndex;
            Compiler.Options.AutoUseLibraryNamespace = autoAddNamespace.Checked;
            CompilerErrors.ShowErrorNumbers          = errorCodes.Checked;

            CompilerOptions.SourceHeader h = new CompilerOptions.SourceHeader();
            h.Text            = sourceHeader.Text;
            sourceHeader.Text = h.Text;
            Compiler.Compile(h);
            if (h.CompilerResults.Errors.HasErrors)
            {
                sourceHeader.MarkErrors(h);
                return(false);
            }
            else
            {
                Compiler.Options.Header.Text = h.Text;
                return(true);
            }
        }
Esempio n. 2
0
 private void compileClick(object sender, System.EventArgs e)
 {
     Apply();
     library.Modified = false;
     Compiler.Compile(library);
     editor.MarkErrors(library);
     if (library.Modified)
     {
         Model.Items.Invalidate();
     }
     if (hasFile)
     {
         try {
             library.Save();
             modified = false;
             hasFile  = true;
             SetTitle();
         } catch (Exception) {
             MessageBox.Show("Error saving file " + library.Filename);
         }
     }
 }
Esempio n. 3
0
 private void compileClick(object sender, System.EventArgs e)
 {
     CreateF();
     Compiler.Compile(f);
     fSource.MarkErrors(f);
 }