1 |
RadDock rdoAlert = new RadDock(); |
2 |
|
3 |
|
4 |
//rdoAlert.Pinned = true; //doesn't allow dragging |
5 |
rdoAlert.Text = woAlert.title; |
6 |
rdoAlert.ID = woAlert.uID; |
7 |
rdoAlert.UniqueName = woAlert.uID; |
8 |
rdoAlert.Width = Unit.Percentage(100); |
9 |
rdoAlert.DefaultCommands = Telerik.Web.UI.Dock.DefaultCommands.None; |
10 |
rdoAlert.ToolTip = woAlert.toolTip; |
11 |
rdoAlert.Title = woAlert.title; |
12 |
|
13 |
rdoAlert.AutoPostBack = false; |
14 |
|
15 |
Label lblDockTitle = new Label(); |
16 |
lblDockTitle.Text = " "+woAlert.title; |
17 |
lblDockTitle.Font.Size = FontUnit.Point(11); |
18 |
lblDockTitle.Font.Bold = true; |
19 |
|
20 |
ImageButton btnDocExpand = new ImageButton(); |
21 |
btnDocExpand.ImageUrl = "Vista/Dock/rdExpand.gif"; |
22 |
|
23 |
btnDocExpand.AlternateText = "Expand"; |
24 |
btnDocExpand.ID = woAlert.title + "Expand"; |
25 |
|
26 |
const string onClientClick = "btnExpand_ONCLICK('{0}', '{1}'); return false;"; |
27 |
btnDocExpand.OnClientClick = string.Format(onClientClick, btnDocExpand.ClientID, "blue"); |
28 |
rdoAlert.TitlebarContainer.Controls.Add(btnDocExpand); |
29 |
rdoAlert.TitlebarContainer.Controls.Add(lblDockTitle); |
30 |
System.Drawing.ColorConverter conv3 = new System.Drawing.ColorConverter(); |
31 |
System.Drawing.Color c3 = (System.Drawing.Color)conv3.ConvertFromString("#69A637"); |
32 |
rdoAlert.TitlebarContainer.BackColor = c3; |
33 |
|
34 |
rdoAlert.TitlebarContainer.ForeColor = System.Drawing.Color.Black; |
35 |
rdoAlert.TitlebarContainer.Font.Size = FontUnit.Point(11); |
36 |
System.Drawing.ColorConverter conv = new System.Drawing.ColorConverter(); |
37 |
System.Drawing.Color c = (System.Drawing.Color)conv.ConvertFromString("#F6F6F6"); |
38 |
rdoAlert.BackColor = c; |
39 |
|
40 |
System.Drawing.ColorConverter conv2 = new System.Drawing.ColorConverter(); |
41 |
System.Drawing.Color c2 = (System.Drawing.Color)conv2.ConvertFromString("#CCCCCC"); |
42 |
rdoAlert.BorderColor = c2; |
43 |
rdoAlert.ContentTemplate = Page.LoadTemplate(woAlert.url); |
44 |
switch (woAlert.columnNum) |
45 |
{ |
46 |
case 0: //corresponds to the main docking area |
47 |
rdzMain.Controls.Add(rdoAlert); |
48 |
break; |
49 |
case 1: |
50 |
break; |
51 |
case 2: |
52 |
break; |
53 |
default: |
54 |
break; |
55 |
} |