Example #1
0
        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;
 }
Example #3
0
 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);
 }
Example #4
0
 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");
     }
 }
Example #5
0
 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");
     }
 }
Example #6
0
        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);
        }
Example #7
0
 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);
     }
 }
Example #8
0
        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;
                }
            }
        }
Example #9
0
        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;
                }
            }
        }
Example #10
0
 public static void InitRegistry()
 {
     RootItem           = new RegistryItem("Root", null);
     RootItem.Directory = true;
     ConfigDir          = RootItem.AddDirectoryChild("Config");
 }
Example #11
0
 public RegistryMethod(string name, RegistryItem parent, InvokeMethod method)
     : base(name, parent)
 {
     this.Method = method;
 }
Example #12
0
 public RegistryImage(string name, RegistryItem parent, ExposeImage img)
     : base(name, parent)
 {
     this.Img = img;
 }
Example #13
0
 public RegistryString(string name, RegistryItem parent, string value)
     : base(name, parent)
 {
 }
Example #14
0
 public RegistryString(string name, RegistryItem parent, string value)
     : base(name, parent)
 {
 }
Example #15
0
 public RegistryNumber(string name, RegistryItem parent, float value)
     : base(name, parent)
 {
     this.Value = value;
 }
Example #16
0
 public RegistryMethod(string name, RegistryItem parent, InvokeMethod method)
     : base(name, parent)
 {
     this.Method = method;
 }
Example #17
0
 public static void InitRegistry()
 {
     RootItem = new RegistryItem("Root", null);
     RootItem.Directory = true;
     ConfigDir = RootItem.AddDirectoryChild("Config");
 }
Example #18
0
 public RegistryItem AddDirectoryChild(string name)
 {
     RegistryItem newItem = new RegistryItem(name, this);
     newItem.Directory = true;
     this.AddChild(newItem);
     return newItem;
 }
Example #19
0
 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));
 }
Example #20
0
 public void Exit(RegistryItem parent)
 {
     this.NWindow.Stop();
 }
Example #21
0
 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);
     }
 }
Example #22
0
 public RegistryNumber(string name, RegistryItem parent, float value)
     : base(name, parent)
 {
     this.Value = value;
 }
Example #23
0
 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());
 }
Example #24
0
 internal static void SetSpeed(RegistryItem item)
 {
     CameraSpeed = (int)(float)(item.GetChild("Speed").GetValue());
 }