Esempio n. 1
0
 public static WarriorDocument Load(string fileName)
 {
     WarriorDocument warrior = new WarriorDocument();
     warrior.FileName = fileName;
     warrior.IsNew = false;
     warrior.IsModified = false;
     return warrior;
 }
Esempio n. 2
0
 public static WarriorDocument New()
 {
     WarriorDocument warrior = new WarriorDocument();
     DocCounter++;
     warrior.FileName = "NewWarrior" + DocCounter + ".red";
     warrior.IsNew = true;
     warrior.IsModified = false;
     return warrior;
 }
Esempio n. 3
0
 public void RemoveWarrior(WarriorDocument warrior, bool delete)
 {
     if (warrior.Closing())
     {
         warrior.Close();
         if (warrior.Project != null)
         {
             warrior.Project.Remove(warrior, delete);
         }
     }
     RefreshControls();
 }
Esempio n. 4
0
        public void Compile(WarriorDocument warrior)
        {
            if (warrior == null)
                return;
            warrior.Save();
            string[] files = new string[1];
            files[0] = warrior.FileName;

            if (warrior.Project!=null)
            {
                ActiveSolution.Components.Parser.Parse(warrior.Project.Project, ConsoleControl);
            }
            else
            {
                Project tmpProj=new Project(Rules.DefaultRules, warrior.FileName);
                tmpProj.ParserOptions = ParserOptions.Ide;
                ActiveSolution.Components.Parser.Parse(tmpProj, ConsoleControl);
            }

            RefreshControls();
        }