public LocaleHelper(ELanguage lang, ResourceManager locales, ResourceManager resources, CultureInfo culture) { Language = lang; mResLocale = locales; mRes = resources; mCulture = culture; }
public static ELanguage GetLanguage(string language) { ELanguage output = new ELanguage(); string toLower = language.ToLower(); char[] charArray = toLower.ToCharArray(); char firstLetter = char.Parse(charArray[0].ToString().ToUpper()); charArray[0] = firstLetter; string outputString = new string(charArray); List<ELanguage> languages = new List<ELanguage>(){ELanguage.Danish, ELanguage.English, ELanguage.French, ELanguage.German, ELanguage.Greek, ELanguage.Italian, ELanguage.Norwegian, ELanguage.Polish, ELanguage.Portuguese, ELanguage.Russian, ELanguage.Swedish, ELanguage.Turkish}; foreach(var lang in languages) { var enumLanguage = lang.ToString(); string strLanguage = enumLanguage; if(outputString == strLanguage) { output = lang; break; } } return output; }
public frmLanguage(ELanguage selectedLang) { InitializeComponent(); // Fill image combobox int i = 0, selectedIndex = -1; EImageComboBoxTextAlign textAlign = EImageComboBoxTextAlign.Right; Font font = cmbLanguage.Font; Color fontColor = cmbLanguage.ForeColor; foreach (string langName in Enum.GetNames(typeof(ELanguage))) { if (langName != "None") { cmbLanguage.Items.Add(new ImageComboBoxItem(langName, font, fontColor, i, textAlign)); if (langName == selectedLang.ToString()) { selectedIndex = i; } i++; } } if (selectedIndex != -1) { cmbLanguage.SelectedIndex = selectedIndex; // Hardcoded, sorry.. switch (selectedLang.ToString().ToLower()) { case "german": imgLanguage.Image = Properties.Resources.flag_germany; Icon = Properties.Resources.flag_germany_icon; break; case "english": imgLanguage.Image = Properties.Resources.flag_great_britain; Icon = Properties.Resources.flag_great_britain_icon; break; } } }
public LanguageCourseForChildren(string courseName, ECourseActivityStatus activityStatus, EGroupType groupType, ECoursePlace coursePlace, decimal price, IList<IPerson> studentsInCourse, IList<IPerson> teachersInCourse, IList<IClassInfo> conductedClasses, EAge age, ELanguage language, ELanguageLevelForChildren languageLevelForChildren) : base(courseName, activityStatus, groupType, coursePlace, price, studentsInCourse, teachersInCourse, conductedClasses, age) { this.Language = language; this.LanguageLevel = languageLevelForChildren; }
public PageModule(IOptions <GoogleBloggerAppSettings> GoogleBloggerAppSettings, ELanguage Language) { this.language = Language; this.googleBloggerAppSettings = GoogleBloggerAppSettings.Value; if (googleBloggerAppSettings.ApiKey == null) { throw new ArgumentNullException("GoogleBloggerAppSettings is null"); } }
/// <summary> /// Load language type based on device language. /// </summary> private void _LoadLanguageBasedOnDevice() { if (Application.systemLanguage < SystemLanguage.Unknown && Enum.IsDefined(typeof(ELanguage), (int)Application.systemLanguage)) { mLanguageType = (ELanguage)Application.systemLanguage; } else { mLanguageType = Config.DefaultLanguage; } }
public static string ConcatAutoGenerationHeader(string txt, ELanguage lan) { switch (lan) { case ELanguage.LUA: return(AUTO_GENERATE_LUA + txt); case ELanguage.PYTHON: return(AUTO_GENERATE_PYTHON + txt); default: return(AUTO_GENERATE_C_LIKE + txt); } }
public static string GetAutoGenerationHeader(ELanguage lan) { switch (lan) { case ELanguage.LUA: return(AUTO_GENERATE_LUA); case ELanguage.PYTHON: return(AUTO_GENERATE_PYTHON); default: return(AUTO_GENERATE_C_LIKE); } }
public static string GetString(ELanguage lang, ETags tag) { try { return(dictionary[lang][tag]); } catch { } return(""); }
public void LoadLanguage(ELanguage lang) { //just get rid of all loaded data (will be reimported anyway when calling a certain string): _loadedLocalizedStrings = new Dictionary <string, Dictionary <string, LocalizedEntry> >(); WriteLanguageSettingsFile(_currentLanguage, lang); _currentLanguage = lang; _curLanguageInfo = new LanguageInfo(lang, LoadCultureInfo(lang)); LanguageLoadedEvent.InvokeEvent(this); }
void SwitchLanguage() { if (elanguage == ELanguage.Chinese) { elanguage = ELanguage.English; } else if (elanguage == ELanguage.English) { elanguage = ELanguage.Chinese; } }
public Task <ItemOrdersHistogram> ItemOrdersHistogramAsync( int nameId, string country, ELanguage lang, int currency) { var result = new Task <ItemOrdersHistogram>(() => this.ItemOrdersHistogram(nameId, country, lang, currency)); result.Start(); return(result); }
public VehicleLite(IVehicle vehicle, ELanguage language, Func <object, string> localise, Func <int, string> getTag) { GaijinId = vehicle.GaijinId; Name = vehicle.ResearchTreeName.GetLocalisation(language); Nation = localise(vehicle.Nation.AsEnumerationItem); Country = localise(vehicle.Country); Branch = localise(vehicle.Branch.AsEnumerationItem); Rank = vehicle.RankAsEnumerationItem; BattleRatingInArcade = vehicle.BattleRating.Arcade ?? -EDecimal.Number.One; BattleRatingInRealistic = vehicle.BattleRating.Realistic ?? -EDecimal.Number.One; BattleRatingInSimulator = vehicle.BattleRating.Simulator ?? -EDecimal.Number.One; Class = localise(vehicle.Class); Subclass1 = localise(vehicle.Subclasses.First); Subclass2 = localise(vehicle.Subclasses.Second); Tag1 = getTag(EInteger.Number.Zero); Tag2 = getTag(EInteger.Number.One); Tag3 = getTag(EInteger.Number.Two); IsResearchable = vehicle.IsResearchable; IsReserve = vehicle.IsReserve; IsSquadronVehicle = vehicle.IsSquadronVehicle; UnlockCostInResearch = (IsResearchable || IsSquadronVehicle) && vehicle.EconomyData is VehicleEconomyData && vehicle.EconomyData.UnlockCostInResearch.HasValue && vehicle.EconomyData.UnlockCostInResearch.Value.IsPositive() ? vehicle.EconomyData.UnlockCostInResearch.Value : IsReserve ? EInteger.Number.Zero : -EInteger.Number.One; PurchaseCostInSilver = (IsResearchable || IsSquadronVehicle) && vehicle.EconomyData is VehicleEconomyData && vehicle.EconomyData.PurchaseCostInSilver.IsPositive() ? vehicle.EconomyData.PurchaseCostInSilver : IsReserve ? EInteger.Number.Zero : -EInteger.Number.One; IsHiddenUnlessOwned = vehicle.IsHiddenUnlessOwned; IsPremium = vehicle.IsPremium; IsPurchasableForGoldenEagles = vehicle.IsPurchasableForGoldenEagles; PurchaseCostInGold = IsPurchasableForGoldenEagles && (IsPremium && vehicle.EconomyData.PurchaseCostInGold.HasValue || IsSquadronVehicle && vehicle.EconomyData.PurchaseCostInGoldAsSquadronVehicle.HasValue) ? (IsPremium ? vehicle.EconomyData.PurchaseCostInGold.Value : vehicle.EconomyData.PurchaseCostInGoldAsSquadronVehicle.Value) : -EInteger.Number.One; MinimumPurchaseCostInGold = IsSquadronVehicle && vehicle.EconomyData.DiscountedPurchaseCostInGoldAsSquadronVehicle.HasValue ? vehicle.EconomyData.DiscountedPurchaseCostInGoldAsSquadronVehicle.Value : -EInteger.Number.One; GiftedToNewPlayersForSelectingTheirFirstBranch = vehicle.GiftedToNewPlayersForSelectingTheirFirstBranch; IsSoldInTheStore = vehicle.IsSoldInTheStore; IsSoldOnTheMarket = vehicle.IsSoldOnTheMarket; IsAvailableOnlyOnConsoles = vehicle.IsAvailableOnlyOnConsoles; RegularCrewTrainingCost = vehicle.EconomyData.BaseCrewTrainCostInSilver; ExpertCrewTrainingCost = vehicle.EconomyData.ExpertCrewTrainCostInSilver; AceCrewTrainingCostInResearch = vehicle.EconomyData.AceCrewTrainCostInResearch; AceCrewTrainingCostInGold = vehicle.EconomyData.AceCrewTrainCostInGold; RepairCostInArcade = vehicle.EconomyData.RepairCost.Arcade ?? -EInteger.Number.One; RepairCostInRealistic = vehicle.EconomyData.RepairCost.Realistic ?? -EInteger.Number.One; RepairCostInSimulator = vehicle.EconomyData.RepairCost.Simulator ?? -EInteger.Number.One; ResearchGainMultiplierLite = vehicle.EconomyData.ResearchGainMultiplier; }
/// <summary> /// Constructs a lobby view /// </summary> /// <param name="lobbyID">Lobby ID</param> /// <param name="playerCount">Player count</param> /// <param name="maximalPlayerCount">Maximal player count</param> /// <param name="roundCount">Round count</param> /// <param name="maximalRoundCount">Maximal round count</param> /// <param name="drawingTime">Drawing time in seconds</param> /// <param name="isUsingCustomWords">Is using custom words</param> /// <param name="isVotekickingEnabled">Is votekicking enabled</param> /// <param name="maximalClientsPerIPCount">Maximal client per IP count</param> /// <param name="language">Language</param> public LobbyView(string lobbyID, uint playerCount, uint maximalPlayerCount, uint roundCount, uint maximalRoundCount, uint drawingTime, bool isUsingCustomWords, bool isVotekickingEnabled, uint maximalClientsPerIPCount, ELanguage language) { LobbyID = lobbyID; PlayerCount = playerCount; MaximalPlayerCount = maximalPlayerCount; RoundCount = roundCount; MaximalRoundCount = maximalRoundCount; DrawingTime = drawingTime; IsUsingCustomWords = isUsingCustomWords; IsVotekickingEnabled = isVotekickingEnabled; MaximalClientsPerIPCount = maximalClientsPerIPCount; Language = language; }
/// <summary> /// Load language type from cache. /// </summary> private void _LoadLanguageFromCache() { int languageValue = PlayerPrefs.GetInt("MyLocalizationManager_Language", (int)ELanguage.None); if (languageValue != (int)ELanguage.None && Enum.IsDefined(typeof(ELanguage), languageValue)) { mLanguageType = (ELanguage)languageValue; } else { mLanguageType = Config.DefaultLanguage; } }
/// <summary> /// Load language type based on device language and cache. /// </summary> private void _LoadLanguagBasedOnDeviceAndCache() { int languageValue = PlayerPrefs.GetInt("MyLocalizationManager_Language", (int)ELanguage.None); if (languageValue != (int)ELanguage.None && Enum.IsDefined(typeof(ELanguage), languageValue)) { mLanguageType = (ELanguage)languageValue; } else { _LoadLanguageBasedOnDevice(); } }
public void init(Excel.Cells v_data, int v_row, SheetHeader v_header) { sheetName = v_header.getData(v_data, v_row, "sheet名") as string; //optFileName = v_header.getData(v_data, v_row, "导出文件") as string; dataOffX = Convert.ToInt32(v_header.getData(v_data, v_row, "数据偏移X")); dataOffY = Convert.ToInt32(v_header.getData(v_data, v_row, "数据偏移Y")); optCliFileName = v_header.getData(v_data, v_row, "导出客户端文件") as string; optCliLanguage = getLuaguage(optCliFileName); optSrvFileName = v_header.getData(v_data, v_row, "导出服务端文件") as string; optSrvLanguage = getLuaguage(optSrvFileName); pmKey = _getPmKey(v_header.getData(v_data, v_row, "主键") as string); string shieldColNames = v_header.getData(v_data, v_row, "屏蔽字段") as string; if (string.IsNullOrEmpty(shieldColNames)) { shildKeys = new string[0]; } else { shildKeys = (v_header.getData(v_data, v_row, "屏蔽字段") as string).Split(',', ','); } Object optCols = v_header.getData(v_data, v_row, "是否导出"); if (optCols == null) { optCols = false; } if (optCols is bool) { isOpt = (bool)optCols; } else { isOpt = optCols.ToString().Equals("TRUE"); } note = v_header.getData(v_data, v_row, "表注释") as string; Object dataPersistence = v_header.getData(v_data, v_row, "是否导出"); if (dataPersistence == null) { dataPersistence = false; } if (dataPersistence is bool) { isDataPersistence = (bool)dataPersistence; } else { isDataPersistence = optCols.ToString().Equals("TRUE"); } }
private CultureInfo LoadCultureInfo(ELanguage lang) { //TODO: settings like these should probably go to something like a language settings file (ScriptableObject): switch (lang) { case ELanguage.de: return(new CultureInfo("de-DE", false)); case ELanguage.en: return(new CultureInfo("en-US", false)); default: return(CultureInfo.InvariantCulture); } }
public Builder(string language) { switch (language.ToLower().Trim()) { case "go": m_language = ELanguage.CL_GOLANG; golangVariableInit(); break; case "cpp": m_language = ELanguage.CL_CPP; cppVariableInit(); break; case "csharp": m_language = ELanguage.CL_SHARP; csharpVariableInit(); break; case "java": m_language = ELanguage.CL_JAVA; javaVariableInit(); break; default: m_language = ELanguage.CL_GOLANG; golangVariableInit(); break; } }
private void WriteLanguageSettingsFile(ELanguage oldLang, ELanguage newLang) { var path = GetLanguageSettingsFilePath(); if (!File.Exists(path) || oldLang != newLang) { try { File.WriteAllText(path, newLang.ToString()); } catch { Debug.LogWarning("Could not write language settings file", this); } } }
private static ELanguage GetWinLanguage(string language) { ELanguage eLanguage = ELanguage.EN; if (language == "Chinese (Simplified)") { eLanguage = ELanguage.CN; } else if (language == "Chinese (Traditional)") { eLanguage = ELanguage.HK; } else if (language.Contains("English")) { eLanguage = ELanguage.EN; } else if (language.Contains("Japanese")) { eLanguage = ELanguage.JA; } else if (language.Contains("Korean")) { eLanguage = ELanguage.KO; } else if (language.Contains("Italian")) { eLanguage = ELanguage.IT; } else if (language.Contains("French")) { eLanguage = ELanguage.FR; } else if (language.Contains("Portuguese")) { eLanguage = ELanguage.PT; } else if (language.Contains("Estonian")) { eLanguage = ELanguage.ES; } else if (language.Contains("German")) { eLanguage = ELanguage.DE; } return(eLanguage); }
public static string GetLanguageName(ELanguage language) { switch (language) { case ELanguage.English: return("English (US)"); case ELanguage.Spanish: return("Español (Spanish)"); case ELanguage.Russian: return("Русский (Russian)"); default: return("?"); } }
public SteamMarketHandler(ELanguage language, string userAgent) { if (string.IsNullOrEmpty(userAgent)) { throw new ArgumentException("Empty UserAgent"); } this.Settings = new Settings { UserAgent = userAgent, Language = language }; this.Auth = new Auth(this); this.Client = new MarketClient(this); this.Inventory = new Invertory(this); this._requestsPerSecondLock = new object(); this.RequestsPerSecond = 3; }
public static void LoadLanguage(ELanguage language) { App.Logger.Log($"[LOCALIZATION] - Loading {language} localization..."); try { using (StreamReader sr = new StreamReader(Application.GetResourceStream(new Uri($"Resources/Localization/{language}.json", UriKind.Relative)).Stream)) { string text = sr.ReadToEnd(); Current = Newtonsoft.Json.JsonConvert.DeserializeObject <Localization>(text); IsLoaded = true; } } catch (Exception ex) { App.Logger.LogException($"[LOCALIZATION] - Could not load {language} localization.", ex: ex); } }
public static string RenderCourseToConsole(string courseType, ulong id, string courseName, ECourseActivityStatus activityStatus, EGroupType groupType, ECoursePlace coursePlace, decimal price, IList<IPerson> studentsInCourse, IList<IPerson> teachersInCourse, EAge age, ECoursePlace place, ELanguage language, ELanguageLevelForAdults languageLevelForAdults) { StringBuilder sb = new StringBuilder(); sb.AppendLine(new string('*', 30)); sb.AppendLine(new string('*', 30)); sb.AppendFormat("{0}", courseType).AppendLine(); sb.AppendFormat("{0}", id).AppendLine(); sb.AppendFormat("{0}", courseName).AppendLine(); sb.AppendFormat("{0}", activityStatus).AppendLine(); sb.AppendFormat("{0}", groupType).AppendLine(); sb.AppendFormat("{0}", coursePlace).AppendLine(); sb.AppendFormat("{0}", age).AppendLine(); sb.AppendFormat("{0}", language).AppendLine(); sb.AppendFormat("{0}", languageLevelForAdults).AppendLine(); sb.AppendFormat("{0} lev(s)", price).AppendLine().AppendLine(); sb.AppendLine(new string('-', 30)); sb.AppendLine("Teachers leading the course: ").AppendLine(); foreach (var teacher in teachersInCourse) { sb.AppendFormat("{0}", teacher.ToString()).AppendLine().AppendLine(); } sb.AppendLine(new string('-', 30)); sb.AppendLine().AppendLine(); sb.AppendLine(new string('-', 30)); sb.AppendLine("Students taking part in the course: ").AppendLine(); foreach (var student in studentsInCourse) { sb.AppendFormat("{0}", student.ToString()).AppendLine().AppendLine(); } sb.AppendLine(new string('-', 30)); sb.AppendLine().AppendLine(); sb.AppendLine(new string('*', 30)); sb.AppendLine(new string('*', 30)); return sb.ToString(); }
public static string RenderCourseToConsole(string courseType, ulong id, string courseName, ECourseActivityStatus activityStatus, EGroupType groupType, ECoursePlace coursePlace, decimal price, IList <IPerson> studentsInCourse, IList <IPerson> teachersInCourse, EAge age, ECoursePlace place, ELanguage language, ELanguageLevelForAdults languageLevelForAdults) { StringBuilder sb = new StringBuilder(); sb.AppendLine(new string('*', 30)); sb.AppendLine(new string('*', 30)); sb.AppendFormat("{0}", courseType).AppendLine(); sb.AppendFormat("{0}", id).AppendLine(); sb.AppendFormat("{0}", courseName).AppendLine(); sb.AppendFormat("{0}", activityStatus).AppendLine(); sb.AppendFormat("{0}", groupType).AppendLine(); sb.AppendFormat("{0}", coursePlace).AppendLine(); sb.AppendFormat("{0}", age).AppendLine(); sb.AppendFormat("{0}", language).AppendLine(); sb.AppendFormat("{0}", languageLevelForAdults).AppendLine(); sb.AppendFormat("{0} lev(s)", price).AppendLine().AppendLine(); sb.AppendLine(new string('-', 30)); sb.AppendLine("Teachers leading the course: ").AppendLine(); foreach (var teacher in teachersInCourse) { sb.AppendFormat("{0}", teacher.ToString()).AppendLine().AppendLine(); } sb.AppendLine(new string('-', 30)); sb.AppendLine().AppendLine(); sb.AppendLine(new string('-', 30)); sb.AppendLine("Students taking part in the course: ").AppendLine(); foreach (var student in studentsInCourse) { sb.AppendFormat("{0}", student.ToString()).AppendLine().AppendLine(); } sb.AppendLine(new string('-', 30)); sb.AppendLine().AppendLine(); sb.AppendLine(new string('*', 30)); sb.AppendLine(new string('*', 30)); return(sb.ToString()); }
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { ELanguage language = ELanguage.English; if (value != null) { string stringValue = value.ToString(); if (LanguageConverter.languageItemSource.ContainsValue(stringValue)) { language = LanguageConverter.languageItemSource.FirstOrDefault(kvp => kvp.Value == stringValue).Key; } else { Enum.TryParse(stringValue, out language); } } return(language); }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string result = ""; if (value is ELanguage) { ELanguage language = (ELanguage)value; if (LanguageConverter.languageItemSource.ContainsKey(language)) { result = LanguageConverter.languageItemSource[language]; } else { result = language.ToString(); } } return(result); }
public void LoadSetup() { m_Language = ELanguage.e_English; m_SaveFileName = Path.Combine(Application.persistentDataPath, "ufo.set"); //m_SaveFileName = "file:/" + Application.streamingAssetsPath + "/ufo.set"; Dictionary <string, object> gsetup; FileStream file = null; try { BinaryFormatter formatter = new BinaryFormatter(); file = File.Open(m_SaveFileName, FileMode.Open); gsetup = formatter.Deserialize(file) as Dictionary <string, object>; file.Close(); m_FonMusic.volume = (float)gsetup["volumeMusic"]; SetVolumeSound((float)gsetup["volumeSound"]); m_Language = (ELanguage)gsetup["Language"]; m_HiScore.text = ((int)gsetup["bestScore"]).ToString(); m_Achiv.LoadAchievements(gsetup); } catch (Exception /*e*/) { if (file != null) { file.Close(); } m_FonMusic.volume = 1.0f; SetVolumeSound(1.0f); m_Language = ELanguage.e_English; m_HiScore.text = "1"; m_Achiv.ResetAchievements(); } StartCoroutine(CorUpdateUI()); LoadJSON(); //if (m_LocManager == null) m_LocManager = FindObjectOfType <LocalizationManager>(); StartCoroutine(m_LocManager.LoadLocalization(langTypeInText[(int)m_Language])); }
public string CreateCodeForLanguage(ELanguage language) { string codeText = ""; switch (language) { case ELanguage.CL_SHARP: codeText = NamespaceCSharpCode.CreateSpaceCode(this); break; case ELanguage.CL_GOLANG: codeText = NamespaceGolangCode.CreateSpaceCode(this); break; case ELanguage.CL_CPP: codeText = NamespaceCppCode.CreateSpaceCode(this); break; case ELanguage.CL_JAVA: codeText = NamespaceJavaCode.CreateSpaceCode(this); break; default: throw new System.Exception("language is not exits!!"); } return(codeText); }
/// <summary> /// 获取语言 /// </summary> /// <returns></returns> public static ELanguage GetLanguage() { ELanguage eLanguage = ELanguage.EN; #if UNITY_EDITOR var language = System.Globalization.CultureInfo.InstalledUICulture.EnglishName; eLanguage = GetWinLanguage(language); DDebug.Log("windows " + eLanguage); #elif UNITY_IPHONE platform = "hi,大家好,我是IPHONE平台"; #elif UNITY_ANDROID platform = "hi,大家好,我是ANDROID平台"; #elif UNITY_STANDALONE_WIN var language = System.Globalization.CultureInfo.InstalledUICulture.EnglishName; eLanguage = GetWinLanguage(language); DDebug.Log("windows " + eLanguage); #endif return(eLanguage); }
//TODO: fix errors/warnings when opening a project for the first time, maybe with this: //private void OnEnable() { UnityEditor.EditorApplication.update += EditorUpdate; } private void OnValidate() { #if UNITY_EDITOR var generatedFolderPath = _importSettings.GetGeneratedFolderPath(); if (_cachedGeneratedFolderPath != generatedFolderPath) { _cachedGeneratedFolderPath = generatedFolderPath; var indexOfLastSlash = generatedFolderPath.LastIndexOf("/"); _resourcesBasePath = generatedFolderPath.Substring(indexOfLastSlash + 1, generatedFolderPath.Length - indexOfLastSlash - 1) + "/"; } #endif if (_currentLanguage != _oldLanguage) { _oldLanguage = _currentLanguage; ReloadCurrentLanguage(); } }
/// <summary> /// コンストラクタ /// </summary> /// <param name="InPath">パス</param> /// <param name="InLanguage">言語</param> public EnumOutputData(string InPath, string InLanguage) { Path = InPath; switch (InLanguage) { case "C++": Language = ELanguage.Cpp; break; case "C#": Language = ELanguage.CSharp; break; default: throw new Exception(InLanguage + "は不明な言語です。"); } }
public static void Init(ELanguage language) { elanguage = language; myWindow = (Pvr_SettingMessageBoxEditor)GetWindow(typeof(Pvr_SettingMessageBoxEditor), true, strWindowName[(int)language], true); myWindow.autoRepaintOnSceneChange = true; myWindow.minSize = new Vector2(360, 200); myWindow.Show(true); Rect pos; if (Pvr_SDKSetting.window != null) { Rect frect = Pvr_SDKSetting.window.position; pos = new Rect(frect.x + 300, frect.y + 200, 200, 140); } else { pos = new Rect(700, 400, 200, 140); } myWindow.position = pos; }
public frmAbout(Form parent, ELanguage lang, IEnumerable<string> text) { InitializeComponent(); // header Text = String.Format("About {0}", AssemblyTitle); int i = 0; int lastY = label3.Location.Y; Graphics g = Graphics.FromHwnd(parent.Handle); foreach (string line in text) { lastY += 16; Label lbl = new Label(); lbl.AutoSize = true; lbl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.26F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); lbl.Location = new System.Drawing.Point((int)Width / 2 - (int)g.MeasureString(line, lbl.Font).Width / 2, lastY); lbl.Name = "dynLabel" + i; lbl.TabIndex = 27 + i; lbl.Text = line; i++; } }
public static bool IsEnglish(ELanguage lang) { return lang == ELanguage.English; }
private static bool IsForeignLanguage(ELanguage lang) { return lang != ELanguage.Any && lang != ELanguage.English; }