~vadim-tk/percona-server/percona-5.5.15-galera

« back to all changes in this revision

Viewing changes to storage/ndb/src/cw/cpcc-win32/csharp/PanelWizard.cs

  • Committer: root
  • Date: 2011-09-10 16:37:18 UTC
  • Revision ID: root@r815.office.percona.com-20110910163718-ydh4zj8hcdgoyavb
Porting Galera to 5.5.15

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright (C) 2004 MySQL AB
 
2
 
 
3
   This program is free software; you can redistribute it and/or modify
 
4
   it under the terms of the GNU General Public License as published by
 
5
   the Free Software Foundation; version 2 of the License.
 
6
 
 
7
   This program is distributed in the hope that it will be useful,
 
8
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
   GNU General Public License for more details.
 
11
 
 
12
   You should have received a copy of the GNU General Public License
 
13
   along with this program; if not, write to the Free Software
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
15
 
 
16
//author:Arun
 
17
//date:Nov 13,2002
 
18
//Wizard using panel
 
19
using System;
 
20
using System.Drawing;
 
21
using System.Collections;
 
22
using System.ComponentModel;
 
23
using System.Windows.Forms;
 
24
 
 
25
namespace NDB_CPC
 
26
{
 
27
        /// <summary>
 
28
        /// Summary description for MDXQueryBuilderWizard.
 
29
        /// </summary>
 
30
        public class PanelWizard : System.Windows.Forms.Form
 
31
        {
 
32
                private System.Windows.Forms.Button btnCancel;
 
33
                private System.Windows.Forms.Button btnback;
 
34
                private System.Windows.Forms.Button btnNext;
 
35
                private System.Windows.Forms.Button btnFinish;
 
36
                
 
37
                //---enabling and disabling the buttons
 
38
                private bool cancelEnabled;
 
39
                private bool backEnabled;
 
40
                private bool nextEnabled;
 
41
                private bool finishEnabled;
 
42
                //--------
 
43
                //--set the next and back panel
 
44
                private Panel nextPanel;
 
45
                private Panel backPanel;
 
46
                private Panel presentPanel;
 
47
                //
 
48
                private Panel[] arrayPanel;
 
49
                private System.Windows.Forms.Panel panel1;
 
50
                private System.Windows.Forms.Panel panel2;
 
51
                private System.Windows.Forms.Panel panel3;
 
52
                private System.Windows.Forms.RadioButton radioBtnYes;
 
53
                private System.Windows.Forms.RadioButton radioBtnNo;
 
54
                private System.Windows.Forms.ListBox listBoxComputers;
 
55
                private System.Windows.Forms.Label label5;
 
56
                private System.Windows.Forms.Label label1;
 
57
                private System.ComponentModel.IContainer components;
 
58
                private System.Windows.Forms.Button buttonComputerAdd;
 
59
                private System.Windows.Forms.Label label2;
 
60
                private System.Windows.Forms.Label label6;
 
61
                private System.Windows.Forms.Label label7;
 
62
                private System.Windows.Forms.ComboBox comboNDB;
 
63
                private System.Windows.Forms.ComboBox comboAPI;
 
64
                private System.Windows.Forms.Label label8;
 
65
                private System.Windows.Forms.ComboBox comboMGM;
 
66
                private System.Windows.Forms.Button btnTransferNodeToComp;
 
67
                private System.Windows.Forms.TreeView tvComputer;
 
68
                private System.Windows.Forms.ListView lvNode;
 
69
                private System.Windows.Forms.Button btnTransferCompToNode;
 
70
                private System.Windows.Forms.Label label3;
 
71
                private System.Windows.Forms.Label label9;
 
72
                private System.Windows.Forms.Label label10;
 
73
                private int m_nMGM;
 
74
                private ComputerMgmt mgmt;
 
75
                private int m_nNDB;
 
76
                private int m_nAPI;
 
77
                private Database m_db;
 
78
                private System.Windows.Forms.Label label11;
 
79
                private System.Windows.Forms.TextBox textDbName;
 
80
                private System.Windows.Forms.Label label31;
 
81
                private System.Windows.Forms.Label label32;
 
82
                private System.Windows.Forms.Label label33;
 
83
                private System.Windows.Forms.Label label18;
 
84
                private System.Windows.Forms.Label labelTitle;
 
85
                private System.Windows.Forms.Label labelCwd;
 
86
                private System.Windows.Forms.Label labelArgs;
 
87
                private System.Windows.Forms.Label labelOther;
 
88
                private System.Windows.Forms.Label labelPath;
 
89
                private int m_noOfConfiguredNodes;
 
90
                private int m_noOfConfiguredMgmt;
 
91
                private int m_noOfConfiguredNdb;
 
92
                private string m_mgmHost;
 
93
                private string m_mgmPort;
 
94
                private System.Windows.Forms.TextBox textCwd;
 
95
                private System.Windows.Forms.TextBox textArgs;
 
96
                private System.Windows.Forms.TextBox textOther;
 
97
                private System.Windows.Forms.TextBox textPath;
 
98
                private System.Windows.Forms.TextBox textComputer;
 
99
                private System.Windows.Forms.TextBox textDatabase;
 
100
                private System.Windows.Forms.TextBox textName;
 
101
                private int m_noOfConfiguredApi;
 
102
                private bool m_bMgmt;
 
103
                private System.Windows.Forms.Button buttonSave;
 
104
                private System.Windows.Forms.CheckBox checkBoxReuse;
 
105
                private System.Windows.Forms.Label label4;
 
106
                private System.Windows.Forms.Panel panel4;
 
107
                private System.Windows.Forms.CheckBox checkBoxLater;
 
108
                private System.Windows.Forms.RadioButton radioYes;
 
109
                private System.Windows.Forms.RadioButton radioNo;
 
110
                private System.Windows.Forms.Panel panel6;
 
111
                private System.Windows.Forms.Panel panel5;
 
112
                private System.Windows.Forms.RadioButton radioStartNo;
 
113
                private System.Windows.Forms.RadioButton radioStartYes;
 
114
                private System.Windows.Forms.ImageList imageListComp;
 
115
                private System.Windows.Forms.Label label12;
 
116
                private System.Windows.Forms.TextBox textOwner;
 
117
                private System.Windows.Forms.Label label13;
 
118
                private System.Windows.Forms.TextBox textEnv;
 
119
                private bool m_bNdb;
 
120
                public PanelWizard(ComputerMgmt comp)
 
121
                {
 
122
                        mgmt=comp;
 
123
                        m_noOfConfiguredNodes=0;
 
124
                        m_noOfConfiguredMgmt=0;
 
125
                        m_noOfConfiguredNdb=0;
 
126
                        m_noOfConfiguredApi=0;  
 
127
                        Size panelSize= new Size(350,300);
 
128
                        Size s= new Size(355,360);
 
129
                        Point cancel= new Point(8,310);
 
130
                        Point back= new Point(96,310);
 
131
                        Point next = new Point(184,310);
 
132
                        Point finish= new Point(272,310);
 
133
                        InitializeComponent();
 
134
                        this.Size=s;
 
135
                        this.btnCancel.Location=cancel;
 
136
                        
 
137
                        this.btnback.Location=back;
 
138
                        this.btnNext.Location=next;
 
139
                        this.btnFinish.Location=finish;
 
140
 
 
141
                        arrayPanel=new Panel[]{panel1,panel2,panel3,panel4,panel5,panel6};//,panel5, panel6};
 
142
                        panel1.Size=panelSize;
 
143
                        
 
144
                        comboNDB.SelectedIndex=0;
 
145
                        comboAPI.SelectedIndex=0;
 
146
                        comboMGM.SelectedIndex=0;
 
147
                        m_bMgmt=false;
 
148
                        m_bNdb=false;
 
149
                        
 
150
                        m_db = new Database();
 
151
                        if(listBoxComputers.Items.Count.Equals(0))
 
152
                                btnNext.Enabled=false;
 
153
                }
 
154
 
 
155
                /// <summary>
 
156
                /// Clean up any resources being used.
 
157
                /// </summary>
 
158
                protected override void Dispose( bool disposing )
 
159
                {
 
160
                        if( disposing )
 
161
                        {
 
162
                                if(components != null)
 
163
                                {
 
164
                                        components.Dispose();
 
165
                                }
 
166
                        }
 
167
                        base.Dispose( disposing );
 
168
                }
 
169
 
 
170
                #region Windows Form Designer generated code
 
171
                /// <summary>
 
172
                /// Required method for Designer support - do not modify
 
173
                /// the contents of this method with the code editor.
 
174
                /// </summary>
 
175
                private void InitializeComponent()
 
176
                {
 
177
                        this.components = new System.ComponentModel.Container();
 
178
                        System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(PanelWizard));
 
179
                        this.panel1 = new System.Windows.Forms.Panel();
 
180
                        this.buttonComputerAdd = new System.Windows.Forms.Button();
 
181
                        this.label1 = new System.Windows.Forms.Label();
 
182
                        this.label5 = new System.Windows.Forms.Label();
 
183
                        this.listBoxComputers = new System.Windows.Forms.ListBox();
 
184
                        this.radioBtnNo = new System.Windows.Forms.RadioButton();
 
185
                        this.radioBtnYes = new System.Windows.Forms.RadioButton();
 
186
                        this.panel2 = new System.Windows.Forms.Panel();
 
187
                        this.label12 = new System.Windows.Forms.Label();
 
188
                        this.textOwner = new System.Windows.Forms.TextBox();
 
189
                        this.label11 = new System.Windows.Forms.Label();
 
190
                        this.textDbName = new System.Windows.Forms.TextBox();
 
191
                        this.label8 = new System.Windows.Forms.Label();
 
192
                        this.label7 = new System.Windows.Forms.Label();
 
193
                        this.label6 = new System.Windows.Forms.Label();
 
194
                        this.comboMGM = new System.Windows.Forms.ComboBox();
 
195
                        this.comboAPI = new System.Windows.Forms.ComboBox();
 
196
                        this.comboNDB = new System.Windows.Forms.ComboBox();
 
197
                        this.label2 = new System.Windows.Forms.Label();
 
198
                        this.panel3 = new System.Windows.Forms.Panel();
 
199
                        this.checkBoxLater = new System.Windows.Forms.CheckBox();
 
200
                        this.label10 = new System.Windows.Forms.Label();
 
201
                        this.label9 = new System.Windows.Forms.Label();
 
202
                        this.label3 = new System.Windows.Forms.Label();
 
203
                        this.btnTransferCompToNode = new System.Windows.Forms.Button();
 
204
                        this.btnTransferNodeToComp = new System.Windows.Forms.Button();
 
205
                        this.lvNode = new System.Windows.Forms.ListView();
 
206
                        this.tvComputer = new System.Windows.Forms.TreeView();
 
207
                        this.imageListComp = new System.Windows.Forms.ImageList(this.components);
 
208
                        this.panel6 = new System.Windows.Forms.Panel();
 
209
                        this.radioStartNo = new System.Windows.Forms.RadioButton();
 
210
                        this.radioStartYes = new System.Windows.Forms.RadioButton();
 
211
                        this.label18 = new System.Windows.Forms.Label();
 
212
                        this.btnCancel = new System.Windows.Forms.Button();
 
213
                        this.btnback = new System.Windows.Forms.Button();
 
214
                        this.btnNext = new System.Windows.Forms.Button();
 
215
                        this.btnFinish = new System.Windows.Forms.Button();
 
216
                        this.panel4 = new System.Windows.Forms.Panel();
 
217
                        this.textEnv = new System.Windows.Forms.TextBox();
 
218
                        this.label13 = new System.Windows.Forms.Label();
 
219
                        this.checkBoxReuse = new System.Windows.Forms.CheckBox();
 
220
                        this.buttonSave = new System.Windows.Forms.Button();
 
221
                        this.labelTitle = new System.Windows.Forms.Label();
 
222
                        this.textComputer = new System.Windows.Forms.TextBox();
 
223
                        this.textCwd = new System.Windows.Forms.TextBox();
 
224
                        this.textArgs = new System.Windows.Forms.TextBox();
 
225
                        this.textOther = new System.Windows.Forms.TextBox();
 
226
                        this.textPath = new System.Windows.Forms.TextBox();
 
227
                        this.textDatabase = new System.Windows.Forms.TextBox();
 
228
                        this.textName = new System.Windows.Forms.TextBox();
 
229
                        this.labelCwd = new System.Windows.Forms.Label();
 
230
                        this.labelArgs = new System.Windows.Forms.Label();
 
231
                        this.labelOther = new System.Windows.Forms.Label();
 
232
                        this.labelPath = new System.Windows.Forms.Label();
 
233
                        this.label31 = new System.Windows.Forms.Label();
 
234
                        this.label32 = new System.Windows.Forms.Label();
 
235
                        this.label33 = new System.Windows.Forms.Label();
 
236
                        this.panel5 = new System.Windows.Forms.Panel();
 
237
                        this.radioNo = new System.Windows.Forms.RadioButton();
 
238
                        this.radioYes = new System.Windows.Forms.RadioButton();
 
239
                        this.label4 = new System.Windows.Forms.Label();
 
240
                        this.panel1.SuspendLayout();
 
241
                        this.panel2.SuspendLayout();
 
242
                        this.panel3.SuspendLayout();
 
243
                        this.panel6.SuspendLayout();
 
244
                        this.panel4.SuspendLayout();
 
245
                        this.panel5.SuspendLayout();
 
246
                        this.SuspendLayout();
 
247
                        // 
 
248
                        // panel1
 
249
                        // 
 
250
                        this.panel1.Controls.AddRange(new System.Windows.Forms.Control[] {
 
251
                                                                                                                                                                 this.buttonComputerAdd,
 
252
                                                                                                                                                                 this.label1,
 
253
                                                                                                                                                                 this.label5,
 
254
                                                                                                                                                                 this.listBoxComputers,
 
255
                                                                                                                                                                 this.radioBtnNo,
 
256
                                                                                                                                                                 this.radioBtnYes});
 
257
                        this.panel1.Name = "panel1";
 
258
                        this.panel1.Size = new System.Drawing.Size(344, 312);
 
259
                        this.panel1.TabIndex = 0;
 
260
                        this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint);
 
261
                        // 
 
262
                        // buttonComputerAdd
 
263
                        // 
 
264
                        this.buttonComputerAdd.Enabled = false;
 
265
                        this.buttonComputerAdd.Location = new System.Drawing.Point(192, 232);
 
266
                        this.buttonComputerAdd.Name = "buttonComputerAdd";
 
267
                        this.buttonComputerAdd.Size = new System.Drawing.Size(96, 24);
 
268
                        this.buttonComputerAdd.TabIndex = 3;
 
269
                        this.buttonComputerAdd.Text = "Add computer...";
 
270
                        this.buttonComputerAdd.Click += new System.EventHandler(this.buttonComputerAdd_Click);
 
271
                        // 
 
272
                        // label1
 
273
                        // 
 
274
                        this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
 
275
                        this.label1.Location = new System.Drawing.Point(80, 8);
 
276
                        this.label1.Name = "label1";
 
277
                        this.label1.Size = new System.Drawing.Size(200, 23);
 
278
                        this.label1.TabIndex = 5;
 
279
                        this.label1.Text = "Configure computers";
 
280
                        this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
 
281
                        // 
 
282
                        // label5
 
283
                        // 
 
284
                        this.label5.Location = new System.Drawing.Point(24, 40);
 
285
                        this.label5.Name = "label5";
 
286
                        this.label5.Size = new System.Drawing.Size(128, 23);
 
287
                        this.label5.TabIndex = 4;
 
288
                        this.label5.Text = "Available computers:";
 
289
                        this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
 
290
                        // 
 
291
                        // listBoxComputers
 
292
                        // 
 
293
                        this.listBoxComputers.Location = new System.Drawing.Point(24, 64);
 
294
                        this.listBoxComputers.Name = "listBoxComputers";
 
295
                        this.listBoxComputers.Size = new System.Drawing.Size(128, 212);
 
296
                        this.listBoxComputers.TabIndex = 3;
 
297
                        this.listBoxComputers.SelectedIndexChanged += new System.EventHandler(this.listBoxComputers_SelectedIndexChanged);
 
298
                        // 
 
299
                        // radioBtnNo
 
300
                        // 
 
301
                        this.radioBtnNo.AutoCheck = false;
 
302
                        this.radioBtnNo.Location = new System.Drawing.Point(168, 168);
 
303
                        this.radioBtnNo.Name = "radioBtnNo";
 
304
                        this.radioBtnNo.Size = new System.Drawing.Size(152, 64);
 
305
                        this.radioBtnNo.TabIndex = 2;
 
306
                        this.radioBtnNo.Text = "No, I have to add more computers in order to deploy NDB Cluster. ";
 
307
                        this.radioBtnNo.Click += new System.EventHandler(this.radioBtnNo_Click);
 
308
                        // 
 
309
                        // radioBtnYes
 
310
                        // 
 
311
                        this.radioBtnYes.AutoCheck = false;
 
312
                        this.radioBtnYes.Location = new System.Drawing.Point(168, 72);
 
313
                        this.radioBtnYes.Name = "radioBtnYes";
 
314
                        this.radioBtnYes.Size = new System.Drawing.Size(152, 80);
 
315
                        this.radioBtnYes.TabIndex = 1;
 
316
                        this.radioBtnYes.Text = "Yes, all the computers that I need to deploy NDB Cluster exists in the list \"Avai" +
 
317
                                "lable computers\"";
 
318
                        this.radioBtnYes.Click += new System.EventHandler(this.radioBtnYes_Click);
 
319
                        // 
 
320
                        // panel2
 
321
                        // 
 
322
                        this.panel2.Controls.AddRange(new System.Windows.Forms.Control[] {
 
323
                                                                                                                                                                 this.label12,
 
324
                                                                                                                                                                 this.textOwner,
 
325
                                                                                                                                                                 this.label11,
 
326
                                                                                                                                                                 this.textDbName,
 
327
                                                                                                                                                                 this.label8,
 
328
                                                                                                                                                                 this.label7,
 
329
                                                                                                                                                                 this.label6,
 
330
                                                                                                                                                                 this.comboMGM,
 
331
                                                                                                                                                                 this.comboAPI,
 
332
                                                                                                                                                                 this.comboNDB,
 
333
                                                                                                                                                                 this.label2});
 
334
                        this.panel2.Location = new System.Drawing.Point(0, 320);
 
335
                        this.panel2.Name = "panel2";
 
336
                        this.panel2.Size = new System.Drawing.Size(344, 312);
 
337
                        this.panel2.TabIndex = 1;
 
338
                        this.panel2.Validating += new System.ComponentModel.CancelEventHandler(this.panel2_Validating);
 
339
                        this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
 
340
                        // 
 
341
                        // label12
 
342
                        // 
 
343
                        this.label12.Location = new System.Drawing.Point(72, 216);
 
344
                        this.label12.Name = "label12";
 
345
                        this.label12.Size = new System.Drawing.Size(112, 24);
 
346
                        this.label12.TabIndex = 16;
 
347
                        this.label12.Text = "Database owner:";
 
348
                        this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
 
349
                        // 
 
350
                        // textOwner
 
351
                        // 
 
352
                        this.textOwner.Location = new System.Drawing.Point(192, 216);
 
353
                        this.textOwner.Name = "textOwner";
 
354
                        this.textOwner.TabIndex = 5;
 
355
                        this.textOwner.Text = "";
 
356
                        this.textOwner.TextChanged += new System.EventHandler(this.textOwner_TextChanged);
 
357
                        // 
 
358
                        // label11
 
359
                        // 
 
360
                        this.label11.Location = new System.Drawing.Point(72, 184);
 
361
                        this.label11.Name = "label11";
 
362
                        this.label11.Size = new System.Drawing.Size(112, 24);
 
363
                        this.label11.TabIndex = 14;
 
364
                        this.label11.Text = "Database name:";
 
365
                        this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
 
366
                        this.label11.Click += new System.EventHandler(this.label11_Click);
 
367
                        // 
 
368
                        // textDbName
 
369
                        // 
 
370
                        this.textDbName.Location = new System.Drawing.Point(192, 184);
 
371
                        this.textDbName.Name = "textDbName";
 
372
                        this.textDbName.TabIndex = 4;
 
373
                        this.textDbName.Text = "";
 
374
                        
 
375
                        this.textDbName.TextChanged += new System.EventHandler(this.textDbName_TextChanged);
 
376
                        // 
 
377
                        // label8
 
378
                        // 
 
379
                        this.label8.Location = new System.Drawing.Point(16, 120);
 
380
                        this.label8.Name = "label8";
 
381
                        this.label8.Size = new System.Drawing.Size(176, 24);
 
382
                        this.label8.TabIndex = 12;
 
383
                        this.label8.Text = "Number of management servers:";
 
384
                        this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
 
385
                        // 
 
386
                        // label7
 
387
                        // 
 
388
                        this.label7.Location = new System.Drawing.Point(16, 88);
 
389
                        this.label7.Name = "label7";
 
390
                        this.label7.Size = new System.Drawing.Size(120, 24);
 
391
                        this.label7.TabIndex = 11;
 
392
                        this.label7.Text = "Number of API nodes:";
 
393
                        this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
 
394
                        // 
 
395
                        // label6
 
396
                        // 
 
397
                        this.label6.Location = new System.Drawing.Point(16, 56);
 
398
                        this.label6.Name = "label6";
 
399
                        this.label6.Size = new System.Drawing.Size(144, 24);
 
400
                        this.label6.TabIndex = 10;
 
401
                        this.label6.Text = "Number of database nodes:";
 
402
                        this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
 
403
                        // 
 
404
                        // comboMGM
 
405
                        // 
 
406
                        this.comboMGM.DisplayMember = "0";
 
407
                        this.comboMGM.Items.AddRange(new object[] {
 
408
                                                                                                                  "1"});
 
409
                        this.comboMGM.Location = new System.Drawing.Point(192, 120);
 
410
                        this.comboMGM.Name = "comboMGM";
 
411
                        this.comboMGM.Size = new System.Drawing.Size(104, 21);
 
412
                        this.comboMGM.TabIndex = 3;
 
413
                        this.comboMGM.Text = "comboBox3";
 
414
                        // 
 
415
                        // comboAPI
 
416
                        // 
 
417
                        this.comboAPI.DisplayMember = "0";
 
418
                        this.comboAPI.Items.AddRange(new object[] {
 
419
                                                                                                                  "1",
 
420
                                                                                                                  "2",
 
421
                                                                                                                  "3",
 
422
                                                                                                                  "4",
 
423
                                                                                                                  "5",
 
424
                                                                                                                  "6",
 
425
                                                                                                                  "7",
 
426
                                                                                                                  "8",
 
427
                                                                                                                  "9",
 
428
                                                                                                                  "10"});
 
429
                        this.comboAPI.Location = new System.Drawing.Point(192, 88);
 
430
                        this.comboAPI.Name = "comboAPI";
 
431
                        this.comboAPI.Size = new System.Drawing.Size(104, 21);
 
432
                        this.comboAPI.TabIndex = 2;
 
433
                        this.comboAPI.Text = "comboBox2";
 
434
                        // 
 
435
                        // comboNDB
 
436
                        // 
 
437
                        this.comboNDB.DisplayMember = "0";
 
438
                        this.comboNDB.Items.AddRange(new object[] {
 
439
                                                                                                                  "1",
 
440
                                                                                                                  "2",
 
441
                                                                                                                  "4",
 
442
                                                                                                                  "8"});
 
443
                        this.comboNDB.Location = new System.Drawing.Point(192, 56);
 
444
                        this.comboNDB.Name = "comboNDB";
 
445
                        this.comboNDB.Size = new System.Drawing.Size(104, 21);
 
446
                        this.comboNDB.TabIndex = 1;
 
447
                        this.comboNDB.Text = "comboBox1";
 
448
                        // 
 
449
                        // label2
 
450
                        // 
 
451
                        this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
 
452
                        this.label2.Location = new System.Drawing.Point(80, 8);
 
453
                        this.label2.Name = "label2";
 
454
                        this.label2.Size = new System.Drawing.Size(208, 23);
 
455
                        this.label2.TabIndex = 6;
 
456
                        this.label2.Text = "Setup NDB Cluster nodes";
 
457
                        this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
 
458
                        // 
 
459
                        // panel3
 
460
                        // 
 
461
                        this.panel3.Controls.AddRange(new System.Windows.Forms.Control[] {
 
462
                                                                                                                                                                 this.checkBoxLater,
 
463
                                                                                                                                                                 this.label10,
 
464
                                                                                                                                                                 this.label9,
 
465
                                                                                                                                                                 this.label3,
 
466
                                                                                                                                                                 this.btnTransferCompToNode,
 
467
                                                                                                                                                                 this.btnTransferNodeToComp,
 
468
                                                                                                                                                                 this.lvNode,
 
469
                                                                                                                                                                 this.tvComputer});
 
470
                        this.panel3.Location = new System.Drawing.Point(360, 8);
 
471
                        this.panel3.Name = "panel3";
 
472
                        this.panel3.Size = new System.Drawing.Size(320, 312);
 
473
                        this.panel3.TabIndex = 2;
 
474
                        // 
 
475
                        // checkBoxLater
 
476
                        // 
 
477
                        this.checkBoxLater.Location = new System.Drawing.Point(40, 256);
 
478
                        this.checkBoxLater.Name = "checkBoxLater";
 
479
                        this.checkBoxLater.Size = new System.Drawing.Size(240, 16);
 
480
                        this.checkBoxLater.TabIndex = 9;
 
481
                        this.checkBoxLater.Text = "I will configure these nodes manually, later.";
 
482
                        // 
 
483
                        // label10
 
484
                        // 
 
485
                        this.label10.Location = new System.Drawing.Point(16, 40);
 
486
                        this.label10.Name = "label10";
 
487
                        this.label10.Size = new System.Drawing.Size(104, 16);
 
488
                        this.label10.TabIndex = 8;
 
489
                        this.label10.Text = "NDB Cluster nodes:";
 
490
                        this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
 
491
                        // 
 
492
                        // label9
 
493
                        // 
 
494
                        this.label9.Location = new System.Drawing.Point(192, 40);
 
495
                        this.label9.Name = "label9";
 
496
                        this.label9.Size = new System.Drawing.Size(100, 16);
 
497
                        this.label9.TabIndex = 7;
 
498
                        this.label9.Text = "Computers:";
 
499
                        this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
 
500
                        // 
 
501
                        // label3
 
502
                        // 
 
503
                        this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
 
504
                        this.label3.Location = new System.Drawing.Point(40, 8);
 
505
                        this.label3.Name = "label3";
 
506
                        this.label3.Size = new System.Drawing.Size(280, 23);
 
507
                        this.label3.TabIndex = 6;
 
508
                        this.label3.Text = "Assign NDB nodes to computers";
 
509
                        this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
 
510
                        // 
 
511
                        // btnTransferCompToNode
 
512
                        // 
 
513
                        this.btnTransferCompToNode.Location = new System.Drawing.Point(144, 160);
 
514
                        this.btnTransferCompToNode.Name = "btnTransferCompToNode";
 
515
                        this.btnTransferCompToNode.Size = new System.Drawing.Size(40, 24);
 
516
                        this.btnTransferCompToNode.TabIndex = 4;
 
517
                        this.btnTransferCompToNode.Text = "<---";
 
518
                        // 
 
519
                        // btnTransferNodeToComp
 
520
                        // 
 
521
                        this.btnTransferNodeToComp.Location = new System.Drawing.Point(144, 128);
 
522
                        this.btnTransferNodeToComp.Name = "btnTransferNodeToComp";
 
523
                        this.btnTransferNodeToComp.Size = new System.Drawing.Size(40, 24);
 
524
                        this.btnTransferNodeToComp.TabIndex = 3;
 
525
                        this.btnTransferNodeToComp.Text = "--->";
 
526
                        this.btnTransferNodeToComp.Click += new System.EventHandler(this.btnTransferNodeToComp_Click);
 
527
                        // 
 
528
                        // lvNode
 
529
                        // 
 
530
                        this.lvNode.HideSelection = false;
 
531
                        this.lvNode.Location = new System.Drawing.Point(16, 56);
 
532
                        this.lvNode.Name = "lvNode";
 
533
                        this.lvNode.Size = new System.Drawing.Size(112, 192);
 
534
                        this.lvNode.TabIndex = 2;
 
535
                        this.lvNode.View = System.Windows.Forms.View.List;
 
536
                        this.lvNode.SelectedIndexChanged += new System.EventHandler(this.lvNode_SelectedIndexChanged);
 
537
                        // 
 
538
                        // tvComputer
 
539
                        // 
 
540
                        this.tvComputer.HideSelection = false;
 
541
                        this.tvComputer.ImageList = this.imageListComp;
 
542
                        this.tvComputer.Location = new System.Drawing.Point(192, 56);
 
543
                        this.tvComputer.Name = "tvComputer";
 
544
                        this.tvComputer.Size = new System.Drawing.Size(120, 192);
 
545
                        this.tvComputer.TabIndex = 1;
 
546
                        this.tvComputer.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tvComputer_MouseDown);
 
