/[cits3200i]/trunk/UWAPlugins/MetadataPlugin/Source/MetadataText.cs


UCC Code Repository

Contents of /trunk/UWAPlugins/MetadataPlugin/Source/MetadataText.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 100 - (show annotations) (download)
Wed Oct 13 01:51:32 2010 UTC (11 years, 1 month ago) by rvvs89
File size: 2427 byte(s)
Merging metadata-branch-rvvs89.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using ZoneFiveSoftware.Common.Data;
5
6 namespace MetadataPlugin.Source
7 {
8 [Serializable]
9 public class MetadataText : IMetadata
10 {
11 private MetadataLocation location;
12 private string name;
13 private string data;
14 private Nullable<DateTime> point;
15 private Nullable<DateTime> range;
16 [NonSerialized]
17 private object formData = null;
18 [NonSerialized]
19 private MetadataTextEditor editor = null;
20
21 public MetadataText(MetadataLocation location)
22 {
23 this.location = location;
24 name = "Untitled text data";
25 data = "Enter your data here";
26 }
27
28 public MetadataType Type
29 {
30 get { return MetadataType.TEXT; }
31 }
32
33 public MetadataLocation Location
34 {
35 get { return location; }
36 set
37 {
38 location = value;
39 Commit();
40 }
41 }
42
43 public string Name
44 {
45 get { return name; }
46 set
47 {
48 name = value;
49 Commit();
50 }
51 }
52
53 public IMetadataEditor Editor
54 {
55 get
56 {
57 if (editor == null || editor.IsDisposed)
58 {
59 editor = new MetadataTextEditor(this);
60 }
61 return editor;
62 }
63 }
64
65 public string Data
66 {
67 get { return data; }
68 set
69 {
70 data = value;
71 Commit();
72 }
73 }
74
75 public DateTime Point
76 {
77 get { return point.Value; }
78 set
79 {
80 point = value;
81 Commit();
82 }
83 }
84
85 public DateTime End
86 {
87 get { return range.Value; }
88 set
89 {
90 range = value;
91 Commit();
92 }
93 }
94
95 public object FormData
96 {
97 get { return formData; }
98 set { formData = value; }
99 }
100
101 public void Commit()
102 {
103 MetadataRouteControlLayer.Instances[0].CurrentList.Commit();
104 }
105 }
106 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26