Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive_Milestone2/sources/HeuristicLab.Hive.Server.Console/3.2/AddGroup.cs @ 2273

Last change on this file since 2273 was 1832, checked in by aleitner, 16 years ago

add contextmenu for adding/deleting groups (#626)

File size: 954 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Linq;
7using System.Text;
8using System.Windows.Forms;
9
10namespace 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.