547
                        this.tvComputer.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tvComputer_AfterSelect);
 
548
                        this.tvComputer.MouseLeave += new System.EventHandler(this.tvComputer_MouseLeave);
 
549
                        this.tvComputer.DragDrop += new System.Windows.Forms.DragEventHandler(this.tvComputer_DragDrop);
 
550
                        // 
 
551
                        // imageListComp
 
552
                        // 
 
553
                        this.imageListComp.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
 
554
                        this.imageListComp.ImageSize = new System.Drawing.Size(16, 16);
 
555
                        this.imageListComp.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListComp.ImageStream")));
 
556
                        this.imageListComp.TransparentColor = System.Drawing.Color.Transparent;
 
557
                        // 
 
558
                        // panel6
 
559
                        // 
 
560
                        this.panel6.Controls.AddRange(new System.Windows.Forms.Control[] {
 
561
                                                                                                                                                                 this.radioStartNo,
 
562
                                                                                                                                                                 this.radioStartYes,
 
563
                                                                                                                                                                 this.label18});
 
564
                        this.panel6.Location = new System.Drawing.Point(344, 336);
 
565
                        this.panel6.Name = "panel6";
 
566
                        this.panel6.Size = new System.Drawing.Size(344, 312);
 
567
                        this.panel6.TabIndex = 3;
 
