Beispiel #1
0
        private void SaveSetting()
        {
            MessageDisplay msgDisplay = CreateMessageDisplay("MaxAlbumCapacity", "MaxPhotoFileSize", "new_MaxAlbumCapacity", "new_MaxPhotoFileSize");

            AlbumSettings albumSettings = new AlbumSettings();

            albumSettings.EnableAlbumFunction = _Request.Get <bool>("EnableAlbumFunction", Method.Post, true);
            albumSettings.MaxAlbumCapacity    = new ExceptableItem_FileSize().GetExceptable("MaxAlbumCapacity", msgDisplay);
            albumSettings.MaxPhotoFileSize    = new ExceptableItem_FileSize().GetExceptable("MaxPhotoFileSize", msgDisplay);

            if (!msgDisplay.HasAnyError())
            {
                SettingManager.SaveSettings(albumSettings);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Read the settings set for this Section in the Administration interface
        /// </summary>
        public override void ReadSectionSettings()
        {
            base.ReadSectionSettings();

            // Set dynamic module settings
            string physicalDir = Convert.ToString(Section.Settings["PHYSICAL_DIR"]);

            if (physicalDir != String.Empty)
            {
                _galleryPathBuilder.PhysicalDir = physicalDir;
            }


            _albumSettings = new AlbumSettings();

            _albumSettings.ShowNumberOfViews            = Convert.ToBoolean(Section.Settings["SHOW_VIEWS"]);
            _albumSettings.NumberOfColumns              = Convert.ToInt32(Section.Settings["NUMBER_OF_COLUMNS"]);
            _albumSettings.NumberOfItemsOnPage          = Convert.ToInt32(Section.Settings["NUMBER_OF_ITEMS_ON_PAGE"]);
            _albumSettings.MaxImageDimension            = Convert.ToInt32(Section.Settings["MAX_IMAGE_DIMENSION"]);
            _albumSettings.MaxThumbDimension            = Convert.ToInt32(Section.Settings["MAX_THUMB_DIMENSION"]);
            _albumSettings.ShowGraphicalButtonsInViewer = true; // unused for now
        }