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


C# LanguageType类代码示例

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


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


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