568
                        this.panel6.Paint += new System.Windows.Forms.PaintEventHandler(this.panel4_Paint);
 
569
                        // 
 
570
                        // radioStartNo
 
571
                        // 
 
572
                        this.radioStartNo.Location = new System.Drawing.Point(40, 144);
 
573
                        this.radioStartNo.Name = "radioStartNo";
 
574
                        this.radioStartNo.Size = new System.Drawing.Size(272, 48);
 
575
                        this.radioStartNo.TabIndex = 81;
 
576
                        this.radioStartNo.Text = "Manually start NDB Cluster. The Magician will exit and you must start NDB Cluster" +
 
577
                                " manually.";
 
578
                        this.radioStartNo.CheckedChanged += new System.EventHandler(this.radioStartNo_CheckedChanged);
 
579
                        // 
 
580
                        // radioStartYes
 
581
                        // 
 
582
                        this.radioStartYes.Location = new System.Drawing.Point(40, 40);
 
583
                        this.radioStartYes.Name = "radioStartYes";
 
584
                        this.radioStartYes.Size = new System.Drawing.Size(272, 88);
 
585
                        this.radioStartYes.TabIndex = 80;
 
586
                        this.radioStartYes.Text = "Start NDB Cluster now. The Magician will start NDB Cluster and exit. MAKE SURE YO" +
 
587
                                "U HAVE STARTED THE MGMTSRVR WITH THE CORRECT CONFIGURATION FILE!!!";
 
588
                        this.radioStartYes.CheckedChanged += new System.EventHandler(this.radioStartYes_CheckedChanged);
 
589
                        // 
 
590
                        // label18
 
591
                        // 
 
592
                        this.label18.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
 
593
                        this.label18.Location = new System.Drawing.Point(56, 8);
 
594
                        this.label18.Name = "label18";
 
595
                        this.label18.Size = new System.Drawing.Size(224, 24);
 
596
                        this.label18.TabIndex = 79;
 
597
                        this.label18.Text = "Start NDB Cluster and finish";
 
598
                        // 
 
599
                        // btnCancel
 
600
                        // 
 
601
                        this.btnCancel.Location = new System.Drawing.Point(8, 656);
 
602
                        this.btnCancel.Name = "btnCancel";
 
603
                        this.btnCancel.Size = new System.Drawing.Size(70, 23);
 
604
                        this.btnCancel.TabIndex = 10;
 
605
                        this.btnCancel.Text = "Cancel";
 
606
                        this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
 
607
                        // 
 
608
                        // btnback
 
609
                        // 
 
610
                        this.btnback.Location = new System.Drawing.Point(96, 656);
 
611
                        this.btnback.Name = "btnback";
 
612
                        this.btnback.Size = new System.Drawing.Size(70, 23);
 
613
                        this.btnback.TabIndex = 11;
 
614
                        this.btnback.Text = "< Back";
 
615
                        this.btnback.Click += new System.EventHandler(this.btnback_Click);
 
616
                        // 
 
617
                        // btnNext
 
618
                        // 
 
619
                        this.btnNext.Location = new System.Drawing.Point(184, 656);
 
620
                        this.btnNext.Name = "btnNext";
 
621
                        this.btnNext.Size = new System.Drawing.Size(70, 23);
 
622
                        this.btnNext.TabIndex = 12;
 
623
                        this.btnNext.Text = "Next >";
 
624
                        this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
 
625
                        // 
 
626
                        // btnFinish
 
627
                        // 
 
628
                        this.btnFinish.Location = new System.Drawing.Point(272, 656);
 
629
                        this.btnFinish.Name = "btnFinish";
 
