public static WarriorDocument Load(string fileName) { WarriorDocument warrior = new WarriorDocument(); warrior.FileName = fileName; warrior.IsNew = false; warrior.IsModified = false; return warrior; }
public static WarriorDocument New() { WarriorDocument warrior = new WarriorDocument(); DocCounter++; warrior.FileName = "NewWarrior" + DocCounter + ".red"; warrior.IsNew = true; warrior.IsModified = false; return warrior; }
public void RemoveWarrior(WarriorDocument warrior, bool delete) { if (warrior.Closing()) { warrior.Close(); if (warrior.Project != null) { warrior.Project.Remove(warrior, delete); } } RefreshControls(); }
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(); }