comparison FrmMain.cs @ 2:74df258710fe

Fixes #8 - Update SWF version of WarFoundry * Add translations file and copy on build * Add names to controls in FrmMain
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Dec 2008 19:20:26 +0000
parents 42cf06b8f897
children 8935971e307c
comparison
equal deleted inserted replaced
1:42cf06b8f897 2:74df258710fe
43 43
44 private FrmArmyTree armyTree; 44 private FrmArmyTree armyTree;
45 private FrmDebugOutput debugWindow; 45 private FrmDebugOutput debugWindow;
46 private string loadedFilePath; 46 private string loadedFilePath;
47 47
48 private IBBoard.Windows.Forms.ColorableStatusBar statusBar; 48 private System.ComponentModel.IContainer components;
49 private System.Windows.Forms.ToolBar toolBar; 49 private System.Windows.Forms.ToolBar toolBar;
50 private System.Windows.Forms.MainMenu mainMenu;
51 private IBBoard.Windows.Forms.IBBMenuItem menuFile;
52 private IBBoard.Windows.Forms.IBBMenuItem menuHelp;
53 private IBBoard.Windows.Forms.IBBToolBarButton bttnNewArmy; 50 private IBBoard.Windows.Forms.IBBToolBarButton bttnNewArmy;
54 private System.Windows.Forms.ImageList buttonIcons; 51 private System.Windows.Forms.ImageList buttonIcons;
55 private IBBoard.Windows.Forms.IBBToolBarButton bttnSaveArmy; 52 private IBBoard.Windows.Forms.IBBToolBarButton bttnSaveArmy;
56 private System.Windows.Forms.OpenFileDialog openArmyDialog; 53 private System.Windows.Forms.OpenFileDialog openArmyDialog;
57 private System.Windows.Forms.SaveFileDialog saveArmyDialog; 54 private System.Windows.Forms.SaveFileDialog saveArmyDialog;
58 private IBBoard.Windows.Forms.IBBMenuItem miExit; 55 private IBBoard.Windows.Forms.IBBToolBarButton bttnOpenArmy;
59 private IBBoard.Windows.Forms.IBBToolBarButton bttnOpenArmy; 56 private IBBoard.Windows.Forms.IBBToolBarButton bttnSep1;
60 private IBBoard.Windows.Forms.IBBMenuItem miAbout; 57 private IBBoard.Windows.Forms.IBBToolBarButton bttnUndo;
61 private System.ComponentModel.IContainer components; 58 private IBBoard.Windows.Forms.IBBToolBarButton bttnRedo;
59 private System.Windows.Forms.MainMenu mainMenu;
60 private IBBoard.Windows.Forms.IBBMenuItem menuFile;
62 private IBBoard.Windows.Forms.IBBMenuItem miNewArmy; 61 private IBBoard.Windows.Forms.IBBMenuItem miNewArmy;
63 private IBBoard.Windows.Forms.IBBMenuItem miOpenArmy; 62 private IBBoard.Windows.Forms.IBBMenuItem miOpenArmy;
64 private IBBoard.Windows.Forms.IBBMenuItem miCloseArmy; 63 private IBBoard.Windows.Forms.IBBMenuItem miCloseArmy;
65 private IBBoard.Windows.Forms.IBBMenuItem miSaveArmy; 64 private IBBoard.Windows.Forms.IBBMenuItem miSaveArmy;
66 private IBBoard.Windows.Forms.IBBMenuItem miSaveArmyAs; 65 private IBBoard.Windows.Forms.IBBMenuItem miSaveArmyAs;
67 private IBBoard.Windows.Forms.IBBMenuItem miChangeSystem; 66 private System.Windows.Forms.MenuItem miSep2;
68 private IBBoard.Windows.Forms.IBBToolBarButton bttnSep1; 67 private IBBoard.Windows.Forms.IBBMenuItem miChangeSystem;
69 private IBBoard.Windows.Forms.IBBToolBarButton bttnUndo; 68 private System.Windows.Forms.MenuItem miSep1;
70 private IBBoard.Windows.Forms.IBBToolBarButton bttnRedo; 69 private IBBoard.Windows.Forms.IBBMenuItem miReloadFiles;
70 private System.Windows.Forms.MenuItem miSep3;
71 private IBBoard.Windows.Forms.IBBMenuItem miExit;
71 private IBBoard.Windows.Forms.IBBMenuItem menuEdit; 72 private IBBoard.Windows.Forms.IBBMenuItem menuEdit;
72 private IBBoard.Windows.Forms.IBBMenuItem miUndo; 73 private IBBoard.Windows.Forms.IBBMenuItem miUndo;
73 private IBBoard.Windows.Forms.IBBMenuItem miRedo; 74 private IBBoard.Windows.Forms.IBBMenuItem miRedo;
74 private IBBoard.Windows.Forms.IBBMenuItem miDebugWindow; 75 private IBBoard.Windows.Forms.IBBMenuItem menuHelp;
75 private System.Windows.Forms.MenuItem miSep1; 76 private IBBoard.Windows.Forms.IBBMenuItem miDebugWindow;
76 private System.Windows.Forms.MenuItem miSep2; 77 private IBBoard.Windows.Forms.IBBMenuItem miAbout;
77 private System.Windows.Forms.MenuItem miSep3;
78 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbMainPanel; 78 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbMainPanel;
79 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbErrorPanel; 79 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbErrorPanel;
80 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbPointsPanel; 80 private IBBoard.Windows.Forms.ColorableStatusBarPanel sbPointsPanel;
81 private System.Windows.Forms.ContextMenu undoMenu; 81 private System.Windows.Forms.ContextMenu undoMenu;
82 private System.Windows.Forms.ContextMenu redoMenu; 82 private System.Windows.Forms.ContextMenu redoMenu;
83 private IBBoard.Windows.Forms.IBBMenuItem miReloadFiles; 83 private IBBoard.Windows.Forms.ColorableStatusBar statusBar;
84 private System.Windows.Forms.Timer statusBarTimer; 84 private System.Windows.Forms.Timer statusBarTimer;
85 private System.Windows.Forms.Panel pnlRight; 85 private System.Windows.Forms.Panel pnlRight;
86 86
87 public FrmMain(string[] args) 87 public FrmMain(string[] args)
88 { 88 {
329 // 329 //
330 // bttnNewArmy 330 // bttnNewArmy
331 // 331 //
332 this.bttnNewArmy.Enabled = false; 332 this.bttnNewArmy.Enabled = false;
333 this.bttnNewArmy.ImageIndex = 0; 333 this.bttnNewArmy.ImageIndex = 0;
334 this.bttnNewArmy.Name = ""; 334 this.bttnNewArmy.Name = "bttnNewArmy";
335 // 335 //
336 // bttnOpenArmy 336 // bttnOpenArmy
337 // 337 //
338 this.bttnOpenArmy.ImageIndex = 2; 338 this.bttnOpenArmy.ImageIndex = 2;
339 this.bttnOpenArmy.Name = ""; 339 this.bttnOpenArmy.Name = "bttnOpenArmy";
340 // 340 //
341 // bttnSaveArmy 341 // bttnSaveArmy
342 // 342 //
343 this.bttnSaveArmy.Enabled = false; 343 this.bttnSaveArmy.Enabled = false;
344 this.bttnSaveArmy.ImageIndex = 1; 344 this.bttnSaveArmy.ImageIndex = 1;
345 this.bttnSaveArmy.Name = ""; 345 this.bttnSaveArmy.Name = "bttnSaveArmy";
346 // 346 //
347 // bttnSep1 347 // bttnSep1
348 // 348 //
349 this.bttnSep1.Name = "";
350 this.bttnSep1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator; 349 this.bttnSep1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
351 // 350 //
352 // bttnUndo 351 // bttnUndo
353 // 352 //
354 this.bttnUndo.DropDownMenu = this.undoMenu; 353 this.bttnUndo.DropDownMenu = this.undoMenu;
355 this.bttnUndo.Enabled = false; 354 this.bttnUndo.Enabled = false;
356 this.bttnUndo.ImageIndex = 3; 355 this.bttnUndo.ImageIndex = 3;
357 this.bttnUndo.Name = ""; 356 this.bttnUndo.Name = "bttnUndo";
358 this.bttnUndo.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; 357 this.bttnUndo.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
359 // 358 //
360 // bttnRedo 359 // bttnRedo
361 // 360 //
362 this.bttnRedo.DropDownMenu = this.redoMenu; 361 this.bttnRedo.DropDownMenu = this.redoMenu;
363 this.bttnRedo.Enabled = false; 362 this.bttnRedo.Enabled = false;
364 this.bttnRedo.ImageIndex = 4; 363 this.bttnRedo.ImageIndex = 4;
365 this.bttnRedo.Name = ""; 364 this.bttnRedo.Name = "bttnRedo";
366 this.bttnRedo.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton; 365 this.bttnRedo.Style = System.Windows.Forms.ToolBarButtonStyle.DropDownButton;
367 // 366 //
368 // buttonIcons 367 // buttonIcons
369 // 368 //
370 this.buttonIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("buttonIcons.ImageStream"))); 369 this.buttonIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("buttonIcons.ImageStream")));
398 this.miSep2, 397 this.miSep2,
399 this.miReloadFiles, 398 this.miReloadFiles,
400 this.miSep3, 399 this.miSep3,
401 this.miExit}); 400 this.miExit});
402 this.menuFile.Text = "&file"; 401 this.menuFile.Text = "&file";
402 this.menuFile.Name = "menuFile";
403 // 403 //
404 // miNewArmy 404 // miNewArmy
405 // 405 //
406 this.miNewArmy.Index = 0; 406 this.miNewArmy.Index = 0;
407 this.miNewArmy.Text = "&new army"; 407 this.miNewArmy.Text = "&new army";
408 this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click); 408 this.miNewArmy.Click += new System.EventHandler(this.miNewArmy_Click);
409 this.miNewArmy.Name = "miNewArmy";
409 // 410 //
410 // miOpenArmy 411 // miOpenArmy
411 // 412 //
412 this.miOpenArmy.Index = 1; 413 this.miOpenArmy.Index = 1;
413 this.miOpenArmy.Text = "&open army"; 414 this.miOpenArmy.Text = "&open army";
414 this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click); 415 this.miOpenArmy.Click += new System.EventHandler(this.miOpenArmy_Click);
416 this.miOpenArmy.Name = "miOpenArmy";
415 // 417 //
416 // miSaveArmy 418 // miSaveArmy
417 // 419 //
418 this.miSaveArmy.Enabled = false; 420 this.miSaveArmy.Enabled = false;
419 this.miSaveArmy.Index = 2; 421 this.miSaveArmy.Index = 2;
420 this.miSaveArmy.Text = "&save army"; 422 this.miSaveArmy.Text = "&save army";
421 this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click); 423 this.miSaveArmy.Click += new System.EventHandler(this.miSaveArmy_Click);
424 this.miSaveArmy.Name = "miSaveArmy";
422 // 425 //
423 // miSaveArmyAs 426 // miSaveArmyAs
424 // 427 //
425 this.miSaveArmyAs.Enabled = false; 428 this.miSaveArmyAs.Enabled = false;
426 this.miSaveArmyAs.Index = 3; 429 this.miSaveArmyAs.Index = 3;
427 this.miSaveArmyAs.Text = "save army &as..."; 430 this.miSaveArmyAs.Text = "save army &as...";
428 this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click); 431 this.miSaveArmyAs.Click += new System.EventHandler(this.miSaveArmyAs_Click);
432 this.miSaveArmyAs.Name = "miSaveArmyAs";
429 // 433 //
430 // miCloseArmy 434 // miCloseArmy
431 // 435 //
432 this.miCloseArmy.Enabled = false; 436 this.miCloseArmy.Enabled = false;
433 this.miCloseArmy.Index = 4; 437 this.miCloseArmy.Index = 4;
434 this.miCloseArmy.Text = "&close army"; 438 this.miCloseArmy.Text = "&close army";
435 this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click); 439 this.miCloseArmy.Click += new System.EventHandler(this.miCloseArmy_Click);
440 this.miCloseArmy.Name = "miCloseArmy";
436 // 441 //
437 // miSep1 442 // miSep1
438 // 443 //
439 this.miSep1.Index = 5; 444 this.miSep1.Index = 5;
440 this.miSep1.Text = "-"; 445 this.miSep1.Text = "-";
442 // miChangeSystem 447 // miChangeSystem
443 // 448 //
444 this.miChangeSystem.Index = 6; 449 this.miChangeSystem.Index = 6;
445 this.miChangeSystem.Text = "change &game system"; 450 this.miChangeSystem.Text = "change &game system";
446 this.miChangeSystem.Click += new System.EventHandler(this.miChangeSystem_Click); 451 this.miChangeSystem.Click += new System.EventHandler(this.miChangeSystem_Click);
452 this.miChangeSystem.Name = "miChangeSystem";
447 // 453 //
448 // miSep2 454 // miSep2
449 // 455 //
450 this.miSep2.Index = 7; 456 this.miSep2.Index = 7;
451 this.miSep2.Text = "-"; 457 this.miSep2.Text = "-";
453 // miReloadFiles 459 // miReloadFiles
454 // 460 //
455 this.miReloadFiles.Index = 8; 461 this.miReloadFiles.Index = 8;
456 this.miReloadFiles.Text = "&reload files"; 462 this.miReloadFiles.Text = "&reload files";
457 this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click); 463 this.miReloadFiles.Click += new System.EventHandler(this.miReloadFiles_Click);
464 this.miReloadFiles.Name = "miReloadFiles";
458 // 465 //
459 // miSep3 466 // miSep3
460 // 467 //
461 this.miSep3.Index = 9; 468 this.miSep3.Index = 9;
462 this.miSep3.Text = "-"; 469 this.miSep3.Text = "-";
464 // miExit 471 // miExit
465 // 472 //
466 this.miExit.Index = 10; 473 this.miExit.Index = 10;
467 this.miExit.Text = "e&xit"; 474 this.miExit.Text = "e&xit";
468 this.miExit.Click += new System.EventHandler(this.miExit_Click); 475 this.miExit.Click += new System.EventHandler(this.miExit_Click);
476 this.miExit.Name = "miExit";
469 // 477 //
470 // menuEdit 478 // menuEdit
471 // 479 //
472 this.menuEdit.Index = 1; 480 this.menuEdit.Index = 1;
473 this.menuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 481 this.menuEdit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
474 this.miUndo, 482 this.miUndo,
475 this.miRedo}); 483 this.miRedo});
476 this.menuEdit.Text = "&edit"; 484 this.menuEdit.Text = "&edit";
485 this.menuEdit.Name = "menuEdit";
477 // 486 //
478 // miUndo 487 // miUndo
479 // 488 //
480 this.miUndo.Enabled = false; 489 this.miUndo.Enabled = false;
481 this.miUndo.Index = 0; 490 this.miUndo.Index = 0;
482 this.miUndo.Text = "&undo"; 491 this.miUndo.Text = "&undo";
483 this.miUndo.Click += new System.EventHandler(this.miUndo_Click); 492 this.miUndo.Click += new System.EventHandler(this.miUndo_Click);
493 this.miUndo.Name = "miUndo";
484 // 494 //
485 // miRedo 495 // miRedo
486 // 496 //
487 this.miRedo.Enabled = false; 497 this.miRedo.Enabled = false;
488 this.miRedo.Index = 1; 498 this.miRedo.Index = 1;
489 this.miRedo.Text = "&redo"; 499 this.miRedo.Text = "&redo";
490 this.miRedo.Click += new System.EventHandler(this.miRedo_Click); 500 this.miRedo.Click += new System.EventHandler(this.miRedo_Click);
501 this.miRedo.Name = "miRedo";
491 // 502 //
492 // menuHelp 503 // menuHelp
493 // 504 //
494 this.menuHelp.Index = 2; 505 this.menuHelp.Index = 2;
495 this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { 506 this.menuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
496 this.miAbout, 507 this.miAbout,
497 this.miDebugWindow}); 508 this.miDebugWindow});
498 this.menuHelp.Text = "&help"; 509 this.menuHelp.Text = "&help";
510 this.menuHelp.Name = "menuHelp";
499 // 511 //
500 // miAbout 512 // miAbout
501 // 513 //
502 this.miAbout.Enabled = false; 514 this.miAbout.Enabled = false;
503 this.miAbout.Index = 0; 515 this.miAbout.Index = 0;
504 this.miAbout.Text = "&about"; 516 this.miAbout.Text = "&about";
517 this.miAbout.Name = "miAbout";
505 // 518 //
506 // miDebugWindow 519 // miDebugWindow
507 // 520 //
508 this.miDebugWindow.Index = 1; 521 this.miDebugWindow.Index = 1;
509 this.miDebugWindow.Text = "&debug"; 522 this.miDebugWindow.Text = "&debug";
510 this.miDebugWindow.Click += new System.EventHandler(this.miDebugWindow_Click); 523 this.miDebugWindow.Click += new System.EventHandler(this.miDebugWindow_Click);
524 this.miDebugWindow.Name = "miDebugWindow";
511 // 525 //
512 // saveArmyDialog 526 // saveArmyDialog
513 // 527 //
514 this.saveArmyDialog.Title = "Translatable:saveArmyDialog"; 528 this.saveArmyDialog.Title = "Translatable:saveArmyDialog";
515 // 529 //