-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathWebPageItemMetadata.cs
38 lines (35 loc) · 1.53 KB
/
WebPageItemMetadata.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using DevExpress.DashboardCommon;
using System;
using System.ComponentModel;
namespace DevExpress.DashboardWin.CustomItemExtension
{
[DisplayName("Web Page"),
CustomItemDescription("Create a Web Page dashboard item and insert it into the dashboard.\n\nThis item displays the web content. You can specify the URI pattern to create the page address from a data column at run-time."),
CustomItemImage("DevExpress.DashboardWin.CustomItemExtension.Images.WebPageItem.svg")]
public class WebPageItemMetadata : CustomItemMetadata {
[
DisplayName("Attribute"),
EmptyDataItemPlaceholder("Attribute"),
]
public Dimension Attribute {
get { return GetPropertyValue<Dimension>(); }
set { SetPropertyValue(value); }
}
[UrlCustom]
public string URI {
get { return GetCustomPropertyValue<string>(); }
set { SetCustomPropertyValue(value); }
}
public class UrlCustomAttribute : Attribute, ICustomPropertyValueConverterAttribute<string>, ICustomPropertyHistoryAttribute<string> {
public string ConvertToString(string value) {
return value;
}
public string ConvertFromString(string strValue) {
return strValue;
}
public string GetHistoryMessage(string newValue, string oldValue, string dashboardItemName) {
return "URI for the " + dashboardItemName + " changed";
}
}
}
}