630
                        this.btnFinish.Size = new System.Drawing.Size(70, 23);
 
631
                        this.btnFinish.TabIndex = 13;
 
632
                        this.btnFinish.Text = "Finish";
 
633
                        this.btnFinish.Click += new System.EventHandler(this.btnFinish_Click);
 
634
                        // 
 
635
                        // panel4
 
636
                        // 
 
637
                        this.panel4.Controls.AddRange(new System.Windows.Forms.Control[] {
 
638
                                                                                                                                                                 this.textEnv,
 
639
                                                                                                                                                                 this.label13,
 
640
                                                                                                                                                                 this.checkBoxReuse,
 
641
                                                                                                                                                                 this.buttonSave,
 
642
                                                                                                                                                                 this.labelTitle,
 
643
                                                                                                                                                                 this.textComputer,
 
644
                                                                                                                                                                 this.textCwd,
 
645
                                                                                                                                                                 this.textArgs,
 
646
                                                                                                                                                                 this.textOther,
 
647
                                                                                                                                                                 this.textPath,
 
648
                                                                                                                                                                 this.textDatabase,
 
649
                                                                                                                                                                 this.textName,
 
650
                                                                                                                                                                 this.labelCwd,
 
651
                                                                                                                                                                 this.labelArgs,
 
652
                                                                                                                                                                 this.labelOther,
 
653
                                                                                                                                                                 this.labelPath,
 
654
                                                                                                                                                                 this.label31,
 
655
                                                                                                                                                                 this.label32,
 
656
                                                                                                                                                                 this.label33});
 
657
                        this.panel4.Location = new System.Drawing.Point(672, 8);
 
658
                        this.panel4.Name = "panel4";
 
659
                        this.panel4.Size = new System.Drawing.Size(344, 312);
 
660
                        this.panel4.TabIndex = 62;
 
661
                        this.panel4.Paint += new System.Windows.Forms.PaintEventHandler(this.panel5_Paint);
 
662
                        // 
 
663
                        // textEnv
 
664
                        // 
 
665
                        this.textEnv.Location = new System.Drawing.Point(136, 136);
 
666
                        this.textEnv.Name = "textEnv";
 
667
                        this.textEnv.Size = new System.Drawing.Size(184, 20);
 
668
                        this.textEnv.TabIndex = 2;
 
669
                        this.textEnv.TabStop = false;
 
670
                        this.textEnv.Text = "";
 
671
                        // 
 
672
                        // label13
 
673
                        // 
 
674
                        this.label13.Location = new System.Drawing.Point(8, 136);
 
675
                        this.label13.Name = "label13";
 
676
                        this.label13.Size = new System.Drawing.Size(136, 24);
 
677
                        this.label13.TabIndex = 81;
 
678
                        this.label13.Text = "Environment variables:";
 
679
                        // 
 
680
                        // checkBoxReuse
 
681
                        // 
 
682
                        this.checkBoxReuse.Location = new System.Drawing.Point(88, 232);
 
683
                        this.checkBoxReuse.Name = "checkBoxReuse";
 
684
                        this.checkBoxReuse.Size = new System.Drawing.Size(240, 32);
 
685
                        this.checkBoxReuse.TabIndex = 5;
 
686
                        this.checkBoxReuse.TabStop = false;
 
687
                        this.checkBoxReuse.Text = "Use the same configuration for ALL NDB nodes?";
 
688
                        // 
 
689
                        // buttonSave
 
690
                        // 
 
691
                        this.buttonSave.Location = new System.Drawing.Point(184, 264);
 
692
                        this.buttonSave.Name = "buttonSave";
 
693
                        this.buttonSave.Size = new System.Drawing.Size(88, 24);
 
694
                        this.buttonSave.TabIndex = 6;
 
695
                        this.buttonSave.Text = "Save";
 
696
                        this.buttonSave.Click += new System.EventHandler(this.buttonSave_Click);
 
697
                        // 
 
698
                        // labelTitle
 
699
                        // 
 
700
                        this.labelTitle.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
 
701
                        this.labelTitle.Location = new System.Drawing.Point(80, 16);
 
702
                        this.labelTitle.Name = "labelTitle";
 
703
                        this.labelTitle.Size = new System.Drawing.Size(192, 23);
 
704
                        this.labelTitle.TabIndex = 79;
 
705
                        this.labelTitle.Text = "Mgmtsrvr configuration";
 
706
                        // 
 
707
                        // textComputer
 
708
                        // 
 
709
                        this.textComputer.Location = new System.Drawing.Point(136, 40);
 
710
                        this.textComputer.Name = "textComputer";
 
711
                        this.textComputer.ReadOnly = true;
 
712
                        this.textComputer.Size = new System.Drawing.Size(184, 20);
 
713
                        this.textComputer.TabIndex = 77;
 
714
                        this.textComputer.TabStop = false;
 
715
                        this.textComputer.Text = "";
 
716
                        // 
 
717
                        // textCwd
 
718
                        // 
 
719
                        this.textCwd.Location = new System.Drawing.Point(136, 208);
 
720
                        this.textCwd.Name = "textCwd";
 
721
                        this.textCwd.Size = new System.Drawing.Size(184, 20);
 
722
                        this.textCwd.TabIndex = 5;
 
723
                        this.textCwd.TabStop = false;
 
724
                        this.textCwd.Text = "";
 
725
                        // 
 
726
                        // textArgs
 
727
                        // 
 
728
                        this.textArgs.Location = new System.Drawing.Point(136, 184);
 
729
                        this.textArgs.Name = "textArgs";
 
730
                        this.textArgs.Size = new System.Drawing.Size(184, 20);
 
731
                        this.textArgs.TabIndex = 4;
 
732
                        this.textArgs.TabStop = false;
 
733
                        this.textArgs.Text = "";
 
734
                        // 
 
735
                        // textOther
 
736
                        // 
 
737
                        this.textOther.Location = new System.Drawing.Point(136, 160);
 
738
                        this.textOther.Name = "textOther";
 
739
                        this.textOther.Size = new System.Drawing.Size(184, 20);
 
740
                        this.textOther.TabIndex = 3;
 
741
                        this.textOther.TabStop = false;
 
742
                        this.textOther.Text = "";
 
743
                        // 
 
744
                        // textPath
 
745
                        // 
 
746
                        this.textPath.Location = new System.Drawing.Point(136, 112);
 
747
                        this.textPath.Name = "textPath";
 
748
                        this.textPath.Size = new System.Drawing.Size(184, 20);
 
749
                        this.textPath.TabIndex = 1;
 
750
                        this.textPath.TabStop = false;
 
751
                        this.textPath.Text = "";
 
752
                        this.textPath.TextChanged += new System.EventHandler(this.textPath_TextChanged);
 
753
                        // 
 
754
                        // textDatabase
 
755
                        // 
 
756
                        this.textDatabase.Location = new System.Drawing.Point(136, 88);
 
757
                        this.textDatabase.Name = "textDatabase";
 
758
                        this.textDatabase.ReadOnly = true;
 
759
                        this.textDatabase.Size = new System.Drawing.Size(184, 20);
 
760
                        this.textDatabase.TabIndex = 62;
 
761
                        this.textDatabase.TabStop = false;
 
762
                        this.textDatabase.Text = "";
 
763
                        // 
 
764
                        // textName
 
765
                        // 
 
766
                        this.textName.Location = new System.Drawing.Point(136, 64);
 
767
                        this.textName.Name = "textName";
 
768
                        this.textName.ReadOnly = true;
 
769
                        this.textName.Size = new System.Drawing.Size(184, 20);
 
770
                        this.textName.TabIndex = 60;
 
771
                        this.textName.TabStop = false;
 
772
                        this.textName.Text = "";
 
773
                        // 
 
774
                        // labelCwd
 
775
                        // 
 
776
                        this.labelCwd.Location = new System.Drawing.Point(8, 208);
 
777
                        this.labelCwd.Name = "labelCwd";
 
778
                        this.labelCwd.Size = new System.Drawing.Size(112, 24);
 
779
                        this.labelCwd.TabIndex = 72;
 
780
                        this.labelCwd.Text = "Current working dir.:";
 
781
                        // 
 
782
                        // labelArgs
 
783
                        // 
 
784
                        this.labelArgs.Location = new System.Drawing.Point(8, 184);
 
785
                        this.labelArgs.Name = "labelArgs";
 
786
                        this.labelArgs.Size = new System.Drawing.Size(128, 24);
 
787
                        this.labelArgs.TabIndex = 70;
 
788
                        this.labelArgs.Text = "Arguments to mgmtsrvr:";
 
789
                        // 
 
790
                        // labelOther
 
791
                        // 
 
792
                        this.labelOther.Location = new System.Drawing.Point(8, 160);
 
793
                        this.labelOther.Name = "labelOther";
 
794
                        this.labelOther.Size = new System.Drawing.Size(136, 24);
 
795
                        this.labelOther.TabIndex = 69;
 
796
                        this.labelOther.Text = "Mgmtsrvr port:";
 
797
                        // 
 
798
                        // labelPath
 
799
                        // 
 
800
                        this.labelPath.Location = new System.Drawing.Point(8, 112);
 
801
                        this.labelPath.Name = "labelPath";
 
802
                        this.labelPath.Size = new System.Drawing.Size(128, 24);
 
803
                        this.labelPath.TabIndex = 67;
 
804
                        this.labelPath.Text = "Path to mgmtsrvr binary:";
 
805
                        // 
 
806
                        // label31
 
807
                        // 
 
808
                        this.label31.Location = new System.Drawing.Point(8, 88);
 
809
                        this.label31.Name = "label31";
 
810
                        this.label31.Size = new System.Drawing.Size(88, 24);
 
811
                        this.label31.TabIndex = 65;
 
812
                        this.label31.Text = "Database:";
 
813
                        // 
 
814
                        // label32
 
815
                        // 
 
816
                        this.label32.Location = new System.Drawing.Point(8, 64);
 
817
                        this.label32.Name = "label32";
 
818
                        this.label32.Size = new System.Drawing.Size(88, 24);
 
819
                        this.label32.TabIndex = 63;
 
820
                        this.label32.Text = "Process name:";
 
821
                        // 
 
822
                        // label33
 
823
                        // 
 
824
                        this.label33.Location = new System.Drawing.Point(8, 40);
 
825
                        this.label33.Name = "label33";
 
826
                        this.label33.Size = new System.Drawing.Size(64, 24);
 
827
                        this.label33.TabIndex = 61;
 
828
                        this.label33.Text = "Computer:";
 
829
                        // 
 
830
                        // panel5
 
831
                        // 
 
832
                        this.panel5.Controls.AddRange(new System.Windows.Forms.Control[] {
 
833
                                                                                                                                                                 this.radioNo,
 
834
                                                                                                                                                                 this.radioYes,
 
835
                                                                                                                                                                 this.label4});
 
836
                        this.panel5.Location = new System.Drawing.Point(672, 328);
 
837
                        this.panel5.Name = "panel5";
 
838
                        this.panel5.Size = new System.Drawing.Size(344, 312);
 
839
                        this.panel5.TabIndex = 63;
 
840
                        // 
 
841
                        // radioNo
 
842
                        // 
 
843
                        this.radioNo.Location = new System.Drawing.Point(72, 160);
 
844
                        this.radioNo.Name = "radioNo";
 
845
                        this.radioNo.Size = new System.Drawing.Size(240, 48);
 
