Rev | Line | |
---|
[1832] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.ComponentModel;
|
---|
| 4 | using System.Data;
|
---|
| 5 | using System.Drawing;
|
---|
| 6 | using System.Linq;
|
---|
| 7 | using System.Text;
|
---|
| 8 | using System.Windows.Forms;
|
---|
| 9 |
|
---|
| 10 | namespace HeuristicLab.Hive.Server.ServerConsole {
|
---|
| 11 |
|
---|
| 12 | public delegate void AddGroupDelegate(string name);
|
---|
| 13 |
|
---|
| 14 | public partial class AddGroup : Form {
|
---|
| 15 |
|
---|
| 16 | public event AddGroupDelegate addGroupEvent;
|
---|
| 17 |
|
---|
| 18 | public AddGroup() {
|
---|
| 19 | InitializeComponent();
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | private void btnAdd_Click(object sender, EventArgs e) {
|
---|
| 23 | if (addGroupEvent != null) {
|
---|
| 24 | addGroupEvent(tbName.Text);
|
---|
| 25 | }
|
---|
| 26 | this.Close();
|
---|
| 27 | }
|
---|
| 28 |
|
---|
| 29 | private void btnClose_Click(object sender, EventArgs e) {
|
---|
| 30 | this.Close();
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | private void tbName_TextChanged(object sender, EventArgs e) {
|
---|
| 34 | if (string.IsNullOrEmpty(tbName.Text)) {
|
---|
| 35 | btnAdd.Enabled = false;
|
---|
| 36 | } else {
|
---|
| 37 | btnAdd.Enabled = true;
|
---|
| 38 | }
|
---|
| 39 | }
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.