private void LoadConfig() { string mediaList = ""; if (File.Exists(ConfigFileName)) { ConfigJSON = JObject.Parse(File.ReadAllText(ConfigFileName)); } else { ConfigJSON = JObject.Parse(CreateConfigFile(ConfigFileName)); } Top = ConfigJSON.GetValue("top").Value <int>(); Left = ConfigJSON.GetValue("left").Value <int>(); Width = ConfigJSON.GetValue("width").Value <int>(); Height = ConfigJSON.GetValue("height").Value <int>(); Volume = ConfigJSON.GetValue("volume").Value <int>(); LastMediaFileName = ConfigJSON.GetValue("lastMediaFileName").Value <string>(); LastMediaPosition = ConfigJSON.GetValue("lastMediaPosition").Value <double>(); CurrentFileIndex = ConfigJSON.GetValue("currentFileIndex").Value <int>(); mediaList = ConfigJSON.GetValue("mediaFileList").Value <string>(); MediaPlayList = mediaList.Split(',').ToList(); }