• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# LanguageType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中LanguageType的典型用法代码示例。如果您正苦于以下问题:C# LanguageType类的具体用法?C# LanguageType怎么用?C# LanguageType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LanguageType类属于命名空间,在下文中一共展示了LanguageType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: OnCreateControl

        protected override void OnCreateControl()
        {
            base.OnCreateControl();
            LanguageType selected = null;
            LanguageType temp = new LanguageType()
            {
                Language = NetLanguage.CSharp,
                Text = "C#",
            };
            if (ApplicationLanguage == NetLanguage.CSharp)
                selected = temp;

            Items.Add(temp);
            temp = new LanguageType()
            {
                Language = NetLanguage.VbNet,
                Text = "VB.NET",
            };
            if (ApplicationLanguage == NetLanguage.VbNet)
                selected = temp;
            Items.Add(temp);
            this.SelectedItem = selected;

            LanguageChange += new EventHandler<EventLanguage>(LanguageSelector_LanguageChange);
        }
开发者ID:rohancragg,项目名称:FileHelpers,代码行数:25,代码来源:LanguageSelector.cs


示例2: GetRawCompetitorInt

 private static List<RawCompetitor> GetRawCompetitorInt(BrokerType brokerType, LanguageType languageType, SportType sportType, GenderType genderType, string[] names)
 {
     if (genderType == GenderType.Unknown) {
         _logger.Error("{0}: {1}", names.StrJoin(", "), genderType);
     }
     var competitorsRaw = RawCompetitor.DataSource.FilterByLanguage(languageType).FilterBySportType(sportType).FilterByBroker(brokerType)
                                         .FilterByNameCompetitor(names)
                                         .FilterByGender(genderType,
                 RawCompetitor.Fields.CompetitoruniqueID,
                 RawCompetitor.Fields.Name,
                 RawCompetitor.Fields.Linkstatus);
     if (competitorsRaw.Count > 1) {
         var groupBy = competitorsRaw.Where(c => c.CompetitoruniqueID != default(int)).GroupBy(c => c.CompetitoruniqueID).ToArray();
         if (groupBy.Length > 1) {
             _logger.Error("{0} {1} {2} {3} {4} <=> {5}", brokerType, sportType, genderType,
                 competitorsRaw.Select(cr => cr.ID).StrJoin(", "), names.StrJoin(", "), groupBy.Select(g => g.Select(ge => ge.Name).StrJoin(", ")).StrJoin(" | "));
             return groupBy.First().ToList();
         }
         if (groupBy.Length == 1) {
             foreach (var rawCompetitor in competitorsRaw.Where(cr => cr.CompetitoruniqueID == default(int))) {
                 rawCompetitor.CompetitoruniqueID = groupBy[0].Key;
                 rawCompetitor.Save();
             }
         }
     }
     return CreateRawCompetitor(names, competitorsRaw, brokerType, languageType, sportType, genderType);
 }
开发者ID:dnmsk,项目名称:rProject,代码行数:27,代码来源:RawCompetitorHelper.cs


示例3: CreateRawCompetitor

        private static List<RawCompetitor> CreateRawCompetitor(string[] names, List<RawCompetitor> competitorsRaw, BrokerType brokerType, LanguageType languageType, SportType sportType, GenderType genderType)
        {
            var existNames = competitorsRaw.Select(cr => cr.Name).ToList();
            names = names
                .Where(name => !existNames.Contains(name))
                .ToArray();
            if (names.Any()) {
                var lastCompetitorUniqueID = competitorsRaw.Any()
                    ? competitorsRaw.First().CompetitoruniqueID
                    : default(int);
                var raw = competitorsRaw;
                names
                    .Where(name => !raw.Any(c => c.Name.Equals(name, StringComparison.InvariantCultureIgnoreCase)))
                    .Each(name => {
                        RawCompetitor competitorRaw = null;
                        try {
                            competitorRaw = BrokerEntityIfaceCreator.CreateEntity<RawCompetitor>(brokerType, languageType, sportType, genderType, LinkEntityStatus.Unlinked, new[] { name },
                                competitor => {
                                    if (lastCompetitorUniqueID != default(int)) {
                                        competitor.CompetitoruniqueID = lastCompetitorUniqueID;
                                        competitor.Linkstatus = LinkEntityStatus.LinkByStatistics | LinkEntityStatus.Linked;
                                    }
                                });
                            competitorRaw.Save();
                            raw.Add(competitorRaw);
                        } catch (Exception ex) {
                            _logger.Error("{0}\r\n{1}", competitorRaw?.ToString(), ex);
                            throw;
                        }
                    });
            }

            return competitorsRaw;
        }
开发者ID:dnmsk,项目名称:rProject,代码行数:34,代码来源:RawCompetitorHelper.cs


