当前位置: 首页>>代码示例>>C#>>正文


C# LanguageType.ToString方法代码示例

本文整理汇总了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
        }
开发者ID:wsbaser,项目名称:CoolVocabulary,代码行数:13,代码来源:ExamWordController.cs

示例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()));
 }
开发者ID:riseandcode,项目名称:open-wscf-2010,代码行数:17,代码来源:ClassGeneratorFromCompileUnitAction.cs

示例3: GetListKey

 private static string GetListKey(LanguageType language, SpeachPartType speachPart) {
     return language.ToString() + "_" + speachPart.ToString();
 }
开发者ID:wsbaser,项目名称:CoolVocabulary,代码行数:3,代码来源:Redis.cs

示例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;
                    }
//.........这里部分代码省略.........
开发者ID:dotnet,项目名称:corefx,代码行数:101,代码来源:LanguageString.cs

示例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;
//.........这里部分代码省略.........
开发者ID:kisflying,项目名称:kion,代码行数:101,代码来源:Gallery.cs

示例6: LoadScript

 public void LoadScript(LanguageType language, string contents)
 {
     UpdateStats();
     LanguageToolStripComboBox.Text = language.ToString();
     CodeTextBox.Text = contents;
 }
开发者ID:JocysCom,项目名称:PassGen,代码行数:6,代码来源:DcControl.cs


注:本文中的LanguageType.ToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。