protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); if (this.ValueProperty != "Identity") { descriptor.AddProperty("ValueProperty", this.ValueProperty); } descriptor.AddUrlProperty("EditCommandUrl", this.EditCommandUrl, this); descriptor.AddUrlProperty("PickerFormUrl", this.PickerFormUrl, this); descriptor.AddProperty("SplitAddRemove", this.SplitAddRemove, true); descriptor.AddProperty("UseModalPopup", this.AlwaysOpenModalDialog || !string.IsNullOrEmpty(this.EditCommandUrl)); descriptor.AddProperty("UseModalessForAdd", this.UseModalessForAdd); descriptor.AddUrlProperty("WholeListEditorUrl", this.WholeListEditorUrl, this); if (this.DialogHeight != 530) { descriptor.AddProperty("DialogHeight", this.DialogHeight); } if (this.DialogWidth != 450) { descriptor.AddProperty("DialogWidth", this.DialogWidth); } if (this.AddCommandDialogHeight != 0) { descriptor.AddProperty("AddCommandDialogHeight", this.AddCommandDialogHeight); } if (this.AddCommandDialogWidth != 0) { descriptor.AddProperty("AddCommandDialogWidth", this.AddCommandDialogWidth); } if (this.EditCommandDialogHeight != 0) { descriptor.AddProperty("EditCommandDialogHeight", this.EditCommandDialogHeight); } if (this.EditCommandDialogWidth != 0) { descriptor.AddProperty("EditCommandDialogWidth", this.EditCommandDialogWidth); } descriptor.AddComponentProperty("ListView", this.ListViewID, this); descriptor.AddComponentProperty("DataSource", this.ListSourceID, this); if (this.ReadOnly) { descriptor.AddProperty("ReadOnly", true); } descriptor.AddProperty("IsUsingOwaPeoplePicker", OwaPickerUtil.CanUseOwaPicker && this.IsUsingOwaPeoplePicker); descriptor.AddProperty("PickerCallerType", this.PickerCallerType); descriptor.AddProperty("IgnoreCaseWhenComparison", this.IgnoreCaseWhenComparison); descriptor.AddProperty("KeepOrderChange", this.KeepOrderChange); }
private void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { descriptor.AddElementProperty("SearchButton", this.searchButton.ClientID, true); descriptor.AddElementProperty("ClearButton", this.clearButton.ClientID, true); descriptor.AddComponentProperty("FromEditor", this.senderMatches.ClientID, true); descriptor.AddComponentProperty("ToEditor", this.recipientMatches.ClientID, true); descriptor.AddElementProperty("MessageIDTextBox", this.messageIDTextBox.ClientID, true); descriptor.AddComponentProperty("ListView", this.listViewSearchResults.ClientID, true); descriptor.AddComponentProperty("ListViewDataSource", this.messageTraceDataSource.ClientID, true); descriptor.AddComponentProperty("ListViewRefreshMethod", this.messageTraceDataSource.RefreshWebServiceMethod.ClientID, true); descriptor.AddElementProperty("DdMessageTimeFrame", this.ddMessageTimeframe.ClientID, true); descriptor.AddElementProperty("DdDeliveryStatus", this.ddDeliveryStatus.ClientID, true); descriptor.AddElementProperty("CustomLink", this.customLink.ClientID, true); ExDateTime dateTimeValue = ExDateTime.UtcNow.ToUserExDateTime(); dateTimeValue = dateTimeValue.AddMinutes((double)((60 - dateTimeValue.Minute) % 30)); descriptor.AddProperty("StartDate", dateTimeValue.AddHours(-48.0).ToUserDateTimeGeneralFormatString(), true); descriptor.AddProperty("EndDate", dateTimeValue.ToUserDateTimeGeneralFormatString(), true); ExTimeZone exTimeZone; if (RbacPrincipal.Current.UserTimeZone != null) { exTimeZone = RbacPrincipal.Current.UserTimeZone; } else if (!ExTimeZoneEnumerator.Instance.TryGetTimeZoneByName("UTC", out exTimeZone)) { exTimeZone = ExTimeZone.UtcTimeZone; } descriptor.AddProperty("TimeZone", exTimeZone.Id, true); descriptor.AddUrlProperty("PickerFormUrl", "~/Pickers/CustomDateRangePicker.aspx", this); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); descriptor.AddUrlProperty("NavigationUrl", this.NavigationUrl, this); descriptor.AddComponentProperty("OwnerControl", this.OwnerControlID, this); descriptor.AddProperty("Width", this.Width, 510); descriptor.AddProperty("Height", this.Height, 564); }
protected override void BuildScriptDescriptor(ScriptComponentDescriptor descriptor) { base.BuildScriptDescriptor(descriptor); string text = RbacPrincipal.Current.TimeFormat; string[] array = text.Split(new char[] { '\'' }); StringBuilder stringBuilder = new StringBuilder(); for (int i = 0; i < array.Length; i += 2) { stringBuilder.Append(array[i]); } text = stringBuilder.ToString(); string text2 = "%h"; if (-1 != text.IndexOf("HH")) { text2 = "HH"; } else if (-1 != text.IndexOf("hh")) { text2 = "hh"; } else if (-1 != text.IndexOf("H")) { text2 = "%H"; } else if (-1 != text.IndexOf("h")) { text2 = "%h"; } bool flag = "HH" == text2 || "%H" == text2; string[] array2 = new string[24]; DateTime dateTime = new DateTime(2000, 1, 1, 0, 0, 0); CultureInfo currentCulture = CultureInfo.CurrentCulture; for (int j = 0; j < 24; j++) { array2[j] = HttpUtility.HtmlEncode(dateTime.ToString(text2, currentCulture)); dateTime = dateTime.AddHours(1.0); } string[] array3 = new string[4]; int k = 0; int num = 0; while (k < 4) { array3[k] = HttpUtility.HtmlEncode(num.ToString(currentCulture)); num += 15; k++; } int num2 = 97; string[] array4 = new string[num2]; dateTime = new DateTime(2000, 1, 1, 0, 0, 0); for (int l = 0; l < num2; l++) { array4[l] = HttpUtility.HtmlEncode(dateTime.ToString("t", currentCulture)); dateTime = dateTime.AddMinutes(15.0); } DateTimeFormatInfo dateTimeFormat = currentCulture.DateTimeFormat; int[] array5 = new int[7]; for (int m = 0; m < 7; m++) { array5[m] = (int)((m + dateTimeFormat.FirstDayOfWeek) % (DayOfWeek)7); } descriptor.AddElementProperty("RootContainer", this.rootContainer.ClientID); descriptor.AddScriptProperty("LegendForTrueValueText", this.LegendForTrueValue.ToJsonString(null)); descriptor.AddScriptProperty("LegendForFalseValueText", this.LegendForFalseValue.ToJsonString(null)); descriptor.AddScriptProperty("IsReadOnly", this.IsReadonly.ToJsonString(null)); descriptor.AddScriptProperty("Is24HourUserLocale", flag.ToJsonString(null)); descriptor.AddScriptProperty("DayMapping", array5.ToJsonString(null)); descriptor.AddScriptProperty("HourStrings", array2.ToJsonString(null)); descriptor.AddScriptProperty("PartHourStrings", array3.ToJsonString(null)); descriptor.AddScriptProperty("TimeSlotStrings", array4.ToJsonString(null)); descriptor.AddScriptProperty("DayStrings", currentCulture.DateTimeFormat.DayNames.ToJsonString(null)); descriptor.AddScriptProperty("ShortestDayStrings", currentCulture.DateTimeFormat.ShortestDayNames.ToJsonString(null)); if (!string.IsNullOrEmpty(this.EditCommandUrl)) { descriptor.AddElementProperty("EditButton", this.btnEditSchedule.ClientID); descriptor.AddUrlProperty("EditCommandUrl", this.EditCommandUrl, this); } }