private void CreateContentPanel() { this.pickerTextBox.CssClass = "pickerTextBox"; this.pickerTextBox.Style.Add(HtmlTextWriterStyle.MarginTop, "0px"); TableCell tableCell = new TableCell(); tableCell.CssClass = "pickerTextBoxTd"; tableCell.Controls.Add(this.pickerTextBox); EncodingLabel child = Util.CreateHiddenForSRLabel(string.Empty, this.pickerTextBox.ID); tableCell.Controls.Add(child); TableRow tableRow = new TableRow(); tableRow.Cells.Add(tableCell); Table table = new Table(); table.CellPadding = 0; table.CellSpacing = 0; table.CssClass = "pickerTextBoxContainer"; table.Rows.Add(tableRow); this.contentPanel = new Panel(); this.contentPanel.ID = "contentPanel"; this.contentPanel.CssClass = "contentPanel"; if (!string.IsNullOrWhiteSpace(this.Caption)) { Label label = new Label(); label.Text = this.Caption; label.CssClass = "detailsLabel"; this.contentPanel.Controls.Add(label); } this.contentPanel.Controls.Add(table); }
protected override void CreateChildControls() { this.summaryTable = new Table(); this.summaryTable.ID = "summaryTable"; TableRow tableRow = new TableRow(); EncodingLabel encodingLabel = new EncodingLabel(); encodingLabel.Text = OwaOptionStrings.SummaryToDate; this.recipientsStatusLinksCell = new TableCell(); this.recipientsStatusLinksCell.Controls.Add(encodingLabel); this.recipientsStatusLinksCell.ID = "recipientStatusLinks"; tableRow.Cells.Add(this.recipientsStatusLinksCell); this.largeRecipientsTextRow = new TableRow(); this.largeRecipientsTextRow.ID = "largeRecipTxtRow"; TableCell tableCell = new TableCell(); EncodingLabel encodingLabel2 = new EncodingLabel(); encodingLabel2.Text = OwaOptionStrings.LargeRecipientList(30); tableCell.Controls.Add(encodingLabel2); this.largeRecipientsTextRow.Cells.Add(tableCell); this.summaryTable.Rows.Add(tableRow); this.summaryTable.Rows.Add(this.largeRecipientsTextRow); this.Controls.Add(this.summaryTable); this.AddNewMailMessageWebServiceMthod(); base.CreateChildControls(); }
public AjaxUploader() : base(HtmlTextWriterTag.Div) { this.HasDefaultValue = true; HtmlGenericControl htmlGenericControl = new HtmlGenericControl(HtmlTextWriterTag.Div.ToString()); htmlGenericControl.Attributes["class"] = "AjaxUploaderNameDiv"; this.fileNameLabel = new EncodingLabel(); this.fileNameLabel.ID = "fileNameLbl"; htmlGenericControl.Controls.Add(this.fileNameLabel); this.progressLabel = new EncodingLabel(); this.progressLabel.ID = "progressLbl"; this.progressLabel.Text = Strings.Uploading; htmlGenericControl.Controls.Add(this.progressLabel); this.Controls.Add(htmlGenericControl); this.separator = new HtmlGenericControl(HtmlTextWriterTag.Div.ToString()); this.separator.ID = "separator"; this.separator.Attributes["class"] = "AjaxUploaderSeparator"; this.Controls.Add(this.separator); htmlGenericControl = new HtmlGenericControl(HtmlTextWriterTag.Div.ToString()); htmlGenericControl.Attributes["class"] = "AjaxUploaderNameDiv"; this.cancelButton = new HyperLink(); this.cancelButton.ID = "cancelBtn"; this.cancelButton.NavigateUrl = "#"; this.cancelButton.Text = Strings.CancelUpload; htmlGenericControl.Controls.Add(this.cancelButton); this.deleteButton = new HyperLink(); this.deleteButton.ID = "deleteBtn"; this.deleteButton.NavigateUrl = "#"; CommandSprite commandSprite = new CommandSprite(); commandSprite.ImageId = CommandSprite.SpriteId.ToolBarDeleteSmall; commandSprite.AlternateText = Strings.DeleteCommandText; this.deleteButton.Controls.Add(commandSprite); htmlGenericControl.Controls.Add(this.deleteButton); EncodingLabel child = Util.CreateHiddenForSRLabel(string.Empty, this.cancelButton.ID); EncodingLabel child2 = Util.CreateHiddenForSRLabel(string.Empty, this.deleteButton.ID); htmlGenericControl.Controls.Add(child); htmlGenericControl.Controls.Add(child2); this.Controls.Add(htmlGenericControl); this.Controls.Add(new LiteralControl("<br />")); htmlGenericControl = new HtmlGenericControl(HtmlTextWriterTag.Div.ToString()); htmlGenericControl.Attributes["class"] = "AjaxUploaderButtonDiv"; this.editFileButton = new IconButton(); this.editFileButton.CssClass = "ajaxUploaderEditButton"; this.editFileButton.ID = "editFileBtn"; if (string.IsNullOrEmpty(this.editFileButton.Text)) { this.editFileButton.Text = Strings.DefaultEditButtonText; } htmlGenericControl.Controls.Add(this.editFileButton); this.uploaderBase = new UploaderBase(); this.uploaderBase.ID = "uploader"; htmlGenericControl.Controls.Add(this.uploaderBase); this.Controls.Add(htmlGenericControl); }
private void RenderEventDetails(PowerShellResults <RecipientTrackingEventRow> results) { RecipientTrackingEventRow recipientTrackingEventRow = results.Output[0]; TrackingEventType trackingEventType = TrackingEventType.None; foreach (TrackingEventRow trackingEventRow in recipientTrackingEventRow.Events) { if (trackingEventType != TrackingEventType.None) { if (trackingEventType != trackingEventRow.TrackingEvent) { HtmlGenericControl child = new HtmlGenericControl("p"); this.deliveryReportDetailsPane.Controls.Add(child); } else { this.AddHtmlBreaks(2); } } if (trackingEventType != trackingEventRow.TrackingEvent) { EncodingLabel encodingLabel = new EncodingLabel(); encodingLabel.Text = trackingEventRow.EventTypeDescription; this.deliveryReportDetailsPane.Controls.Add(encodingLabel); this.AddHtmlBreaks(1); } if (!string.IsNullOrEmpty(trackingEventRow.EventDateTime) || !string.IsNullOrEmpty(trackingEventRow.Server)) { StringBuilder stringBuilder = new StringBuilder(); EncodingLabel encodingLabel2 = new EncodingLabel(); if (!string.IsNullOrEmpty(trackingEventRow.EventDateTime)) { stringBuilder.Append(trackingEventRow.EventDateTime); } if (!string.IsNullOrEmpty(trackingEventRow.Server)) { if (stringBuilder.Length > 0) { stringBuilder.AppendFormat(" {0}", trackingEventRow.Server); } else { stringBuilder.Append(trackingEventRow.Server); } } encodingLabel2.Text = stringBuilder.ToString(); this.deliveryReportDetailsPane.Controls.Add(encodingLabel2); this.AddHtmlBreaks(1); } EncodingLabel encodingLabel3 = new EncodingLabel(); encodingLabel3.Text = trackingEventRow.EventDescription; this.deliveryReportDetailsPane.Controls.Add(encodingLabel3); if (trackingEventRow.TrackingEvent == TrackingEventType.Fail) { encodingLabel3.CssClass = "ErrorText"; if (trackingEventRow.EventData != null && trackingEventRow.EventData.Length > 0) { this.AddHtmlBreaks(1); HtmlGenericControl htmlGenericControl = new HtmlGenericControl("p"); htmlGenericControl.Attributes.Add("class", "failedDeliveryDetailText"); EncodingLabel encodingLabel4 = new EncodingLabel(); encodingLabel4.Text = trackingEventRow.EventData.StringArrayJoin("\n"); htmlGenericControl.Controls.Add(encodingLabel4); this.deliveryReportDetailsPane.Controls.Add(htmlGenericControl); } } if (trackingEventRow.TrackingEvent == TrackingEventType.Expand && trackingEventRow.EventData.Length > 0) { this.AddEditGroupLink(trackingEventRow.EventData[0]); } trackingEventType = trackingEventRow.TrackingEvent; } }