846
                        this.radioNo.TabIndex = 1;
 
847
                        this.radioNo.Text = "I already have a configuration file that I want to use for this configuration.";
 
848
                        this.radioNo.CheckedChanged += new System.EventHandler(this.radioNo_CheckedChanged);
 
849
                        // 
 
850
                        // radioYes
 
851
                        // 
 
852
                        this.radioYes.Checked = true;
 
853
                        this.radioYes.Location = new System.Drawing.Point(72, 56);
 
854
                        this.radioYes.Name = "radioYes";
 
855
                        this.radioYes.Size = new System.Drawing.Size(240, 88);
 
856
                        this.radioYes.TabIndex = 0;
 
857
                        this.radioYes.TabStop = true;
 
858
                        this.radioYes.Text = "Generate a configuration file template (initconfig.txt) for the mgmtsrvr based on" +
 
859
                                " the specified configuration? Notepad will be started with a template that you m" +
 
860
                                "ust complete and save in the cwd of the mgmtsrvr.";
 
861
                        this.radioYes.CheckedChanged += new System.EventHandler(this.radioYes_CheckedChanged);
 
862
                        // 
 
863
                        // label4
 
864
                        // 
 
865
                        this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
 
866
                        this.label4.Location = new System.Drawing.Point(88, 8);
 
867
                        this.label4.Name = "label4";
 
868
                        this.label4.Size = new System.Drawing.Size(192, 40);
 
869
                        this.label4.TabIndex = 79;
 
870
                        this.label4.Text = "Tying up the configuration";
 
871
                        this.label4.TextAlign = System.Drawing.ContentAlignment.TopCenter;
 
872
                        // 
 
873
                        // PanelWizard
 
874
                        // 
 
875
                        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
 
876
                        this.ClientSize = new System.Drawing.Size(1030, 755);
 
877
                        this.Controls.AddRange(new System.Windows.Forms.Control[] {
 
878
                                                                                                                                                  this.panel5,
 
879
                                                                                                                                                  this.panel4,
 
880
                                                                                                                                                  this.panel1,
 
881
                                                                                                                                                  this.btnFinish,
 
882
                                                                                                                                                  this.btnNext,
 
883
                                                                                                                                                  this.btnback,
 
884
                                                                                                                                                  this.btnCancel,
 
885
                                                                                                                                                  this.panel6,
 
886
                                                                                                                                                  this.panel3,
 
887
                                                                                                                                                  this.panel2});
 
888
                        this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
 
889
                        this.MaximizeBox = false;
 
890
                        this.MinimizeBox = false;
 
891
                        this.Name = "PanelWizard";
 
892
                        this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
 
893
                        this.Text = "Create Database Magician";
 
894
                        this.Load += new System.EventHandler(this.MDXQueryBuilderWizard_Load);
 
895
                        this.Activated += new System.EventHandler(this.PanelWizard_Activated);
 
896
                        this.panel1.ResumeLayout(false);
 
897
                        this.panel2.ResumeLayout(false);
 
898
                        this.panel3.ResumeLayout(false);
 
899
                        this.panel6.ResumeLayout(false);
 
900
                        this.panel4.ResumeLayout(false);
 
901
                        this.panel5.ResumeLayout(false);
 
902
                        this.ResumeLayout(false);
 
903
 
 
904
                }
 
905
                #endregion
 
906
 
 
907
                private void MDXQueryBuilderWizard_Load(object sender, System.EventArgs e)
 
908
                {
 
909
                
 
910
                        foreach(Control ct in this.Controls)
 
911
                        {
 
912
                                if(ct.GetType().Name=="Panel")
 
913
                                {
 
914
                                        ct.Left=0;
 
915
                                        ct.Top=0;
 
916
                                        ct.Visible=false;
 
917
                                }
 
918
                                
 
919
                        }
 
920
                        presentPanel=arrayPanel[0];
 
921
                        //--set the properties
 
922
                        setBtnPanProperty(getPosition(presentPanel));
 
923
                        //------
 
924
                        refreshLook();
 
925
                }
 
926
 
 
927
                //-set the buttons and panel
 
928
                private void refreshLook()
 
929
                {
 
930
                        if(cancelEnabled)
 
931
                                btnCancel.Enabled=true;
 
932
                        else
 
933
                                btnCancel.Enabled=false;
 
934
 
 
935
                        if(backEnabled)
 
936
                                btnback.Enabled=true;
 
937
                        else
 
938
                                btnback.Enabled=false;
 
939
 
 
940
                        if(nextEnabled)
 
941
                                btnNext.Enabled=true;
 
942
                        else
 
943
                                btnNext.Enabled=false;
 
944
 
 
945
                        if(finishEnabled)
 
946
                                btnFinish.Enabled=true;
 
947
                        else
 
948
                                btnFinish.Enabled=false;
 
949
                        
 
950
                        if(presentPanel!=null)
 
951
                        {
 
952
                                presentPanel.Show();
 
953
                                presentPanel.BringToFront();
 
954
                        }
 
955
                }
 
956
                //--------
 
957
                private int getPosition(Panel p)
 
958
                {
 
959
                        int result=-1;
 
960
                        for(int i=0;i<arrayPanel.Length;i++)
 
961
                        {
 
962
                                if(arrayPanel[i]==p)
 
963
                                {
 
964
                                        result=i;
 
965
                                        break;
 
966
                                }
 
967
                        }
 
968
                        return result ;
 
969
                }
 
970
                //----
 
971
 
 
972
                private void setBtnPanProperty(int presentPanelPosition )
 
973
                {                                               
 
974
                        int panelLength=arrayPanel.Length-1;
 
975
                        if(presentPanelPosition==0)
 
976
                        {
 
977
                                //first panel...no back ,no finish
 
978
                                cancelEnabled=true;
 
979
                                backEnabled=false;
 
980
                                nextEnabled=false;
 
981
                                finishEnabled=false;
 
982
                                presentPanel=arrayPanel[presentPanelPosition];
 
983
                                nextPanel=arrayPanel[presentPanelPosition+1];
 
984
                                backPanel=null;
 
985
 
 
986
                        }
 
987
                        else if(presentPanelPosition==1)
 
988
                        {
 
989
                                cancelEnabled=true;
 
990
                                backEnabled=true;
 
991
                                nextEnabled=false;
 
992
                                finishEnabled=false;
 
993
                                presentPanel=arrayPanel[presentPanelPosition];
 
994
                                nextPanel=arrayPanel[presentPanelPosition+1];
 
995
                                backPanel=arrayPanel[presentPanelPosition-1];
 
996
                        }
 
997
 
 
998
                        else if(presentPanelPosition==2)
 
999
                        {
 
1000
                                cancelEnabled=true;
 
1001
                                backEnabled=true;
 
1002
                                nextEnabled=false;
 
1003
                                finishEnabled=false;
 
1004
                                presentPanel=arrayPanel[presentPanelPosition];
 
1005
                                nextPanel=arrayPanel[presentPanelPosition+1];
 
1006
                                backPanel=arrayPanel[presentPanelPosition-1];
 
1007
                        }
 
1008
 
 
1009
                        else if(presentPanelPosition==3)
 
1010
                        {
 
1011
                                //last panel...no next,finish
 
1012
                                cancelEnabled=true;
 
1013
                                backEnabled=true;
 
1014
                                nextEnabled=true;
 
1015
                                finishEnabled=false;
 
1016
                                presentPanel=arrayPanel[presentPanelPosition];
 
1017
                                nextPanel=arrayPanel[presentPanelPosition+1];
 
1018
                                backPanel=arrayPanel[presentPanelPosition-1];
 
1019
                        }
 
1020
                        else if(presentPanelPosition==4)
 
1021
                        {
 
1022
                                //last panel...no next,finish
 
1023
                                cancelEnabled=true;
 
1024
                                backEnabled=true;
 
1025
                                nextEnabled=true;
 
1026
                                finishEnabled=false;
 
1027
                                presentPanel=arrayPanel[presentPanelPosition];
 
1028
                                nextPanel=presentPanel;
 
1029
                                backPanel=arrayPanel[presentPanelPosition-1];
 
1030
                        }
 
1031
 
 
1032
                        else if(presentPanelPosition==5)
 
1033
                        {
 
1034
                                //last panel...no next,finish yes
 
1035
                                cancelEnabled=true;
 
1036
                                backEnabled=true;
 
1037
                                nextEnabled=false;
 
1038
                                finishEnabled=false;
 
1039
                                presentPanel=arrayPanel[presentPanelPosition];
 
1040
                                nextPanel=null;
 
1041
                                backPanel=arrayPanel[presentPanelPosition-1];
 
1042
                        }
 
1043
 
 
1044
                        else
 
1045
                        {
 
1046
                                //no finish,next and back
 
1047
                                cancelEnabled=true;
 
1048
                                backEnabled=true;
 
1049
                                nextEnabled=false;
 
1050
                                finishEnabled=true;
 
1051
                                presentPanel=arrayPanel[presentPanelPosition];
 
1052
                                nextPanel=null;
 
1053
                                backPanel=arrayPanel[presentPanelPosition-1];
 
1054
                        }
 
1055
                }
 
1056
 
 
1057
                private void btnNext_Click(object sender, System.EventArgs e)
 
1058
                {
 
1059
                        
 
1060
                        if(arrayPanel[getPosition(presentPanel)].Equals(panel1))
 
1061
                        {
 
1062
                                presentPanel=arrayPanel[getPosition(presentPanel)+1];
 
1063
                                setBtnPanProperty(getPosition(presentPanel));
 
1064
                                refreshLook();
 
1065
                                return;
 
1066
                        }
 
1067
                        if(arrayPanel[getPosition(presentPanel)].Equals(panel2))
 
1068
                        {
 
1069
                                m_db.setName(textDbName.Text.ToString());
 
1070
                                m_db.setOwner(textOwner.Text.ToString());
 
1071
                                presentPanel=arrayPanel[getPosition(presentPanel)+1];
 
1072
                                //presentPanel
 
1073
                                setBtnPanProperty(getPosition(presentPanel));
 
1074
                                prepareNodeAssignmentPanel();   
 
1075
                                refreshLook();
 
1076
                        
 
1077
                                return;
 
1078
                        }
 
1079
                        if(arrayPanel[getPosition(presentPanel)].Equals(panel3))
 
1080
                        {
 
1081
                                prepareNodeConfigurationPanel();        
 
1082
                                presentPanel=arrayPanel[getPosition(presentPanel)+1];
 
1083
                                setBtnPanProperty(getPosition(presentPanel));
 
1084
                                refreshLook();
 
1085
                                return;
 
1086
                        }
 
1087
                        if(arrayPanel[getPosition(presentPanel)].Equals(panel4))
 
1088
                        {
 
1089
                                nextEnabled=true;
 
1090
                                finishEnabled=true;
 
1091
                                backEnabled=true;
 
1092
                                cancelEnabled=true;
 
1093
                                presentPanel=arrayPanel[getPosition(presentPanel)+1];
 
1094
                                setBtnPanProperty(getPosition(presentPanel));
 
1095
                                refreshLook();
 
1096
                                return;
 
1097
                        }
 
1098
                        if(arrayPanel[getPosition(presentPanel)].Equals(panel5)) 
 
1099
                        {
 
1100
                                generateInitConfig();
 
1101
                                presentPanel=arrayPanel[getPosition(presentPanel)+1];
 
1102
                                setBtnPanProperty(getPosition(presentPanel));
 
1103
                                refreshLook();
 
1104
                                return;
 
1105
                        }
 
1106
                
 
1107
                        if(arrayPanel[getPosition(presentPanel)].Equals(panel6)) 
 
1108
                        {
 
1109
                        //      presentPanel=arrayPanel[getPosition(presentPanel)+1];
 
1110
                                setBtnPanProperty(getPosition(presentPanel));
 
1111
                                refreshLook();
 
1112
                                return;
 
1113
                        }
 
1114
                        /*else 
 
1115
                        {
 
1116
                                presentPanel=arrayPanel[getPosition(presentPanel)+1];
 
1117
                                setBtnPanProperty(getPosition(presentPanel));
 
1118
                                updateListViews();
 
1119
                                refreshLook();
 
1120
                        }*/
 
1121
                }
 