示例4: SolutionItem

        public SolutionItem(Connect connect, Solution solution, bool recursive)
        {
            this._subItems = new List<SolutionItem>();
            this._projectType = LanguageType.None;

            if (connect == null)
            {
                throw new ArgumentNullException("connect");
            }

            if (solution == null)
            {
                throw new ArgumentNullException("solution");
            }

            this._incrementSetting = new SolutionItemIncrementSettings(this);
            this._connect = connect;
            this._item = solution;
            this._itemType = SolutionItemType.Solution;
            this._name = Path.GetFileNameWithoutExtension(solution.FileName);
            this._filename = solution.FileName;
            this._uniqueName = this._name;
            this.GetGlobalVariables();
            if (recursive)
            {
                SolutionItem.FillSolutionTree(connect, this, solution.Projects);
            }
        }
开发者ID:postondemand,项目名称:BuildVersionIncrement,代码行数:28,代码来源:SolutionItem.cs


示例5: LanguagePackGet

		public s_cache_language_pack LanguagePackGet(LanguageType lang)
		{
			if(languagePacks != null)
				return languagePacks[(int)lang];

			return null;
		}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:7,代码来源:CacheFile.cs


示例6: Configure

 /// <summary>
 /// Configures the component using the dictionary of attributes specified
 /// in the configuration file.
 /// </summary>
 /// <param name="attributes">The attributes in the configuration element.</param>
 public void Configure(System.Collections.Specialized.StringDictionary attributes)
 {
     if(attributes.ContainsKey(ProjectTypeArgument))
     {
         language = (LanguageType)Enum.Parse(typeof(LanguageType), attributes[ProjectTypeArgument]);
     }
 }
开发者ID:riseandcode,项目名称:open-wscf-2010,代码行数:12,代码来源:ProjectExistsConverter.cs


示例7: Start

    // Use this for initialization
    void Start()
    {
        if(this.GetComponent<UIPopupList>())
        {
            this.GetComponent<UIPopupList>().eventReceiver=this.gameObject;
            this.GetComponent<UIPopupList>().selection=PlayerPrefs.GetString("language", "English");
        }

        string language = PlayerPrefs.GetString("language", "English");
        if(lang==LanguageType.None)
        {
        if(language=="English")
        {
            lang=LanguageType.English;
        }
        else
        {
            lang=LanguageType.Japanese;
        }
        }

        LanguageChange[] targetObjs = LanguageUI.GetComponentsInChildren<LanguageChange>();

        foreach(LanguageChange lc in targetObjs)
        {
            lc.lang=lang;
            lc.ChangeLanguage();
        }
    }
开发者ID:unigame,项目名称:Unity3Dtetris,代码行数:30,代码来源:SelectLanguage.cs


示例8: LanguageInfo

 internal LanguageInfo(string name, string twoLetterCode, string threeLetterCode, LanguageFamily family, LanguageType type)
 {
     Name = name;
     TwoLetterIsoCode = twoLetterCode;
     ThreeLetterIsoCode = threeLetterCode;
     Family = family;
     Type = type;
 }
开发者ID:bazile,项目名称:Training,代码行数:8,代码来源:LanguageInfo.cs


示例9: ByLanguage

        public IHttpActionResult ByLanguage(LanguageType language)
        {
            var codeSnipetTitles = this.data
                .CodeSnipets
                .All()
                .Where(c => c.Language == language)
                .Select(CodeSnipetsPartialDataModel.FromCodeSnipet);

            return Ok(codeSnipetTitles);
        }
开发者ID:IvayloGeorgiev,项目名称:TA-Kiwi,代码行数:10,代码来源:CodeSnipetsController.cs


示例10: GetRandomWordsAsync

        public static async Task<List<string>> GetRandomWordsAsync(LanguageType language, SpeachPartType speachPart, int count) {
#if !NO_REDIS

            var key = GetListKey(language, speachPart);
            int listSize = (int)(await Db.ListLengthAsync(key));
            var startIndex = listSize > count ? new Random().Next(listSize - count) : 0;
            return Db.ListRange(key, startIndex, startIndex + count).Select(v => v.ToString()).ToList<string>();
#endif
            return null;
        }
开发者ID:wsbaser,项目名称:CoolVocabulary,代码行数:10,代码来源:Redis.cs


示例11: Solution

 public Solution(string name, string text, string ip, int port, int apport, string logindatabase, string loginsolution, LanguageType language)
 {
     _Name = name;
     _Text = text;
     _IP = ip;
     _Port = port;
     _ApPort = apport;
     _LoginDataBase = logindatabase;
     _LoginSolution = loginsolution;
     _Language = language;
 }
开发者ID:san90279,项目名称:UK_OAS,代码行数:11,代码来源:Solution.cs


示例12: GetVkLanguage

 private VkApiLanguage GetVkLanguage(LanguageType language)
 {
     switch (language)
     {
         case LanguageType.Russian:
             return VkApiLanguage.Russian;
         case LanguageType.English:
             return VkApiLanguage.English;
         default:
             return VkApiLanguage.Russian;
     }
 }
开发者ID:ukionik,项目名称:VDesktopeNew,代码行数:12,代码来源:VkApiSettings.cs


