?? settingscollection.cs
字號:
?namespace ElementIT.PowUpload
{
using System;
using System.Collections.Specialized;
using System.Reflection;
public class SettingsCollection : NameObjectCollectionBase
{
private bool _isCommonSettingsCol;
internal DateTime _timeCreated = DateTime.MinValue;
internal SettingsCollection(bool isCommonSettingsCol)
{
this._timeCreated = DateTime.Now;
this._isCommonSettingsCol = isCommonSettingsCol;
}
internal bool HasKey(string Name)
{
for (int i = 0; i < base.Keys.Count; i++)
{
if (string.Compare(base.Keys[i], Name, true) == 0)
{
return true;
}
}
return false;
}
public object this[string Name]
{
get
{
if (this.HasKey(Name))
{
return base.BaseGet(Name);
}
if (this._isCommonSettingsCol)
{
return null;
}
return Settings.CommonSettings[Name];
}
set
{
if (this.HasKey(Name))
{
base.BaseSet(Name, value);
}
else
{
base.BaseAdd(Name, value);
}
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -