Last change
on this file since 1200 was
187,
checked in by mkofler, 17 years ago
|
Added ItemDictionary and related classes (View, KeyValueEventArgs, EditKeyValueDialog) to the Core and Data projects as per Andreas' request.
|
File size:
892 bytes
|
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 | public partial class EditKeyValueDialog : Form {
|
---|
10 | private IItem key;
|
---|
11 | public IItem Key {
|
---|
12 | get { return key; }
|
---|
13 | }
|
---|
14 |
|
---|
15 | private IItem value;
|
---|
16 | public IItem Value {
|
---|
17 | get { return value; }
|
---|
18 | }
|
---|
19 |
|
---|
20 | public EditKeyValueDialog(Type keyType, Type valueType) {
|
---|
21 | InitializeComponent();
|
---|
22 | key = (IItem) Activator.CreateInstance(keyType);
|
---|
23 | value = (IItem) Activator.CreateInstance(valueType);
|
---|
24 | keyPanel.Controls.Add((Control) key.CreateView());
|
---|
25 | valuePanel.Controls.Add((Control) value.CreateView());
|
---|
26 | }
|
---|
27 |
|
---|
28 | private void okButton_Click(object sender, EventArgs e) {
|
---|
29 | this.DialogResult = DialogResult.OK;
|
---|
30 | this.Close();
|
---|
31 | }
|
---|
32 | }
|
---|
33 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.