コード例 #1
0
ファイル: MMEMovies.cs プロジェクト: ttttbbbb708/MMEViewer
        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);
            }
        }
コード例 #2
0
        private void LoadAttributesAndComments()
        {
            MMEInformationFileHelper.RawMMEFile rawData = MMEInformationFileHelper.ReadInformationFile(MMEFilePath);

            Attributes = rawData.Attributes;
            Comments   = rawData.AdditionalComments;
        }
コード例 #3
0
ファイル: MMEChannel.cs プロジェクト: ttttbbbb708/MMEViewer
        private void LoadChannelFile()
        {
            Free();

            var rawData = MMEInformationFileHelper.ReadInformationFile(ChannelFilePath, true);

            Attributes = rawData.Attributes.ToDictionary(a => a.Name);
            Comments   = rawData.AdditionalComments;
            Values     = rawData.Values;
        }