Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
comparison FrmMainWindow.cs @ 153:87fda1e6d4d3
* Merge accidental new head
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 08 May 2012 21:01:57 +0100 |
parents | 83b19b57cba1 |
children | 2d1dd73a3289 |
comparison
equal
deleted
inserted
replaced
152:b612d7137f4d | 153:87fda1e6d4d3 |
---|---|
1 // This file (FrmMainWindow.cs) is a part of the IBBoard.WarFoundry.GTK project and is copyright 2008, 2009 IBBoard. | 1 // This file (FrmMainWindow.cs) is a part of the IBBoard.WarFoundry.GTK project and is copyright 2008, 2009 IBBoard. |
2 // | 2 // |
3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. | 3 // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. |
4 | |
5 using System; | 4 using System; |
6 using System.Collections; | 5 using System.Collections; |
7 using System.Collections.Generic; | 6 using System.Collections.Generic; |
8 using System.Configuration; | 7 using System.Configuration; |
9 using System.IO; | 8 using System.IO; |
507 RemoveCategoryButtons(); | 506 RemoveCategoryButtons(); |
508 | 507 |
509 if (system != null) | 508 if (system != null) |
510 { | 509 { |
511 AddCategoryButtons(system.Categories); | 510 AddCategoryButtons(system.Categories); |
511 logger.DebugFormat("Game system set to {0} with ID {1}", system.Name, system.ID); | |
512 } | |
513 else | |
514 { | |
515 logger.Debug("Game system set to null"); | |
512 } | 516 } |
513 } | 517 } |
514 | 518 |
515 private void OnArmyChanged(Army oldArmy, Army newArmy) | 519 private void OnArmyChanged(Army oldArmy, Army newArmy) |
516 { | 520 { |
570 | 574 |
571 CommandStack.Reset(); | 575 CommandStack.Reset(); |
572 SetStatusBarText(); | 576 SetStatusBarText(); |
573 } | 577 } |
574 | 578 |
575 private void OnArmyNameChanged (WarFoundryObject obj, string oldValue, string newValue) | 579 private void OnArmyNameChanged(WarFoundryObject obj, string oldValue, string newValue) |
576 { | 580 { |
577 SetAppTitle(); | 581 SetAppTitle(); |
578 } | 582 } |
579 | 583 |
580 private void OnMaxPointsValueChanged (WarFoundryObject obj, int oldValue, int newValue) | 584 private void OnMaxPointsValueChanged(WarFoundryObject obj, int oldValue, int newValue) |
581 { | 585 { |
582 SetStatusBarText(); | 586 SetStatusBarText(); |
583 } | 587 } |
584 | 588 |
585 private void HandleArmyCompositionChanged() | 589 private void HandleArmyCompositionChanged() |
981 loadedArmyPath = filePath; | 985 loadedArmyPath = filePath; |
982 success = true; | 986 success = true; |
983 } | 987 } |
984 else | 988 else |
985 { | 989 { |
986 MessageDialog dialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, Translation.GetTranslation("SaveFailed", "File save failed. Please check log file")); | 990 MessageDialog dialog = new MessageDialog(this, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, Translation.GetTranslation("SaveFailed", "File save failed. Please check log file")); |
987 dialog.Title = Translation.GetTranslation("SaveFailedTitle", "File save failed"); | 991 dialog.Title = Translation.GetTranslation("SaveFailedTitle", "File save failed"); |
988 dialog.Run(); | 992 dialog.Run(); |
989 dialog.Hide(); | 993 dialog.Hide(); |
990 dialog.Dispose(); | 994 dialog.Dispose(); |
991 } | 995 } |