Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/AddProject.cs @ 2636

Last change on this file since 2636 was 1937, checked in by aleitner, 15 years ago

contextmenu is on place where clicked
Add project form
expand add job form
(#626)

File size: 968 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 AddProjectDelegate(string name);
13
14  public partial class AddProject : Form {
15
16    public event AddProjectDelegate AddProjectEvent;
17
18    public AddProject() {
19      InitializeComponent();
20    }
21
22    private void btnAdd_Click(object sender, EventArgs e) {
23      if (AddProjectEvent != null) {
24        AddProjectEvent(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.