/[cits3200i]/branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/MetadataTextEditor.cs


UCC Code Repository

Contents of /branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/MetadataTextEditor.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 90 - (show annotations) (download)
Tue Oct 12 21:18:41 2010 UTC (11 years, 1 month ago) by rvvs89
File size: 949 byte(s)
Attaching metadata now works.
Saving metadata now works.
Loading metadata now works.
Editing metadata and cancelling your changes now works.
MetadataList now only commits on change.
Icons appear on the track when metadata is added.
Icons can be double clicked to launch the editor.
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Windows.Forms;
5
6 namespace MetadataPlugin.Source
7 {
8 class MetadataTextEditor : IMetadataEditor
9 {
10 private EditText control;
11 private MetadataText parent;
12
13 public MetadataTextEditor(MetadataText parent)
14 {
15 this.parent = parent;
16 control = new EditText();
17 control.Data = parent.Data;
18 }
19
20 public Control EditorControl
21 {
22 get { return control; }
23 }
24
25 public void Commit()
26 {
27 parent.Data = control.Data;
28 }
29
30 public void Dispose()
31 {
32 control.Dispose();
33 }
34
35 public bool IsDisposed
36 {
37 get { return control.IsDisposed; }
38 }
39
40 public IMetadata Data
41 {
42 get { return parent; }
43 }
44 }
45 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26