Ejemplo n.º 1
0
 public void Initialize(IProgress<double> progress, SQF.ClassParser.ConfigField MainConfigField)
 {
     for (int i = 0; i < UIElements.Count; i++)
     {
         var file = UIElements[i];
         file.Parent = this;
         progress.Report(i / (UIElements.Count + this.Styles.Count));
         file.Initialize(MainConfigField);
     }
     for (int i = 0; i < Styles.Count; i++)
     {
         var style = Styles[i];
         style.Parent = this;
         progress.Report(i / (UIElements.Count + this.Styles.Count));
         style.Initialize(this.ThisPath);
     }
 }
Ejemplo n.º 2
0
        public void Initialize(SQF.ClassParser.ConfigField MainConfigField)
        {
            this.Image = Parent.ThisPath + Image.Replace('/', '\\');
            this.__ClassPath = Parent.ThisPath + __ClassPath.Replace('/', '\\');
            this.__XamlPath = Parent.ThisPath + __XamlPath.Replace('/', '\\');
            using (var stream = System.IO.File.OpenRead(this.__ClassPath))
            {
                var parser = new SQF.ClassParser.Generated.Parser(new SQF.ClassParser.Generated.Scanner(stream));
                parser.Patch(MainConfigField, false);
                this.ConfigKey = MainConfigField[MainConfigField.Count - 1].Name;
            }

            foreach (var it in this.__PropertiesPath)
            {
                var path = System.IO.Path.Combine(Parent.ThisPath, it.TrimStart(new[] { '\\', '/' }));
                var groups = Group.Load(path);
                foreach(var groupA in this.Properties)
                {
                    foreach(var groupB in groups)
                    {
                        if(groupA.Name.ToUpper() == groupB.Name.ToUpper())
                        {
                            groups.Remove(groupB);
                            groupA.Items.AddRange(groupB.Items);
                            break;
                        }
                    }
                }
                this.Properties.AddRange(groups);
            }
            foreach (var it in this.__EventsPath)
            {
                var path = System.IO.Path.Combine(Parent.ThisPath, it.TrimStart(new[] { '\\', '/' }));
                this.Events.AddRange(Event.Load(path));
            }
        }
Ejemplo n.º 3
0
        public static void LoadAddons()
        {
            string BinaryPaths = Environment.CurrentDirectory + "\\intercept\\Addons\\";

            Console.WriteLine(SQF.time());
        }
Ejemplo n.º 4
0
 public void Patch(SQF.ClassParser.ConfigField field, bool AutoRemove)
 {
     this.MainField = field;
     la = new Token();
     la.val = "";
     Get();
     doRoot();
     if(AutoRemove)
         ApplyRemovedFields();
 }