Ejemplo n.º 1
0
        private JObject parseReplay(string path)
        {
            Replay replay = Replay.Deserialize(path);

            RocketLeagueReplayParser.Serializers.JsonSerializer jserializer = new RocketLeagueReplayParser.Serializers.JsonSerializer();
            string jsonString = jserializer.Serialize(replay);
            int    i          = jsonString.IndexOf("\"Frames\"");

            jsonString = jsonString.Substring(0, i - 1);
            jsonString = jsonString + "}";
            JObject json = JObject.Parse(jsonString);

            return(json);
        }
Ejemplo n.º 2
0
        public MainWindow()
        {
            InitializeComponent();
            String        path = "C:\\Users\\" + Environment.UserName + "\\Documents\\My Games\\Rocket League\\TAGame\\Demos\\";
            DirectoryInfo d    = new DirectoryInfo(path);

            Console.WriteLine(path);
            watch(path);
            foreach (FileInfo file in d.GetFiles("*.replay"))
            {
                Replay replay = Replay.Deserialize(file.FullName);
                RocketLeagueReplayParser.Serializers.JsonSerializer jserializer = new RocketLeagueReplayParser.Serializers.JsonSerializer();
                string jsonString = jserializer.Serialize(replay);
                int    i          = jsonString.IndexOf("\"Frames\"");
                jsonString = jsonString.Substring(0, i - 1);
                jsonString = jsonString + "}";
                JObject json = JObject.Parse(jsonString);
            }
        }