protected override void CreateControlHierarchy() { base.CreateControlHierarchy(); CellHeaderContent.ID = RoundPanel.GetRoundPanelHeaderID(); if (RoundPanel.HeaderTemplate == null) { HeaderControl.Clear(); HeaderControl.Add( HeaderTable = RenderUtils.CreateTable().Add( HeaderContentRow = RenderUtils.CreateTableRow() ) ); if (RoundPanel.HeaderImage.IsEmpty == false) { CreateHeaderImageBlock(); } CreateHeaderTextBlock(); CreateHeaderECButton(); CreateECStateControl(); } }
protected virtual void PrepareHeaderImage() { if (HeaderImage == null) { return; } HeaderImageCell.Width = Unit.Pixel(1); HeaderImage.CssClass = RoundPanel.GetHeaderImageCssClassName(); RoundPanel.HeaderImage.AssignToControl(HeaderImage, DesignMode); if (IsRightToLeft) { RenderUtils.SetHorizontalMargins(HeaderImage, RoundPanel.GetImageSpacing(), Unit.Empty); RenderUtils.AlignBlockLevelElement(HeaderImage, HorizontalAlign.Right); } else { RenderUtils.SetHorizontalMargins(HeaderImage, Unit.Empty, RoundPanel.GetImageSpacing()); RenderUtils.AlignBlockLevelElement(HeaderImage, HorizontalAlign.Left); } HeaderImage.AlternateText = RoundPanel.ToolTip; RenderUtils.AppendDefaultDXClassName(HeaderImage, RoundPanel.GetCssClassNamePrefix()); }
protected virtual void CreateHeaderECButton() { HeaderContentRow.Add( HeaderECButtonCell = RenderUtils.CreateTableCell().Add( HeaderECButton = new ASPxButton() ) ); HeaderECButton.ID = RoundPanel.GetHeaderECButtonID(); }
protected virtual void CreateECStateControl() { HeaderContentRow.Add( RenderUtils.CreateTableCell().SetStyle("display", "none").Add( CStateElement = RenderUtils.CreateWebControl(HtmlTextWriterTag.Input) ) ); CStateElement.ID = RoundPanel.GetCStateControlID(); }
protected virtual void CreateHeaderTextBlock() { HeaderContentRow.Add( HeaderTextCell = RenderUtils.CreateTableCell().Add( HeaderText = RenderUtils.CreateWebControl(HtmlTextWriterTag.Span) ) ); HeaderText.ID = RoundPanel.GetHeaderTextContainerID(); }
private void CreateCancelSearchButton() { CBContainerRow.Add( CBCancelSearchButtonCell = RenderUtils.CreateTableCell().Add( CancelSearchButton = new ASPxButton() ) ); CancelSearchButton.ID = RoundPanel.GetCancelSearchButtonID(); }
private void CreatePerformSearchButton() { CBContainerRow.Add( CBPerformSearchButtonCell = RenderUtils.CreateTableCell().Add( PerformSearchButton = new ASPxButton() ) ); PerformSearchButton.ID = RoundPanel.GetPerformSearchButtonID(); }
private void PrepareCBContainerTable() { if (CBContainerTable == null) { return; } CBContainerTable.CssClass = RoundPanel.GetCBContainerTableClassName(); CBContainerTable.Width = Unit.Percentage(100); }
private void PrepareCancelSearchButton() { if (CancelSearchButton == null) { return; } CBCancelSearchButtonCell.Width = Unit.Pixel(1); CancelSearchButton.EnableClientSideAPI = true; CancelSearchButton.AutoPostBack = false; CancelSearchButton.UseSubmitBehavior = false; CancelSearchButton.Wrap = DefaultBoolean.False; CancelSearchButton.Text = RoundPanel.HtmlEncode(RoundPanel.CancelSearchText); CancelSearchButton.Width = Unit.Percentage(100); }
protected virtual void PrepareHeaderText() { if (HeaderText == null) { return; } HeaderText.CssClass = RoundPanel.GetHeaderTextCssClassName(); RoundPanel.GetHeaderStyle().AssignToControl(HeaderText, AttributesRange.Font); HeaderText.Add( RenderUtils.CreateLiteralControl( RoundPanel.HtmlEncode(RoundPanel.HeaderText) ) ); }
public Panel CreateRightAudioBubble(string text, string userName) { Panel BodyPanel = new Panel() { Size = new Size(839, 130),//Original 729, 168 //Margin = new Padding(70, 0, 0, 0), AutoSizeMode = AutoSizeMode.GrowAndShrink, BackColor = Theme.GetBackColor() }; RoundPanel AudioPanel = new RoundPanel() { Name = AudioFile, Size = new Size(253, 81), Location = new Point(560, 15), Anchor = AnchorStyles.Right, BackColor = Color.PaleGreen }; AudioPanel.Region = Region.FromHrgn(GDI.CreateRoundRectRgn(0, 0, AudioPanel.Width, AudioPanel.Height, 20, 20)); Label Info = new Label() { BackColor = Color.Transparent, Location = new Point(611, 99),//450.140 ForeColor = Theme.GetForeColor(), Anchor = AnchorStyles.Right, Text = DateTime.Now.ToString("HH:mm") }; Label TimeInfo = new Label() { BackColor = Color.Transparent, Location = new Point(166, 53), ForeColor = Color.Black, Text = string.Empty }; RoundButton ButtonPic = new RoundButton() { Size = new Size(64, 62), Location = new Point(8, 10), FlatStyle = FlatStyle.Flat, BackColor = Theme.GetForeColor(), BackgroundImage = Properties.Resources.play2, BackgroundImageLayout = ImageLayout.Stretch, }; ButtonPic.FlatAppearance.BorderSize = 0; TrackBar ElapsedBar = new TrackBar() { Size = new Size(169, 45), Location = new Point(75, 31), TickStyle = TickStyle.None }; ButtonPic.Click += (sender, e) => Chat.ButtonPic_Click(sender, e, ButtonPic, AudioPanel.Name, ElapsedBar); FileStream ms = File.OpenRead(AudioFile); var rdr = new WaveFileReader(ms); var ts = new TimeSpan(); ts = rdr.TotalTime; ElapsedBar.Maximum = (int)ts.TotalSeconds * 100; string time = rdr.TotalTime.ToString(); time = time.Remove(time.LastIndexOf('.'), 8); TimeInfo.Text = time; ms.Dispose(); rdr.Dispose(); AudioPanel.Controls.Add(TimeInfo); AudioPanel.Controls.Add(ButtonPic); AudioPanel.Controls.Add(ElapsedBar); BodyPanel.Controls.Add(Info); BodyPanel.Controls.Add(AudioPanel); BodyPanel.Refresh(); return(BodyPanel); }