-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAcSmClassWithCustomPropertyBag.cs
57 lines (48 loc) · 1.41 KB
/
AcSmClassWithCustomPropertyBag.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.Threading.Tasks;
namespace AcSmSheetSetMgr
{
public class AcSmClassWithCustomPropertyBag : AcSmClass
{
public AcSmClassWithCustomPropertyBag()
{
//
}
public AcSmClassWithCustomPropertyBag(XmlElement wEl)
: base(wEl)
{
}
public AcSmCustomPropertyBag GetCustomPropertyBag()
{
AcSmCustomPropertyBag res = (AcSmCustomPropertyBag)this.FindChild("AcSmCustomPropertyBag");
if (res == null)
{
res = new AcSmCustomPropertyBag();
this.Child.Add(res);
}
return res;
}
public AcSmCustomPropertyValue GetCustomProperty(string nName)
{
AcSmCustomPropertyBag wCPB = this.GetCustomPropertyBag();
return wCPB.GetProperty(nName);
}
public void SetCustomProperty(string nName, string pValue)
{
this.GetCustomProperty(nName).Value = pValue;
}
public AcSmProp GetProperty(string nName)
{
return (AcSmProp)this.FindChild("AcSmProp", nName);
}
public void SetProperty(string nName, string nValue)
{
AcSmProp wP = this.GetProperty(nName);
wP.SetValue(nValue);
}
}
}