本文整理汇总了C#中LanguageType.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# LanguageType.ToString方法的具体用法?C# LanguageType.ToString怎么用?C# LanguageType.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LanguageType
的用法示例。
在下文中一共展示了LanguageType.ToString方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddRandomWordsAsync
private async Task AddRandomWordsAsync(List<dynamic> words, LanguageType language, SpeachPartType speachPart, int count) {
#if !NO_REDIS
List<string> list = await Redis.GetRandomWordsAsync(language, speachPart, count);
foreach (string word in list) {
words.Add(new {
id = ObjectId.GenerateNewId().ToString(),
language = language.ToString(),
speachPart = (int)speachPart,
word = word
});
}
#endif
}
示例2: CreateProvider
/// <summary>
/// Creates the provider.
/// </summary>
/// <param name="language">The language.</param>
/// <returns></returns>
public static CodeDomProvider CreateProvider(LanguageType language)
{
if(language == LanguageType.cs)
{
return new CSharpCodeProvider();
}
else if(language == LanguageType.vb)
{
return new VBCodeProvider();
}
throw new NotSupportedException(string.Format(CultureInfo.CurrentUICulture, Properties.Resources.LanguageNotSupported, language.ToString()));
}
示例3: GetListKey
private static string GetListKey(LanguageType language, SpeachPartType speachPart) {
return language.ToString() + "_" + speachPart.ToString();
}
示例4: ToString
/// <summary>
/// Convert enumeration to string
/// </summary>
public static string ToString(LanguageType value)
{
// Switch through the langauges
switch (value)
{
case LanguageType.English:
{
return English;
}
case LanguageType.German:
{
return German;
}
case LanguageType.French:
{
return French;
}
case LanguageType.Japanese:
{
return Japanese;
}
case LanguageType.Danish:
{
return Danish;
}
case LanguageType.Spanish:
{
return Spanish;
}
case LanguageType.Italian:
{
return Italian;
}
case LanguageType.Dutch:
{
return Dutch;
}
case LanguageType.Norwegian:
{
return Norwegian;
}
case LanguageType.Portuguese:
{
return Portuguese;
}
case LanguageType.Finnish:
{
return Finnish;
}
case LanguageType.Swedish:
{
return Swedish;
}
case LanguageType.Czech:
{
return Czech;
}
case LanguageType.Hungarian:
{
return Hungarian;
}
case LanguageType.Polish:
{
return Polish;
}
case LanguageType.Romanian:
{
return Romanian;
}
case LanguageType.Croatian:
{
return Croatian;
}
case LanguageType.Slovak:
{
return Slovak;
}
case LanguageType.Slovenian:
{
return Slovenian;
}
case LanguageType.Greek:
{
return Greek;
}
case LanguageType.Bulgarian:
{
return Bulgarian;
}
case LanguageType.Russian:
{
return Russian;
}
case LanguageType.Turkish:
{
return Turkish;
}
//.........这里部分代码省略.........
示例5: translate
/// <summary>
/// Translates the specified en.
/// </summary>
/// <param name="en">The en.</param>
/// <param name="translationLanguage">The translation language.</param>
/// <returns></returns>
public static string translate( string en , LanguageType translationLanguage ) {
string str;
var collection = new Collection();
switch ( en ) {
case "back":
collection.Add( "zur\x00fcck" , LanguageType.de.ToString() , null , null );
collection.Add( "en arri\x00e8re" , LanguageType.fr.ToString() , null , null );
collection.Add( "achteruit" , LanguageType.nl.ToString() , null , null );
break;
case "click to close window":
collection.Add( "Klicken, um Fenster zu schlie\x00dfen" , LanguageType.de.ToString() , null , null );
collection.Add( "d\x00e9clic pour fermer la fen\x00eatre" , LanguageType.fr.ToString() , null , null );
break;
case "Detailed View":
collection.Add( "Detailansicht" , LanguageType.de.ToString() , null , null );
break;
case "e-mail":
collection.Add( "E-Mail" , LanguageType.de.ToString() , null , null );
break;
case "freeware Version":
collection.Add( "kostenlose Version" , LanguageType.de.ToString() , null , null );
break;
case "Image":
collection.Add( "Bild" , LanguageType.de.ToString() , null , null );
break;
case "LicenceKey invalid":
collection.Add( "LicenceKey ung\x00fcltig" , LanguageType.de.ToString() , null , null );
break;
case "Message":
collection.Add( "Nachricht" , LanguageType.de.ToString() , null , null );
break;
case "Name":
collection.Add( "Name" , LanguageType.de.ToString() , null , null );
break;
case "next":
collection.Add( "weiter" , LanguageType.de.ToString() , null , null );
collection.Add( "en avant" , LanguageType.fr.ToString() , null , null );
collection.Add( "wijdere" , LanguageType.nl.ToString() , null , null );
break;
case "of":
collection.Add( "von" , LanguageType.de.ToString() , null , null );
collection.Add( "de" , LanguageType.fr.ToString() , null , null );
collection.Add( "van" , LanguageType.nl.ToString() , null , null );
break;
case "Original":
collection.Add( "Original" , LanguageType.de.ToString() , null , null );
collection.Add( "Original" , LanguageType.fr.ToString() , null , null );
collection.Add( "Origineel" , LanguageType.nl.ToString() , null , null );
break;
case "Page":
collection.Add( "Seite" , LanguageType.de.ToString() , null , null );
collection.Add( "Page" , LanguageType.fr.ToString() , null , null );
collection.Add( "Zijde" , LanguageType.nl.ToString() , null , null );
break;
case "Request from":
collection.Add( "Anfrage aus" , LanguageType.de.ToString() , null , null );
break;
case "Request price information for this image":
collection.Add( "Preisinformationen f\x00fcr dieses Bild anfordern" , LanguageType.de.ToString() , null ,
null );
break;
case "send e-mail":
collection.Add( "versende E-Mail" , LanguageType.de.ToString() , null , null );
break;
case "Thanks for your interest in that image! This E-Mail has been sent:":
collection.Add( "Danke f\x00fcr Ihr Interesse an diesem Bild! Folgende E-Mail wurde versendet:" ,
LanguageType.de.ToString() , null , null );
break;
}
try {
return Conversions.ToString( collection[translationLanguage.ToString()] );
}
catch ( Exception exception1 ) {
ProjectData.SetProjectError( exception1 );
Exception exception = exception1;
str = en;
ProjectData.ClearProjectError();
return str;
//.........这里部分代码省略.........
示例6: LoadScript
public void LoadScript(LanguageType language, string contents)
{
UpdateStats();
LanguageToolStripComboBox.Text = language.ToString();
CodeTextBox.Text = contents;
}