📄 gallery.cs
字号:
else if(value > 100)
SetExtendedAttribute( "ThumbnailBrightness", "100" );
else
SetExtendedAttribute( "ThumbnailBrightness", value.ToString() );
}
}
/// <summary>
/// This property defines the width of large thumbnails
/// </summary>
public int SecondaryThumbnailX
{
get
{
string val = GetExtendedAttribute( "SecondaryThumbnailX" );
if(val != string.Empty)
return int.Parse(val);
else
return 160;
}
set { SetExtendedAttribute( "SecondaryThumbnailX", value.ToString() ); }
}
/// <summary>
/// This property defines the height of large thumbnails
/// </summary>
public int SecondaryThumbnailY
{
get
{
string val = GetExtendedAttribute( "SecondaryThumbnailY" );
if(val != string.Empty)
return int.Parse(val);
else
return 140;
}
set { SetExtendedAttribute( "SecondaryThumbnailY", value.ToString() ); }
}
/// <summary>
/// This property defines the quality percentage for large thumbnail images
/// </summary>
public int SecondaryThumbnailQuality
{
get
{
string val = GetExtendedAttribute( "SecondaryThumbnailQuality" );
if(val != string.Empty)
return int.Parse(val);
else
return 80;
}
set { SetExtendedAttribute( "SecondaryThumbnailQuality", value.ToString() ); }
}
/// <summary>
/// This property defines the width of the image shown on the picture details screen
/// </summary>
public int PictureDetailsX
{
get
{
string val = GetExtendedAttribute( "PictureDetailsX" );
if(val != string.Empty)
return int.Parse(val);
else
return 500;
}
set { SetExtendedAttribute( "PictureDetailsX", value.ToString() ); }
}
/// <summary>
/// This property defines the height of the image shown on the picture details screen
/// </summary>
public int PictureDetailsY
{
get
{
string val = GetExtendedAttribute( "PictureDetailsY" );
if(val != string.Empty)
return int.Parse(val);
else
return 375;
}
set { SetExtendedAttribute( "PictureDetailsY", value.ToString() ); }
}
/// <summary>
/// This property defines the quality percentage of the image shown on the picture details screen
/// </summary>
public int PictureDetailsQuality
{
get
{
string val = GetExtendedAttribute( "PictureDetailsQuality" );
if(val != string.Empty)
return int.Parse(val);
else
return 80;
}
set { SetExtendedAttribute( "PictureDetailsQuality", value.ToString() ); }
}
/// <summary>
/// This property defines the width of slideshow images
/// </summary>
public int SlideshowX
{
get
{
string val = GetExtendedAttribute( "SlideshowX" );
if(val != string.Empty)
return int.Parse(val);
else
return 400;
}
set { SetExtendedAttribute( "SlideshowX", value.ToString() ); }
}
/// <summary>
/// This property defines the height of slideshow images
/// </summary>
public int SlideshowY
{
get
{
string val = GetExtendedAttribute( "SlideshowY" );
if(val != string.Empty)
return int.Parse(val);
else
return 300;
}
set { SetExtendedAttribute( "SlideshowY", value.ToString() ); }
}
/// <summary>
/// This property defines the quality percentage of slideshow images
/// </summary>
public int SlideshowQuality
{
get
{
string val = GetExtendedAttribute( "SlideshowQuality" );
if(val != string.Empty)
return int.Parse(val);
else
return 80;
}
set { SetExtendedAttribute( "SlideshowQuality", value.ToString() ); }
}
/// <summary>
/// This property defines the delay in seconds of the time between image changes in slideshows
/// </summary>
public int SlideshowDelay
{
get
{
string val = GetExtendedAttribute( "SlideshowDelay" );
if(val != string.Empty)
return int.Parse(val);
else
return 5;
}
set { SetExtendedAttribute( "SlideshowDelay", value.ToString() ); }
}
#endregion
#region Feature Settings
public bool EnableComments
{
get
{
string val = GetExtendedAttribute( "EnableComments" );
if(val != string.Empty)
return bool.Parse(val);
else
return true;
}
set { SetExtendedAttribute( "EnableComments", value.ToString() ); }
}
public bool ModerateComments
{
get
{
string val = GetExtendedAttribute( "ModerateComments" );
if(val != string.Empty)
return bool.Parse(val);
else
return false;
}
set { SetExtendedAttribute( "ModerateComments", value.ToString() ); }
}
public bool EnableRatings
{
get
{
string val = GetExtendedAttribute( "EnableRatings" );
if(val != string.Empty)
return bool.Parse(val);
else
return true;
}
set { SetExtendedAttribute( "EnableRatings", value.ToString() ); }
}
public bool EnableExif
{
get
{
string val = GetExtendedAttribute( "EnableExif" );
if(val != string.Empty)
return bool.Parse(val);
else
return true;
}
set { SetExtendedAttribute( "EnableExif", value.ToString() ); }
}
public bool EnableOrderPrints
{
get
{
string val = GetExtendedAttribute( "EnableOrderPrints" );
if(val != string.Empty)
return bool.Parse(val);
else
return true;
}
set { SetExtendedAttribute( "EnableOrderPrints", value.ToString() ); }
}
#endregion
#region Image Settings
public bool EnableSecondaryThumbnail
{
get
{
string val = GetExtendedAttribute( "EnableSecondaryThumbnail" );
if(val != string.Empty)
return bool.Parse(val);
else
return true;
}
set { SetExtendedAttribute( "EnableSecondaryThumbnail", value.ToString() ); }
}
public bool EnableHighlightThumbnail
{
get
{
string val = GetExtendedAttribute( "EnableHighlightThumbnail" );
if(val != string.Empty)
return bool.Parse(val);
else
return true;
}
set { SetExtendedAttribute( "EnableHighlightThumbnail", value.ToString() ); }
}
#endregion
#region Themes
private string theme = null;
public string Theme
{
get
{
//This property will be called numerous times per request. Let's save the lookup cost
//by using a local variable. In addition, this will give us a clean spot to set the default skin
if(theme == null)
{
theme = GetString("Theme",null);
if(Globals.IsNullorEmpty(theme))
theme = GalleryConfiguration.Instance().DefaultTemplate;
}
return theme;
}
//If the theme name == the default value, do we want to save it?
set
{
//If updated value == Default Value, set to null. Otherwise, just update the inernal
//store and set the local variable
if(string.Compare(value, GalleryConfiguration.Instance().DefaultTemplate) == 0)
SetExtendedAttribute("Theme", null);
else
SetExtendedAttribute("Theme", value);
theme = value;
}
}
public string SecondaryCSS
{
get { return GetString("SecondaryCSS", null); }
set { SetExtendedAttribute("SecondaryCSS", value); }
}
public string CSSOverride
{
get { return GetString("CSSOverride", null); }
set { SetExtendedAttribute("CSSOverride", value); }
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -