annotate FrmSystem.cs @ 3:2f52da2e7605

Directory and project updates. VS2008 does not like app.config so I had to remove references of that from the solution from other projects.
author Tsudico
date Wed, 08 Dec 2010 18:44:10 -0600
parents 91b5550eff31
children 866d0093bb11
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
1 using System;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
2 using System.Collections.Generic;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
3 using System.ComponentModel;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
4 using System.Data;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
5 using System.Drawing;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
6 using System.Text;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
7 using System.Text.RegularExpressions;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
8 using System.Windows.Forms;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
9 using IBBoard.Lang;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
10 using IBBoard.Windows.Forms;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
11 using IBBoard.Windows.Forms.I18N;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
12
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
13 namespace IBBoard.WarFoundry.Forge.WinForms
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
14 {
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
15 public partial class FrmSystem : IBBoard.Windows.Forms.IBBForm
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
16 {
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
17 public FrmSystem()
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
18 {
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
19 InitializeComponent();
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
20 }
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
21
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
22 private void btnSystemClose_Click(object sender, EventArgs e)
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
23 {
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
24 this.Close();
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
25 }
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
26
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
27 private void btnGenerateSysId_Click(object sender, EventArgs e)
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
28 {
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
29 string newId = String.Empty;
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
30
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
31 MatchCollection id_parts = Regex.Matches(this.txtSystemName.Text, @"[A-Z\d]");
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
32 foreach(Match part in id_parts)
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
33 {
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
34 newId += part.ToString();
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
35 }
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
36
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
37 if(newId.Length < 3)
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
38 {
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
39 newId = this.txtSystemName.Text.ToLower().Replace(" ", "");
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
40 }
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
41
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
42 this.txtSystemId.Text = newId.ToLower();
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
43 }
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
44 }
91b5550eff31 Initial Commit.
Tsudico
parents:
diff changeset
45 }