本文整理汇总了C#中Locale类的典型用法代码示例。如果您正苦于以下问题:C# Locale类的具体用法?C# Locale怎么用?C# Locale使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Locale类属于命名空间,在下文中一共展示了Locale类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LocationAutosuggestSettings
/// <summary>
/// Initializes a new instance of the LocationAutosuggestSettings with the specified parameters
/// </summary>
/// <param name="query">Query string to search for</param>
/// <param name="queryType">Query type - search by name or ID</param>
/// <param name="market">Market country</param>
/// <param name="currency">Selected currency</param>
/// <param name="locale">Selected language</param>
public LocationAutosuggestSettings(string query, LocationAutosuggestQueryType queryType, Market market, Currency currency, Locale locale)
{
if (market == null)
{
throw new ArgumentNullException(nameof(market));
}
if (currency == null)
{
throw new ArgumentNullException(nameof(currency));
}
if (locale == null)
{
throw new ArgumentNullException(nameof(locale));
}
if (query == null)
{
throw new ArgumentNullException(nameof(query));
}
if (query.Length < 2)
{
throw new ArgumentException("The query string has to be at least two characters long", nameof(query));
}
Query = query;
QueryType = queryType;
Market = market;
Currency = currency;
Locale = locale;
}
示例2: FixRow
public bool FixRow(Locale lang)
{
if (spellid == 0)
return false;
return true;
}
示例3: Insert
public void Insert(Locale model)
{
using (var db = new SQLite.SQLiteConnection(Settings.DatabasePath))
{
db.Insert(model);
}
}
示例4: LoadKeys
public void LoadKeys(Locale loadFrom, string collectionKey)
{
_locale = _localeManager.Locales[_localeManager.CurrentLocale];
if(_locale.StringCollections.ContainsKey(collectionKey) == false)
{
_locale.StringCollections.Add(collectionKey, new StringCollection(collectionKey));
}
_collection = _locale.StringCollections[collectionKey];
txtNew.RightToLeft = _locale.RightToLeft ? RightToLeft.Yes : RightToLeft.No;
var enumerable = loadFrom.StringCollections[collectionKey].StringsTable.Values;
foreach (var key in enumerable)
{
if (key.AliasedKey)
continue;
var item = new ListViewItem(key.Key);
item.ImageKey = GetStatusIcon(collectionKey, key.Key);
lstKeys.Items.Add(item);
}
colKey.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent);
chkMinorUpdate.Visible = _parentLocale == null;
chkDerived.Enabled = _parentLocale != null;
chkUpToDate.Visible = _parentLocale != null;
btnSetModified.Visible = _parentLocale == null;
}
示例5: TrainerParser
public TrainerParser(Locale locale, int flags)
: base(locale, flags)
{
this.Address = "npc={0}";
Builder.Setup("npc_trainer", "entry", true, "spell", "spellcost", "reqlevel", "reqSkill", "reqSkillValue");
}
示例6: Minute
public Minute(Date time, TimeZone zone, Locale locale)
{
Minute minute = this;
if (time == null)
{
string str = "Null 'time' argument.";
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new IllegalArgumentException(str);
}
else if (zone == null)
{
string str = "Null 'zone' argument.";
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new IllegalArgumentException(str);
}
else if (locale == null)
{
string str = "Null 'locale' argument.";
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new IllegalArgumentException(str);
}
else
{
Calendar instance = Calendar.getInstance(zone, locale);
instance.setTime(time);
this.minute = (byte) instance.get(12);
this.hour = (byte) instance.get(11);
this.day = new Day(time, zone, locale);
this.peg(instance);
}
}
示例7: SetUp
public void SetUp()
{
Configuration.ResourceResolver = new HttpResourceResolver();
Runner.SqlCompact("Lemonade").Down();
Runner.SqlCompact("Lemonade").Up();
var application = new ApplicationBuilder()
.WithName("Test Application")
.Build();
var locale = new Locale { Description = "English", IsoCode = "en-GB" };
new CreateApplicationFake().Execute(application);
new CreateLocaleFake().Execute(locale);
var resource = new ResourceBuilder()
.WithLocale(locale)
.WithResourceKey("HelloWorld")
.WithResourceSet("MyTestResources")
.WithValue("Hello World")
.WithApplication(application).Build();
new CreateResourceFake().Execute(resource);
_nancyHost = new NancyHost(new Uri("http://localhost:12345"), new LemonadeBootstrapper());
_nancyHost.Start();
}
示例8: Solver
public Solver(int matrixSize, Locale locale)
{
this.matrixSize = matrixSize;
Locale = locale;
generateNeighborsTable();
}
示例9: getBundle
public MessageBundle getBundle(GadgetSpec spec, Locale locale, bool ignoreCache)
{
if (ignoreCache)
{
return getNestedBundle(spec, locale, true);
}
String key = spec.getUrl().ToString() + '.' + locale.ToString();
MessageBundle cached = HttpRuntime.Cache[key] as MessageBundle;
MessageBundle bundle;
if (cached == null)
{
try
{
bundle = getNestedBundle(spec, locale, ignoreCache);
}
catch (GadgetException)
{
// Enforce negative caching.
bundle = cached ?? MessageBundle.EMPTY;
}
HttpRuntime.Cache.Insert(key, bundle, null, System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(refresh));
}
else
{
bundle = cached;
}
return bundle;
}
示例10: ResourceBundleSupport
protected internal ResourceBundleSupport(Locale locale, ResourceBundle resourceBundle, string baseName)
{
base.\u002Ector();
ResourceBundleSupport resourceBundleSupport = this;
if (locale == null)
{
string str = "Locale must not be null";
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new NullPointerException(str);
}
else if (resourceBundle == null)
{
string str = "Resources must not be null";
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new NullPointerException(str);
}
else if (baseName == null)
{
string str = "BaseName must not be null";
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new NullPointerException(str);
}
else
{
this.locale = locale;
this.resources = resourceBundle;
this.resourceBase = baseName;
this.cache = new TreeMap();
this.lookupPath = new TreeSet();
}
}
示例11: NpcLocaleParser
public NpcLocaleParser(Locale locale, int flags)
: base(locale, flags)
{
if (HasLocales)
Builder.Setup("locales_creature", "entry", false, string.Format("name_{0}", LocalePosfix), string.Format("subname_{0}", LocalePosfix));
else
Builder.Setup("creature_template", "entry", false, "name", "subname");
}
示例12: QuestLocaleParser
public QuestLocaleParser(Locale locale, int flags)
: base(locale, flags)
{
if (HasLocales)
Builder.Setup("locales_quest", "entry", false, string.Format("title_{0}", LocalePosfix));
else
Builder.Setup("quest_template", "id", false, "title");
}
示例13: Year
public Year(Date time, TimeZone zone, Locale locale)
{
Year year = this;
Calendar instance = Calendar.getInstance(zone, locale);
instance.setTime(time);
this.year = (short) instance.get(1);
this.peg(instance);
}
示例14: ImportReportData
public ImportReportData(string providerPairName, string uploadedFileName, Locale affectedLocale, List<QualifiedValue> inserts, List<Tuple<QualifiedValue, HomeController.ImportExportRecord>> updates, List<QualifiedValue> deletes)
{
ProviderPairName = providerPairName;
UploadedFileName = uploadedFileName;
AffectedLocale = affectedLocale;
Inserts = inserts;
Updates = updates;
Deletes = deletes;
}
示例15: DateTimeStr
internal DateTimeStr(string pattern, Locale locale, Time t)
{
this.pattern = pattern;
this.m_locale = locale;
this.hour = t.getHour();
this.min = t.getMin();
this.sec = t.getSec();
this.ns = t.getNanoSec();
}