1122
 
 
1123
 
 
1124
                private void btnback_Click(object sender, System.EventArgs e)
 
1125
                {
 
1126
                        presentPanel=arrayPanel[getPosition(presentPanel)-1];
 
1127
                        setBtnPanProperty(getPosition(presentPanel));
 
1128
                        m_noOfConfiguredNodes=0;
 
1129
                        m_noOfConfiguredNodes=0;
 
1130
                        m_noOfConfiguredMgmt=0;
 
1131
                        m_noOfConfiguredNdb=0;
 
1132
                        m_noOfConfiguredApi=0;
 
1133
                        m_bNdb=false;
 
1134
                        m_bMgmt=false;
 
1135
                        refreshLook();
 
1136
                }
 
1137
                
 
1138
 
 
1139
                private void btnCancel_Click(object sender, System.EventArgs e)
 
1140
                {
 
1141
                        m_db.removeAllProcesses();
 
1142
                        this.Dispose(true);
 
1143
                }
 
1144
 
 
1145
                
 
1146
 
 
1147
                
 
1148
                private void radioBtnYes_Click(object sender, System.EventArgs e)
 
1149
                {
 
1150
                        if(radioBtnNo.Checked.Equals(false))
 
1151
                        {
 
1152
                                if(radioBtnYes.Checked.Equals(true))
 
1153
                                        radioBtnYes.Checked=false;
 
1154
                                else 
 
1155
                                {
 
1156
                                        radioBtnYes.Checked=true;
 
1157
                                        this.btnNext.Enabled=true;
 
1158
                                }
 
1159
                                
 
1160
                        }
 
1161
                        if(radioBtnNo.Checked.Equals(true)) 
 
1162
                        {
 
1163
                                radioBtnNo.Checked=false;
 
1164
                                radioBtnYes.Checked=true;
 
1165
                                buttonComputerAdd.Enabled=false;
 
1166
                                this.btnNext.Enabled=true;
 
1167
                        }
 
1168
                                        
 
1169
                }
 
1170
 
 
1171
                private void radioBtnNo_Click(object sender, System.EventArgs e)
 
1172
                {
 
1173
                        if(radioBtnYes.Checked.Equals(false))
 
1174
                        {
 
1175
                                if(radioBtnNo.Checked.Equals(true)) 
 
1176
                                {
 
1177
                                        radioBtnNo.Checked=false;
 
1178
                                        buttonComputerAdd.Enabled=false;
 
1179
                                }
 
1180
                                else 
 
1181
                                {
 
1182
                                        radioBtnNo.Checked=true;
 
1183
                                        buttonComputerAdd.Enabled=true;
 
1184
                                        this.btnNext.Enabled=false;
 
1185
                                }
 
1186
                                
 
1187
                        }
 
1188
                        if(radioBtnYes.Checked.Equals(true)) 
 
1189
                        {
 
1190
                                radioBtnYes.Checked=false;
 
1191
                                radioBtnNo.Checked=true;
 
1192
                                buttonComputerAdd.Enabled=true;
 
1193
                                this.btnNext.Enabled=false;
 
1194
                        }               
 
1195
                }
 
1196
 
 
1197
                private void buttonComputerAdd_Click(object sender, System.EventArgs e)
 
1198
                {
 
1199
                        if(getPosition(presentPanel)==0) 
 
1200
                        {
 
1201
                                if(radioBtnNo.Checked.Equals(true))
 
1202
                                {
 
1203
                                        ComputerAddDialog cad = new ComputerAddDialog(mgmt);
 
1204
                                        cad.ShowDialog();
 
1205
                                }
 
1206
                        }
 
1207
                }
 
1208
 
 
1209
                private void PanelWizard_Activated(object sender, System.EventArgs e)
 
1210
                {
 
1211
                        updateComputers();
 
1212
                }
 
1213
 
 
1214
                private void updateComputers()
 
1215
                {
 
1216
                        ArrayList list = mgmt.getComputerCollection();
 
1217
                        this.listBoxComputers.BeginUpdate();
 
1218
                        this.listBoxComputers.Items.Clear();
 
1219
                        foreach(Computer c in list) 
 
1220
                        {
 
1221
                                this.listBoxComputers.Items.Add(c.getName());
 
1222
                        }
 
1223
                        if(listBoxComputers.Items.Count > 0) 
 
1224
                        {
 
1225
                                btnNext.Enabled=true;
 
1226
                        }
 
1227
                        this.listBoxComputers.EndUpdate();
 
1228
                        this.listBoxComputers.Refresh();
 
1229
                }       
 
1230
                
 
1231
 
 
1232
                private void tvComputer_AfterSelect(object sender, System.Windows.Forms.TreeViewEventArgs e)
 
1233
                {
 
1234
                        tvComputer.SelectedNode.Expand();
 
1235
 
 
1236
                }
 
1237
 
 
1238
                private void tvComputer_DragDrop(object sender, System.Windows.Forms.DragEventArgs e)
 
1239
                {
 
1240
                                
 
1241
                }
 
1242
 
 
1243
                private void tvComputer_MouseLeave(object sender, System.EventArgs e)
 
1244
                {
 
1245
                
 
1246
                }
 
1247
 
 
1248
                private void tvComputer_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 
1249
                {
 
1250
                        TreeNode prevNode = tvComputer.SelectedNode;
 
1251
                        if(prevNode!=null)
 
1252
                        {
 
1253
                                prevNode.BackColor=Color.White;
 
1254
                        }
 
1255
                        TreeNode node = tvComputer.GetNodeAt(e.X,e.Y);
 
1256
                        if(node==null)
 
1257
                        {
 
1258
                                return;
 
1259
                        }
 
1260
                
 
1261
                        tvComputer.SelectedNode=node;
 
1262
                        tvComputer.SelectedNode.BackColor=Color.LightGray;
 
1263
                        
 
1264
                }
 
1265
 
 
1266
                private void btnTransferNodeToComp_Click(object sender, System.EventArgs e)
 
1267
                {
 
1268
                        
 
1269
                        if(tvComputer.SelectedNode==null)
 
1270
                                return;
 
1271
                        if(lvNode.SelectedItems.Equals(null))
 
1272
                                return;
 
1273
                        int itemCount=lvNode.SelectedItems.Count;
 
1274
                        lvNode.BeginUpdate();
 
1275
                        tvComputer.BeginUpdate();
 
1276
                        for(int i=0;i < itemCount;i++)
 
1277
                        {
 
1278
                                tvComputer.SelectedNode.Nodes.Add(lvNode.SelectedItems[i].Text.ToString());
 
1279
                        }
 
1280
                                
 
1281
                        for(int i=0;i < itemCount;i++)
 
1282
                        {
 
1283
                                lvNode.Items.RemoveAt(lvNode.SelectedIndices[0]);
 
1284
                                
 
1285
                        }
 
1286
                        if(lvNode.Items.Count.Equals(0))
 
1287
                                btnNext.Enabled=true;
 
1288
                        else
 
1289
                                btnNext.Enabled=false;
 
1290
                        tvComputer.SelectedNode.Expand();
 
1291
                        lvNode.EndUpdate();
 
1292
                        tvComputer.EndUpdate();
 
1293
                }
 
1294
 
 
1295
                private void lvNode_SelectedIndexChanged(object sender, System.EventArgs e)
 
1296
                {
 
1297
                }
 
1298
 
 
1299
                private void prepareNodeAssignmentPanel()
 
1300
                {
 
1301
                        ArrayList computers = mgmt.getComputerCollection();
 
1302
                        m_nNDB=Convert.ToInt32(comboNDB.SelectedItem.ToString());
 
1303
                        m_nAPI=Convert.ToInt32(comboAPI.SelectedItem.ToString());
 
1304
                        m_nMGM=Convert.ToInt32(comboMGM.SelectedItem.ToString());
 
1305
                
 
1306
                        lvNode.Items.Clear();
 
1307
                        tvComputer.Nodes.Clear();
 
1308
                        for (int i=1;i<=m_nMGM;i++)
 
1309
                                lvNode.Items.Add("mgm."+i);
 
1310
                                
 
1311
                        for (int i=m_nMGM+1;i<=(m_nNDB+m_nMGM);i++)
 
1312
                                lvNode.Items.Add("ndb."+i);
 
1313
                
 
1314
                        for (int i=m_nMGM+m_nNDB+1;i<=(m_nNDB+m_nMGM+m_nAPI);i++)
 
1315
                                lvNode.Items.Add("api."+i);
 
1316
                
 
1317
                        foreach(Computer c in computers)
 
1318
                        {
 
1319
                                if(c.getStatus() == Computer.Status.Connected)
 
1320
                                        tvComputer.Nodes.Add(c.getName());
 
1321
                        }
 
1322
                
 
1323
                }
 
1324
                private void prepareNodeConfigurationPanel()
 
1325
                {       
 
1326
                        Computer c;
 
1327
                        for(int i=0;i<tvComputer.Nodes.Count;i++) 
 
1328
                        {
 
1329
                                c=mgmt.getComputer(tvComputer.Nodes[i].Text.ToString());
 
1330
                                for(int j=0; j < tvComputer.Nodes[i].Nodes.Count;j++)
 
1331
                                {
 
1332
                                        m_db.addProcess(new Process(tvComputer.Nodes[i].Nodes[j].Text.ToString(),m_db.getOwner(),m_db.getName(),c));
 
1333
                                        c.addProcess(m_db.getProcessByName(tvComputer.Nodes[i].Nodes[j].Text.ToString()));
 
1334
                                }
 
1335
                        }
 
1336
                }
 
1337
 
 
1338
                private void updateListViews()
 
1339
                {/*
 
1340
                        lvConfig.Items.Clear();
 
1341
                        ArrayList processes = m_db.getProcesses();
 
1342
                        string [] processcols= new string[5];
 
1343
                        foreach (Process process in processes)
 
1344
                        {
 
1345
                                processcols[0]=process.getName();
 
1346
                                processcols[1]=process.getComputer().getName();
 
1347
                                processcols[2]=process.getPath();
 
1348
                                processcols[3]="";
 
1349
                                processcols[4]="";
 
1350
                                
 
1351
                                ListViewItem lvc= new ListViewItem(processcols);
 
1352
        
 
1353
                                
 
1354
                                lvConfig.Items.Add(lvc);
 
1355
                        }
 
1356
                        lvConfig.EndUpdate();
 
1357
                */      
 
1358
                }
 
1359
 
 
1360
                private void btnConfigure_Click(object sender, System.EventArgs e)
 
1361
                {
 
1362
                        
 
1363
                }
 
1364
 
 
1365
                private void textDbName_TextChanged(object sender, System.EventArgs e)
 
1366
                {
 
1367
                        if(textOwner.TextLength>0 && textDbName.TextLength > 0)
 
1368
                                nextEnabled=true;
 
1369
                        else
 
1370
                                nextEnabled=false;
 
1371
 
 
1372
                        refreshLook();
 
1373
                        
 
1374
                }
 
1375
 
 
1376
                private void checkBoxLater_CheckedChanged(object sender, System.EventArgs e)
 
1377
                {
 
1378
                        if(checkBoxLater.Checked.Equals(true)) 
 
1379
                        {
 
1380
                                this.finishEnabled=true;
 
1381
                                this.nextEnabled=false;
 
1382
                        } 
 
1383
                        else 
 
1384
                        {
 
1385
                                this.finishEnabled=false;
 
1386
                                this.nextEnabled=true;
 
1387
                        }
 
1388
                        this.refreshLook();
 
1389
                }
 
1390
 
 
1391
                private void btnFinish_Click(object sender, System.EventArgs e)
 
1392
                {
 
1393
                        mgmt.AddDatabase(this.m_db);
 
1394
 
 
1395
                        if(radioStartYes.Checked==true)
 
1396
                                startDatabase();
 
1397
                        this.Dispose();
 
1398
                }
 
1399
 
 
1400
                private void panel4_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
 
1401
                {
 
1402
                        
 
1403
        //              Point location= new Point(8,40);
 
1404
        //              Size s= new Size(panel4.Size.Width-8,panel4.Size.Height-120);
 
1405
        //              lvConfig.Location=location;
 
1406
        //              lvConfig.Size=s;
 
1407
                        
 
1408
 
 
1409
                }       
 
1410
 
 
1411
                private void configureMgmt()
 
1412
                {
 
1413
                        //clear old
 
1414
                        textOther.Text="";
 
1415
                        textArgs.Text="";
 
1416
                        textCwd.Text="";
 
1417
                        textPath.Text="";
 
1418
 
 
1419
                        textPath.Clear();
 
1420
                        textEnv.Clear();
 
1421
                        textOther.Clear();
 
1422
                        textCwd.Clear();
 
1423
                        textArgs.Clear();
 
1424
 
 
1425
                        textPath.ClearUndo();
 
1426
                        textEnv.ClearUndo();
 
1427
                        textOther.ClearUndo();
 
1428
                        textCwd.ClearUndo();
 
1429
                        textArgs.ClearUndo();
 
1430
 
 
1431
                        
 
1432
                        textOther.Enabled=true;
 
1433
                        textArgs.Enabled=true;
 
1434
                        textCwd.Enabled=true;
 
1435
                        textPath.Enabled=true;
 
1436
 
 
1437
                        textPath.TabStop=true;
 
1438
                        textOther.TabStop=true;
 
1439
                        textArgs.TabStop=true;
 
1440
                        textCwd.TabStop=true;
 
1441
                        textEnv.TabStop=true;
 
1442
                        
 
1443
                        labelTitle.Text="Mgmtsrvr configuration";
 
1444
                        labelPath.Text="Path to mgmtsrvr binary:";
 
1445
                        labelArgs.Text="Arguments to mgmtsrvr:";
 
1446
                        labelOther.Text="Mgmtsrvr port (-p X):";
 
1447
 
 
1448
                        //get new
 
1449
                        String process="mgm." + Convert.ToString(m_noOfConfiguredMgmt+1);
 
1450
                        Process mgmt=m_db.getProcessByName(process);
 
1451
                        textComputer.Text=mgmt.getComputer().getName();
 
1452
                        textName.Text=mgmt.getName().ToString();
 
1453
                        textDatabase.Text=mgmt.getDatabase().ToString();
 
1454
                        m_mgmHost=mgmt.getComputer().getName();
 
1455
                        textPath.Focus();
 
1456
                }
 
1457
                private void configureApi()
 
1458
                {
 
1459
                        checkBoxReuse.Text="Use the same configuration for ALL API nodes?";
 
1460
                        if(m_nAPI > 1) 
 
1461
                    {
 
1462
                                checkBoxReuse.Visible=true;
 
1463
                                checkBoxReuse.Enabled=true;
 
1464
                                
 
1465
                        }
 
1466
                        else
 
1467
                        {
 
1468
                                checkBoxReuse.Enabled=false;
 
1469
                                checkBoxReuse.Visible=true;
 
1470
                        }
 
1471
                        
 
1472
                        // clear previous and get a new api
 
1473
                        
 
1474
                        textOther.Text="";
 
1475
                        textArgs.Text="";
 
1476
                        //textCwd.Text="";
 
1477
                        //textPath.Text="";
 
1478
                        //get new api
 
1479
                        textOther.Enabled=false;
 
1480
                        textArgs.Enabled=true;
 
1481
                        labelTitle.Text="API node configuration";
 
1482
                        labelPath.Text="Path to api binary:";
 
1483
                        labelArgs.Text="Arguments to api:";
 
1484
                        labelOther.Text="NDB_CONNECTSTRING";
 
1485
                        String process="api." + Convert.ToString(m_noOfConfiguredApi+m_nMGM+m_nNDB+1);
 
1486
                        Process api=m_db.getProcessByName(process);
 
1487
                        textComputer.Text=api.getComputer().getName();
 
1488
                        textName.Text=api.getName().ToString();
 
1489
                        textOther.Text="nodeid=" + Convert.ToString(m_noOfConfiguredApi+m_nMGM+m_nNDB+1) + ";host="+this.m_mgmHost + ":" + this.m_mgmPort; 
 
1490
                        textDatabase.Text=api.getDatabase().ToString();
 
1491
                        textPath.Focus();
 
1492
                }
 
1493
 
 
1494
                private void configureNdb()
 
1495
                {
 
1496
 
 
1497
 
 
1498
                        checkBoxReuse.Text="Use the same configuration for ALL NDB nodes?";
 
1499
                
 
1500
 
 
1501
                        if(this.m_nNDB > 1) 
 
1502
                        {
 
1503
                                checkBoxReuse.Visible=true;
 
1504
                                checkBoxReuse.Enabled=true;
 
1505
                                
 
1506
                        }
 
1507
                        else
 
1508
                        {
 
1509
                                checkBoxReuse.Enabled=false;
 
1510
                                checkBoxReuse.Visible=true;
 
1511
                        }
 
1512
                        
 
1513
                        
 
1514
 
 
1515
                        labelPath.Text="Path to ndb binary:";
 
1516
                        labelArgs.Text="Arguments to ndb:";
 
1517
                        
 
1518
                        // clear previous and get a new ndb
 
1519
                        
 
1520
                        labelOther.Text="NDB_CONNECTSTRING";
 
1521
                        textArgs.Text="-i";
 
1522
                        textOther.Enabled=false;
 
1523
                        textArgs.Enabled=false;
 
1524
 
 
1525
                        textPath.TabStop=true;
 
1526
                        textEnv.TabStop=true;
 
1527
                        textOther.TabStop=false;
 
1528
                        textArgs.TabStop=false;
 
1529
                        textCwd.TabStop=true;
 
1530
                        
 
1531
                        //textCwd.Text="";
 
1532
                        //textPath.Text="";
 
1533
                        //get new
 
1534
                        
 
1535
                        String process="ndb." + Convert.ToString(m_noOfConfiguredNdb+m_nMGM+1);
 
1536
                        textOther.Text="nodeid=" + Convert.ToString(m_noOfConfiguredNdb+m_nMGM+1) + ";host="+this.m_mgmHost + ":" + this.m_mgmPort;
 
1537
                        Process ndb=m_db.getProcessByName(process);
 
1538
                        textComputer.Text=ndb.getComputer().getName();
 
1539
                        textName.Text=ndb.getName().ToString();
 
1540
                        textDatabase.Text=ndb.getDatabase().ToString();
 
1541
                        textPath.Focus();
 
1542
                }
 
1543
 
 
1544
 
 
1545
                public void saveMgm()
 
1546
                {
 
1547
                        String process="mgm." + Convert.ToString(m_noOfConfiguredMgmt+1);
 
1548
                        Process mgmt=m_db.getProcessByName(process);
 
1549
                        mgmt.setOther(textOther.Text.ToString());
 
1550
                        mgmt.setEnv(textEnv.Text.ToString());
 
1551
                        m_mgmPort = textOther.Text.ToString();
 
1552
                        try 
 
1553
                        {
 
1554
                                m_db.setMgmtPort(Convert.ToInt32(m_mgmPort));
 
1555
                        }
 
1556
                        catch(Exception e)
 
1557
                        {
 
1558
                                MessageBox.Show("Port number must be numeric!!!", "Error",MessageBoxButtons.OK);
 
1559
                                this.configureMgmt();
 
1560
                                return;
 
1561
                        }
 
1562
                        mgmt.setPath(textPath.Text.ToString());
 
1563
                        mgmt.setCwd(textCwd.Text.ToString());
 
1564
                        mgmt.setProcessType("permanent");
 
1565
                        mgmt.setArgs("-i initconfig.txt");
 
1566
                        mgmt.setConnectString("nodeid=" + Convert.ToString(m_noOfConfiguredMgmt+1)+";host="+m_mgmHost+":" + m_mgmPort);
 
1567
                        this.m_noOfConfiguredMgmt++;
 
1568
                }
 
1569
 
 
1570
                public void saveApi()
 
1571
                {
 
1572
                        if(checkBoxReuse.Checked) 
 
1573
                        {
 
1574
                                for(;m_noOfConfiguredApi<m_nAPI;m_noOfConfiguredApi++)
 
1575
                                {
 
1576
                                        String process="api." + Convert.ToString(m_noOfConfiguredApi+m_nMGM+m_nNDB+1);
 
1577
                                        Process api=m_db.getProcessByName(process);
 
1578
                                        textName.Text=process;
 
1579
                                        api.setPath(textPath.Text.ToString());
 
1580
                                        api.setArgs(textArgs.Text.ToString());
 
1581
                                        api.setCwd(textCwd.Text.ToString());
 
1582
                                        api.setEnv(textEnv.Text.ToString());
 
1583
                                        api.setConnectString("nodeid=" + Convert.ToString(m_noOfConfiguredApi+m_nNDB+m_nMGM+1)+";host="+m_mgmHost+":" + m_mgmPort);
 
1584
                                        api.setProcessType("permanent");
 
1585
                                }
 
1586
 
 
1587
                        }       
 
1588
                        else
 
1589
                        {
 
1590
                                String process="api." + Convert.ToString(m_noOfConfiguredApi+m_nMGM+m_nNDB+1);
 
1591
                                Process api=m_db.getProcessByName(process);
 
1592
                                api.setPath(textPath.Text.ToString());
 
1593
                                api.setCwd(textCwd.Text.ToString());
 
1594
                                api.setEnv(textEnv.Text.ToString());
 
1595
                                api.setConnectString("nodeid=" + Convert.ToString(m_noOfConfiguredApi+m_nNDB+m_nMGM+1)+";host="+m_mgmHost+":" + m_mgmPort);
 
1596
                                api.setArgs(textArgs.Text.ToString());
 
1597
                                api.setProcessType("permanent");
 
1598
                                this.m_noOfConfiguredApi++;
 
1599
                        }
 
1600
                }
 
1601
 
 
1602
                public void saveNdb()
 
1603
                {
 
1604
                        
 
1605
                        if(checkBoxReuse.Checked) 
 
1606
                        {
 
1607
                                for(;m_noOfConfiguredNdb<m_nNDB;m_noOfConfiguredNdb++)
 
1608
                                {
 
1609
                                        String process="ndb." + Convert.ToString(m_noOfConfiguredNdb+m_nMGM+1);
 
1610
                                        Process ndb=m_db.getProcessByName(process);
 
1611
                                        ndb.setConnectString("nodeid=" + Convert.ToString(m_noOfConfiguredNdb+m_nMGM+1)+";host="+m_mgmHost+":" + m_mgmPort);
 
1612
                                        ndb.setPath(textPath.Text.ToString());
 
1613
                                        ndb.setArgs(textArgs.Text.ToString());
 
1614
                                        ndb.setEnv(textEnv.Text.ToString());
 
1615
                                        ndb.setCwd(textCwd.Text.ToString());
 
1616
                                        ndb.setProcessType("permanent");        
 
1617
                                }
 
1618
                                checkBoxReuse.Checked=false;
 
1619
                                return;
 
1620
                        }       
 
1621
                        else
 
1622
                        {
 
1623
                                String process="ndb." + Convert.ToString(m_noOfConfiguredNdb+m_nMGM+1);
 
1624
                                Process ndb=m_db.getProcessByName(process);
 
1625
                                ndb.setConnectString("nodeid=" + Convert.ToString(m_noOfConfiguredNdb+m_nMGM+1)+";host="+m_mgmHost+":" + m_mgmPort);
 
1626
                                ndb.setPath(textPath.Text.ToString());
 
1627
                                ndb.setCwd(textCwd.Text.ToString());
 
1628
                                ndb.setArgs(textArgs.Text.ToString());
 
1629
                                ndb.setEnv(textEnv.Text.ToString());
 
1630
                                ndb.setProcessType("permanent");
 
1631
                                m_noOfConfiguredNdb++;
 
1632
                        }
 
1633
                        
 
1634
                }
 
1635
 
 
1636
 
 
1637
                private void panel5_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
 
1638
                {
 
1639
                        nextEnabled=false;
 
1640
                        buttonSave.Enabled=true;
 
1641
                        checkBoxReuse.Visible=false;
 
1642
                        refreshLook();
 
1643
                        configureMgmt();
 
1644
                }
 
1645
 
 
1646
                private void buttonSave_Click(object sender, System.EventArgs e)
 
1647
                {
 
1648
                        Process p = m_db.getProcessByName(textName.Text.ToString());
 
1649
 
 
1650
                        if(textOther.Text.ToString().Equals("")) 
 
1651
                        {
 
1652
                                if(textName.Text.StartsWith("mgm"))  
 
1653
                                {
 
1654
                                        MessageBox.Show("You have to specify a port.","Warning",MessageBoxButtons.OK);
 
1655
                                        return;
 
1656
                                }
 
1657
                                if(textName.Text.StartsWith("ndb"))  
 
1658
                                {
 
1659
                                        MessageBox.Show("You have to specify a filesystem path.","Warning",MessageBoxButtons.OK);
 
1660
                                        return;
 
1661
                                }
 
1662
 
 
1663
                        }
 
1664
                        
 
1665
                        if(textPath.Text.ToString().Equals("")) 
 
1666
                        {
 
1667
                                if(textName.Text.StartsWith("mgm"))  
 
1668
                                {
 
1669
                                        MessageBox.Show("You have to specify the path to the mgmtsrvr.","Warning",MessageBoxButtons.OK);
 
1670
                                        return;
 
1671
                                }
 
1672
                                if(textName.Text.StartsWith("ndb"))  
 
1673
                                {
 
1674
                                        MessageBox.Show("You have to specify the path to ndb.","Warning",MessageBoxButtons.OK);
 
1675
                                        return;
 
1676
                                }
 
1677
                        }
 
1678
                        
 
1679
                        if(textArgs.Text.ToString().Equals("")) 
 
1680
                        {
 
1681
                                if(textName.Text.StartsWith("mgm"))  
 
1682
                                {
 
1683
                                        MessageBox.Show("You have to specify the arguments to the mgmtsrvr.","Warning",MessageBoxButtons.OK);
 
1684
                                        return;
 
1685
                                }
 
1686
                        }
 
1687
                        
 
1688
                        if(textCwd.Text.ToString().Equals("")) 
 
1689
                        {
 
1690
                                if(textCwd.Text.StartsWith("mgm")) 
 
1691
                                {
 
1692
                                        MessageBox.Show("You have to specify the current working directory for the mgmtsrvr.","Warning",MessageBoxButtons.OK);
 
1693
                                        return;
 
1694
                                }
 
1695
                        }
 
1696
 
 
1697
 
 
1698
                        /*
 
1699
                         * INPUT IS FINE AT THIS POINT
 
1700
                         * Everything needed for respective process is ok
 
1701
                         * */
 
1702
 
 
1703
                        if(textName.Text.StartsWith("mgm")) 
 
1704
                        {
 
1705
                                //MessageBox.Show(textOther.Text.ToString());
 
1706
                                saveMgm();
 
1707
                        
 
1708
                        }
 
1709
 
 
1710
                        if(textName.Text.StartsWith("ndb")) 
 
1711
                        {
 
1712
                                saveNdb();
 
1713
                
 
1714
                        }
 
1715
 
 
1716
                        if(textName.Text.StartsWith("api")) 
 
1717
                        {
 
1718
                                saveApi();
 
1719
                
 
1720
                        }
 
1721
 
 
1722
                        if(m_noOfConfiguredMgmt < m_nMGM) 
 
1723
                        {
 
1724
                                //load another Mgmt
 
1725
                                labelTitle.Text="Mgmtsrvr configuration";
 
1726
                                configureMgmt();
 
1727
                        } 
 
1728
                        else
 
1729
                        {
 
1730
                                m_bMgmt=true;
 
1731
                        }
 
1732
 
 
1733
                        if(m_bMgmt) 
 
1734
                        {
 
1735
                                labelTitle.Text="NDB node configuration";
 
1736
                                if(m_noOfConfiguredNdb < m_nNDB) 
 
1737
                                {
 
1738
                                        configureNdb();
 
1739
                                }
 
1740
                                else
 
1741
                                        m_bNdb=true;
 
1742
                        }
 
1743
 
 
1744
                        if(m_bNdb && m_bMgmt) 
 
1745
                        {
 
1746
                                labelTitle.Text="API node configuration";
 
1747
                                if(m_noOfConfiguredApi < m_nAPI)
 
1748
                                        configureApi();
 
1749
                                else 
 
1750
                                {
 
1751
                                        nextEnabled=true;
 
1752
                                        buttonSave.Enabled=false;
 
1753
                                        refreshLook();
 
1754
                                }
 
1755
                        }
 
1756
                        
 
1757
                }
 
1758
 
 
1759
                private void listBoxComputers_SelectedIndexChanged(object sender, System.EventArgs e)
 
1760
                {
 
1761
                
 
1762
                }
 
1763
 
 
1764
                private void panel1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
 
1765
                {
 
1766
                        updateComputers();
 
1767
                }
 
1768
 
 
1769
                private void radioYes_CheckedChanged(object sender, System.EventArgs e)
 
1770
                {
 
1771
                        if(radioYes.Checked==true) 
 
1772
                        {
 
1773
                                radioNo.Checked=false;
 
1774
                        }
 
1775
                        if(radioYes.Checked==false) 
 
1776
                        {
 
1777
                                radioNo.Checked=true;
 
1778
                        }
 
1779
 
 
1780
                }
 
1781
 
 
1782
                private void radioNo_CheckedChanged(object sender, System.EventArgs e)
 
1783
                {
 
1784
                        if(radioNo.Checked==true) 
 
1785
                        {
 
1786
                                radioYes.Checked=false;
 
1787
                        }
 
1788
                        if(radioNo.Checked==false) 
 
1789
                        {
 
1790
                                radioYes.Checked=true;
 
1791
                        }               
 
1792
                }
 
1793
 
 
1794
                private void radioStartYes_CheckedChanged(object sender, System.EventArgs e)
 
1795
                {
 
1796
                
 
1797
                        if(radioStartYes.Checked==true) 
 
1798
                        {
 
1799
                                radioStartNo.Checked=false;
 
1800
                        }
 
1801
                        if(radioStartYes.Checked==false) 
 
1802
                        {
 
1803
                                radioStartNo.Checked=true;
 
1804
                        }
 
1805
                        finishEnabled=true;
 
1806
                        refreshLook();
 
1807
                }
 
1808
 
 
1809
                private void radioStartNo_CheckedChanged(object sender, System.EventArgs e)
 
1810
                {
 
1811
                        if(radioStartNo.Checked==true) 
 
1812
                        {
 
1813
                                radioStartYes.Checked=false;
 
1814
                        }
 
1815
                        if(radioStartNo.Checked==false) 
 
1816
                        {
 
1817
                                radioStartYes.Checked=true;
 
1818
                        }
 
1819
                        finishEnabled=true;
 
1820
                        refreshLook();
 
1821
                }
 
1822
 
 
1823
                
 
1824
 
 
1825
                
 
1826
                public void startDatabase()
 
1827
                {
 
1828
                        startDatabaseDlg x = new startDatabaseDlg(this.m_db);
 
1829
                        
 
1830
                
 
1831
                        x.ShowDialog();
 
1832
                        
 
1833
 
 
1834
                }
 
1835
 
 
1836
                
 
1837
                public void generateInitConfig()
 
1838
                {
 
1839
                        MessageBox.Show("Generate initconfig.txt");
 
1840
                }
 
1841
 
 
1842
                private void label11_Click(object sender, System.EventArgs e)
 
1843
                {
 
1844
                
 
1845
                }
 
1846
 
 
1847
                private void textOwner_TextChanged(object sender, System.EventArgs e)
 
1848
                {
 
1849
                        if(textDbName.TextLength > 0 && textOwner.TextLength > 0)
 
1850
                                nextEnabled=true;
 
1851
                        else
 
1852
                                nextEnabled=false;
 
1853
 
 
1854
                        refreshLook();
 
1855
                }
 
1856
 
 
1857
                private void panel2_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
 
1858
                {
 
1859
                        textOwner.Text=System.Environment.UserName;
 
1860
                        this.Validate();
 
1861
                        if(textDbName.TextLength > 0 && textOwner.TextLength>0)
 
1862
                        {
 
1863
                                nextEnabled=true;
 
1864
                        }
 
1865
                        else
 
1866
                        {
 
1867
                                nextEnabled=false;
 
1868
                        }
 
1869
                        refreshLook();
 
1870
                }
 
1871
 
 
1872
                private void textPath_TextChanged(object sender, System.EventArgs e)
 
1873
                {
 
1874
                        try 
 
1875
                        {
 
1876
 
 
1877
                        }
 
1878
                        catch (Exception exc)
 
1879
                        {
 
1880
                                MessageBox.Show(exc.ToString());
 
1881
                        }
 
1882
                }
 
1883
 
 
1884
                private void panel2_Validating(object sender, System.ComponentModel.CancelEventArgs e)
 
1885
                {
 
1886
                        if(textOwner.TextLength>0 && textDbName.TextLength > 0)
 
1887
                                nextEnabled=true;
 
1888
                        else
 
1889
                                nextEnabled=false;
 
1890
                }
 
1891
 
 
1892
                
 
1893
 
 
1894
 
 
1895
 
 
1896
        
 
1897
        }
 
1898
}