示例13: GetMonthPlanDtoAsync

 internal async Task<MonthPlanDto> GetMonthPlanDtoAsync(string userId, LanguageType languageType) {
     MonthPlanDto statisticDto = Redis.GetMonthPlan(userId, languageType);
     if (statisticDto == null) {
         MonthPlan monthPlan = await _db.GetThisMonthPlanAsync(userId, languageType);
         if (monthPlan == null) {
             int planedCount = CalculateMonthPlan(userId, languageType);
             monthPlan = await _db.CreateMonthPlanAsync(userId, languageType, planedCount);
         }
         statisticDto = new MonthPlanDto(monthPlan);
     }
     return statisticDto;
 }
开发者ID:wsbaser,项目名称:CoolVocabulary,代码行数:12,代码来源:Repository.cs


示例14: CompetitionItem

 public ActionResult CompetitionItem(LanguageType languagetype, FilterModel<BrokerType> filter, StateFilter state = StateFilter.All)
 {
     var dateTime = DateTime.UtcNow.Date;
     if (filter.date == DateTime.MinValue) {
         filter.FixDates(dateTime, dateTime);
     }
     filter.FixDates(new DateTime(2014, 01, 01), dateTime.AddDays(14));
     return View(new StaticPageBaseModel<WithFilterModel<BrokerType, List<RawCompetitionTransport>>>(this) {
         ControllerModel = new WithFilterModel<BrokerType, List<RawCompetitionTransport>>(new FilterModel<BrokerType>("CompetitionItem", "SystemState", CurrentLanguage, FilterSettings.ToDate, filter, new RouteValueDictionary(new { languagetype, state }))) {
             Data = _provider.GetCompetitionItems(filter.id, languagetype, filter.date, state)
         }
     });
 }
开发者ID:dnmsk,项目名称:rProject,代码行数:13,代码来源:SystemStateController.cs


示例15: 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


示例16: LanguagePackGet

		public s_cache_language_pack LanguagePackGet(LanguageType lang)
		{
			switch(lang)
			{
				case LanguageType.English:		return English;
				case LanguageType.Japanese:		return Japanese;
				case LanguageType.German:		return German;
				case LanguageType.French:		return French;
				case LanguageType.Spanish:		return Spanish;
				case LanguageType.Italian:		return Italian;
				case LanguageType.Korean:		return Korean;
				case LanguageType.Chinese:		return Chinese;
				case LanguageType.Portuguese:	return Portuguese;
				default:						throw new Debug.Exceptions.UnreachableException(lang);
			}
		}
开发者ID:CodeAsm,项目名称:open-sauce,代码行数:16,代码来源:Globals.cs


示例17: Initialize

        public static void Initialize(LanguageType lid)
        {
            List<Language> langs = GetLanguages();

            foreach (Language lang in langs)
            {
                if (lang.ID == lid)
                {
                    Helpers.ConsolePrint("NICEHASH", "Selected language: " + lang.Name);
                    SelectedLanguage = lang;
                    return;
                }
            }
            
            Helpers.ConsolePrint("NICEHASH", "Critical error: missing language");
        }
开发者ID:CharlesDeep,项目名称:NiceHashMiner,代码行数:16,代码来源:International.cs


示例18: NetLanguageList

 static NetLanguageList()
 {
     _Languages = new List<LanguageType>();
     LanguageType temp = new LanguageType()
     {
         Language = NetLanguage.CSharp,
         Text = "C#",
     };
     _Languages.Add(temp);
     temp = new LanguageType()
     {
         Language = NetLanguage.VbNet,
         Text = "VB.NET",
     };
     _Languages.Add(temp);
 }
开发者ID:calebillman,项目名称:FileHelpers,代码行数:16,代码来源:NetLanguageList.cs


示例19: CommandLineParser

 public CommandLineParser(string[] argv)
 {
     string tmpString;
     if(ParseCommandLine(argv, "-config", out tmpString)) {
         Helpers.ConsolePrint("CommandLineParser", "-config parameter has been depreciated, run setting from GUI");
     }
     if (ParseCommandLine(argv, "-lang", out tmpString)) {
         IsLang = true;
         int tmp;
         // if parsing fails set to default
         if (Int32.TryParse(tmpString, out tmp)) {
             LangValue = (LanguageType)tmp;
         } else {
             LangValue = LanguageType.En;
         }
     }
 }
开发者ID:nicehash,项目名称:NiceHashMiner,代码行数:17,代码来源:CommandLineParser.cs


示例20: RunReadOnly

        public static string RunReadOnly(string viewName, string providerName, LanguageType lang)
        {
            string templateText = GetTemplateText(TemplateType.ReadOnly, lang);

            //set the provider and tablename
            templateText = templateText.Replace("#VIEW#", viewName);
            templateText = templateText.Replace("#PROVIDER#", providerName);

            string result = string.Empty;
            Template t = new Template(templateText);
            result = t.Render();

            result = SrubOutput(result);

            if (result == string.Empty)
                throw new Exception(t.Error);
            return result;
        }
开发者ID:RyanDansie,项目名称:SubSonic-2.0,代码行数:18,代码来源:Builder.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# LanguageVersion类代码示例发布时间:2022-05-24
下一篇:
C# LanguageElement类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap