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


UCC Code Repository

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 88 - (show annotations) (download)
Tue Oct 12 04:54:08 2010 UTC (11 years, 1 month ago) by rvvs89
File size: 1344 byte(s)
Syncing.
1 using System;
2 using System.Collections.Generic;
3 using System.ComponentModel;
4 using System.Drawing;
5 using System.Data;
6 using System.Text;
7 using System.Windows.Forms;
8
9 namespace MetadataPlugin.Source
10 {
11 public partial class AddMetadataControl : UserControl
12 {
13 private MetadataLocation location;
14
15 public AddMetadataControl()
16 {
17 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 }

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26