private void LoadInformationFile() { List <string> additionalComments = new List <string>(); var rawData = MMEInformationFileHelper.ReadInformationFile(MovieInformationFilePath); Comments = rawData.AdditionalComments; MMEAttribute numberOfMoviesAttribute = rawData.Attributes.First( a => a.Name.Equals(MME_NUMBER_OF_MOVIES_KEY, StringComparison.InvariantCultureIgnoreCase) ); int numberOfMovies = int.Parse(numberOfMoviesAttribute.Value); for (int i = 0; i < numberOfMovies; i++) { Dictionary <string, MMEAttribute> photoAttributes; photoAttributes = rawData.Attributes .Where(a => a.Name.EndsWith(" " + (i + 1))) .ToDictionary(a => a.Name); MMEMovie mmeMovie = new MMEMovie(this, photoAttributes); Add(mmeMovie); } }
private void LoadAttributesAndComments() { MMEInformationFileHelper.RawMMEFile rawData = MMEInformationFileHelper.ReadInformationFile(MMEFilePath); Attributes = rawData.Attributes; Comments = rawData.AdditionalComments; }
private void LoadChannelFile() { Free(); var rawData = MMEInformationFileHelper.ReadInformationFile(ChannelFilePath, true); Attributes = rawData.Attributes.ToDictionary(a => a.Name); Comments = rawData.AdditionalComments; Values = rawData.Values; }