本文整理汇总了C#中Locale类的典型用法代码示例。如果您正苦于以下问题:C# Locale类的具体用法?C# Locale怎么用?C# Locale使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Locale类属于命名空间,在下文中一共展示了Locale类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:jochenvanwylick,项目名称:SkyScanner,代码行数:37,代码来源:LocationAutosuggestSettings.cs
示例2: FixRow
public bool FixRow(Locale lang)
{
if (spellid == 0)
return false;
return true;
}
开发者ID:LordJZ,项目名称:MyWowTools,代码行数:7,代码来源:GlyphProperties.cs
示例3: Insert
public void Insert(Locale model)
{
using (var db = new SQLite.SQLiteConnection(Settings.DatabasePath))
{
db.Insert(model);
}
}
开发者ID:ktei,项目名称:JsonResxEditor,代码行数:7,代码来源:LocaleService.cs
示例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;
}
开发者ID:neosmart,项目名称:Localization,代码行数:31,代码来源:Translator.cs
示例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");
}
开发者ID:armano2,项目名称:WoWHead-data-parser,代码行数:7,代码来源:TrainerParser.cs
示例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);
}
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:31,代码来源:Minute.cs
示例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();
}
开发者ID:thesheps,项目名称:lemonade,代码行数:27,代码来源:GivenHttpResourceResolver.cs
示例8: Solver
public Solver(int matrixSize, Locale locale)
{
this.matrixSize = matrixSize;
Locale = locale;
generateNeighborsTable();
}
开发者ID:bsrykt,项目名称:kelime-avcisi,代码行数:7,代码来源:Solver.cs
示例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;
}
开发者ID:s7loves,项目名称:pesta,代码行数:32,代码来源:DefaultMessageBundleFactory.cs
示例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();
}
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:31,代码来源:ResourceBundleSupport.cs
示例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");
}
开发者ID:Lordron,项目名称:WoWHead-data-parser,代码行数:8,代码来源:NpcLocaleParser.cs
示例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");
}
开发者ID:Lordron,项目名称:WoWHead-data-parser,代码行数:8,代码来源:QuestLocaleParser.cs
示例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);
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:Year.cs
示例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;
}
开发者ID:BackseatDevelopers,项目名称:BLocal,代码行数:9,代码来源:ImportReportData.cs
示例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();
}
开发者ID:nomit007,项目名称:f4,代码行数:9,代码来源:DateTimeStr.cs
示例16: OnLocaleChange
public void OnLocaleChange(Locale e)
{
#if SILVERLIGHT
RaisePropertyChanged("Values");
#else
RaisePropertyChanged(string.Empty);
#endif
}
开发者ID:arielbh,项目名称:SuiteValue.UI,代码行数:9,代码来源:LocalizationHelper.cs
示例17: Month
public Month(Date time, TimeZone zone, Locale locale)
{
Month month = this;
Calendar instance = Calendar.getInstance(zone, locale);
instance.setTime(time);
this.month = instance.get(2) + 1;
this.year = instance.get(1);
this.peg(instance);
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:9,代码来源:Month.cs
示例18: Translator
public Translator(LocaleManager localeManager, Locale parentLocale = null)
{
_localeManager = localeManager;
_parentLocale = parentLocale;
InitializeComponent();
imageList1.Images.Add(@"red", Properties.Resources.red);
imageList1.Images.Add(@"orange", Properties.Resources.orange);
imageList1.Images.Add(@"green", Properties.Resources.green);
}
开发者ID:neosmart,项目名称:Localization,代码行数:10,代码来源:Translator.cs
示例19: GenerateEnglish
private static Locale GenerateEnglish()
{
var loc = new Locale();
for (var i = 'A'; i <= 'Z'; i++)
{
loc.Alphabet.Add(i);
}
loc.Name = "Английский";
return loc;
}
开发者ID:TesByRus,项目名称:Crypto,代码行数:10,代码来源:Locales.cs
示例20: FixRow
public ulong petFamilyMask1; // unk
#region Methods
public bool FixRow(Locale lang)
{
rankCount = 0;
for (int i = 0; i < rank.Length; ++i)
{
if (rank[i] != 0)
++rankCount;
}
return true;
}
开发者ID:LordJZ,项目名称:MyWowTools,代码行数:15,代码来源:Talent.cs
注:本文中的Locale类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论