public TrainerParser(Locale locale, int flags) : base(locale, flags) { this.Address = "npc={0}"; Builder.Setup("npc_trainer", "entry", true, "spell", "spellcost", "reqlevel", "reqSkill", "reqSkillValue"); }
public void LoadKeys(Locale loadFrom, string collectionKey) { _locale = _localeManager.Locales[_localeManager.CurrentLocale]; if(_locale.StringCollections.ContainsKey(collectionKey) == false) { _locale.StringCollections.Add(collectionKey, new StringCollection(collectionKey)); } _collection = _locale.StringCollections[collectionKey]; txtNew.RightToLeft = _locale.RightToLeft ? RightToLeft.Yes : RightToLeft.No; var enumerable = loadFrom.StringCollections[collectionKey].StringsTable.Values; foreach (var key in enumerable) { if (key.AliasedKey) continue; var item = new ListViewItem(key.Key); item.ImageKey = GetStatusIcon(collectionKey, key.Key); lstKeys.Items.Add(item); } colKey.AutoResize(ColumnHeaderAutoResizeStyle.ColumnContent); chkMinorUpdate.Visible = _parentLocale == null; chkDerived.Enabled = _parentLocale != null; chkUpToDate.Visible = _parentLocale != null; btnSetModified.Visible = _parentLocale == null; }
public bool FixRow(Locale lang) { if (spellid == 0) return false; return true; }
/// <summary> /// Initializes a new instance of the LocationAutosuggestSettings with the specified parameters /// </summary> /// <param name="query">Query string to search for</param> /// <param name="queryType">Query type - search by name or ID</param> /// <param name="market">Market country</param> /// <param name="currency">Selected currency</param> /// <param name="locale">Selected language</param> public LocationAutosuggestSettings(string query, LocationAutosuggestQueryType queryType, Market market, Currency currency, Locale locale) { if (market == null) { throw new ArgumentNullException(nameof(market)); } if (currency == null) { throw new ArgumentNullException(nameof(currency)); } if (locale == null) { throw new ArgumentNullException(nameof(locale)); } if (query == null) { throw new ArgumentNullException(nameof(query)); } if (query.Length < 2) { throw new ArgumentException("The query string has to be at least two characters long", nameof(query)); } Query = query; QueryType = queryType; Market = market; Currency = currency; Locale = locale; }
public void Insert(Locale model) { using (var db = new SQLite.SQLiteConnection(Settings.DatabasePath)) { db.Insert(model); } }
public Solver(int matrixSize, Locale locale) { this.matrixSize = matrixSize; Locale = locale; generateNeighborsTable(); }
public void SetUp() { Configuration.ResourceResolver = new HttpResourceResolver(); Runner.SqlCompact("Lemonade").Down(); Runner.SqlCompact("Lemonade").Up(); var application = new ApplicationBuilder() .WithName("Test Application") .Build(); var locale = new Locale { Description = "English", IsoCode = "en-GB" }; new CreateApplicationFake().Execute(application); new CreateLocaleFake().Execute(locale); var resource = new ResourceBuilder() .WithLocale(locale) .WithResourceKey("HelloWorld") .WithResourceSet("MyTestResources") .WithValue("Hello World") .WithApplication(application).Build(); new CreateResourceFake().Execute(resource); _nancyHost = new NancyHost(new Uri("http://localhost:12345"), new LemonadeBootstrapper()); _nancyHost.Start(); }
public Minute(Date time, TimeZone zone, Locale locale) { Minute minute = this; if (time == null) { string str = "Null 'time' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else if (zone == null) { string str = "Null 'zone' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else if (locale == null) { string str = "Null 'locale' argument."; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new IllegalArgumentException(str); } else { Calendar instance = Calendar.getInstance(zone, locale); instance.setTime(time); this.minute = (byte) instance.get(12); this.hour = (byte) instance.get(11); this.day = new Day(time, zone, locale); this.peg(instance); } }
public MessageBundle getBundle(GadgetSpec spec, Locale locale, bool ignoreCache) { if (ignoreCache) { return getNestedBundle(spec, locale, true); } String key = spec.getUrl().ToString() + '.' + locale.ToString(); MessageBundle cached = HttpRuntime.Cache[key] as MessageBundle; MessageBundle bundle; if (cached == null) { try { bundle = getNestedBundle(spec, locale, ignoreCache); } catch (GadgetException) { // Enforce negative caching. bundle = cached ?? MessageBundle.EMPTY; } HttpRuntime.Cache.Insert(key, bundle, null, System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromSeconds(refresh)); } else { bundle = cached; } return bundle; }
protected internal ResourceBundleSupport(Locale locale, ResourceBundle resourceBundle, string baseName) { base.\u002Ector(); ResourceBundleSupport resourceBundleSupport = this; if (locale == null) { string str = "Locale must not be null"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new NullPointerException(str); } else if (resourceBundle == null) { string str = "Resources must not be null"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new NullPointerException(str); } else if (baseName == null) { string str = "BaseName must not be null"; Throwable.__\u003CsuppressFillInStackTrace\u003E(); throw new NullPointerException(str); } else { this.locale = locale; this.resources = resourceBundle; this.resourceBase = baseName; this.cache = new TreeMap(); this.lookupPath = new TreeSet(); } }
public Year(Date time, TimeZone zone, Locale locale) { Year year = this; Calendar instance = Calendar.getInstance(zone, locale); instance.setTime(time); this.year = (short) instance.get(1); this.peg(instance); }
public QuestLocaleParser(Locale locale, int flags) : base(locale, flags) { if (HasLocales) Builder.Setup("locales_quest", "entry", false, string.Format("title_{0}", LocalePosfix)); else Builder.Setup("quest_template", "id", false, "title"); }
public NpcLocaleParser(Locale locale, int flags) : base(locale, flags) { if (HasLocales) Builder.Setup("locales_creature", "entry", false, string.Format("name_{0}", LocalePosfix), string.Format("subname_{0}", LocalePosfix)); else Builder.Setup("creature_template", "entry", false, "name", "subname"); }
public Month(Date time, TimeZone zone, Locale locale) { Month month = this; Calendar instance = Calendar.getInstance(zone, locale); instance.setTime(time); this.month = instance.get(2) + 1; this.year = instance.get(1); this.peg(instance); }
public ImportReportData(string providerPairName, string uploadedFileName, Locale affectedLocale, List<QualifiedValue> inserts, List<Tuple<QualifiedValue, HomeController.ImportExportRecord>> updates, List<QualifiedValue> deletes) { ProviderPairName = providerPairName; UploadedFileName = uploadedFileName; AffectedLocale = affectedLocale; Inserts = inserts; Updates = updates; Deletes = deletes; }
internal DateTimeStr(string pattern, Locale locale, Time t) { this.pattern = pattern; this.m_locale = locale; this.hour = t.getHour(); this.min = t.getMin(); this.sec = t.getSec(); this.ns = t.getNanoSec(); }
public void OnLocaleChange(Locale e) { #if SILVERLIGHT RaisePropertyChanged("Values"); #else RaisePropertyChanged(string.Empty); #endif }
internal DateTimeStr(string pattern, Locale locale, Date d) { this.pattern = pattern; this.m_locale = locale; this.year = d.getYear(); this.mon = d.month(); this.day = d.getDay(); try { this.weekday = d.weekday(); } catch (Exception) {} }
private static Locale GenerateEnglish() { var loc = new Locale(); for (var i = 'A'; i <= 'Z'; i++) { loc.Alphabet.Add(i); } loc.Name = "Английский"; return loc; }
public Translator(LocaleManager localeManager, Locale parentLocale = null) { _localeManager = localeManager; _parentLocale = parentLocale; InitializeComponent(); imageList1.Images.Add(@"red", Properties.Resources.red); imageList1.Images.Add(@"orange", Properties.Resources.orange); imageList1.Images.Add(@"green", Properties.Resources.green); }
protected void btnSetLocale_Click(object sender, EventArgs e) { string language = comboLanguage.SelectedValue; string country = comboCountry.SelectedValue; Locale locale = new Locale(language, country); SessionManager.SetLocale(Context, locale); Response.Redirect(Response.ApplyAppPathModifier("~/Pages/MainPage.aspx")); }
public void Save() { if (!Validate()) { return; } var model = new Locale() { DisplayName = Name, Code = Code, ProjectId = IoC.Get<IShell>().ActiveProjectId.Value }; LocaleService.Insert(model); IsSaved = true; OnRequestClose(); }
public Second(Date time, TimeZone zone, Locale locale) { Second second = this; Calendar instance = Calendar.getInstance(zone, locale); instance.setTime(time); this.second = (byte) instance.get(13); this.minute = (byte) instance.get(12); this.hour = (byte) instance.get(11); this.day = new Day(time, zone, locale); this.peg(instance); }
public override void SetUp() { base.SetUp(); UpdateTabName(_tabId, "About Us"); CacheController.FlushPageIndexFromCache(); GetDefaultAlias(); _redirectMode = PortalController.GetPortalSetting("PortalAliasMapping", PortalId, "CANONICALURL"); _primaryAlias = null; _customLocale = null; }
public ulong petFamilyMask1; // unk #region Methods public bool FixRow(Locale lang) { rankCount = 0; for (int i = 0; i < rank.Length; ++i) { if (rank[i] != 0) ++rankCount; } return true; }
public QuestLocaleParser(Locale locale, int flags) : base(locale, flags) { this.Address = "quests?filter=cr=30:30;crs=1:4;crv={0}:{1}"; this.MaxCount = 32000; if (HasLocales) Builder.Setup("locales_quest", "entry", false, string.Format("title_{0}", LocalePosfix)); else Builder.Setup("quest_template", "id", false, "title"); }
public NpcLocaleParser(Locale locale, int flags) : base(locale, flags) { this.Address = "npcs?filter=cr=37:37;crs=1:4;crv={0}:{1}"; this.MaxCount = 59000; if (HasLocales) Builder.Setup("locales_creature", "entry", false, string.Format("name_{0}", LocalePosfix), string.Format("subname_{0}", LocalePosfix)); else Builder.Setup("creature_template", "entry", false, "name", "subname"); }
public PrepScreen(String player, MainWindow main) { InitializeComponent(); local =main.loc; Internationalizer.setLocale(local); this.ReadyButton.Content = player + " "+ Internationalizer.getMessage("IsReady"); this.ReadyButton.Focus(); this.main = main; this.ReadyLabel.Content = player + " "+ Internationalizer.getMessage("GetReady"); this.Title = Internationalizer.getMessage("Prep"); }
public ActionResult Export(String providerConfigName, String[] parts, String format, String locale) { var providerPair = FetchProviderPair(providerConfigName); var allValues = providerPair.ValueManager.GetAllValuesQualified().ToArray(); var selectedLocale = new Locale(locale); var groupedTranslations = allValues .Where(v => parts.Contains(v.Qualifier.Part.ToString())) .ToLookup(v => new Qualifier(v.Qualifier.Part, TranslationVerificationData.NoLocale, v.Qualifier.Key)); var records = groupedTranslations.Select(group => group.SingleOrDefault(v => Equals(v.Qualifier.Locale.ToString(), locale)) ?? new QualifiedValue( new Qualifier.Unique(group.Key.Part, selectedLocale, group.Key.Key), new Value(ContentType.Unspecified, String.Empty) ) ).Select(v => new ImportExportRecord(v.Qualifier.Part.ToString(), v.Qualifier.Key, v.Value.Content)) .ToArray(); var stream = new MemoryStream(); try { switch (format.ToLowerInvariant()) { case "csv": var streamWriter = new StreamWriter(stream); var csvWriter = new CsvWriter(streamWriter); csvWriter.Configuration.Delimiter = ";"; csvWriter.WriteRecords(records); streamWriter.Flush(); stream.Seek(0, SeekOrigin.Begin); return File(stream, "text/csv", providerConfigName + " - " + selectedLocale + " - " + DateTime.Now.ToString("yyyy-MM-dd HHmmss") + ".csv"); case "xml": var xmlRecords = new XElement("Localizations", records.Select(r => new XElement("Localization", new XElement("Part", r.Part), new XElement("Key", r.Key), new XElement("Value", r.Value), new XElement("DeleteOnImport", r.DeleteOnImport) )) ); xmlRecords.Save(stream); stream.Seek(0, SeekOrigin.Begin); return File(stream, "text/xml", providerConfigName + " - " + selectedLocale + " - " + DateTime.Now.ToString("yyyy-MM-dd HHmmss") + ".xml"); } } catch { stream.Dispose(); return null; } throw new Exception("Unknown data format: " + format); }
public MonthDateFormat(TimeZone zone, Locale locale, int chars, bool showYearForJan, bool showYearForDec) { int num1 = showYearForJan ? 1 : 0; int num2 = showYearForDec ? 1 : 0; TimeZone zone1 = zone; Locale locale1 = locale; int chars1 = chars; bool[] showYear = new bool[13]; int index1 = 0; int num3 = num1; showYear[index1] = num3 != 0; int index2 = 1; int num4 = 0; showYear[index2] = num4 != 0; int index3 = 2; int num5 = 0; showYear[index3] = num5 != 0; int index4 = 3; int num6 = 0; showYear[index4] = num6 != 0; int index5 = 4; int num7 = 0; showYear[index5] = num7 != 0; int index6 = 5; int num8 = 0; showYear[index6] = num8 != 0; int index7 = 6; int num9 = 0; showYear[index7] = num9 != 0; int index8 = 7; int num10 = 0; showYear[index8] = num10 != 0; int index9 = 8; int num11 = 0; showYear[index9] = num11 != 0; int index10 = 9; int num12 = 0; showYear[index10] = num12 != 0; int index11 = 10; int num13 = 0; showYear[index11] = num13 != 0; int index12 = 11; int num14 = 0; showYear[index12] = num14 != 0; int index13 = 12; int num15 = num2; showYear[index13] = num15 != 0; SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yy"); // ISSUE: explicit constructor call this.\u002Ector(zone1, locale1, chars1, showYear, (DateFormat) simpleDateFormat); }
private String GetStockLocalizedStatus(ushort instanceID, ref CitizenInstance data, out bool addCustomStatus, out InstanceID target) { if ((data.m_flags & (CitizenInstance.Flags.Blown | CitizenInstance.Flags.Floating)) != CitizenInstance.Flags.None) { target = InstanceID.Empty; addCustomStatus = false; return(Locale.Get("CITIZEN_STATUS_CONFUSED")); } CitizenManager citMan = Singleton <CitizenManager> .instance; uint citizenId = data.m_citizen; bool isStudent = false; ushort homeId = 0; ushort workId = 0; ushort vehicleId = 0; if (citizenId != 0u) { homeId = citMan.m_citizens.m_buffer[citizenId].m_homeBuilding; workId = citMan.m_citizens.m_buffer[citizenId].m_workBuilding; vehicleId = citMan.m_citizens.m_buffer[citizenId].m_vehicle; isStudent = ((citMan.m_citizens.m_buffer[citizenId].m_flags & Citizen.Flags.Student) != Citizen.Flags.None); } ushort targetBuilding = data.m_targetBuilding; if (targetBuilding == 0) { target = InstanceID.Empty; addCustomStatus = false; return(Locale.Get("CITIZEN_STATUS_CONFUSED")); } if ((data.m_flags & CitizenInstance.Flags.TargetIsNode) != CitizenInstance.Flags.None) { if (vehicleId != 0) { VehicleManager vehManager = Singleton <VehicleManager> .instance; VehicleInfo vehicleInfo = vehManager.m_vehicles.m_buffer[vehicleId].Info; if (vehicleInfo.m_class.m_service == ItemClass.Service.Residential && vehicleInfo.m_vehicleType != VehicleInfo.VehicleType.Bicycle) { if (vehicleInfo.m_vehicleAI.GetOwnerID(vehicleId, ref vehManager.m_vehicles.m_buffer[vehicleId]).Citizen == citizenId) { target = InstanceID.Empty; target.NetNode = targetBuilding; addCustomStatus = true; return(ColossalFramework.Globalization.Locale.Get("CITIZEN_STATUS_DRIVINGTO")); } } else if (vehicleInfo.m_class.m_service == ItemClass.Service.PublicTransport || vehicleInfo.m_class.m_service == ItemClass.Service.Disaster) { ushort transportLine = Singleton <NetManager> .instance.m_nodes.m_buffer[targetBuilding].m_transportLine; if ((data.m_flags & CitizenInstance.Flags.WaitingTaxi) != 0) { target = InstanceID.Empty; addCustomStatus = true; return(ColossalFramework.Globalization.Locale.Get("CITIZEN_STATUS_WAITING_TAXI")); } if (vehManager.m_vehicles.m_buffer[vehicleId].m_transportLine != transportLine) { target = InstanceID.Empty; target.NetNode = targetBuilding; addCustomStatus = true; return(ColossalFramework.Globalization.Locale.Get("CITIZEN_STATUS_TRAVELLINGTO")); } } } if ((data.m_flags & CitizenInstance.Flags.OnTour) != 0) { target = InstanceID.Empty; target.NetNode = targetBuilding; addCustomStatus = true; return(ColossalFramework.Globalization.Locale.Get("CITIZEN_STATUS_VISITING")); } target = InstanceID.Empty; target.NetNode = targetBuilding; addCustomStatus = true; return(ColossalFramework.Globalization.Locale.Get("CITIZEN_STATUS_GOINGTO")); } bool isOutsideConnection = (Singleton <BuildingManager> .instance.m_buildings.m_buffer[(int)targetBuilding].m_flags & Building.Flags.IncomingOutgoing) != Building.Flags.None; bool hangsAround = data.m_path == 0u && (data.m_flags & CitizenInstance.Flags.HangAround) != CitizenInstance.Flags.None; if (vehicleId != 0) { VehicleManager vehicleMan = Singleton <VehicleManager> .instance; VehicleInfo vehicleInfo = vehicleMan.m_vehicles.m_buffer[(int)vehicleId].Info; if (vehicleInfo.m_class.m_service == ItemClass.Service.Residential && vehicleInfo.m_vehicleType != VehicleInfo.VehicleType.Bicycle) { if (vehicleInfo.m_vehicleAI.GetOwnerID(vehicleId, ref vehicleMan.m_vehicles.m_buffer[(int)vehicleId]).Citizen == citizenId) { if (isOutsideConnection) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_DRIVINGTO_OUTSIDE")); } if (targetBuilding == homeId) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_DRIVINGTO_HOME")); } else if (targetBuilding == workId) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get((!isStudent) ? "CITIZEN_STATUS_DRIVINGTO_WORK" : "CITIZEN_STATUS_DRIVINGTO_SCHOOL")); } else { target = InstanceID.Empty; target.Building = targetBuilding; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_DRIVINGTO")); } } } else if (vehicleInfo.m_class.m_service == ItemClass.Service.PublicTransport || vehicleInfo.m_class.m_service == ItemClass.Service.Disaster) { if ((data.m_flags & CitizenInstance.Flags.WaitingTaxi) != CitizenInstance.Flags.None) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_WAITING_TAXI")); } if (isOutsideConnection) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_TRAVELLINGTO_OUTSIDE")); } if (targetBuilding == homeId) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_TRAVELLINGTO_HOME")); } if (targetBuilding == workId) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get((!isStudent) ? "CITIZEN_STATUS_TRAVELLINGTO_WORK" : "CITIZEN_STATUS_TRAVELLINGTO_SCHOOL")); } target = InstanceID.Empty; target.Building = targetBuilding; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_TRAVELLINGTO")); } } if (isOutsideConnection) { target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_GOINGTO_OUTSIDE")); } if (targetBuilding == homeId) { if (hangsAround) { target = InstanceID.Empty; addCustomStatus = false; return(Locale.Get("CITIZEN_STATUS_AT_HOME")); } target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_GOINGTO_HOME")); } else if (targetBuilding == workId) { if (hangsAround) { target = InstanceID.Empty; addCustomStatus = false; return(Locale.Get((!isStudent) ? "CITIZEN_STATUS_AT_WORK" : "CITIZEN_STATUS_AT_SCHOOL")); } target = InstanceID.Empty; addCustomStatus = true; return(Locale.Get((!isStudent) ? "CITIZEN_STATUS_GOINGTO_WORK" : "CITIZEN_STATUS_GOINGTO_SCHOOL")); } else { if (hangsAround) { target = InstanceID.Empty; target.Building = targetBuilding; addCustomStatus = false; return(Locale.Get("CITIZEN_STATUS_VISITING")); } target = InstanceID.Empty; target.Building = targetBuilding; addCustomStatus = true; return(Locale.Get("CITIZEN_STATUS_GOINGTO")); } }
public void Awake() { MainContainer = GetComponent <UIPanel>(); MainContainer.autoLayout = true; MainContainer.autoLayoutDirection = LayoutDirection.Vertical; MainContainer.padding = new RectOffset(5, 5, 5, 5); MainContainer.autoLayoutPadding = new RectOffset(0, 0, 3, 3); KlyteMonoUtils.CreateTabsComponent(out m_tabstrip, out m_tabContainer, MainContainer.transform, "TextEditor", new Vector4(0, 0, MainContainer.width, 40), new Vector4(0, 0, MainContainer.width, MainContainer.height - 40)); m_tabSettings = TabCommons.CreateNonScrollableTabLocalized(m_tabstrip, KlyteResourceLoader.GetDefaultSpriteNameFor(CommonsSpriteNames.K45_Settings), "K45_WTS_GENERAL_SETTINGS", "TxtSettings"); m_tabSize = TabCommons.CreateNonScrollableTabLocalized(m_tabstrip, KlyteResourceLoader.GetDefaultSpriteNameFor(CommonsSpriteNames.K45_MoveCross), "K45_WTS_TEXT_SIZE_ATTRIBUTES", "TxtSize"); m_tabAppearence = TabCommons.CreateScrollableTabLocalized(m_tabstrip, KlyteResourceLoader.GetDefaultSpriteNameFor(CommonsSpriteNames.K45_AutoColorIcon), "K45_WTS_TEXT_APPEARANCE_ATTRIBUTES", "TxtApp"); m_tabConfig = TabCommons.CreateScrollableTabLocalized(m_tabstrip, KlyteResourceLoader.GetDefaultSpriteNameFor(CommonsSpriteNames.K45_AutoNameIcon), "K45_WTS_TEXT_CONFIGURATION_ATTRIBUTES", "TxtCnf"); var helperSettings = new UIHelperExtension(m_tabSettings, LayoutDirection.Vertical); var helperSize = new UIHelperExtension(m_tabSize, LayoutDirection.Vertical); var helperAppearance = new UIHelperExtension(m_tabAppearence, LayoutDirection.Vertical); var helperConfig = new UIHelperExtension(m_tabConfig, LayoutDirection.Vertical); AddTextField(Locale.Get("K45_WTS_TEXT_TAB_TITLE"), out m_tabName, helperSettings, OnTabNameChanged); AddVector3Field(Locale.Get("K45_WTS_RELATIVE_POS"), out m_arrayCoord, helperSize, OnPositionChange); AddVector3Field(Locale.Get("K45_WTS_RELATIVE_ROT"), out m_arrayRotation, helperSize, OnRotationChange); AddFloatField(Locale.Get("K45_WTS_TEXT_SCALE"), out m_textScale, helperSize, OnScaleSubmit, false); AddFloatField(Locale.Get("K45_WTS_MAX_WIDTH_METERS"), out m_maxWidth, helperSize, OnMaxWidthChange, false); AddCheckboxLocale("K45_WTS_RESIZE_Y_TEXT_OVERFLOW", out m_applyScaleOnY, helperSize, OnChangeApplyRescaleOnY); AddCheckboxLocale("K45_WTS_CREATE_CLONE_180DEG", out m_create180degSimmetricClone, helperSize, OnChangeCreateSimmetricClone); AddCheckboxLocale("K45_WTS_CLONE_180DEG_INVERT_TEXT_HOR_ALIGN", out m_invertTextHorizontalAlignClone, helperSize, OnChangeInvertCloneTextHorizontalAlignment); // AddCheckboxLocale("K45_WTS_MIRRORED", out m_mirrored, helperSize, OnChangeMirrored); AddDropdown(Locale.Get("K45_WTS_TEXT_ALIGN_HOR"), out m_dropdownTextAlignHorizontal, helperAppearance, ColossalUIExtensions.GetDropdownOptions <UIHorizontalAlignment>("K45_ALIGNMENT"), OnSetTextAlignmentHorizontal); helperAppearance.AddSpace(5); AddCheckboxLocale("K45_WTS_USE_CONTRAST_COLOR", out m_useContrastColor, helperAppearance, OnContrastColorChange); AddColorField(helperAppearance, Locale.Get("K45_WTS_TEXT_COLOR"), out m_textFixedColor, OnFixedColorChanged); AddSlider(Locale.Get("K45_WTS_TEXT_DEPTH"), out m_sliderDepth, helperAppearance, OnChangeDepth, -1, 1, 0.025f, (x) => $"{x.ToString("P1")}"); AddDropdown(Locale.Get("K45_WTS_TEXT_MATERIALTYPE"), out m_dropdownMaterialType, helperAppearance, ColossalUIExtensions.GetDropdownOptions <MaterialType>("K45_WTS_TEXTMATERIALTYPE"), OnSetMaterialType); AddSlider(Locale.Get("K45_WTS_TEXT_ILLUMINATIONSTRENGTH"), out m_sliderIllumination, helperAppearance, OnChangeIlluminationStrength, 0, 10, 0.025f, (x) => $"{x.ToString("P1")}"); AddDropdown(Locale.Get("K45_WTS_TEXT_BLINKTYPE"), out m_dropdownBlinkType, helperAppearance, ColossalUIExtensions.GetDropdownOptions <BlinkType>("K45_WTS_BLINKTYPE"), OnSetBlinkType); AddVector4Field(Locale.Get("K45_WTS_TEXT_CUSTOMBLINKPARAMS"), out m_arrayCustomBlink, helperAppearance, OnCustomBlinkChange); AddEmptyDropdown(Locale.Get("K45_WTS_TEXT_CONTENT"), out m_dropdownTextContent, helperConfig, OnSetTextOwnNameContent); AddTextField(Locale.Get("K45_WTS_CUSTOM_TEXT"), out m_customText, helperConfig, OnSetTextCustom); IEnumerator OnFilter(string x, Wrapper <string[]> result) { yield return(result.Value = OnFilterParamImages(WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite, x)); } AddFilterableInput(Locale.Get("K45_WTS_SPRITE_NAME"), helperConfig, out m_spriteFilter, out UIListBox lb2, OnFilter, OnSpriteNameChanged); lb2.size = new Vector2(MainContainer.width - 20, 220); lb2.processMarkup = true; m_spriteFilter.eventGotFocus += (x, y) => { var text = ((UITextField)x).text; if (text.StartsWith(WTSAtlasesLibrary.PROTOCOL_IMAGE_ASSET) || text.StartsWith(WTSAtlasesLibrary.PROTOCOL_IMAGE)) { WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.spriteName = ((UITextField)x).text.Split('/').Last().Trim(); } }; lb2.eventItemMouseHover += (x, y) => { if (y >= 0 && y < lb2.items.Length) { WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.spriteName = lb2.items[y].Split('/').Last().Trim(); } }; lb2.eventVisibilityChanged += (x, y) => WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.parent.isVisible = y; WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.parent.isVisible = false; AddDropdown(Locale.Get("K45_WTS_PROPLAYOUT_DESTINATIONREFERENCE"), out m_destinationRef, helperConfig, ColossalUIExtensions.GetDropdownOptions <DestinationReference>("K45_WTS_ONNETTEXT_DESTINATION_DESC"), OnChangeDestinationRef); AddDropdown(Locale.Get("K45_WTS_PROPLAYOUT_TEXTPARAMETERIDX"), out m_parameterIdx, helperConfig, ColossalUIExtensions.GetDropdownOptionsUnlocalized(new string[BoardInstanceOnNetXml.TEXT_PARAMETERS_COUNT].Select((x, i) => $"#{i}").ToArray()), OnChangeTextParameterIdx); AddTextField(Locale.Get("K45_WTS_PROPLAYOUT_TEXTPARAMETERNAME"), out m_parameterDisplayName, helperConfig, OnSetParameterDisplayName); IEnumerator OnFilter2(string x, Wrapper <string[]> result) { yield return(result.Value = OnFilterParamImages(WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite, x)); } AddFilterableInput(Locale.Get("K45_WTS_PROPLAYOUT_TEXTPARAMETERDEFAULTVAL"), helperConfig, out m_defaultParameterValue, out UIListBox lb, OnFilter2, OnChangedDefaultTextParam); lb.processMarkup = true; lb.size = new Vector2(MainContainer.width - 20, 220); m_defaultParameterValue.eventGotFocus += (x, y) => { var text = ((UITextField)x).text; if (text.StartsWith(WTSAtlasesLibrary.PROTOCOL_IMAGE_ASSET) || text.StartsWith(WTSAtlasesLibrary.PROTOCOL_IMAGE)) { WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.spriteName = ((UITextField)x).text.Split('/').Last().Trim(); } }; lb.eventItemMouseHover += (x, y) => { if (y >= 0 && y < lb.items.Length) { WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.spriteName = lb.items[y].Split('/').Last().Trim(); } }; lb.eventVisibilityChanged += (x, y) => WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.parent.isVisible = y; WTSPropLayoutEditor.Instance.PropPreview.OverrideSprite.parent.isVisible = false; AddIntField(Locale.Get("K45_WTS_PROPLAYOUT_ITEMDURATIONFRAMES"), out m_slideDurationFrames, helperConfig, OnSetDurationFrames, false); AddIntField(Locale.Get("K45_WTS_PROPLAYOUT_DESYNCFRAMES"), out m_slideDesync, helperConfig, OnSetDesyncOffset, false); helperConfig.AddSpace(5); AddDropdown(Locale.Get("K45_WTS_CLASS_FONT"), out m_fontClassSelect, helperConfig, ColossalUIExtensions.GetDropdownOptions <FontClass>("K45_WTS_FONTCLASS"), OnSetFontClass); AddEmptyDropdown(Locale.Get("K45_WTS_OVERRIDE_FONT"), out m_overrideFontSelect, helperConfig, OnSetOverrideFont); AddTextField(Locale.Get("K45_WTS_PREFIX"), out m_textPrefix, helperConfig, OnSetPrefix); AddTextField(Locale.Get("K45_WTS_SUFFIX"), out m_textSuffix, helperConfig, OnSetSuffix); AddCheckboxLocale("K45_WTS_TEXT_ALL_CAPS", out m_allCaps, helperConfig, OnSetAllCaps); AddCheckboxLocale("K45_WTS_TEXT_APPLYABBREVIATIONS", out m_applyAbbreviations, helperConfig, OnSetApplyAbbreviations); AddVector2Field(Locale.Get("K45_WTS_TEXT_ROW_COLUMNS"), out m_arrayRowColumnsCount, helperConfig, OnRowColumnCountChanged, true, true); m_arrayRowColumnsCount.ForEach(x => x.allowNegative = false); AddVector2Field(Locale.Get("K45_WTS_TEXT_ROW_COLUMNS_SPACING"), out m_arrayRowColumnsSpacing, helperConfig, OnRowColumnSpacingChanged); AddDropdown(Locale.Get("K45_WTS_VERTICAL_ALIGNMENT"), out m_verticalAlignDD, helperConfig, ColossalUIExtensions.GetDropdownOptions <UIVerticalAlignment>("K45_VERT_ALIGNMENT"), OnSetVerticalAlign); AddCheckboxLocale("K45_WTS_TEXT_FILLCOLUMNSFIRST", out m_checkboxVerticalFirst, helperConfig, OnColumnsFirstChanged); WTSUtils.ReloadFontsOf(m_overrideFontSelect, null, true, true); WTSPropLayoutEditor.Instance.CurrentTabChanged += (newVal) => { int targetTab = newVal - 1; SafeObtain(OnSetData, targetTab); if (WTSPropLayoutEditor.Instance.EditingInstance?.m_configurationSource == ConfigurationSource.CITY) { m_tabContainer.Enable(); } else { m_tabContainer.Disable(); } }; m_isEditing = false; AddLibBox <WTSLibPropTextItem, BoardTextDescriptorGeneralXml>(helperSettings, out UIButton m_copyButtonText, DoCopyText, out m_pasteButtonText, DoPasteText, out UIButton m_deleteButtonText, DoDeleteText, (loadedItem) => SafeObtain((ref BoardTextDescriptorGeneralXml x) => { string name = x.SaveName; x = XmlUtils.DefaultXmlDeserialize <BoardTextDescriptorGeneralXml>(loadedItem); x.SaveName = name; OnSetData(ref x); x.SaveName = name; }), () => XmlUtils.DefaultXmlSerialize(WTSPropLayoutEditor.Instance.EditingInstance.TextDescriptors[Math.Max(0, TabToEdit)])); }
/** * Gets the resource string for this key in Locale. * * If the resource is not found, a warning is logged * * @param key * the key in the resource file * @param forcedLocale Force a particular locale * @return the resource string if the key is found; otherwise, return * "[res_key="+key+"]" * @since 2.7 */ public static String getResString(String key, Locale forcedLocale) { return(getResStringDefault(key, RES_KEY_PFX + key + "]", // $NON-NLS-1$ forcedLocale)); }
private void ReadLegacyManifest(XPathNavigator manifestNav) { string fileName = Null.NullString; string filePath = Null.NullString; string sourceFileName = Null.NullString; string resourcetype = Null.NullString; string moduleName = Null.NullString; foreach (XPathNavigator fileNav in manifestNav.Select("Files/File")) { fileName = Util.ReadAttribute(fileNav, "FileName").ToLowerInvariant(); resourcetype = Util.ReadAttribute(fileNav, "FileType"); moduleName = Util.ReadAttribute(fileNav, "ModuleName").ToLowerInvariant(); sourceFileName = Path.Combine(resourcetype, Path.Combine(moduleName, fileName)); string extendedExtension = "." + this.Language.Code.ToLowerInvariant() + ".resx"; switch (resourcetype) { case "GlobalResource": filePath = "App_GlobalResources"; this._IsCore = true; break; case "ControlResource": filePath = "Controls\\App_LocalResources"; break; case "AdminResource": this._IsCore = true; switch (moduleName) { case "authentication": filePath = "DesktopModules\\Admin\\Authentication\\App_LocalResources"; break; case "controlpanel": filePath = "Admin\\ControlPanel\\App_LocalResources"; break; case "files": filePath = "DesktopModules\\Admin\\FileManager\\App_LocalResources"; break; case "host": switch (fileName.Replace(extendedExtension, string.Empty)) { case "authentication.ascx": filePath = string.Empty; break; case "friendlyurls.ascx": filePath = "DesktopModules\\Admin\\HostSettings\\App_LocalResources"; break; case "hostsettings.ascx": filePath = "DesktopModules\\Admin\\HostSettings\\App_LocalResources"; break; case "requestfilters.ascx": filePath = "DesktopModules\\Admin\\HostSettings\\App_LocalResources"; break; } break; case "lists": filePath = "DesktopModules\\Admin\\Lists\\App_LocalResources"; break; case "localization": switch (fileName.Replace(extendedExtension, string.Empty)) { case "languageeditor.ascx": filePath = "DesktopModules\\Admin\\Extensions\\Editors\\App_LocalResources"; break; case "languageeditorext.ascx": filePath = "DesktopModules\\Admin\\Extensions\\Editors\\App_LocalResources"; break; case "timezoneeditor.ascx": filePath = "DesktopModules\\Admin\\Extensions\\Editors\\App_LocalResources"; break; case "resourceverifier.ascx": filePath = "DesktopModules\\Admin\\Extensions\\Editors\\App_LocalResources"; break; default: filePath = string.Empty; break; } break; case "logging": filePath = "DesktopModules\\Admin\\LogViewer\\App_LocalResources"; break; case "moduledefinitions": switch (fileName.Replace(extendedExtension, string.Empty)) { case "editmodulecontrol.ascx": filePath = "DesktopModules\\Admin\\Extensions\\Editors\\App_LocalResources"; break; case "importmoduledefinition.ascx": filePath = "DesktopModules\\Admin\\Extensions\\Editors\\App_LocalResources"; break; case "timezoneeditor.ascx": filePath = "DesktopModules\\Admin\\Extensions\\Editors\\App_LocalResources"; break; default: filePath = string.Empty; break; } break; case "modules": filePath = "Admin\\Modules\\App_LocalResources"; break; case "packages": filePath = "DesktopModules\\Admin\\Extensions\\App_LocalResources"; break; case "portal": switch (fileName.Replace(extendedExtension, string.Empty)) { case "editportalalias.ascx": filePath = "DesktopModules\\Admin\\Portals\\App_LocalResources"; break; case "portalalias.ascx": filePath = "DesktopModules\\Admin\\Portals\\App_LocalResources"; break; case "portals.ascx": filePath = "DesktopModules\\Admin\\Portals\\App_LocalResources"; break; case "privacy.ascx": filePath = "Admin\\Portal\\App_LocalResources"; break; case "signup.ascx": filePath = "DesktopModules\\Admin\\Portals\\App_LocalResources"; break; case "sitesettings.ascx": filePath = "DesktopModules\\Admin\\Portals\\App_LocalResources"; break; case "sitewizard.ascx": filePath = "DesktopModules\\Admin\\SiteWizard\\App_LocalResources"; break; case "sql.ascx": filePath = "DesktopModules\\Admin\\SQL\\App_LocalResources"; break; case "systemmessages.ascx": filePath = string.Empty; break; case "template.ascx": filePath = "DesktopModules\\Admin\\Portals\\App_LocalResources"; break; case "terms.ascx": filePath = "Admin\\Portal\\App_LocalResources"; break; } break; case "scheduling": filePath = "DesktopModules\\Admin\\Scheduler\\App_LocalResources"; break; case "search": switch (fileName.Replace(extendedExtension, string.Empty)) { case "inputsettings.ascx": filePath = "DesktopModules\\Admin\\SearchInput\\App_LocalResources"; break; case "resultssettings.ascx": filePath = "DesktopModules\\Admin\\SearchResults\\App_LocalResources"; break; case "searchadmin.ascx": filePath = "DesktopModules\\Admin\\SearchAdmin\\App_LocalResources"; break; case "searchinput.ascx": filePath = "DesktopModules\\Admin\\SearchInput\\App_LocalResources"; break; case "searchresults.ascx": filePath = "DesktopModules\\Admin\\SearchResults\\App_LocalResources"; break; } break; case "security": switch (fileName.Replace(extendedExtension, string.Empty)) { case "accessdenied.ascx": filePath = "Admin\\Security\\App_LocalResources"; break; case "authenticationsettings.ascx": filePath = string.Empty; break; case "editgroups.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "editroles.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "register.ascx": filePath = string.Empty; break; case "roles.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "securityroles.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "sendpassword.ascx": filePath = "Admin\\Security\\App_LocalResources"; break; case "signin.ascx": filePath = string.Empty; break; } break; case "skins": filePath = "Admin\\Skins\\App_LocalResources"; break; case "syndication": filePath = "DesktopModules\\Admin\\FeedExplorer\\App_LocalResources"; break; case "tabs": switch (fileName.Replace(extendedExtension, string.Empty)) { case "export.ascx": filePath = "Admin\\Tabs\\App_LocalResources"; break; case "import.ascx": filePath = "Admin\\Tabs\\App_LocalResources"; break; case "managetabs.ascx": filePath = "DesktopModules\\Admin\\Tabs\\App_LocalResources"; break; case "recyclebin.ascx": filePath = "DesktopModules\\Admin\\RecycleBin\\App_LocalResources"; break; case "tabs.ascx": filePath = "DesktopModules\\Admin\\Tabs\\App_LocalResources"; break; } break; case "users": switch (fileName.Replace(extendedExtension, string.Empty)) { case "bulkemail.ascx": filePath = "DesktopModules\\Admin\\Newsletters\\App_LocalResources"; fileName = "Newsletter.ascx" + extendedExtension; break; case "editprofiledefinition.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "manageusers.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "memberservices.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "membership.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "password.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "profile.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "profiledefinitions.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "user.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "users.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "usersettings.ascx": filePath = "DesktopModules\\Admin\\Security\\App_LocalResources"; break; case "viewprofile.ascx": filePath = "Admin\\Users\\App_LocalResources"; break; } break; case "vendors": switch (fileName.Replace(extendedExtension, string.Empty)) { case "adsense.ascx": filePath = string.Empty; break; case "editadsense.ascx": filePath = string.Empty; break; case "affiliates.ascx": filePath = "DesktopModules\\Admin\\Vendors\\App_LocalResources"; break; case "banneroptions.ascx": filePath = "DesktopModules\\Admin\\Banners\\App_LocalResources"; break; case "banners.ascx": filePath = "DesktopModules\\Admin\\Vendors\\App_LocalResources"; break; case "displaybanners.ascx": filePath = "DesktopModules\\Admin\\Banners\\App_LocalResources"; break; case "editaffiliate.ascx": filePath = "DesktopModules\\Admin\\Vendors\\App_LocalResources"; break; case "editbanner.ascx": filePath = "DesktopModules\\Admin\\Vendors\\App_LocalResources"; break; case "editvendors.ascx": filePath = "DesktopModules\\Admin\\Vendors\\App_LocalResources"; break; case "vendors.ascx": filePath = "DesktopModules\\Admin\\Vendors\\App_LocalResources"; break; } break; } break; case "LocalResource": filePath = Path.Combine("DesktopModules", Path.Combine(moduleName, "App_LocalResources")); // Two assumptions are made here // 1. Core files appear in the package before extension files // 2. Module packages only include one module if (!this._IsCore && this._LanguagePack == null) { // Check if language is installed Locale locale = LocaleController.Instance.GetLocale(this._Language.Code); if (locale == null) { this.LegacyError = "CoreLanguageError"; } else { // Attempt to figure out the Extension foreach (KeyValuePair <int, DesktopModuleInfo> kvp in DesktopModuleController.GetDesktopModules(Null.NullInteger)) { if (kvp.Value.FolderName.ToLowerInvariant() == moduleName) { // Found Module - Get Package var dependentPackage = PackageController.Instance.GetExtensionPackage(Null.NullInteger, p => p.PackageID == kvp.Value.PackageID); this.Package.Name += "_" + dependentPackage.Name; this.Package.FriendlyName += " " + dependentPackage.FriendlyName; this._LanguagePack = new LanguagePackInfo(); this._LanguagePack.DependentPackageID = dependentPackage.PackageID; this._LanguagePack.LanguageID = locale.LanguageId; break; } } if (this._LanguagePack == null) { this.LegacyError = "DependencyError"; } } } break; case "ProviderResource": filePath = Path.Combine("Providers", Path.Combine(moduleName, "App_LocalResources")); break; case "InstallResource": filePath = "Install\\App_LocalResources"; break; } if (!string.IsNullOrEmpty(filePath)) { this.AddFile(Path.Combine(filePath, fileName), sourceFileName); } } }
public LanguagePackWriter(Locale language, PackageInfo package) : base(package) { this._Language = language; this.BasePath = Null.NullString; }
protected virtual void SetUp() { Locale.SetDefault(Locale.Us); }
private static void ThrowArgumentException(object value) { throw new ArgumentOutOfRangeException("value", value, Locale.GetText("Current platform doesn't support this value.")); }
protected override string GetFxText() { return(Locale.Get("boss_rush")); }
private void OnSetData(ref BoardTextDescriptorGeneralXml x) { m_tabName.text = x.SaveName; m_arrayCoord[0].text = x.PlacingConfig.Position.X.ToString("F3"); m_arrayCoord[1].text = x.PlacingConfig.Position.Y.ToString("F3"); m_arrayCoord[2].text = x.PlacingConfig.Position.Z.ToString("F3"); m_arrayRotation[0].text = x.PlacingConfig.Rotation.X.ToString("F3"); m_arrayRotation[1].text = x.PlacingConfig.Rotation.Y.ToString("F3"); m_arrayRotation[2].text = x.PlacingConfig.Rotation.Z.ToString("F3"); m_textScale.text = x.m_textScale.ToString("F3"); m_maxWidth.text = x.m_maxWidthMeters.ToString("F3"); m_applyScaleOnY.isChecked = x.m_applyOverflowResizingOnY; m_invertTextHorizontalAlignClone.isChecked = x.PlacingConfig.m_invertYCloneHorizontalAlign; m_create180degSimmetricClone.isChecked = x.PlacingConfig.m_create180degYClone; // m_mirrored.isChecked = x.PlacingConfig.m_mirrored; m_dropdownTextAlignHorizontal.selectedIndex = (int)x.m_textAlign; m_useContrastColor.isChecked = x.ColoringConfig.UseContrastColor; m_dropdownMaterialType.selectedIndex = (int)x.IlluminationConfig.IlluminationType; m_sliderIllumination.value = x.IlluminationConfig.IlluminationStrength; m_sliderDepth.value = x.IlluminationConfig.IlluminationDepth; m_dropdownBlinkType.selectedIndex = (int)x.IlluminationConfig.BlinkType; m_textFixedColor.selectedColor = x.ColoringConfig.m_cachedColor; m_dropdownTextContent.items = WTSDynamicTextRenderingRules.ALLOWED_TYPES_PER_RENDERING_CLASS[WTSPropLayoutEditor.Instance.EditingInstance.m_allowedRenderClass].Select(y => Locale.Get("K45_WTS_BOARD_TEXT_TYPE_DESC", y.ToString())).ToArray(); m_dropdownTextContent.selectedIndex = Array.IndexOf(WTSDynamicTextRenderingRules.ALLOWED_TYPES_PER_RENDERING_CLASS[WTSPropLayoutEditor.Instance.EditingInstance.m_allowedRenderClass], x.m_textType); m_customText.text = x.m_fixedText ?? ""; m_parameterDisplayName.text = x.ParameterDisplayName ?? ""; m_destinationRef.selectedIndex = (int)(x.m_destinationRelative); m_parameterIdx.selectedIndex = x.m_parameterIdx; m_defaultParameterValue.text = x.DefaultParameterValueAsString ?? ""; m_slideDesync.text = x.AnimationSettings.m_extraDelayCycleFrames.ToString(); m_slideDurationFrames.text = x.AnimationSettings.m_itemCycleFramesDuration.ToString(); m_overrideFontSelect.selectedIndex = x.m_overrideFont == null ? 0 : x.m_overrideFont == WTSController.DEFAULT_FONT_KEY ? 1 : Array.IndexOf(m_overrideFontSelect.items, x.m_overrideFont); m_fontClassSelect.selectedIndex = (int)x.m_fontClass; m_textPrefix.text = x.m_prefix ?? ""; m_textSuffix.text = x.m_suffix ?? ""; m_allCaps.isChecked = x.m_allCaps; m_spriteFilter.text = x.m_spriteParam?.ToString() ?? ""; m_applyAbbreviations.isChecked = x.m_applyAbbreviations; m_arrayCustomBlink[0].text = x.IlluminationConfig.CustomBlink.X.ToString("F3"); m_arrayCustomBlink[1].text = x.IlluminationConfig.CustomBlink.Y.ToString("F3"); m_arrayCustomBlink[2].text = x.IlluminationConfig.CustomBlink.Z.ToString("F3"); m_arrayCustomBlink[3].text = x.IlluminationConfig.CustomBlink.W.ToString("F3"); m_arrayRowColumnsCount[1].text = x.MultiItemSettings.SubItemsPerRow.ToString(); m_arrayRowColumnsCount[0].text = x.MultiItemSettings.SubItemsPerColumn.ToString(); m_arrayRowColumnsSpacing[0].text = x.MultiItemSettings.SubItemSpacing.X.ToString("F3"); m_arrayRowColumnsSpacing[1].text = x.MultiItemSettings.SubItemSpacing.Y.ToString("F3"); ApplyShowRules(x); }
private async void SendExecute() { var disclaimer = await MessagePopup.ShowAsync(string.Format(Strings.Resources.PaymentWarningText, _bot.FirstName, _provider.FirstName), Strings.Resources.PaymentWarning, Strings.Resources.OK); var confirm = await MessagePopup.ShowAsync(string.Format(Strings.Resources.PaymentTransactionMessage, Locale.FormatCurrency(_totalAmount, _paymentForm.Invoice.Currency), _bot.FirstName, _invoice.Title), Strings.Resources.PaymentTransactionReview, Strings.Resources.OK, Strings.Resources.Cancel); if (confirm != Windows.UI.Xaml.Controls.ContentDialogResult.Primary) { return; } IsLoading = true; //TLInputPaymentCredentialsBase credentials; //if (_paymentForm.HasSavedCredentials && _paymentForm.SavedCredentials is TLPaymentSavedCredentialsCard savedCard) //{ // credentials = new TLInputPaymentCredentialsSaved { Id = savedCard.Id, TmpPassword = ApplicationSettings.Current.TmpPassword.TmpPassword }; //} //else //{ // credentials = new TLInputPaymentCredentials { Data = new TLDataJSON { Data = _credentials }, IsSave = _save }; //} //var response = await LegacyService.SendPaymentFormAsync(_message.Id, _requestedInfo?.Id, _shipping?.Id, credentials); //if (response.IsSucceeded) //{ // if (response.Result is TLPaymentsPaymentVerficationNeeded verificationNeeded) // { // if (Uri.TryCreate(verificationNeeded.Url, UriKind.Absolute, out Uri uri)) // { // await Launcher.LaunchUriAsync(uri); // } // } // NavigationService.GoBackAt(1); //} //else if (response.Error != null) //{ //} }
public SqlTypeException() : base(Locale.GetText("A sql exception has occured.")) { }