Last change
on this file since 2168 was
1529,
checked in by gkronber, 16 years ago
|
Moved source files of plugins AdvancedOptimizationFrontEnd ... Grid into version-specific sub-folders. #576
|
File size:
1.4 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Data;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows.Forms;
|
---|
6 | using HeuristicLab.Core;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Data {
|
---|
9 | /// <summary>
|
---|
10 | /// A visual representation to visualize a key-value pair.
|
---|
11 | /// </summary>
|
---|
12 | public partial class EditKeyValueDialog : Form {
|
---|
13 | private IItem key;
|
---|
14 | /// <summary>
|
---|
15 | /// Gets the current key.
|
---|
16 | /// </summary>
|
---|
17 | public IItem Key {
|
---|
18 | get { return key; }
|
---|
19 | }
|
---|
20 |
|
---|
21 | private IItem value;
|
---|
22 | /// <summary>
|
---|
23 | /// Gets the current value.
|
---|
24 | /// </summary>
|
---|
25 | public IItem Value {
|
---|
26 | get { return value; }
|
---|
27 | }
|
---|
28 |
|
---|
29 | /// <summary>
|
---|
30 | /// Initializes a new instance of the class <see cref="EditKeyValueDialog"/> with the given types of
|
---|
31 | /// key and value.
|
---|
32 | /// </summary>
|
---|
33 | /// <param name="keyType">The type of the key.</param>
|
---|
34 | /// <param name="valueType">The type of the value.</param>
|
---|
35 | public EditKeyValueDialog(Type keyType, Type valueType) {
|
---|
36 | InitializeComponent();
|
---|
37 | key = (IItem) Activator.CreateInstance(keyType);
|
---|
38 | value = (IItem) Activator.CreateInstance(valueType);
|
---|
39 | keyPanel.Controls.Add((Control) key.CreateView());
|
---|
40 | valuePanel.Controls.Add((Control) value.CreateView());
|
---|
41 | }
|
---|
42 |
|
---|
43 | private void okButton_Click(object sender, EventArgs e) {
|
---|
44 | this.DialogResult = DialogResult.OK;
|
---|
45 | this.Close();
|
---|
46 | }
|
---|
47 | }
|
---|
48 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.