public RegistryItem AddDirectoryChild(string name) { RegistryItem newItem = new RegistryItem(name, this); newItem.Directory = true; this.AddChild(newItem); return(newItem); }
public static RegistryItem CreateRegistryEntity(RegistryItem parent, string name, string filename, float xloc, float yloc) { RegistryItem entity = parent.AddDirectoryChild(name); CreateVector(entity, "Location", xloc, yloc); entity.AddChild(new RegistryMethod("Draw", entity, new RegistryMethod.InvokeMethod(DrawBasic))); entity.AddChild(new RegistryImage("Image", entity, ResourceManager.GetImage(filename))); return entity; }
public GameWindow(int width, int height) { EngineGlobals.Init(); CameraManager.Init(); this.RendererItem = RegistryManager.RootItem.AddDirectoryChild("Renderer"); this.RendererItem.AddChild(new RegistryMethod("Exit", this.RendererItem, new RegistryMethod.InvokeMethod(Exit))); this.NWindow = new Tier2NativeWindow(width, height); }
public RegistryFile(string name, RegistryItem parent, string filename) : base(name, parent) { this.Value = new FileInfo(filename); if (!this.Value.Exists) { LogManager.Log("Registry", "Warning", filename + " : Does not Exist"); } }
public static RegistryItem GetItem(string name) { string[] tokens = name.Split('\\'); RegistryItem directory = RootItem; for (int i = 0; i < tokens.Length; i++) { directory = directory.GetChild(tokens[i]); } return(directory); }
public void AddChild(RegistryItem item) { if (this.GetChild(item.Name) != null) { LogManager.Log("Registry", "Error", "Node: " + item.Name + " already exists"); } else { this.Children.Add(item); } }
public RegistryItem(string name, RegistryItem parent) { this.Name = name; this.Parent = parent; this.FullPath += this.Name + "\\"; if (this.Parent != null) { RegistryItem iterTmp = this.Parent; while (iterTmp.Parent != null) { this.FullPath += iterTmp.Name + "\\"; iterTmp = iterTmp.Parent; } } }
public static void InitRegistry() { RootItem = new RegistryItem("Root", null); RootItem.Directory = true; ConfigDir = RootItem.AddDirectoryChild("Config"); }
public RegistryMethod(string name, RegistryItem parent, InvokeMethod method) : base(name, parent) { this.Method = method; }
public RegistryImage(string name, RegistryItem parent, ExposeImage img) : base(name, parent) { this.Img = img; }
public RegistryString(string name, RegistryItem parent, string value) : base(name, parent) { }
public RegistryNumber(string name, RegistryItem parent, float value) : base(name, parent) { this.Value = value; }
public RegistryItem AddDirectoryChild(string name) { RegistryItem newItem = new RegistryItem(name, this); newItem.Directory = true; this.AddChild(newItem); return newItem; }
public static void CreateVector(RegistryItem parent, string name, float x, float y) { RegistryItem vector = parent.AddDirectoryChild(name); vector.AddChild(new RegistryNumber("X", vector, x)); vector.AddChild(new RegistryNumber("Y", vector, y)); }
public void Exit(RegistryItem parent) { this.NWindow.Stop(); }
internal static void DrawBasic(RegistryItem item) { RegistryItem loc = item.GetChild("Location"); Graphics.DrawImage(item.GetChild("Image").GetValue(), loc.GetChild("X").GetValue(), loc.GetChild("Y").GetValue()); }
internal static void SetSpeed(RegistryItem item) { CameraSpeed = (int)(float)(item.GetChild("Speed").GetValue()); }