public void LocalizedStringsNotNull() { LocalizedStrings locStrings = new LocalizedStrings(); Assert.IsNotNull(locStrings.Resource1); Assert.IsNotNull(locStrings); }
public static LocalizedStrings GetInstance() { if (_localizedStrings == null) { _localizedStrings = new LocalizedStrings(); } return _localizedStrings; }
public void Initialize(Canvas canvas, FDCreature creature, ShowType showType, Action <int> callback = null) { LocalizedStrings.SetLanguage("zh-CN"); if (creature == null) { throw new ArgumentNullException("creature"); } base.Initialize(canvas); this.OnCallback = callback; this.gameObject.name = "CreatureDialog"; this.transform.localPosition = new Vector3(0, 0, 0); this.transform.localScale = new Vector3(1f, 1f, 1f); this.creature = creature; this.showType = showType; }
protected string RenderELCComment() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.Append("<div class=\"divElcComponent\" id=\"divElcComment\">"); stringBuilder.Append("<div class=\"divIBTxt\">"); stringBuilder.Append(Utilities.HtmlEncode(this.elcDisplayName)); stringBuilder.Append(": "); if (this.HasELCComment) { stringBuilder.Append(Utilities.HtmlEncode(this.elcFolderComment)); } if (!this.elcMustDisplayComment) { stringBuilder.Append("</div><div class=\"divIBTxt\"><a href=# id=\"lnkHdELC\">"); stringBuilder.Append(LocalizedStrings.GetHtmlEncoded(1303059585) + "</a>"); } stringBuilder.Append("</div></div>"); return(stringBuilder.ToString()); }
private void BuildFolderName(SanitizingStringBuilder <OwaHtml> stringBuilder) { if (!this.isSharedFolder) { stringBuilder.Append <SanitizedHtmlString>(this.folderEncodedDisplayName); return; } if (Utilities.IsDefaultFolder(this.folder, DefaultFolderType.Calendar)) { stringBuilder.Append <SanitizedHtmlString>(this.folderOwnerEncodedName); return; } string htmlEncoded = LocalizedStrings.GetHtmlEncoded(-881877772); stringBuilder.Append <SanitizedHtmlString>(SanitizedHtmlString.Format(this.userContext.UserCulture, htmlEncoded, new object[] { this.folderEncodedDisplayName, this.folderOwnerEncodedName })); }
protected void RenderPhoneProperties() { base.Response.Write("<tr><td class=\"cntPT\"><select id=phl class=\"cntDD\">"); this.RenderListBody(ContactUtilities.AssistantPhoneNumber.Id, ContactUtilities.PhoneNumberProperties); base.Response.Write("</select></td><td class=\"cntPV\">"); this.RenderTextControl(true, ContactUtilities.PhoneNumberProperties); base.Response.Write("</td></tr>"); base.Response.Write("<tr><td colspan=2 class=cntPV2><table cellspacing=0 cellpadding=0 class=w100><tr><td id=cntLt>"); base.Response.Write(LocalizedStrings.GetHtmlEncoded(-746050732)); base.Response.Write("</td><td id=cntRt><select name=\""); base.Response.Write(ContactUtilities.DefaultPhoneNumber.Id); base.Response.Write("\" class=\"cntDD cntCB\">"); int intValue = this.helper.GetIntValue(ContactUtilities.DefaultPhoneNumber, 1); for (int i = 0; i <= 18; i++) { this.RenderListItem(i.ToString(), ContactUtilities.GetPropertyStringFromPhoneNumberType((PhoneNumberType)i), intValue == i); } base.Response.Write("</select></td></tr></table></td></tr>"); }
// Token: 0x0600243C RID: 9276 RVA: 0x000D18A4 File Offset: 0x000CFAA4 internal static void RenderBuddyListTreeControl(TextWriter output, UserContext userContext, bool expandBuddyList) { SimpleTreeNode simpleTreeNode = new SimpleTreeNode(userContext, "bddyRt"); simpleTreeNode.SetSelectable(false); simpleTreeNode.ClientNodeType = "buddyRootNode"; SimpleTreeNode simpleTreeNode2 = simpleTreeNode; simpleTreeNode2.HighlightClassName += " trNdGpHdHl"; SimpleTreeNode simpleTreeNode3 = simpleTreeNode; simpleTreeNode3.NodeClassName += " trNdGpHd"; simpleTreeNode.NeedSync = false; simpleTreeNode.IsExpanded = expandBuddyList; simpleTreeNode.SetContent(LocalizedStrings.GetNonEncoded(2047178654)); new SimpleTree(userContext, simpleTreeNode, "divTrBddy") { ErrDiv = "divErrMail" }.Render(output); }
// Token: 0x060005B8 RID: 1464 RVA: 0x0002C93C File Offset: 0x0002AB3C private void FetchModule() { this.type = base.OwaContext.FormsRegistryContext.Type; this.module = Navigation.GetNavigationModuleFromFolder(base.UserContext, this.selectedFolderId); switch (this.module) { case NavigationModule.Mail: this.headerLabelForMove = LocalizedStrings.GetHtmlEncoded(1182470434); return; case NavigationModule.Contacts: if (!base.UserContext.IsFeatureEnabled(Feature.Contacts)) { throw new OwaSegmentationException("Contacts is not enabled"); } this.headerLabelForMove = LocalizedStrings.GetHtmlEncoded(-1217485730); return; } throw new OwaInvalidRequestException("The " + this.module + " module is not supported to move items in Owa Basic"); }
// Token: 0x060001F4 RID: 500 RVA: 0x00012E90 File Offset: 0x00011090 private void RenderAccessibilityOptions() { string format = "<input type=\"checkbox\" name=\"{0}\"{1}{3} id=\"{0}\" onclick=\"return onClkChkBx(this);\" value=\"1\"><label for=\"{0}\">{2}</label>"; base.RenderHeaderRow(ThemeFileId.AboutOwa, 951662406); this.writer.Write("<tr><td class=\"bd\">"); this.writer.Write(LocalizedStrings.GetHtmlEncoded(1435977365)); this.writer.Write("<ul><li>{0}</li><li>{1}</li><li>{2}</li></ul>", LocalizedStrings.GetHtmlEncoded(2267445), LocalizedStrings.GetHtmlEncoded(405551972), LocalizedStrings.GetHtmlEncoded(-1160531969)); this.writer.Write("</td></tr>"); this.writer.Write("<tr><td class=\"bd\">"); this.writer.Write(format, new object[] { "chkOptAcc", this.isOptimizedForAccessibility ? " checked" : string.Empty, LocalizedStrings.GetHtmlEncoded(-2119250240), this.isRichClientFeatureEnabled ? string.Empty : " disabled" }); this.writer.Write("<div id=\"olo\">{0}</div>", LocalizedStrings.GetHtmlEncoded(this.isRichClientFeatureEnabled ? -1771373774 : 1767653808)); this.writer.Write("</td></tr>"); }
// Token: 0x06001E3E RID: 7742 RVA: 0x000AF348 File Offset: 0x000AD548 private string GetSubjectOfFreeBusyOnlyItem(int index) { switch (this.items[index].BusyType) { case BusyTypeWrapper.Free: return(LocalizedStrings.GetNonEncoded(-971703552)); case BusyTypeWrapper.Tentative: return(LocalizedStrings.GetNonEncoded(1797669216)); case BusyTypeWrapper.Busy: return(LocalizedStrings.GetNonEncoded(2052801377)); case BusyTypeWrapper.OOF: return(LocalizedStrings.GetNonEncoded(2047193656)); default: return(LocalizedStrings.GetNonEncoded(-1280331347)); } }
void AddMagicsToContainer(GameObject container) { float zOrder = 2f; float intervalX = -8f; float intervalY = 1.7f; float startX = 9.0f; float startY = -2.55f; float xOffsetName = -0.5f; float xOffsetCost = -4f; Vector3 scale = new Vector3(0.35f, 0.35f, 1); for (int i = 0; i < creature.Data.Magics.Count; i++) { int magicId = creature.Data.Magics[i]; MagicDefinition magic = DefinitionStore.Instance.GetMagicDefinition(magicId); if (magic == null) { continue; } int x = i / 4; int y = i % 4; float baseX = startX + intervalX * x; float baseY = startY + intervalY * y; // Name int val = i; string name = LocalizedStrings.GetMagicName(magicId); AddText(name, container.transform, new Vector3(baseX + xOffsetName, zOrder, baseY), scale, () => { this.OnSelectClicked(val); }); // Cost AddText("-MP " + StringUtils.Digit3(magic.MpCost), container.transform, new Vector3(baseX + xOffsetCost, zOrder, baseY), scale); } }
// Token: 0x060003AE RID: 942 RVA: 0x000212EC File Offset: 0x0001F4EC private void RenderDateTimeFormats() { base.RenderHeaderRow(ThemeFileId.DateBook, -1860736294); this.writer.Write("<tr><td class=\"bd\">"); this.writer.Write("<table class=\"fmt\">"); this.writer.Write("<tr>"); this.writer.Write("<td nowrap>"); this.writer.Write(LocalizedStrings.GetHtmlEncoded(-1176481198)); this.writer.Write("</td>"); this.writer.Write("<td>"); this.RenderDateStyleSelection(); this.writer.Write("</td>"); this.writer.Write("<td class=\"w100\">"); this.RenderCalendarOptions(); this.writer.Write("</td>"); this.writer.Write("</tr>"); this.writer.Write("<tr>"); this.writer.Write("<td nowrap>"); this.writer.Write(LocalizedStrings.GetHtmlEncoded(1486945283)); this.writer.Write("</td>"); this.writer.Write("<td colspan=2 class=\"w100\">"); this.RenderTimeStyleSelection(); this.writer.Write("</td>"); this.writer.Write("</tr>"); this.writer.Write("<tr>"); this.writer.Write("<td nowrap>"); this.writer.Write(LocalizedStrings.GetHtmlEncoded(-1147623709)); this.writer.Write("</td>"); this.writer.Write("<td colspan=2 class=\"w100\">"); this.RenderTimeZoneSelection(); this.writer.Write("</td>"); this.writer.Write("</tr>"); this.writer.Write("</table>"); this.writer.Write("</td></tr>"); if (this.userContext.WorkingHours.IsTimeZoneDifferent && this.userContext.IsFeatureEnabled(Feature.Calendar)) { this.writer.Write("<tr><td id=\"tdTZNt\">"); this.writer.Write(LocalizedStrings.GetHtmlEncoded(566587615)); this.writer.Write("</td></tr>"); } }
public void Rename() { ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "TreeEventHandler.Rename"); OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("destId"); string text = ((string)base.GetParameter("fN")).Trim(); string s = text; if (text.Length == 0) { throw new OwaEventHandlerException("User did not provide name for new folder", LocalizedStrings.GetNonEncoded(-41080803), true); } using (Folder folder = Utilities.GetFolder <Folder>(base.UserContext, owaStoreObjectId, new PropertyDefinition[0])) { if (!Utilities.CanFolderBeRenamed(base.UserContext, folder)) { throw new OwaInvalidRequestException("Folder cannot be renamed."); } folder.DisplayName = text; FolderSaveResult folderSaveResult = folder.Save(); if (folderSaveResult.OperationResult != OperationResult.Succeeded) { if (Utilities.IsFolderNameConflictError(folderSaveResult)) { throw new OwaEventHandlerException("Folder rename did not return OperationResult.Succeeded", LocalizedStrings.GetNonEncoded(1602494619), OwaEventHandlerErrorCode.FolderNameExists, true); } throw new OwaAccessDeniedException(LocalizedStrings.GetNonEncoded(995407892)); } else { if (owaStoreObjectId.IsArchive) { s = string.Format(LocalizedStrings.GetNonEncoded(-83764036), text, Utilities.GetMailboxOwnerDisplayName((MailboxSession)folder.Session)); } this.Writer.Write("<div id=tn>"); Utilities.HtmlEncode(text, this.Writer, true); this.Writer.Write("</div><div id=ntn>"); Utilities.HtmlEncode(s, this.Writer, true); this.Writer.Write("</div>"); } } }
private void RenderDirectReports(IADOrgPerson person, TextWriter writer) { this.reports = person.GetDirectReportsView(new PropertyDefinition[] { ADRecipientSchema.DisplayName, ADObjectSchema.Id, ADRecipientSchema.RecipientType }); if (this.reports != null && this.reports.Length > 0) { writer.Write("<tr><td class=\"lbl lp\">"); writer.Write(LocalizedStrings.GetHtmlEncoded(-156515347)); writer.Write("</td><td>"); writer.Write("<table cellpadding=0 cellspacing=0 class=\"drpts\">"); List <ReadADOrgPerson.ADMember> list = new List <ReadADOrgPerson.ADMember>(); for (int i = 0; i < this.reports.Length; i++) { list.Add(new ReadADOrgPerson.ADMember(this.reports[i][0] as string, this.reports[i][1] as ADObjectId, this.reports[i][2])); } list.Sort(this); foreach (ReadADOrgPerson.ADMember admember in list) { RecipientType recipientType = (RecipientType)admember.Type; int readItemType; if (Utilities.IsADDistributionList(recipientType)) { readItemType = 2; } else { readItemType = 1; } writer.Write("<tr><td class=\"rptdpd\">"); ReadADRecipient.RenderADRecipient(writer, readItemType, admember.Id, admember.DisplayName); writer.Write("</td></tr>"); } writer.Write("</table>"); writer.Write("</td></tr>"); this.renderOrganizationDetails = true; } }
private void RenderEmailAddresses(TextWriter writer) { foreach (EmailAddressIndex emailAddressIndex in ContactUtilities.EmailAddressIndexesToRead) { string value = null; switch (emailAddressIndex) { case EmailAddressIndex.Email1: value = LocalizedStrings.GetHtmlEncoded(1111077458); break; case EmailAddressIndex.Email2: value = LocalizedStrings.GetHtmlEncoded(1405549740); break; case EmailAddressIndex.Email3: value = LocalizedStrings.GetHtmlEncoded(-160534201); break; } Participant participant = this.contact.EmailAddresses[emailAddressIndex]; if (!(participant == null)) { string text = null; string text2 = null; ContactUtilities.GetParticipantEmailAddress(participant, out text, out text2, false); if (!string.IsNullOrEmpty(text)) { writer.Write("<tr><td class=\"lbl lp\">"); writer.Write(value); writer.Write("</td><td class=\"txvl\">"); base.RenderEmail(writer, text2, text, participant.RoutingType, base.IsEmbeddedItem ? null : base.Item.Id.ObjectId, emailAddressIndex); writer.Write("</td></tr>"); this.isEmailRendered = true; } } } if (this.isEmailRendered) { writer.Write("<tr><td class=\"spcHd\" colspan=2></td></tr>"); } }
public void GetAttachmentExtension() { ExTraceGlobals.MailCallTracer.TraceDebug((long)this.GetHashCode(), "ReadVoiceMessageEventHandler.GetAttachmentExtension"); OwaStoreObjectId owaStoreObjectId = (OwaStoreObjectId)base.GetParameter("Id"); Item item = Utilities.GetItem <Item>(base.UserContext, owaStoreObjectId, new PropertyDefinition[0]); Exception ex = null; RightsManagedMessageItem rightsManagedMessageItem = item as RightsManagedMessageItem; if (rightsManagedMessageItem != null && rightsManagedMessageItem.IsRestricted && base.UserContext.IsIrmEnabled) { try { rightsManagedMessageItem.Decode(Utilities.CreateOutboundConversionOptions(base.UserContext), true); } catch (RightsManagementPermanentException ex2) { ex = ex2; } catch (RightsManagementTransientException ex3) { ex = ex3; } } if (ex != null) { throw new OwaEventHandlerException(LocalizedStrings.GetNonEncoded(756278106), LocalizedStrings.GetNonEncoded(-229902107), ex); } Attachment latestVoiceMailAttachment = Utilities.GetLatestVoiceMailAttachment(item, base.UserContext); if (latestVoiceMailAttachment != null) { string text = latestVoiceMailAttachment.FileExtension; if (text == null) { text = string.Empty; } Utilities.HtmlEncode(text, this.Writer); return; } throw new OwaEventHandlerException(LocalizedStrings.GetNonEncoded(756278106), LocalizedStrings.GetNonEncoded(-229902107)); }
protected static string GetSensitivity(IStorePropertyBag storePropertyBag) { if (storePropertyBag == null) { throw new ArgumentNullException("storePropertyBag"); } switch (ItemUtility.GetProperty <Sensitivity>(storePropertyBag, ItemSchema.Sensitivity, Sensitivity.Normal)) { case Sensitivity.Personal: return(LocalizedStrings.GetNonEncoded(-1220985107)); case Sensitivity.Private: return(LocalizedStrings.GetNonEncoded(-171299332)); case Sensitivity.CompanyConfidential: return(LocalizedStrings.GetNonEncoded(-216368585)); default: return(null); } }
// Token: 0x06002A86 RID: 10886 RVA: 0x000EE4C8 File Offset: 0x000EC6C8 private void RenderAddressList() { if (string.IsNullOrEmpty(this.orgPerson.StreetAddress) && string.IsNullOrEmpty(this.orgPerson.City) && string.IsNullOrEmpty(this.orgPerson.StateOrProvince) && string.IsNullOrEmpty(this.orgPerson.PostalCode) && string.IsNullOrEmpty(this.orgPerson.CountryOrRegionDisplayName)) { return; } base.Response.Write(string.Concat(new string[] { "<div class=\"row2sp\"><div class=\"secCol\"><span class=spS>", LocalizedStrings.GetHtmlEncoded(-1159205642), "</span></div><div class=bLn>(", LocalizedStrings.GetHtmlEncoded(1912536019), ")</div></div>" })); IDictionary <AddressFormatTable.AddressPart, AddressComponent> addressInfo = ContactUtilities.GetAddressInfo(this.orgPerson); foreach (KeyValuePair <AddressFormatTable.AddressPart, AddressComponent> keyValuePair in addressInfo) { this.RenderLabelValueRow(keyValuePair.Value.Label, keyValuePair.Value.Value, false); } }
public async Task ExportToExcel(string GridModel) { ExcelExport exp = new ExcelExport(); var data = await GetData(); var users = data.UsersViewModel.ToList(); var DataSource = users; currentData = users; var currentDate = DateTime.Today.ToShortDateString().Replace("/", "-"); GridProperties obj = (GridProperties)Syncfusion.JavaScript.Utils.DeserializeToModel(typeof(GridProperties), GridModel); //Clear if there are any filter columns //syncfusion bug in exporting while in filter mode obj.FilterSettings.FilteredColumns.Clear(); obj.ServerExcelQueryCellInfo = QueryCellInfo; exp.Export(obj, DataSource, LocalizedStrings.GetString("User") + " " + currentDate + ".xlsx", ExcelVersion.Excel2010, false, false, "flat-saffron"); }
private void ConfirmClicked(object sender, KeyRoutedEventArgs e) { if (e.Key != VirtualKey.Accept && e.Key != VirtualKey.Enter) { return; } e.Handled = true; if (Passcode.Password.Equals(Options.Passcode)) { PlatformAdapter.SendToCustomLogger( string.Format("PincodeDialog.ConfirmClicked - Pincode matched, going to {0}", SDKManager.RootApplicationPage), LoggingLevel.Verbose); AuthStorageHelper.StorePincode(Options.Policy, Options.Passcode); PincodeManager.Unlock(); Frame.Navigate(SDKManager.RootApplicationPage); } else { DisplayErrorFlyout(LocalizedStrings.GetString("passcode_must_match")); } }
internal void BuildInfobar(Infobar infobar) { if (this.IsPhishingItemWithEnabledLinks()) { string s = "<a id=\"aIbBlk\" href=\"#\" " + string.Format(CultureInfo.InvariantCulture, ">{0}</a> {1} ", new object[] { LocalizedStrings.GetHtmlEncoded(-672110188), LocalizedStrings.GetHtmlEncoded(-1020475744) }); string s2 = string.Format(CultureInfo.InvariantCulture, "<a href=\"#\" " + Utilities.GetScriptHandler("onclick", "opnHlp(\"" + Utilities.JavascriptEncode(Utilities.BuildEhcHref(HelpIdsLight.EmailSafetyLight.ToString())) + "\");") + ">{0}</a>", new object[] { LocalizedStrings.GetHtmlEncoded(338562664) }); infobar.AddMessage(SanitizedHtmlString.Format("{0}{1}{2}", new object[] { LocalizedStrings.GetNonEncoded(1581910613), SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s), SanitizedHtmlString.GetSanitizedStringWithoutEncoding(s2) }), InfobarMessageType.Phishing); } if (this.isDelegated) { infobar.AddMessage(SanitizedHtmlString.Format(LocalizedStrings.GetHtmlEncoded(-1205864060), new object[] { MeetingUtilities.GetReceivedOnBehalfOfDisplayName(this.meetingRequest) }), InfobarMessageType.Informational); } if (this.meetingRequest.MeetingRequestType == MeetingMessageType.PrincipalWantsCopy) { infobar.AddMessage(SanitizedHtmlString.FromStringId(-332743944), InfobarMessageType.Informational); } if (!this.IsDraft && this.meetingRequest.MeetingRequestType != MeetingMessageType.Outdated && this.CalendarItemBase != null) { CalendarUtilities.AddCalendarInfobarMessages(infobar, this.CalendarItemBase, this.meetingRequest, this.UserContext); } if (this.infobarResponseString != null) { infobar.AddMessage(this.infobarResponseString.Value, InfobarMessageType.Informational); } }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); BusyType busyType = BusyType.Tentative; if (base.Item != null) { object obj = base.Item.TryGetProperty(CalendarItemBaseSchema.FreeBusyStatus); if (obj is int) { busyType = (BusyType)obj; } } switch (busyType) { case BusyType.Free: this.busyFreeString = LocalizedStrings.GetHtmlEncoded(-971703552); goto IL_91; case BusyType.Busy: this.busyFreeString = LocalizedStrings.GetHtmlEncoded(2052801377); goto IL_91; case BusyType.OOF: this.busyFreeString = LocalizedStrings.GetHtmlEncoded(2047193656); goto IL_91; } this.busyFreeString = LocalizedStrings.GetHtmlEncoded(1797669216); IL_91: if (base.Item.Importance == Importance.High) { this.importanceString = LocalizedStrings.GetHtmlEncoded(-77932258); } else if (base.Item.Importance == Importance.Low) { this.importanceString = LocalizedStrings.GetHtmlEncoded(1502599728); } this.categoriesString = ItemUtility.GetCategoriesAsString(base.Item); this.attachmentWellRenderObjects = AttachmentWell.GetAttachmentInformation(base.Item, base.AttachmentLinks, base.UserContext.IsPublicLogon, base.IsEmbeddedItem); }
// Token: 0x06003113 RID: 12563 RVA: 0x00121434 File Offset: 0x0011F634 public static SanitizedHtmlString GetDueByString(ExDateTime?dueDate) { SanitizedHtmlString result = null; if (dueDate != null) { int days = (dueDate.Value.Date - DateTimeUtilities.GetLocalTime().Date).Days; if (days == 0) { result = SanitizedHtmlString.GetNonEncoded(2136131687); } else if (days == 1) { result = SanitizedHtmlString.GetNonEncoded(-1763467067); } else if (days > 1 && days < 15) { result = SanitizedHtmlString.Format(LocalizedStrings.GetNonEncoded(397195003), new object[] { days }); } else if (days == -1) { result = SanitizedHtmlString.GetNonEncoded(-2069325904); } else if (days < -1 && days > -15) { result = SanitizedHtmlString.Format(LocalizedStrings.GetNonEncoded(2142112873), new object[] { days * -1 }); } else if (days < -14) { result = SanitizedHtmlString.GetNonEncoded(2027934943); } } return(result); }
// Token: 0x06001FDA RID: 8154 RVA: 0x000B8470 File Offset: 0x000B6670 internal static string TimeSpanToString(EnhancedTimeSpan timeSpan) { if (timeSpan == EnhancedTimeSpan.Zero) { return(LocalizedStrings.GetNonEncoded(1491852291)); } int num = (int)(timeSpan.TotalDays / 365.0); if (num > 0) { return(string.Format(LocalizedStrings.GetNonEncoded((num > 1) ? 376120709 : 1543927794), num)); } int num2 = (int)(timeSpan.TotalDays % 365.0 / 30.0); if (num2 > 0) { return(string.Format(LocalizedStrings.GetNonEncoded((num2 > 1) ? 1489284924 : -228948015), num2)); } int num3 = (int)timeSpan.TotalDays; return(string.Format(LocalizedStrings.GetNonEncoded((num3 > 1) ? -620305904 : -912690831), num3)); }
// Token: 0x060003B1 RID: 945 RVA: 0x0002162C File Offset: 0x0001F82C protected void RenderTimeStyleSelection() { string[] allDateTimePatterns = this.DateTimeFormat.GetAllDateTimePatterns('t'); ExDateTime exDateTime = new ExDateTime(this.userContext.TimeZone, 2008, 1, 21, 1, 1, 0); ExDateTime exDateTime2 = new ExDateTime(this.userContext.TimeZone, 2008, 1, 21, 23, 59, 0); this.writer.Write("<select name=\"{0}\"{1}{2}>", "selTmStl", " class=\"rs padLR\"", " onchange=\"return onChgSel(this);\""); for (int i = 0; i < allDateTimePatterns.Length; i++) { this.writer.Write("<option value=\""); Utilities.HtmlEncode(allDateTimePatterns[i], this.writer); this.writer.Write('"'); if (allDateTimePatterns[i] == this.userContext.UserOptions.TimeFormat) { this.writer.Write(" selected"); } this.writer.Write('>'); this.writer.Write(LocalizedStrings.GetHtmlEncoded(466973109), Utilities.HtmlEncode(exDateTime.ToString(allDateTimePatterns[i], this.DateTimeFormat)), Utilities.HtmlEncode(exDateTime2.ToString(allDateTimePatterns[i], this.DateTimeFormat))); this.writer.Write("</option>"); } this.writer.Write("</select>"); }
public static void LocalizeDropdown(ComboBox ddl) { var eventHandlers = ddl.RemoveEventHandlers(nameof(ddl.SelectionChanged)); var items = ddl.Items.Cast <DdlItem>().ToArray(); var selectedItem = ddl.SelectedItem(); ddl.ItemsSource = null; var itemTexts = LocalizedStrings.Single(ls => ls.Key.AfterFirst("_") == "ComboBox_Items_" + ddl.Name).Value.Split(",", false, StringSplitOptions.None); for (var i = 0; i < items.Length; i++) { if (!String.IsNullOrEmpty(itemTexts[i])) { items[i].Text = itemTexts[i]; } } ddl.ItemsSource = items; ddl.SelectByItem(selectedItem); ddl.AddEventHandlers(nameof(ddl.SelectionChanged), eventHandlers); }
internal static GlobalAddressListInfo GetGlobalAddressListInfo(UserContext userContext) { if (userContext == null) { throw new ArgumentNullException("userContext"); } ADObjectId queryBaseDN = userContext.MailboxIdentity.GetOWAMiniRecipient().QueryBaseDN; GlobalAddressListInfo globalAddressListInfo; if (queryBaseDN == null) { if (userContext.GlobalAddressList != null) { globalAddressListInfo = new GlobalAddressListInfo(userContext.GlobalAddressList, GlobalAddressListInfo.GalOrigin.DefaultGlobalAddressList); } else { globalAddressListInfo = new GlobalAddressListInfo(new AddressBookBase(), GlobalAddressListInfo.GalOrigin.EmptyGlobalAddressList); globalAddressListInfo.DisplayName = LocalizedStrings.GetNonEncoded(1164140307); globalAddressListInfo.Id = null; } } else { IConfigurationSession configurationSession = Utilities.CreateADSystemConfigurationSession(true, ConsistencyMode.IgnoreInvalid, userContext); AddressBookBase addressBookBase = configurationSession.Read <AddressBookBase>(new ADObjectId(null, queryBaseDN.ObjectGuid)); if (addressBookBase != null) { globalAddressListInfo = new GlobalAddressListInfo(addressBookBase, GlobalAddressListInfo.GalOrigin.QueryBaseDNAddressList); } else { globalAddressListInfo = new GlobalAddressListInfo(new AddressBookBase(), GlobalAddressListInfo.GalOrigin.QueryBaseDNSubTree); globalAddressListInfo.DisplayName = LocalizedStrings.GetNonEncoded(1164140307); globalAddressListInfo.Id = queryBaseDN; } } return(globalAddressListInfo); }
private void RenderPageControlImage(TextWriter writer, ThemeFileId image, int pageNumber, Strings.IDs title, string controlId) { writer.Write("<td class=\"pImg\">"); if (pageNumber > 0) { writer.Write("<a href=\"#\" id=\""); writer.Write(controlId); writer.Write("\" onClick=\"return onClkPg('{0}');\">", pageNumber); } writer.Write("<img border=\"0\" src=\""); this.userContext.RenderThemeFileUrl(writer, image); writer.Write("\" title=\""); writer.Write(LocalizedStrings.GetHtmlEncoded(title)); writer.Write("\" "); Utilities.RenderImageAltAttribute(writer, this.UserContext, image); writer.Write(">"); if (pageNumber > 0) { writer.Write("</a>"); } writer.Write("</td>"); }
// Token: 0x06002A8B RID: 10891 RVA: 0x000EE80C File Offset: 0x000ECA0C private static void RenderDirectReportsList(TextWriter writer, object[][] peopleList) { if (peopleList.Length <= 0) { return; } int num = peopleList.Length; ReadADOrgPerson.RenderPeopleLabelHeading(writer, LocalizedStrings.GetHtmlEncoded(849014173)); List <ReadADOrgPerson.ADMember> list = new List <ReadADOrgPerson.ADMember>(); for (int i = 0; i < num; i++) { ReadADOrgPerson.ADMember item = new ReadADOrgPerson.ADMember((ADObjectId)peopleList[i][0], (string)peopleList[i][1], (string)peopleList[i][2]); list.Add(item); } list.Sort(); foreach (ReadADOrgPerson.ADMember admember in list) { ReadADOrgPerson.RenderPeopleRow(writer, admember.Id, admember.DisplayName, admember.Title); } }
// Token: 0x06000157 RID: 343 RVA: 0x0000B514 File Offset: 0x00009714 private void RenderSubject(TextWriter writer, string subject, int maxCharacters, ExDateTime startDateTime, ExDateTime endDateTime, string location, bool isEvent, bool isMeeting, OwaStoreObjectId itemId) { if (Utilities.WhiteSpaceOnlyOrNullEmpty(subject)) { if (isMeeting) { subject = LocalizedStrings.GetNonEncoded(-1500721828); } else { subject = LocalizedStrings.GetNonEncoded(-1178892512); } } StringBuilder stringBuilder = new StringBuilder(); if (isEvent) { stringBuilder.Append(startDateTime.ToString(this.UserContext.UserOptions.DateFormat)); stringBuilder.Append(" "); } stringBuilder.Append(startDateTime.ToString(this.UserContext.UserOptions.TimeFormat)); stringBuilder.Append(" - "); if (isEvent) { stringBuilder.Append(endDateTime.ToString(this.UserContext.UserOptions.DateFormat)); stringBuilder.Append(" "); } stringBuilder.Append(endDateTime.ToString(this.UserContext.UserOptions.TimeFormat)); stringBuilder.Append(" , "); stringBuilder.Append(Utilities.HtmlEncode(subject)); if (!string.IsNullOrEmpty(location)) { stringBuilder.Append("; "); stringBuilder.Append(Utilities.HtmlEncode(location)); } writer.Write("<h1 class=\"bld\"><a href=\"#\" onClick=\"return onClkM('{0}')\" title=\"{1}\">", HttpUtility.UrlEncode(itemId.StoreObjectId.ToBase64String()), stringBuilder.ToString()); Utilities.CropAndRenderText(writer, subject, maxCharacters); writer.Write("</a></h1>"); }
// Token: 0x0600313C RID: 12604 RVA: 0x00122A8C File Offset: 0x00120C8C private static void ProcessOutofOfficeStatus(PersonalAutoAttendant pAA, ref bool isFirst, StringBuilder builder) { if (!isFirst) { builder.Append("\r\n"); builder.Append(LocalizedStrings.GetHtmlEncoded(-56156833)); } else { isFirst = false; } builder.Append(LocalizedStrings.GetHtmlEncoded(-2042562863)); if (pAA.OutOfOffice == OutOfOfficeStatusEnum.Oof) { builder.Append(LocalizedStrings.GetHtmlEncoded(-856091954)); return; } if (pAA.OutOfOffice == OutOfOfficeStatusEnum.NotOof) { builder.Append(LocalizedStrings.GetHtmlEncoded(727321927)); } }
// Token: 0x0600313D RID: 12605 RVA: 0x00122B08 File Offset: 0x00120D08 private static string GetContactNameFromLegacyDN(string legacyDN, UserContext userContext) { if (legacyDN == null) { throw new ArgumentNullException("legacyDN"); } if (userContext == null) { throw new ArgumentNullException("userContext"); } AdRecipientBatchQuery adRecipientBatchQuery = new AdRecipientBatchQuery(userContext, new string[] { legacyDN }); ADRecipient adRecipient = adRecipientBatchQuery.GetAdRecipient(legacyDN); if (adRecipient == null || string.IsNullOrEmpty(adRecipient.DisplayName)) { return(LocalizedStrings.GetNonEncoded(-1626952556)); } return(adRecipient.DisplayName); }
private void exportStringsToFileToolStripMenuItem_Click(object sender, EventArgs e) { // Find all lstring that are internalized and rewrite to var plugin = this.GetPluginFromNode(this.PluginTree.SelectedRecord); if (plugin == null) { MessageBox.Show(Resources.NoPluginSelected, Resources.ErrorText); return; } var lstrings = new LocalizedStrings { Strings = plugin.Strings.Select(x => new LocalizedString {ID = x.Key, Type = LocalizedStringFormat.Base, Value = x.Value}).Union( plugin.DLStrings.Select(x => new LocalizedString {ID = x.Key, Type = LocalizedStringFormat.DL, Value = x.Value})).Union( plugin.ILStrings.Select(x => new LocalizedString {ID = x.Key, Type = LocalizedStringFormat.IL, Value = x.Value})).ToArray() }; if (lstrings.Strings.Length == 0) { MessageBox.Show("No strings available to export.", Resources.ErrorText); return; } using (var dlg = new SaveFileDialog()) { if (string.IsNullOrEmpty(Settings.Default.DefaultSaveFolder) || !Directory.Exists(Settings.Default.DefaultSaveFolder)) { dlg.InitialDirectory = Path.Combine(Options.Value.GameDataDirectory, "Strings"); } else { dlg.InitialDirectory = Path.Combine(Settings.Default.DefaultSaveFolder, "Strings"); } dlg.DefaultExt = ".xml"; dlg.Filter = "String Table|*.xml"; dlg.CheckPathExists = true; dlg.AddExtension = true; dlg.OverwritePrompt = true; dlg.FileName = string.Format("{0}_{1}.xml", Path.GetFileNameWithoutExtension(plugin.Name), TESVSnip.Domain.Properties.Settings.Default.LocalizationName); if (dlg.ShowDialog(this) == DialogResult.OK) { var xs = new XmlSerializer(typeof (LocalizedStrings)); using (var tw = new XmlTextWriter(dlg.FileName, System.Text.Encoding.Unicode)) { tw.Formatting = Formatting.Indented; xs.Serialize(tw, lstrings); } } } }