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


UCC Code Repository

Diff of /branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/AddMetadataControl.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 87 by rvvs89, Mon Oct 11 06:42:56 2010 UTC revision 88 by rvvs89, Tue Oct 12 04:54:08 2010 UTC
# Line 10  namespace MetadataPlugin.Source Line 10  namespace MetadataPlugin.Source
10  {  {
11      public partial class AddMetadataControl : UserControl      public partial class AddMetadataControl : UserControl
12      {      {
13            private MetadataLocation location;
14    
15          public AddMetadataControl()          public AddMetadataControl()
16          {          {
17              InitializeComponent();              InitializeComponent();
18          }          }
19    
20            public MetadataLocation MetadataLocation
21            {
22                get { return location; }
23                set
24                {
25                    location = value;
26                    textRadioButton.Enabled = new List<MetadataLocation>(MetadataType.TEXT.ApplicableLocations).Contains(location);
27                }
28            }
29    
30            private void nextButton_Click(object sender, EventArgs e)
31            {
32                MetadataType type;
33                if (textRadioButton.Checked)
34                {
35                    type = MetadataType.TEXT;
36                } else {
37                    Hide();
38                    /* FIXME: prevent this case from occuring by disabling the button */
39                    return;
40                }
41                IMetadata data = type.CreateInstance(MetadataLocation);
42                EditMetadataDialog.Instance.Control.Editor = data.Editor;
43                EditMetadataDialog.Instance.ShowDialog();
44            }
45      }      }
46  }  }

Legend:
Removed from v.87  
changed lines
  Added in v.88

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26