annotate FrmSelectSystem.cs @ 48:cf644b2c65e6 WarFoundry_v0.1beta_Winforms

* Change assembly number to 0.0.1.* because we've not reached 0.1 yet, never mind 1.0! * Add "COPYING" to the copied files so that we have a license no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 13 Sep 2009 19:03:37 +0000
parents 1576f669b3eb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
36
6ab7ddc038f9 Re #121: Move all code to AGPL
IBBoard <dev@ibboard.co.uk>
parents: 33
diff changeset
1 // This file (FrmSelectSystem.cs) is a part of the IBBoard.WarFoundry.GUI.WinForms project and is copyright 2007, 2008, 2009 IBBoard.
33
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
2 //
36
6ab7ddc038f9 Re #121: Move all code to AGPL
IBBoard <dev@ibboard.co.uk>
parents: 33
diff changeset
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
33
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
4
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
5 using System;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
6 using System.IO;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
7 using System.Drawing;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
8 using System.ComponentModel;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
9 using System.Windows.Forms;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
10 using IBBoard;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
11 using IBBoard.Lang;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
12 using IBBoard.WarFoundry.API;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
13 using IBBoard.Windows.Forms;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
14 using IBBoard.WarFoundry.API.Objects;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
15 using IBBoard.Windows.Forms.I18N;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
16
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
17 namespace IBBoard.WarFoundry
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
18 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
19 /// <summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
20 /// Summary description for FrmSelectSystem.
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
21 /// </summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
22 public class FrmSelectSystem : IBBoard.Windows.Forms.IBBForm
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
23 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
24 private System.Windows.Forms.ListBox lstSystems;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
25 private IBBoard.Windows.Forms.IBBLabel lblSystemList;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
26 /// <summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
27 /// Required designer variable.
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
28 /// </summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
29 private System.ComponentModel.Container components = null;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
30 private IBBoard.Windows.Forms.IBBButton bttnCancel;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
31 private IBBoard.Windows.Forms.IBBButton bttnSelectSystem;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
32 private GameSystem selectedSystem;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
33
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
34
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
35 public FrmSelectSystem()
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
36 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
37 //
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
38 // Required for Windows Form Designer support
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
39 //
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
40 InitializeComponent();
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
41
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
42 ControlTranslator.TranslateControl(this);
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
43
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
44 lstSystems.Items.Clear();
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
45 GameSystem[] systems = WarFoundryLoader.GetDefault().GetGameSystems();
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
46 lstSystems.DataSource = systems;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
47 lstSystems.DisplayMember = "Name";
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
48 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
49
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
50 /// <summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
51 /// Clean up any resources being used.
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
52 /// </summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
53 protected override void Dispose( bool disposing )
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
54 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
55 if( disposing )
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
56 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
57 if(components != null)
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
58 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
59 components.Dispose();
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
60 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
61 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
62 base.Dispose( disposing );
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
63 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
64
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
65 #region Windows Form Designer generated code
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
66 /// <summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
67 /// Required method for Designer support - do not modify
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
68 /// the contents of this method with the code editor.
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
69 /// </summary>
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
70 private void InitializeComponent()
29
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
71 {
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
72 this.lstSystems = new System.Windows.Forms.ListBox();
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
73 this.bttnSelectSystem = new IBBoard.Windows.Forms.IBBButton();
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
74 this.lblSystemList = new IBBoard.Windows.Forms.IBBLabel();
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
75 this.bttnCancel = new IBBoard.Windows.Forms.IBBButton();
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
76 this.SuspendLayout();
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
77 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
78 // lstSystems
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
79 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
80 this.lstSystems.Location = new System.Drawing.Point(80, 8);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
81 this.lstSystems.Name = "lstSystems";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
82 this.lstSystems.Size = new System.Drawing.Size(216, 95);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
83 this.lstSystems.TabIndex = 0;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
84 this.lstSystems.DoubleClick += new System.EventHandler(this.lstSystems_DoubleClick);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
85 this.lstSystems.SelectedIndexChanged += new System.EventHandler(this.lstSystems_SelectedIndexChanged);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
86 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
87 // bttnSelectSystem
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
88 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
89 this.bttnSelectSystem.Enabled = false;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
90 this.bttnSelectSystem.FlatStyle = System.Windows.Forms.FlatStyle.System;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
91 this.bttnSelectSystem.Location = new System.Drawing.Point(192, 112);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
92 this.bttnSelectSystem.Name = "bttnSelectSystem";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
93 this.bttnSelectSystem.Size = new System.Drawing.Size(104, 24);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
94 this.bttnSelectSystem.TabIndex = 1;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
95 this.bttnSelectSystem.Text = "Select system";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
96 this.bttnSelectSystem.Click += new System.EventHandler(this.bttnSelectSystem_Click);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
97 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
98 // lblSystemList
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
99 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
100 this.lblSystemList.Location = new System.Drawing.Point(0, 8);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
101 this.lblSystemList.Name = "lblSystemList";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
102 this.lblSystemList.Size = new System.Drawing.Size(80, 80);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
103 this.lblSystemList.TabIndex = 2;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
104 this.lblSystemList.Text = "system list";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
105 this.lblSystemList.TextAlign = System.Drawing.ContentAlignment.TopRight;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
106 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
107 // bttnCancel
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
108 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
109 this.bttnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
110 this.bttnCancel.FlatStyle = System.Windows.Forms.FlatStyle.System;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
111 this.bttnCancel.Location = new System.Drawing.Point(8, 112);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
112 this.bttnCancel.Name = "bttnCancel";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
113 this.bttnCancel.Size = new System.Drawing.Size(80, 24);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
114 this.bttnCancel.TabIndex = 3;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
115 this.bttnCancel.Text = "Cancel";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
116 this.bttnCancel.Click += new System.EventHandler(this.bttnCancel_Click);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
117 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
118 // FrmSelectSystem
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
119 //
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
120 this.AcceptButton = this.bttnSelectSystem;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
121 this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
122 this.CancelButton = this.bttnCancel;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
123 this.ClientSize = new System.Drawing.Size(306, 142);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
124 this.ControlBox = false;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
125 this.Controls.Add(this.bttnCancel);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
126 this.Controls.Add(this.lblSystemList);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
127 this.Controls.Add(this.bttnSelectSystem);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
128 this.Controls.Add(this.lstSystems);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
129 this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
130 this.Name = "FrmSelectSystem";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
131 this.ShowInTaskbar = false;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
132 this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
133 this.Text = "FrmSelectSystem";
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
134 this.ResumeLayout(false);
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
135
33
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
136 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
137 #endregion
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
138
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
139 private void lstSystems_SelectedIndexChanged(object sender, System.EventArgs e)
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
140 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
141 bttnSelectSystem.Enabled = (lstSystems.SelectedIndex>-1);
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
142 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
143
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
144 private void bttnSelectSystem_Click(object sender, System.EventArgs e)
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
145 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
146 selectedSystem = (GameSystem) lstSystems.SelectedItem;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
147 this.DialogResult = DialogResult.OK;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
148 this.Close();
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
149 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
150
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
151 private void bttnCancel_Click(object sender, System.EventArgs e)
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
152 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
153 this.DialogResult = DialogResult.Cancel;
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
154 this.Close();
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
155 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
156
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
157 public GameSystem GameSystem
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
158 {
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
159 get { return selectedSystem; }
29
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
160 }
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
161
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
162 private void lstSystems_DoubleClick(object sender, EventArgs e)
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
163 {
f72a3da5059b Re #88: Complete initial WinForms UI
IBBoard <dev@ibboard.co.uk>
parents: 24
diff changeset
164 bttnSelectSystem_Click(null, null);
33
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
165 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
166 }
67c283ea77a7 * Code cleanup (line endings)
IBBoard <dev@ibboard.co.uk>
parents: 29
diff changeset
167 }