Ejemplo n.º 1
0
        public MMEMovie(MMEMovies mMEMovies, Dictionary <string, MMEAttribute> movieAttributes)
        {
            this.parent          = mMEMovies;
            this.movieAttributes = movieAttributes;

            MMEInformationFileHelper.RemoveNumberFromAttributes(movieAttributes);
        }
Ejemplo n.º 2
0
        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);
            }
        }
Ejemplo n.º 3
0
        public MMEPhoto(MMEPhotos mMEPhotos, Dictionary <string, MMEAttribute> photoAttributes)
        {
            this.mMEPhotos       = mMEPhotos;
            this.photoAttributes = photoAttributes;

            MMEInformationFileHelper.RemoveNumberFromAttributes(photoAttributes);
        }
Ejemplo n.º 4
0
        private void LoadAttributesAndComments()
        {
            MMEInformationFileHelper.RawMMEFile rawData = MMEInformationFileHelper.ReadInformationFile(MMEFilePath);

            Attributes = rawData.Attributes;
            Comments   = rawData.AdditionalComments;
        }
Ejemplo n.º 5
0
        private void LoadChannelFile()
        {
            Free();

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

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