Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
changeset 77:68804784bf6f
Re #86: Complete initial GTK# UI
* Add About dialog
* Make sure app builds as "WarFoundry-GTK.exe"
* Move all UI components to IBBoard.WarFoundry.GUI.GTK namespace
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FrmAbout.cs Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,35 @@ +// This file (FrmAbout.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2010 IBBoard +// +// 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. + +using System; +using Gtk; + +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class FrmAbout : Gtk.Dialog + { + private static FrmAbout frm; + + public static FrmAbout GetForm() + { + if (frm == null) + { + frm = new FrmAbout(); + } + + return frm; + } + + private FrmAbout() + { + this.Build(); + } + + protected virtual void OkayClicked(object sender, System.EventArgs e) + { + Respond(ResponseType.Ok); + } + } +} +
--- a/FrmMainWindow.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/FrmMainWindow.cs Sat Dec 18 16:42:51 2010 +0000 @@ -3,33 +3,34 @@ // 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. using System; -using System.IO; using System.Collections.Generic; using System.Configuration; +using System.IO; +using GLib; using Gtk; using IBBoard; using IBBoard.Commands; +using IBBoard.CustomMath; using IBBoard.GtkSharp; +using IBBoard.GtkSharp.Translatable; using IBBoard.IO; using IBBoard.Lang; using IBBoard.Logging; -using IBBoard.CustomMath; using IBBoard.WarFoundry.API; +using IBBoard.WarFoundry.API.Commands; using IBBoard.WarFoundry.API.Exporters; using IBBoard.WarFoundry.API.Factories; using IBBoard.WarFoundry.API.Factories.Xml; using IBBoard.WarFoundry.API.Objects; -using WFObjects = IBBoard.WarFoundry.API.Objects; -using IBBoard.WarFoundry.API.Commands; +using IBBoard.WarFoundry.API.Requirements; using IBBoard.WarFoundry.API.Savers; -using IBBoard.WarFoundry.API.Requirements; -using IBBoard.WarFoundry.GTK.Widgets; +using IBBoard.WarFoundry.GUI.GTK.Widgets; using IBBoard.WarFoundry.Plugin.Rollcall; using IBBoard.Xml; using log4net; -using GLib; +using WFObjects = IBBoard.WarFoundry.API.Objects; -namespace IBBoard.WarFoundry.GTK +namespace IBBoard.WarFoundry.GUI.GTK { public partial class FrmMainWindow: Gtk.Window { @@ -126,7 +127,7 @@ mainColumn.SetCellDataFunc(mainCell, new TreeCellDataFunc(RenderCategoryTreeObjectName)); treeUnits.Model = new TreeStore(typeof(WarFoundryObject)); logger.Debug("Loading preferences"); - Preferences = new Preferences("WarFoundryGTK"); + Preferences = new Preferences("WarFoundry-GTK"); logger.Debug("Loading translations"); try @@ -149,6 +150,7 @@ WarFoundryCore.ArmyChanged += new ArmyChangedDelegate(OnArmyChanged); Destroyed += new EventHandler(OnWindowDestroyed); //TODO: Translate and subscribe to other events + ControlTranslator.TranslateWidget(this); UnitAddedMethod = new ObjectAddDelegate(OnUnitAdded); UnitRemovedMethod = new ObjectRemoveDelegate(OnUnitRemoved); PointsValueChangedMethod = new DoubleValChangedDelegate(OnPointsValueChanged); @@ -368,7 +370,7 @@ } while (model.IterNext(ref iter)); } - + private void RemoveUnitTab(WFObjects.Unit unit) { UnitDisplayWidget widget = DictionaryUtils.GetValue(unitToWidgetMap, unit); @@ -720,7 +722,7 @@ saveArmyButton.Sensitive = commandStack.IsDirty() && WarFoundryCore.CurrentArmy != null; miSaveArmy.Sensitive = commandStack.IsDirty() && WarFoundryCore.CurrentArmy != null; } - + private void RedoMenuActivated(object sender, EventArgs e) { if (sender is MenuItem) @@ -855,7 +857,7 @@ return SaveArmyToPath(WarFoundryCore.CurrentArmy, filePath); } - + private bool SaveArmyToPath(Army army, string filePath) { bool success = false; @@ -908,12 +910,12 @@ { if (dr == ResponseType.No) { - //They don't care about their changes + //They don't care about their changes canClose = true; } else { - //Assume cancel or close with the X button + //Assume cancel or close with the X button canClose = false; } @@ -1000,7 +1002,7 @@ ShowUnitWidget(unit); } } - + private void ShowUnitWidget(WFObjects.Unit unit) { UnitDisplayWidget widget; @@ -1090,7 +1092,7 @@ OnTreeUnitsPopupMenu(o, null); } } - + protected virtual void NotebookPageRemoved(object o, Gtk.RemovedArgs args) { Widget widget = args.Widget; @@ -1100,7 +1102,12 @@ unitToWidgetMap.Remove(((UnitDisplayWidget)widget).Unit); } } - - + + protected virtual void HelpAboutActivated(object sender, System.EventArgs e) + { + FrmAbout form = FrmAbout.GetForm(); + form.Run(); + form.Hide(); + } } }
--- a/FrmNewArmy.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/FrmNewArmy.cs Sat Dec 18 16:42:51 2010 +0000 @@ -12,7 +12,7 @@ using IBBoard.WarFoundry.GUI.GTK.Util; using IBBoard.GtkSharp.Translatable; -namespace IBBoard.WarFoundry.GTK +namespace IBBoard.WarFoundry.GUI.GTK { public partial class FrmNewArmy : TranslatableDialog, ITranslatable { @@ -20,7 +20,7 @@ private Race race; private string armyName; private int pointsValue; - + public FrmNewArmy(GameSystem gameSystem) { this.Build(); @@ -46,13 +46,13 @@ ComboBoxUtils.SelectIndex(systemCombo, 0); } } - + protected virtual void OnSelectionChanged(object o, EventArgs e) { logger.Debug("Race selection changed"); SetOkayButtonState(); } - + private void SetOkayButtonState() { bttnCreate.Sensitive = (lstRaces.Selection.CountSelectedRows() == 1 && txtArmyName.Text != "" && sbPointsValue.Value > 0); @@ -88,7 +88,7 @@ { SetOkayButtonState(); } - + protected virtual void OnSystemComboChanged(object sender, System.EventArgs e) { GameSystem system = ComboBoxUtils.GetSelectedItem<GameSystem>(systemCombo); @@ -96,7 +96,7 @@ logger.Debug("System selection changed: " + (system == null ? "null" : system.Name)); SetOkayButtonState(); } - + private void SetRaces(GameSystem system) { ListStore store = new ListStore(typeof(Race)); @@ -111,17 +111,17 @@ lstRaces.Model = store; } - + public Race SelectedRace { get { return race; } } - + public string ArmyName { get { return armyName; } } - + public int ArmySize { get { return pointsValue; }
--- a/FrmNewUnit.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/FrmNewUnit.cs Sat Dec 18 16:42:51 2010 +0000 @@ -10,14 +10,14 @@ using IBBoard.WarFoundry.API.Requirements; using log4net; -namespace IBBoard.WarFoundry.GTK +namespace IBBoard.WarFoundry.GUI.GTK { public partial class FrmNewUnit : TranslatableDialog { private ILog logger = LogManager.GetLogger(typeof(FrmNewUnit)); - private UnitType unitType; + private UnitType unitType; private Army unitArmy; - + public FrmNewUnit(Race race, Category cat, Army army) { this.Build(); @@ -42,23 +42,23 @@ lstUnitTypes.Model = store; lstUnitTypes.Selection.Changed += new EventHandler(OnSelectionChanged); } - + private void RenderUnitTypeName(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) { UnitType type = (UnitType)model.GetValue(iter, 0); (cell as CellRendererText).Text = type.Name; } - + protected virtual void OnSelectionChanged(object o, EventArgs e) { SetSelectUnitEnabledVal(); } - + public UnitType SelectedUnit { get { return unitType; } } - + private UnitType GetSelectedUnitType() { TreeModel model; @@ -73,7 +73,7 @@ return toReturn; } - + private void SetSelectUnitEnabledVal() { UnitType type = GetSelectedUnitType();
--- a/IBBoard.WarFoundry.GUI.GTK.csproj Tue Nov 23 21:03:46 2010 +0000 +++ b/IBBoard.WarFoundry.GUI.GTK.csproj Sat Dec 18 16:42:51 2010 +0000 @@ -9,8 +9,9 @@ <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>IBBoard.WarFoundry.GUI.GTK</RootNamespace> - <StartupObject>IBBoard.WarFoundry.GTK.FrmMainWindow</StartupObject> + <StartupObject>IBBoard.WarFoundry.GUI.GTK.FrmMainWindow</StartupObject> <ApplicationIcon>App.ico</ApplicationIcon> + <AssemblyName>WarFoundry-GTK</AssemblyName> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> @@ -20,7 +21,6 @@ <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <AssemblyName>WarFoundryGTK</AssemblyName> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> @@ -29,7 +29,6 @@ <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> - <AssemblyName>IBBoard.WarFoundry.GUI.GTK</AssemblyName> </PropertyGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. @@ -46,10 +45,6 @@ <Compile Include="FrmNewUnit.cs" /> <Compile Include="Widgets\UnitDisplayWidget.cs" /> <Compile Include="gtk-gui\generated.cs" /> - <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmMainWindow.cs" /> - <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmNewArmy.cs" /> - <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmNewUnit.cs" /> - <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs" /> <Compile Include="UIControl\AddEquipmentUIControl.cs" /> <Compile Include="UIControl\Interfaces\IAddEquipmentUI.cs" /> <Compile Include="FrmAddEquipment.cs" /> @@ -66,6 +61,12 @@ <Compile Include="FrmReplaceEquipment.cs" /> <Compile Include="UIControl\ReplaceEquipmentUIControl.cs" /> <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmReplaceEquipment.cs" /> + <Compile Include="FrmAbout.cs" /> + <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmAbout.cs" /> + <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs" /> + <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs" /> + <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs" /> + <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.cs" /> </ItemGroup> <ItemGroup> <Content Include="App.png" /> @@ -75,13 +76,13 @@ <None Include="translations\en.translation"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> - <None Include="WarFoundryGTK.exe.log4net"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </None> <None Include="gtk-gui\gui.stetic" /> <None Include="gtk-gui\objects.xml" /> <None Include="COPYING" /> - <None Include="WarFoundryGTKPref.xml"> + <None Include="WarFoundry-GTK.exe.log4net"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> + <None Include="WarFoundry-GTKPref.xml"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> @@ -118,6 +119,7 @@ <EmbeddedResource Include="App.ico"> <LogicalName>App.ico</LogicalName> </EmbeddedResource> + <EmbeddedResource Include="App-lrg.png" /> </ItemGroup> <ItemGroup> <Folder Include="UIControl\" />
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WarFoundry-GTK.exe.log4net Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8" ?> +<log4net> + <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" > + <layout type="log4net.Layout.PatternLayout"> + <conversionPattern value="%-5p [%d{HH:MM:ss}]: %C{1}.%M() - Line: %L - %m%n" /> + </layout> + </appender> + <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> + <file value="logs/WarFoundry.log" /> + <appendToFile value="false" /> + <rollingStyle value="Size" /> + <maxSizeRollBackups value="-1" /> + <maximumFileSize value="100MB" /> + <layout type="log4net.Layout.PatternLayout"> + <conversionPattern value="%-5p [%d{HH:MM:ss}]: %C{1}.%M() - Line: %L - %m%n" /> + </layout> + </appender> + <root> + <level value="DEBUG" /> + <appender-ref ref="ConsoleAppender" /> + <appender-ref ref="RollingLogFileAppender" /> + </root> +</log4net>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/WarFoundry-GTKPref.xml Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE preferences[ + <!ELEMENT preference (CDATA|preferenceArr+)> + <!ELEMENT preferenceArr (CDATA)> + <!ATTLIST preference id ID #REQUIRED> + <!ATTLIST preference type CDATA #REQUIRED> + <!ATTLIST preferenceArr id ID #REQUIRED> +]> +<preferences> +<preference id="language" type="System.String">en</preference> +<preference id="currSystem" type="System.String"></preference> +<preference id="logLevel" type="System.String">Info</preference> +</preferences>
--- a/WarFoundryGTK.exe.log4net Tue Nov 23 21:03:46 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="utf-8" ?> -<log4net> - <appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" > - <layout type="log4net.Layout.PatternLayout"> - <conversionPattern value="%-5p [%d{HH:MM:ss}]: %C{1}.%M() - Line: %L - %m%n" /> - </layout> - </appender> - <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> - <file value="logs/WarFoundry.log" /> - <appendToFile value="false" /> - <rollingStyle value="Size" /> - <maxSizeRollBackups value="-1" /> - <maximumFileSize value="100MB" /> - <layout type="log4net.Layout.PatternLayout"> - <conversionPattern value="%-5p [%d{HH:MM:ss}]: %C{1}.%M() - Line: %L - %m%n" /> - </layout> - </appender> - <root> - <level value="DEBUG" /> - <appender-ref ref="ConsoleAppender" /> - <appender-ref ref="RollingLogFileAppender" /> - </root> -</log4net>
--- a/WarFoundryGTKPref.xml Tue Nov 23 21:03:46 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE preferences[ - <!ELEMENT preference (CDATA|preferenceArr+)> - <!ELEMENT preferenceArr (CDATA)> - <!ATTLIST preference id ID #REQUIRED> - <!ATTLIST preference type CDATA #REQUIRED> - <!ATTLIST preferenceArr id ID #REQUIRED> -]> -<preferences> -<preference id="language" type="System.String">en</preference> -<preference id="currSystem" type="System.String"></preference> -<preference id="logLevel" type="System.String">Info</preference> -</preferences>
--- a/Widgets/UnitDisplayWidget.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/Widgets/UnitDisplayWidget.cs Sat Dec 18 16:42:51 2010 +0000 @@ -1,7 +1,6 @@ // This file (UnitDisplayWidget.cs) is a part of the IBBoard.WarFoundry.GTK project and is copyright 2008, 2009 IBBoard. // // 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. - using System; using Gtk; using IBBoard.Commands; @@ -16,166 +15,156 @@ using WFObjects = IBBoard.WarFoundry.API.Objects; using System.Collections.Generic; -namespace IBBoard.WarFoundry.GTK.Widgets +namespace IBBoard.WarFoundry.GUI.GTK.Widgets { [System.ComponentModel.Category("WarFoundry GTK# GUI")] [System.ComponentModel.ToolboxItem(true)] public partial class UnitDisplayWidget : Gtk.Bin { - private static ILog log = LogManager.GetLogger(typeof(UnitDisplayWidget)); + private static ILog log = LogManager.GetLogger (typeof (UnitDisplayWidget)); private WFObjects.Unit unit; private CommandStack stack; - private Dictionary<string, NodeView> statsViews = new Dictionary<string, NodeView>(); - - public UnitDisplayWidget(WFObjects.Unit sourceUnit, CommandStack commandStack) + private Dictionary<string, NodeView> statsViews = new Dictionary<string, NodeView> (); + + public UnitDisplayWidget (WFObjects.Unit sourceUnit, CommandStack commandStack) { - this.Build(); + this.Build (); stack = commandStack; unit = sourceUnit; unitName.Text = unit.Name; unitSize.Value = unit.Size; int maxSize = (unit.UnitType.MaxSize == WarFoundryCore.INFINITY ? int.MaxValue : unit.UnitType.MaxSize); int minSize = unit.UnitType.MinSize; - unitSize.SetRange(minSize, maxSize); + unitSize.SetRange (minSize, maxSize); unitSize.Sensitive = (maxSize != minSize); notesView.Buffer.Text = unit.UnitType.Notes; unit.NameChanged += UnitNameChanged; unit.UnitSizeChanged += UnitSizeChanged; unit.UnitEquipmentAmountChanged += HandleUnitUnitEquipmentAmountChanged; equipmentList.Selection.Changed += HandleEquipmentListSelectionChanged; - SetAbilities(); - SetStats(); - SetWeapons(); + SetAbilities (); + SetStats (); + SetWeapons (); } - private void HandleEquipmentListSelectionChanged(object sender, EventArgs e) + private void HandleEquipmentListSelectionChanged (object sender, EventArgs e) { - SetButtonsEnabledState(); + SetButtonsEnabledState (); } - private void SetButtonsEnabledState() + private void SetButtonsEnabledState () { - UnitEquipmentItem equipItem = GetSelectedEquipmentItem(); - bttnReplaceEquipment.Sensitive = (equipItem != null && equipItem.HasAlternatives()); - bttnEditEquipment.Sensitive = (UnitEquipmentUtil.CanEditEquipmentAmount(unit, equipItem)); + UnitEquipmentItem equipItem = GetSelectedEquipmentItem (); + bttnReplaceEquipment.Sensitive = (equipItem != null && equipItem.HasAlternatives ()); + bttnEditEquipment.Sensitive = (UnitEquipmentUtil.CanEditEquipmentAmount (unit, equipItem)); bttnRemoveEquipment.Sensitive = (equipItem != null && !equipItem.IsRequired); } - private UnitEquipmentItem GetSelectedEquipmentItem() + private UnitEquipmentItem GetSelectedEquipmentItem () { - return (UnitEquipmentItem)TreeUtils.GetSelectedItem(equipmentList); + return (UnitEquipmentItem)TreeUtils.GetSelectedItem (equipmentList); } - - private void SetAbilities() + + private void SetAbilities () { - CellRendererText renderer = new CellRendererText(); - abilitiesList.AppendColumn("", renderer, new TreeCellDataFunc(RenderAbility)); + CellRendererText renderer = new CellRendererText (); + abilitiesList.AppendColumn ("", renderer, new TreeCellDataFunc (RenderAbility)); - ListStore model = new ListStore(typeof(Ability)); + ListStore model = new ListStore (typeof (Ability)); - foreach (Ability ability in unit.UnitType.GetRequiredAbilities()) - { - model.AppendValues(ability); + foreach (Ability ability in unit.UnitType.GetRequiredAbilities ()) { + model.AppendValues (ability); } abilitiesList.Model = model; } - - public void RenderAbility(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) + + public void RenderAbility (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) { - object o = model.GetValue(iter, 0); + object o = model.GetValue (iter, 0); - if (o is Ability) - { + if (o is Ability) { Ability ability = (Ability)o; (cell as CellRendererText).Text = ability.Name; } } - private void SetStats() + private void SetStats () { Stat[][] stats = unit.UnitStatsArraysWithName; string[] statsIDs = unit.UnitStatsArrayIDs; int statsCount = stats.Length; - log.DebugFormat("Unit {0} has {1} stats arrays", unit.UnitType.Name, statsCount); + log.DebugFormat ("Unit {0} has {1} stats arrays", unit.UnitType.Name, statsCount); - for (int i = 0; i < statsCount; i++) - { - NodeView statsGrid = GetStatsView(statsIDs[i]); + for (int i = 0; i < statsCount; i++) { + NodeView statsGrid = GetStatsView (statsIDs [i]); TreeStore model = (TreeStore)statsGrid.Model; - log.DebugFormat("Adding row to data table for {0}", statsIDs[i]); - log.DebugFormat("TreeStore supports {0} columns", model.NColumns); - model.AppendValues((object)stats[i]); + log.DebugFormat ("Adding row to data table for {0}", statsIDs [i]); + log.DebugFormat ("TreeStore supports {0} columns", model.NColumns); + model.AppendValues ((object)stats [i]); } } - - private NodeView GetStatsView(string statsID) + + private NodeView GetStatsView (string statsID) { NodeView statsView; - if (statsViews.ContainsKey(statsID)) - { - statsView = DictionaryUtils.GetValue(statsViews, statsID); - } - else - { - statsView = CreateStatsView(statsID); - statsViews[statsID] = statsView; + if (statsViews.ContainsKey (statsID)) { + statsView = DictionaryUtils.GetValue (statsViews, statsID); + } else { + statsView = CreateStatsView (statsID); + statsViews [statsID] = statsView; } return statsView; } - - private NodeView CreateStatsView(string statsID) + + private NodeView CreateStatsView (string statsID) { - log.DebugFormat("Create NodeView for stats ID {0}", statsID); - SystemStats sysStats = unit.Race.GameSystem.GetSystemStatsForID(statsID); + log.DebugFormat ("Create NodeView for stats ID {0}", statsID); + SystemStats sysStats = unit.Race.GameSystem.GetSystemStatsForID (statsID); StatSlot[] sysStatSlots = sysStats.StatSlots; int statsCount = sysStatSlots.Length; - NodeView statsGrid = CreateNodeView(); - CellRendererText renderer = new CellRendererText(); - statsGrid.AppendColumn(Translation.GetTranslation("UnitNameColumn", "Unit Type", null), renderer, RenderUnitStat); + NodeView statsGrid = CreateNodeView (); + CellRendererText renderer = new CellRendererText (); + statsGrid.AppendColumn (Translation.GetTranslation ("UnitNameColumn", "Unit Type", null), renderer, RenderUnitStat); - for (int i = 0; i < statsCount; i++) - { - StatSlot stat = sysStatSlots[i]; + for (int i = 0; i < statsCount; i++) { + StatSlot stat = sysStatSlots [i]; string slotName = stat.Name; - statsGrid.AppendColumn(slotName, renderer, RenderUnitStat); + statsGrid.AppendColumn (slotName, renderer, RenderUnitStat); } - statsGrid.Model = new TreeStore(typeof(Stat[])); + statsGrid.Model = new TreeStore (typeof (Stat[])); return statsGrid; } - - private NodeView CreateNodeView() + + private NodeView CreateNodeView () { - NodeView nodeView = new NodeView(); - statsRepeatBox.Add(nodeView); + NodeView nodeView = new NodeView (); + statsRepeatBox.Add (nodeView); return nodeView; } - - private void RenderUnitStat(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) + + private void RenderUnitStat (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) { - object o = model.GetValue(iter, 0); + object o = model.GetValue (iter, 0); - if (o is Stat[]) - { + if (o is Stat[]) { Stat[] stats = (Stat[])o; - (cell as CellRendererText).Text = stats[GetStatColumnIndex(column)].SlotValueString; + (cell as CellRendererText).Text = stats [GetStatColumnIndex (column)].SlotValueString; } } - - private int GetStatColumnIndex(TreeViewColumn column) + + private int GetStatColumnIndex (TreeViewColumn column) { int idx = -1; TreeViewColumn[] cols = ((TreeView)column.TreeView).Columns; int colCount = cols.Length; - for (int i = 0; i < colCount; i++) - { - if (cols[i] == column) - { + for (int i = 0; i < colCount; i++) { + if (cols [i] == column) { idx = i; break; } @@ -184,200 +173,177 @@ return idx; } - private void SetWeapons() + private void SetWeapons () { - CellRendererText renderer = new CellRendererText(); - equipmentList.AppendColumn("", renderer, new TreeCellDataFunc(RenderEquipmentLine)); + CellRendererText renderer = new CellRendererText (); + equipmentList.AppendColumn ("", renderer, new TreeCellDataFunc (RenderEquipmentLine)); - ListStore model = new ListStore(typeof(UnitEquipmentItem)); + ListStore model = new ListStore (typeof (UnitEquipmentItem)); - foreach (UnitEquipmentItem item in unit.GetEquipment()) - { - model.AppendValues(item); + foreach (UnitEquipmentItem item in unit.GetEquipment ()) { + model.AppendValues (item); } equipmentList.Model = model; } - - public void RenderEquipmentLine(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) + + public void RenderEquipmentLine (TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter) { - object o = model.GetValue(iter, 0); + object o = model.GetValue (iter, 0); - if (o is UnitEquipmentItem) - { + if (o is UnitEquipmentItem) { UnitEquipmentItem item = (UnitEquipmentItem)o; - (cell as CellRendererText).Text = GetUnitEquipmentText(item); + (cell as CellRendererText).Text = GetUnitEquipmentText (item); } } - - private string GetUnitEquipmentText(UnitEquipmentItem item) + + private string GetUnitEquipmentText (UnitEquipmentItem item) { string translation = ""; - if (item.Cost == 0) - { - translation = Translation.GetTranslation("equipmentAmountWithZeroCost", "{0} ({1} - free)", item.Name, GetAmountString(item)); - } - else - { - translation = Translation.GetTranslation("equipmentAmountWithCost", "{0} ({1} at {2}pts each)", item.Name, GetAmountString(item), item.Cost); + if (item.Cost == 0) { + translation = Translation.GetTranslation ("equipmentAmountWithZeroCost", "{0} ({1} - free)", item.Name, GetAmountString (item)); + } else { + translation = Translation.GetTranslation ("equipmentAmountWithCost", "{0} ({1} at {2}pts each)", item.Name, GetAmountString (item), item.Cost); } return translation; } - private string GetAmountString(UnitEquipmentItem item) + private string GetAmountString (UnitEquipmentItem item) { - double amount = UnitEquipmentUtil.GetEquipmentAmount(unit, item); + double amount = UnitEquipmentUtil.GetEquipmentAmount (unit, item); string amountString = ""; - if (UnitEquipmentUtil.GetEquipmentAmountIsRatio(unit, item)) - { - int number = UnitEquipmentUtil.GetEquipmentAmountTaken(unit, item); + if (UnitEquipmentUtil.GetEquipmentAmountIsRatio (unit, item)) { + int number = UnitEquipmentUtil.GetEquipmentAmountTaken (unit, item); - if (amount == 100) - { - amountString = Translation.GetTranslation("equipmentChoiceAmountAll", "all ({1})", amount, number); + if (amount == 100) { + amountString = Translation.GetTranslation ("equipmentChoiceAmountAll", "all ({1})", amount, number); + } else { + amountString = Translation.GetTranslation ("equipmentChoiceAmountPercentage", "{0}% ({1})", amount, number); } - else - { - amountString = Translation.GetTranslation("equipmentChoiceAmountPercentage", "{0}% ({1})", amount, number); - } - } - else - { - amountString = Translation.GetTranslation("equipmentChoiceAmountNumber", "{0}", amount); + } else { + amountString = Translation.GetTranslation ("equipmentChoiceAmountNumber", "{0}", amount); } return amountString; } - public WFObjects.Unit Unit - { + public WFObjects.Unit Unit { get { return unit; } } - - private void UnitNameChanged(WarFoundryObject obj, string oldValue, string newValue) + + private void UnitNameChanged (WarFoundryObject obj, string oldValue, string newValue) { unitName.Text = newValue; } - - private void UnitSizeChanged(WarFoundryObject obj, int oldValue, int newValue) + + private void UnitSizeChanged (WarFoundryObject obj, int oldValue, int newValue) { unitSize.Value = newValue; } - private void HandleUnitUnitEquipmentAmountChanged(WarFoundryObject obj, double oldValue, double newValue) + private void HandleUnitUnitEquipmentAmountChanged (WarFoundryObject obj, double oldValue, double newValue) { - if (oldValue == 0) - { - ((ListStore)equipmentList.Model).AppendValues(obj); - } - else - { - if (newValue == 0) - { - TreeIter treeIter = TreeUtils.GetItemIter(equipmentList, obj); - ((ListStore)equipmentList.Model).Remove(ref treeIter); + if (oldValue == 0) { + ((ListStore)equipmentList.Model).AppendValues (obj); + } else { + if (newValue == 0) { + TreeIter treeIter = TreeUtils.GetItemIter (equipmentList, obj); + ((ListStore)equipmentList.Model).Remove (ref treeIter); } } - equipmentList.QueueDraw(); + equipmentList.QueueDraw (); } - protected virtual void OnUnitSizeFocusOut(object o, Gtk.FocusOutEventArgs args) + protected virtual void OnUnitSizeFocusOut (object o, Gtk.FocusOutEventArgs args) { - SetNewUnitSize(); + SetNewUnitSize (); } [GLib.ConnectBefore ()] - protected virtual void OnUnitSizeKeyPress(object o, Gtk.KeyPressEventArgs args) + protected virtual void OnUnitSizeKeyPress (object o, Gtk.KeyPressEventArgs args) { - if (args.Event.Key == Gdk.Key.Return || args.Event.Key == Gdk.Key.KP_Enter) - { - SetNewUnitSize(); - } - } - - private void SetNewUnitSize() - { - if (unitSize.Value != unit.Size) - { - SetUnitSizeCommand cmd = new SetUnitSizeCommand(unit, (int)Math.Round(unitSize.Value)); - stack.Execute(cmd); + if (args.Event.Key == Gdk.Key.Return || args.Event.Key == Gdk.Key.KP_Enter) { + SetNewUnitSize (); } } - protected virtual void OnUnitNameFocusOut(object o, Gtk.FocusOutEventArgs args) + private void SetNewUnitSize () { - SetNewUnitName(); + if (unitSize.Value != unit.Size) { + SetUnitSizeCommand cmd = new SetUnitSizeCommand (unit, (int)Math.Round (unitSize.Value)); + stack.Execute (cmd); + } + } + + protected virtual void OnUnitNameFocusOut (object o, Gtk.FocusOutEventArgs args) + { + SetNewUnitName (); } [GLib.ConnectBefore ()] - protected virtual void OnUnitNameKeyPress(object o, Gtk.KeyPressEventArgs args) + protected virtual void OnUnitNameKeyPress (object o, Gtk.KeyPressEventArgs args) { - if (args.Event.Key == Gdk.Key.Return || args.Event.Key == Gdk.Key.KP_Enter) - { - SetNewUnitName(); + if (args.Event.Key == Gdk.Key.Return || args.Event.Key == Gdk.Key.KP_Enter) { + SetNewUnitName (); } } - - private void SetNewUnitName() + + private void SetNewUnitName () { - if (unitName.Text != unit.Name) - { - SetNameCommand cmd = new SetNameCommand(unit, unitName.Text); - stack.Execute(cmd); + if (unitName.Text != unit.Name) { + SetNameCommand cmd = new SetNameCommand (unit, unitName.Text); + stack.Execute (cmd); } } - - private void OnBttnAddEquipmentClicked(object sender, System.EventArgs e) + + private void OnBttnAddEquipmentClicked (object sender, System.EventArgs e) { - AddEquipment(); - } - - private void AddEquipment() - { - AddEquipmentUIControl addEquipment = new AddEquipmentUIControl(unit, stack); - addEquipment.Show(); + AddEquipment (); } - - protected virtual void HandleRemoveButtonActivated(object sender, System.EventArgs e) + + private void AddEquipment () { - UnitEquipmentItem item = GetSelectedEquipmentItem(); - log.Debug("Remove " + item); + AddEquipmentUIControl addEquipment = new AddEquipmentUIControl (unit, stack); + addEquipment.Show (); + } + + protected virtual void HandleRemoveButtonActivated (object sender, System.EventArgs e) + { + UnitEquipmentItem item = GetSelectedEquipmentItem (); + log.Debug ("Remove " + item); - if (item != null) - { - SetUnitEquipmentNumericAmountCommand cmd = new SetUnitEquipmentNumericAmountCommand(unit, item, 0); - stack.Execute(cmd); + if (item != null) { + SetUnitEquipmentNumericAmountCommand cmd = new SetUnitEquipmentNumericAmountCommand (unit, item, 0); + stack.Execute (cmd); } } - - protected virtual void HandleEditButtonClicked(object sender, System.EventArgs e) + + protected virtual void HandleEditButtonClicked (object sender, System.EventArgs e) { - UnitEquipmentItem item = GetSelectedEquipmentItem(); - log.Debug("Edit " + item); + UnitEquipmentItem item = GetSelectedEquipmentItem (); + log.Debug ("Edit " + item); - if (item != null) - { - EditEquipmentUIControl editEquipment = new EditEquipmentUIControl(unit, item, stack); - editEquipment.Show(); + if (item != null) { + EditEquipmentUIControl editEquipment = new EditEquipmentUIControl (unit, item, stack); + editEquipment.Show (); } } - - protected virtual void HandleReplaceButtonClicked(object sender, System.EventArgs e) + + protected virtual void HandleReplaceButtonClicked (object sender, System.EventArgs e) { - UnitEquipmentItem item = GetSelectedEquipmentItem(); - log.Debug("Replace " + item); + UnitEquipmentItem item = GetSelectedEquipmentItem (); + log.Debug ("Replace " + item); - if (item != null) - { - ReplaceEquipmentUIControl addEquipment = new ReplaceEquipmentUIControl(unit, item, stack); - addEquipment.Show(); + if (item != null) { + ReplaceEquipmentUIControl addEquipment = new ReplaceEquipmentUIControl (unit, item, stack); + addEquipment.Show (); } } }
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs Tue Nov 23 21:03:46 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,235 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace IBBoard.WarFoundry.GTK -{ - public partial class FrmMainWindow - { - private global::Gtk.UIManager UIManager; - - private global::Gtk.Action menuFile; - - private global::Gtk.Action miCreateArmy; - - private global::Gtk.Action miOpenArmy; - - private global::Gtk.Action miSaveArmy; - - private global::Gtk.Action miSaveArmyAs; - - private global::Gtk.Action miCloseArmy; - - private global::Gtk.Action refreshAction; - - private global::Gtk.Action miExit; - - private global::Gtk.Action menuEdit; - - private global::Gtk.Action miUndo; - - private global::Gtk.Action miRedo; - - private global::Gtk.Action menuHelp; - - private global::Gtk.Action miAbout; - - private global::Gtk.Action miDebugInformation; - - private global::Gtk.Action newArmyButton; - - private global::Gtk.Action openArmyButton; - - private global::Gtk.Action saveArmyButton; - - private global::Gtk.Action undoActionButton; - - private global::Gtk.Action redoActionButton; - - private global::Gtk.Action goDown; - - private global::Gtk.Action @add; - - private global::Gtk.Action miExportArmy; - - private global::Gtk.Action miExportAsBasicHtml; - - private global::Gtk.VBox vbox1; - - private global::Gtk.MenuBar menubar1; - - private global::Gtk.Toolbar toolbar; - - private global::Gtk.HPaned hpaned2; - - private global::Gtk.TreeView treeUnits; - - private global::Gtk.Notebook unitsNotebook; - - private global::Gtk.Statusbar statusbar1; - - protected virtual void Build() - { - global::Stetic.Gui.Initialize(this); - // Widget IBBoard.WarFoundry.GTK.FrmMainWindow - this.UIManager = new global::Gtk.UIManager(); - global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default"); - this.menuFile = new global::Gtk.Action("menuFile", global::Mono.Unix.Catalog.GetString("File"), null, null); - this.menuFile.ShortLabel = global::Mono.Unix.Catalog.GetString("File"); - w1.Add(this.menuFile, null); - this.miCreateArmy = new global::Gtk.Action("miCreateArmy", global::Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new"); - this.miCreateArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Create army"); - w1.Add(this.miCreateArmy, null); - this.miOpenArmy = new global::Gtk.Action("miOpenArmy", global::Mono.Unix.Catalog.GetString("Open army"), null, "gtk-open"); - this.miOpenArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Open army"); - w1.Add(this.miOpenArmy, null); - this.miSaveArmy = new global::Gtk.Action("miSaveArmy", global::Mono.Unix.Catalog.GetString("Save army"), null, "gtk-save"); - this.miSaveArmy.Sensitive = false; - this.miSaveArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Save army"); - w1.Add(this.miSaveArmy, null); - this.miSaveArmyAs = new global::Gtk.Action("miSaveArmyAs", global::Mono.Unix.Catalog.GetString("Save army as"), null, "gtk-save-as"); - this.miSaveArmyAs.Sensitive = false; - this.miSaveArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Save army as"); - w1.Add(this.miSaveArmyAs, null); - this.miCloseArmy = new global::Gtk.Action("miCloseArmy", global::Mono.Unix.Catalog.GetString("Close army"), null, "gtk-close"); - this.miCloseArmy.Sensitive = false; - this.miCloseArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Close army"); - w1.Add(this.miCloseArmy, null); - this.refreshAction = new global::Gtk.Action("refreshAction", global::Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh"); - this.refreshAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Reload files"); - w1.Add(this.refreshAction, null); - this.miExit = new global::Gtk.Action("miExit", global::Mono.Unix.Catalog.GetString("Exit"), null, "gtk-quit"); - this.miExit.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit"); - w1.Add(this.miExit, null); - this.menuEdit = new global::Gtk.Action("menuEdit", global::Mono.Unix.Catalog.GetString("Edit"), null, null); - this.menuEdit.ShortLabel = global::Mono.Unix.Catalog.GetString("Edit"); - w1.Add(this.menuEdit, null); - this.miUndo = new global::Gtk.Action("miUndo", global::Mono.Unix.Catalog.GetString("Undo"), null, "gtk-undo"); - this.miUndo.Sensitive = false; - this.miUndo.ShortLabel = global::Mono.Unix.Catalog.GetString("Undo"); - w1.Add(this.miUndo, null); - this.miRedo = new global::Gtk.Action("miRedo", global::Mono.Unix.Catalog.GetString("Redo"), null, "gtk-redo"); - this.miRedo.Sensitive = false; - this.miRedo.ShortLabel = global::Mono.Unix.Catalog.GetString("Redo"); - w1.Add(this.miRedo, null); - this.menuHelp = new global::Gtk.Action("menuHelp", global::Mono.Unix.Catalog.GetString("Help"), null, null); - this.menuHelp.ShortLabel = global::Mono.Unix.Catalog.GetString("Help"); - w1.Add(this.menuHelp, null); - this.miAbout = new global::Gtk.Action("miAbout", global::Mono.Unix.Catalog.GetString("About"), null, "gtk-about"); - this.miAbout.ShortLabel = global::Mono.Unix.Catalog.GetString("About"); - w1.Add(this.miAbout, null); - this.miDebugInformation = new global::Gtk.Action("miDebugInformation", global::Mono.Unix.Catalog.GetString("Debug Information"), null, null); - this.miDebugInformation.ShortLabel = global::Mono.Unix.Catalog.GetString("Debug Information"); - w1.Add(this.miDebugInformation, null); - this.newArmyButton = new global::Gtk.Action("newArmyButton", null, null, "gtk-new"); - w1.Add(this.newArmyButton, null); - this.openArmyButton = new global::Gtk.Action("openArmyButton", null, null, "gtk-open"); - w1.Add(this.openArmyButton, null); - this.saveArmyButton = new global::Gtk.Action("saveArmyButton", null, null, "gtk-save"); - this.saveArmyButton.Sensitive = false; - w1.Add(this.saveArmyButton, null); - this.undoActionButton = new global::Gtk.Action("undoActionButton", null, null, "gtk-undo"); - this.undoActionButton.Sensitive = false; - w1.Add(this.undoActionButton, null); - this.redoActionButton = new global::Gtk.Action("redoActionButton", null, null, "gtk-redo"); - this.redoActionButton.Sensitive = false; - w1.Add(this.redoActionButton, null); - this.goDown = new global::Gtk.Action("goDown", null, null, null); - w1.Add(this.goDown, null); - this.@add = new global::Gtk.Action("add", null, null, "gtk-add"); - w1.Add(this.@add, null); - this.miExportArmy = new global::Gtk.Action("miExportArmy", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert"); - this.miExportArmy.Sensitive = false; - this.miExportArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army"); - w1.Add(this.miExportArmy, null); - this.miExportAsBasicHtml = new global::Gtk.Action("miExportAsBasicHtml", global::Mono.Unix.Catalog.GetString("Basic HTML"), null, null); - this.miExportAsBasicHtml.ShortLabel = global::Mono.Unix.Catalog.GetString("Basic HTML"); - w1.Add(this.miExportAsBasicHtml, null); - this.UIManager.InsertActionGroup(w1, 0); - this.AddAccelGroup(this.UIManager.AccelGroup); - this.Name = "IBBoard.WarFoundry.GTK.FrmMainWindow"; - this.Title = global::Mono.Unix.Catalog.GetString("MainWindow"); - this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico"); - // Container child IBBoard.WarFoundry.GTK.FrmMainWindow.Gtk.Container+ContainerChild - this.vbox1 = new global::Gtk.VBox(); - this.vbox1.Name = "vbox1"; - // Container child vbox1.Gtk.Box+BoxChild - this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miCreateArmy' action='miCreateArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmy' action='miExportArmy'><menuitem name='miExportAsBasicHtml' action='miExportAsBasicHtml'/></menu><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='refreshAction' action='refreshAction'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/><menuitem name='miDebugInformation' action='miDebugInformation'/></menu></menubar></ui>"); - this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); - this.menubar1.Name = "menubar1"; - this.vbox1.Add(this.menubar1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.UIManager.AddUiFromString("<ui><toolbar name='toolbar'><toolitem name='newArmyButton' action='newArmyButton'/><toolitem name='openArmyButton' action='openArmyButton'/><toolitem name='saveArmyButton' action='saveArmyButton'/><separator/><toolitem name='undoActionButton' action='undoActionButton'/><toolitem name='redoActionButton' action='redoActionButton'/><separator/></toolbar></ui>"); - this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar"))); - this.toolbar.HeightRequest = 36; - this.toolbar.Name = "toolbar"; - this.toolbar.ShowArrow = false; - this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); - this.toolbar.IconSize = ((global::Gtk.IconSize)(3)); - this.vbox1.Add(this.toolbar); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.toolbar])); - w3.Position = 1; - w3.Expand = false; - w3.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.hpaned2 = new global::Gtk.HPaned(); - this.hpaned2.CanFocus = true; - this.hpaned2.Name = "hpaned2"; - this.hpaned2.Position = 178; - // Container child hpaned2.Gtk.Paned+PanedChild - this.treeUnits = new global::Gtk.TreeView(); - this.treeUnits.CanFocus = true; - this.treeUnits.Name = "treeUnits"; - this.hpaned2.Add(this.treeUnits); - global::Gtk.Paned.PanedChild w4 = ((global::Gtk.Paned.PanedChild)(this.hpaned2[this.treeUnits])); - w4.Resize = false; - // Container child hpaned2.Gtk.Paned+PanedChild - this.unitsNotebook = new global::Gtk.Notebook(); - this.unitsNotebook.CanFocus = true; - this.unitsNotebook.Name = "unitsNotebook"; - this.unitsNotebook.CurrentPage = -1; - this.unitsNotebook.Scrollable = true; - this.hpaned2.Add(this.unitsNotebook); - this.vbox1.Add(this.hpaned2); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hpaned2])); - w6.Position = 2; - // Container child vbox1.Gtk.Box+BoxChild - this.statusbar1 = new global::Gtk.Statusbar(); - this.statusbar1.Name = "statusbar1"; - this.statusbar1.Spacing = 2; - this.vbox1.Add(this.statusbar1); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); - w7.Position = 3; - w7.Expand = false; - w7.Fill = false; - this.Add(this.vbox1); - if ((this.Child != null)) - { - this.Child.ShowAll(); - } - this.DefaultWidth = 832; - this.DefaultHeight = 659; - this.hpaned2.Hide(); - this.Show(); - this.miCreateArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated); - this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated); - this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated); - this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated); - this.miCloseArmy.Activated += new global::System.EventHandler(this.OnCloseArmyActivated); - this.refreshAction.Activated += new global::System.EventHandler(this.OnReloadFilesActivated); - this.miExit.Activated += new global::System.EventHandler(this.OnExitActivated); - this.newArmyButton.Activated += new global::System.EventHandler(this.newTBButtonActivated); - this.openArmyButton.Activated += new global::System.EventHandler(this.openTBButtonActivated); - this.saveArmyButton.Activated += new global::System.EventHandler(this.saveTBButtonActivated); - this.undoActionButton.Activated += new global::System.EventHandler(this.undoTBButtonActivated); - this.redoActionButton.Activated += new global::System.EventHandler(this.redoTBButtonActivated); - this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated); - this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler(this.ArmyRowActivated); - this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler(this.OnTreeUnitsPopupMenu); - this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(this.UnitTreeButtonPressed); - this.unitsNotebook.Removed += new global::Gtk.RemovedHandler(this.NotebookPageRemoved); - } - } -}
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs Tue Nov 23 21:03:46 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace IBBoard.WarFoundry.GTK -{ - public partial class FrmNewArmy - { - private global::Gtk.Table table1; - - private global::Gtk.ScrolledWindow GtkScrolledWindow; - - private global::Gtk.TreeView lstRaces; - - private global::Gtk.HBox hbox2; - - private global::Gtk.SpinButton sbPointsValue; - - private global::Gtk.Label label1; - - private global::Gtk.Label label2; - - private global::Gtk.Label label3; - - private global::Gtk.Label label4; - - private global::Gtk.ComboBoxEntry systemCombo; - - private global::Gtk.Entry txtArmyName; - - private global::Gtk.Button bttnCancel; - - private global::Gtk.Button bttnCreate; - - protected virtual void Build() - { - global::Stetic.Gui.Initialize(this); - // Widget IBBoard.WarFoundry.GTK.FrmNewArmy - this.Events = ((global::Gdk.EventMask)(256)); - this.Name = "IBBoard.WarFoundry.GTK.FrmNewArmy"; - this.Title = global::Mono.Unix.Catalog.GetString("Create new army"); - this.Icon = global::Stetic.IconLoader.LoadIcon(this, "gtk-new", global::Gtk.IconSize.Menu); - this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - this.SkipPagerHint = true; - this.SkipTaskbarHint = true; - // Internal child IBBoard.WarFoundry.GTK.FrmNewArmy.VBox - global::Gtk.VBox w1 = this.VBox; - w1.CanFocus = true; - w1.Events = ((global::Gdk.EventMask)(256)); - w1.Name = "dialog_VBox"; - w1.BorderWidth = ((uint)(2)); - // Container child dialog_VBox.Gtk.Box+BoxChild - this.table1 = new global::Gtk.Table(((uint)(4)), ((uint)(2)), false); - this.table1.Name = "table1"; - this.table1.RowSpacing = ((uint)(6)); - this.table1.ColumnSpacing = ((uint)(6)); - // Container child table1.Gtk.Table+TableChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); - this.GtkScrolledWindow.Name = "GtkScrolledWindow"; - this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.lstRaces = new global::Gtk.TreeView(); - this.lstRaces.HeightRequest = 150; - this.lstRaces.CanFocus = true; - this.lstRaces.Name = "lstRaces"; - this.lstRaces.HeadersVisible = false; - this.lstRaces.RulesHint = true; - this.GtkScrolledWindow.Add(this.lstRaces); - this.table1.Add(this.GtkScrolledWindow); - global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow])); - w3.TopAttach = ((uint)(1)); - w3.BottomAttach = ((uint)(2)); - w3.LeftAttach = ((uint)(1)); - w3.RightAttach = ((uint)(2)); - w3.XOptions = ((global::Gtk.AttachOptions)(4)); - w3.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.hbox2 = new global::Gtk.HBox(); - this.hbox2.Name = "hbox2"; - // Container child hbox2.Gtk.Box+BoxChild - this.sbPointsValue = new global::Gtk.SpinButton(0, 2000000000, 100); - this.sbPointsValue.WidthRequest = 150; - this.sbPointsValue.CanFocus = true; - this.sbPointsValue.Name = "sbPointsValue"; - this.sbPointsValue.Adjustment.PageIncrement = 1000; - this.sbPointsValue.ClimbRate = 100; - this.sbPointsValue.Numeric = true; - this.sbPointsValue.Value = 1000; - this.hbox2.Add(this.sbPointsValue); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.sbPointsValue])); - w4.Position = 0; - w4.Expand = false; - w4.Fill = false; - this.table1.Add(this.hbox2); - global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.hbox2])); - w5.TopAttach = ((uint)(3)); - w5.BottomAttach = ((uint)(4)); - w5.LeftAttach = ((uint)(1)); - w5.RightAttach = ((uint)(2)); - w5.XOptions = ((global::Gtk.AttachOptions)(4)); - w5.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.label1 = new global::Gtk.Label(); - this.label1.Name = "label1"; - this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Race"); - this.table1.Add(this.label1); - global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1[this.label1])); - w6.TopAttach = ((uint)(1)); - w6.BottomAttach = ((uint)(2)); - w6.XOptions = ((global::Gtk.AttachOptions)(4)); - w6.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.label2 = new global::Gtk.Label(); - this.label2.Name = "label2"; - this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Army name"); - this.table1.Add(this.label2); - global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1[this.label2])); - w7.TopAttach = ((uint)(2)); - w7.BottomAttach = ((uint)(3)); - w7.XOptions = ((global::Gtk.AttachOptions)(4)); - w7.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.label3 = new global::Gtk.Label(); - this.label3.Name = "label3"; - this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Points value"); - this.table1.Add(this.label3); - global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1[this.label3])); - w8.TopAttach = ((uint)(3)); - w8.BottomAttach = ((uint)(4)); - w8.XOptions = ((global::Gtk.AttachOptions)(4)); - w8.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.label4 = new global::Gtk.Label(); - this.label4.Name = "label4"; - this.label4.LabelProp = global::Mono.Unix.Catalog.GetString("game system"); - this.table1.Add(this.label4); - global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.label4])); - w9.XOptions = ((global::Gtk.AttachOptions)(4)); - w9.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.systemCombo = global::Gtk.ComboBoxEntry.NewText(); - this.systemCombo.Name = "systemCombo"; - this.table1.Add(this.systemCombo); - global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1[this.systemCombo])); - w10.LeftAttach = ((uint)(1)); - w10.RightAttach = ((uint)(2)); - w10.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.txtArmyName = new global::Gtk.Entry(); - this.txtArmyName.CanFocus = true; - this.txtArmyName.Name = "txtArmyName"; - this.txtArmyName.IsEditable = true; - this.txtArmyName.InvisibleChar = '•'; - this.table1.Add(this.txtArmyName); - global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.txtArmyName])); - w11.TopAttach = ((uint)(2)); - w11.BottomAttach = ((uint)(3)); - w11.LeftAttach = ((uint)(1)); - w11.RightAttach = ((uint)(2)); - w11.XOptions = ((global::Gtk.AttachOptions)(4)); - w11.YOptions = ((global::Gtk.AttachOptions)(4)); - w1.Add(this.table1); - global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(w1[this.table1])); - w12.Position = 0; - w12.Expand = false; - w12.Fill = false; - w12.Padding = ((uint)(6)); - // Internal child IBBoard.WarFoundry.GTK.FrmNewArmy.ActionArea - global::Gtk.HButtonBox w13 = this.ActionArea; - w13.CanFocus = true; - w13.Events = ((global::Gdk.EventMask)(256)); - w13.Name = "WarFoundrySharp.FrmNewArmy_ActionArea"; - w13.Spacing = 6; - w13.BorderWidth = ((uint)(5)); - w13.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); - // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.bttnCancel = new global::Gtk.Button(); - this.bttnCancel.CanFocus = true; - this.bttnCancel.Name = "bttnCancel"; - this.bttnCancel.UseStock = true; - this.bttnCancel.UseUnderline = true; - this.bttnCancel.Label = "gtk-cancel"; - this.AddActionWidget(this.bttnCancel, -6); - global::Gtk.ButtonBox.ButtonBoxChild w14 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCancel])); - w14.Expand = false; - w14.Fill = false; - // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.bttnCreate = new global::Gtk.Button(); - this.bttnCreate.Sensitive = false; - this.bttnCreate.CanDefault = true; - this.bttnCreate.CanFocus = true; - this.bttnCreate.Name = "bttnCreate"; - this.bttnCreate.UseUnderline = true; - // Container child bttnCreate.Gtk.Container+ContainerChild - global::Gtk.Alignment w15 = new global::Gtk.Alignment(0.5f, 0.5f, 0f, 0f); - // Container child GtkAlignment.Gtk.Container+ContainerChild - global::Gtk.HBox w16 = new global::Gtk.HBox(); - w16.Spacing = 2; - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Image w17 = new global::Gtk.Image(); - w17.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-ok", global::Gtk.IconSize.Menu); - w16.Add(w17); - // Container child GtkHBox.Gtk.Container+ContainerChild - global::Gtk.Label w19 = new global::Gtk.Label(); - w19.LabelProp = global::Mono.Unix.Catalog.GetString("C_reate"); - w19.UseUnderline = true; - w16.Add(w19); - w15.Add(w16); - this.bttnCreate.Add(w15); - this.AddActionWidget(this.bttnCreate, -5); - global::Gtk.ButtonBox.ButtonBoxChild w23 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCreate])); - w23.Position = 1; - w23.Expand = false; - w23.Fill = false; - if ((this.Child != null)) - { - this.Child.ShowAll(); - } - this.DefaultWidth = 370; - this.DefaultHeight = 348; - this.Show(); - this.txtArmyName.Changed += new global::System.EventHandler(this.OnTextChanged); - this.systemCombo.Changed += new global::System.EventHandler(this.OnSystemComboChanged); - this.sbPointsValue.ChangeValue += new global::Gtk.ChangeValueHandler(this.OnSpinChangeValue); - this.sbPointsValue.ValueChanged += new global::System.EventHandler(this.OnSpinValueChanged); - this.sbPointsValue.Changed += new global::System.EventHandler(this.OnSpinValueChanged); - this.bttnCancel.Clicked += new global::System.EventHandler(this.OnCancelClicked); - this.bttnCreate.Clicked += new global::System.EventHandler(this.OnCreateClicked); - } - } -}
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmNewUnit.cs Tue Nov 23 21:03:46 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace IBBoard.WarFoundry.GTK -{ - public partial class FrmNewUnit - { - private global::Gtk.VBox vbox2; - - private global::Gtk.HBox hbox1; - - private global::Gtk.Label label1; - - private global::Gtk.ScrolledWindow GtkScrolledWindow; - - private global::Gtk.TreeView lstUnitTypes; - - private global::Gtk.Label lblNewUnitWarning; - - private global::Gtk.Button buttonCancel; - - private global::Gtk.Button buttonOk; - - protected virtual void Build() - { - global::Stetic.Gui.Initialize(this); - // Widget IBBoard.WarFoundry.GTK.FrmNewUnit - this.Name = "IBBoard.WarFoundry.GTK.FrmNewUnit"; - this.Title = global::Mono.Unix.Catalog.GetString("Add new unit"); - this.Icon = global::Stetic.IconLoader.LoadIcon(this, "gtk-new", global::Gtk.IconSize.Menu); - this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - this.Modal = true; - this.SkipPagerHint = true; - this.SkipTaskbarHint = true; - // Internal child IBBoard.WarFoundry.GTK.FrmNewUnit.VBox - global::Gtk.VBox w1 = this.VBox; - w1.Name = "dialog1_VBox"; - w1.BorderWidth = ((uint)(2)); - // Container child dialog1_VBox.Gtk.Box+BoxChild - this.vbox2 = new global::Gtk.VBox(); - this.vbox2.Name = "vbox2"; - this.vbox2.Spacing = 6; - // Container child vbox2.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox(); - this.hbox1.Name = "hbox1"; - this.hbox1.Spacing = 6; - // Container child hbox1.Gtk.Box+BoxChild - this.label1 = new global::Gtk.Label(); - this.label1.Name = "label1"; - this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Unit Type:"); - this.hbox1.Add(this.label1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.label1])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child hbox1.Gtk.Box+BoxChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); - this.GtkScrolledWindow.Name = "GtkScrolledWindow"; - this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - this.lstUnitTypes = new global::Gtk.TreeView(); - this.lstUnitTypes.HeightRequest = 150; - this.lstUnitTypes.CanFocus = true; - this.lstUnitTypes.Name = "lstUnitTypes"; - this.lstUnitTypes.HeadersVisible = false; - this.GtkScrolledWindow.Add(this.lstUnitTypes); - this.hbox1.Add(this.GtkScrolledWindow); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.GtkScrolledWindow])); - w4.Position = 1; - this.vbox2.Add(this.hbox1); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); - w5.Position = 0; - w5.Expand = false; - w5.Fill = false; - // Container child vbox2.Gtk.Box+BoxChild - this.lblNewUnitWarning = new global::Gtk.Label(); - this.lblNewUnitWarning.Name = "lblNewUnitWarning"; - this.lblNewUnitWarning.Xalign = 0f; - this.lblNewUnitWarning.Yalign = 0f; - this.vbox2.Add(this.lblNewUnitWarning); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.lblNewUnitWarning])); - w6.Position = 1; - w6.Expand = false; - w6.Fill = false; - w1.Add(this.vbox2); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(w1[this.vbox2])); - w7.Position = 0; - w7.Expand = false; - w7.Fill = false; - // Internal child IBBoard.WarFoundry.GTK.FrmNewUnit.ActionArea - global::Gtk.HButtonBox w8 = this.ActionArea; - w8.Name = "dialog1_ActionArea"; - w8.Spacing = 6; - w8.BorderWidth = ((uint)(5)); - w8.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonCancel = new global::Gtk.Button(); - this.buttonCancel.CanDefault = true; - this.buttonCancel.CanFocus = true; - this.buttonCancel.Name = "buttonCancel"; - this.buttonCancel.UseStock = true; - this.buttonCancel.UseUnderline = true; - this.buttonCancel.Label = "gtk-cancel"; - this.AddActionWidget(this.buttonCancel, -6); - global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.buttonCancel])); - w9.Expand = false; - w9.Fill = false; - // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild - this.buttonOk = new global::Gtk.Button(); - this.buttonOk.Sensitive = false; - this.buttonOk.CanDefault = true; - this.buttonOk.CanFocus = true; - this.buttonOk.Name = "buttonOk"; - this.buttonOk.UseStock = true; - this.buttonOk.UseUnderline = true; - this.buttonOk.Label = "gtk-ok"; - this.AddActionWidget(this.buttonOk, -5); - global::Gtk.ButtonBox.ButtonBoxChild w10 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.buttonOk])); - w10.Position = 1; - w10.Expand = false; - w10.Fill = false; - if ((this.Child != null)) - { - this.Child.ShowAll(); - } - this.DefaultWidth = 400; - this.DefaultHeight = 318; - this.Show(); - this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler(this.OnRowActivated); - this.buttonCancel.Activated += new global::System.EventHandler(this.OnButtonCancelActivated); - this.buttonOk.Clicked += new global::System.EventHandler(this.OnButtonOkClicked); - } - } -}
--- a/gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs Tue Nov 23 21:03:46 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,262 +0,0 @@ - -// This file has been generated by the GUI designer. Do not modify. -namespace IBBoard.WarFoundry.GTK.Widgets -{ - public partial class UnitDisplayWidget - { - private global::Gtk.VBox vbox1; - private global::Gtk.HBox hbox1; - private global::Gtk.Entry unitName; - private global::Gtk.SpinButton unitSize; - private global::Gtk.ScrolledWindow statsScrollPanel; - private global::Gtk.VBox statsRepeatBox; - private global::Gtk.HSeparator hseparator1; - private global::Gtk.HBox hbox2; - private global::Gtk.Table table1; - private global::Gtk.Label equipmentLabel; - private global::Gtk.ScrolledWindow GtkScrolledWindow2; - private global::Gtk.NodeView equipmentList; - private global::Gtk.ScrolledWindow GtkScrolledWindow3; - private global::Gtk.TextView notesView; - private global::Gtk.ScrolledWindow GtkScrolledWindow4; - private global::Gtk.NodeView abilitiesList; - private global::Gtk.Label lblAbilities; - private global::Gtk.Label lblNotes; - private global::Gtk.VBox vbox3; - private global::Gtk.Button bttnAddEquipment; - private global::Gtk.Button bttnEditEquipment; - private global::Gtk.Button bttnReplaceEquipment; - private global::Gtk.Button bttnRemoveEquipment; - - protected virtual void Build() - { - global::Stetic.Gui.Initialize(this); - // Widget IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget - global::Stetic.BinContainer.Attach(this); - this.Name = "IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget"; - // Container child IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.Gtk.Container+ContainerChild - this.vbox1 = new global::Gtk.VBox(); - this.vbox1.Name = "vbox1"; - this.vbox1.Spacing = 6; - // Container child vbox1.Gtk.Box+BoxChild - this.hbox1 = new global::Gtk.HBox(); - this.hbox1.Name = "hbox1"; - this.hbox1.Spacing = 6; - // Container child hbox1.Gtk.Box+BoxChild - this.unitName = new global::Gtk.Entry(); - this.unitName.CanFocus = true; - this.unitName.Name = "unitName"; - this.unitName.IsEditable = true; - this.unitName.InvisibleChar = '•'; - this.hbox1.Add(this.unitName); - global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.unitName])); - w1.Position = 0; - // Container child hbox1.Gtk.Box+BoxChild - this.unitSize = new global::Gtk.SpinButton(0, 100, 1); - this.unitSize.CanFocus = true; - this.unitSize.Name = "unitSize"; - this.unitSize.Adjustment.PageIncrement = 10; - this.unitSize.ClimbRate = 1; - this.unitSize.Numeric = true; - this.hbox1.Add(this.unitSize); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.unitSize])); - w2.Position = 1; - w2.Expand = false; - w2.Fill = false; - this.vbox1.Add(this.hbox1); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); - w3.Position = 0; - w3.Expand = false; - w3.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.statsScrollPanel = new global::Gtk.ScrolledWindow(); - this.statsScrollPanel.CanFocus = true; - this.statsScrollPanel.Name = "statsScrollPanel"; - this.statsScrollPanel.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child statsScrollPanel.Gtk.Container+ContainerChild - global::Gtk.Viewport w4 = new global::Gtk.Viewport(); - w4.ShadowType = ((global::Gtk.ShadowType)(0)); - // Container child GtkViewport.Gtk.Container+ContainerChild - this.statsRepeatBox = new global::Gtk.VBox(); - this.statsRepeatBox.Name = "statsRepeatBox"; - this.statsRepeatBox.Spacing = 6; - w4.Add(this.statsRepeatBox); - this.statsScrollPanel.Add(w4); - this.vbox1.Add(this.statsScrollPanel); - global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statsScrollPanel])); - w7.Position = 1; - // Container child vbox1.Gtk.Box+BoxChild - this.hseparator1 = new global::Gtk.HSeparator(); - this.hseparator1.Name = "hseparator1"; - this.vbox1.Add(this.hseparator1); - global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hseparator1])); - w8.Position = 2; - w8.Expand = false; - w8.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.hbox2 = new global::Gtk.HBox(); - this.hbox2.Name = "hbox2"; - this.hbox2.Spacing = 6; - // Container child hbox2.Gtk.Box+BoxChild - this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(2)), false); - this.table1.Name = "table1"; - this.table1.RowSpacing = ((uint)(6)); - this.table1.ColumnSpacing = ((uint)(6)); - // Container child table1.Gtk.Table+TableChild - this.equipmentLabel = new global::Gtk.Label(); - this.equipmentLabel.Name = "equipmentLabel"; - this.equipmentLabel.LabelProp = global::Mono.Unix.Catalog.GetString("equipment:"); - this.table1.Add(this.equipmentLabel); - global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.equipmentLabel])); - w9.XOptions = ((global::Gtk.AttachOptions)(4)); - w9.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.GtkScrolledWindow2 = new global::Gtk.ScrolledWindow(); - this.GtkScrolledWindow2.Name = "GtkScrolledWindow2"; - this.GtkScrolledWindow2.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child GtkScrolledWindow2.Gtk.Container+ContainerChild - this.equipmentList = new global::Gtk.NodeView(); - this.equipmentList.CanFocus = true; - this.equipmentList.Name = "equipmentList"; - this.equipmentList.HeadersVisible = false; - this.GtkScrolledWindow2.Add(this.equipmentList); - this.table1.Add(this.GtkScrolledWindow2); - global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow2])); - w11.LeftAttach = ((uint)(1)); - w11.RightAttach = ((uint)(2)); - w11.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.GtkScrolledWindow3 = new global::Gtk.ScrolledWindow(); - this.GtkScrolledWindow3.Name = "GtkScrolledWindow3"; - this.GtkScrolledWindow3.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child GtkScrolledWindow3.Gtk.Container+ContainerChild - this.notesView = new global::Gtk.TextView(); - this.notesView.CanFocus = true; - this.notesView.Name = "notesView"; - this.notesView.Editable = false; - this.GtkScrolledWindow3.Add(this.notesView); - this.table1.Add(this.GtkScrolledWindow3); - global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow3])); - w13.TopAttach = ((uint)(2)); - w13.BottomAttach = ((uint)(3)); - w13.LeftAttach = ((uint)(1)); - w13.RightAttach = ((uint)(2)); - w13.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.GtkScrolledWindow4 = new global::Gtk.ScrolledWindow(); - this.GtkScrolledWindow4.Name = "GtkScrolledWindow4"; - this.GtkScrolledWindow4.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child GtkScrolledWindow4.Gtk.Container+ContainerChild - this.abilitiesList = new global::Gtk.NodeView(); - this.abilitiesList.CanFocus = true; - this.abilitiesList.Name = "abilitiesList"; - this.abilitiesList.HeadersVisible = false; - this.GtkScrolledWindow4.Add(this.abilitiesList); - this.table1.Add(this.GtkScrolledWindow4); - global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow4])); - w15.TopAttach = ((uint)(1)); - w15.BottomAttach = ((uint)(2)); - w15.LeftAttach = ((uint)(1)); - w15.RightAttach = ((uint)(2)); - w15.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.lblAbilities = new global::Gtk.Label(); - this.lblAbilities.Name = "lblAbilities"; - this.lblAbilities.LabelProp = global::Mono.Unix.Catalog.GetString("abilities:"); - this.table1.Add(this.lblAbilities); - global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.lblAbilities])); - w16.TopAttach = ((uint)(1)); - w16.BottomAttach = ((uint)(2)); - w16.XOptions = ((global::Gtk.AttachOptions)(4)); - w16.YOptions = ((global::Gtk.AttachOptions)(4)); - // Container child table1.Gtk.Table+TableChild - this.lblNotes = new global::Gtk.Label(); - this.lblNotes.Name = "lblNotes"; - this.lblNotes.LabelProp = global::Mono.Unix.Catalog.GetString("notes:"); - this.table1.Add(this.lblNotes); - global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.lblNotes])); - w17.TopAttach = ((uint)(2)); - w17.BottomAttach = ((uint)(3)); - w17.XOptions = ((global::Gtk.AttachOptions)(4)); - w17.YOptions = ((global::Gtk.AttachOptions)(4)); - this.hbox2.Add(this.table1); - global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.table1])); - w18.Position = 0; - // Container child hbox2.Gtk.Box+BoxChild - this.vbox3 = new global::Gtk.VBox(); - this.vbox3.Name = "vbox3"; - this.vbox3.Spacing = 6; - // Container child vbox3.Gtk.Box+BoxChild - this.bttnAddEquipment = new global::Gtk.Button(); - this.bttnAddEquipment.CanFocus = true; - this.bttnAddEquipment.Name = "bttnAddEquipment"; - this.bttnAddEquipment.UseUnderline = true; - this.bttnAddEquipment.Label = global::Mono.Unix.Catalog.GetString("Add"); - this.vbox3.Add(this.bttnAddEquipment); - global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddEquipment])); - w19.Position = 0; - w19.Expand = false; - w19.Fill = false; - // Container child vbox3.Gtk.Box+BoxChild - this.bttnEditEquipment = new global::Gtk.Button(); - this.bttnEditEquipment.Sensitive = false; - this.bttnEditEquipment.CanFocus = true; - this.bttnEditEquipment.Name = "bttnEditEquipment"; - this.bttnEditEquipment.UseUnderline = true; - this.bttnEditEquipment.Label = global::Mono.Unix.Catalog.GetString("Edit"); - this.vbox3.Add(this.bttnEditEquipment); - global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditEquipment])); - w20.Position = 1; - w20.Expand = false; - w20.Fill = false; - // Container child vbox3.Gtk.Box+BoxChild - this.bttnReplaceEquipment = new global::Gtk.Button(); - this.bttnReplaceEquipment.Sensitive = false; - this.bttnReplaceEquipment.CanFocus = true; - this.bttnReplaceEquipment.Name = "bttnReplaceEquipment"; - this.bttnReplaceEquipment.UseUnderline = true; - this.bttnReplaceEquipment.Label = global::Mono.Unix.Catalog.GetString("Replace"); - this.vbox3.Add(this.bttnReplaceEquipment); - global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnReplaceEquipment])); - w21.Position = 2; - w21.Expand = false; - w21.Fill = false; - // Container child vbox3.Gtk.Box+BoxChild - this.bttnRemoveEquipment = new global::Gtk.Button(); - this.bttnRemoveEquipment.Sensitive = false; - this.bttnRemoveEquipment.CanFocus = true; - this.bttnRemoveEquipment.Name = "bttnRemoveEquipment"; - this.bttnRemoveEquipment.UseUnderline = true; - this.bttnRemoveEquipment.Label = global::Mono.Unix.Catalog.GetString("Remove"); - this.vbox3.Add(this.bttnRemoveEquipment); - global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemoveEquipment])); - w22.Position = 3; - w22.Expand = false; - w22.Fill = false; - this.hbox2.Add(this.vbox3); - global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.vbox3])); - w23.Position = 1; - w23.Expand = false; - w23.Fill = false; - this.vbox1.Add(this.hbox2); - global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); - w24.Position = 3; - w24.Expand = false; - w24.Fill = false; - this.Add(this.vbox1); - if ((this.Child != null)) - { - this.Child.ShowAll(); - } - this.Show(); - this.unitName.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitNameFocusOut); - this.unitName.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitNameKeyPress); - this.unitSize.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitSizeFocusOut); - this.unitSize.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitSizeKeyPress); - this.bttnAddEquipment.Clicked += new global::System.EventHandler(this.OnBttnAddEquipmentClicked); - this.bttnEditEquipment.Clicked += new global::System.EventHandler(this.HandleEditButtonClicked); - this.bttnReplaceEquipment.Clicked += new global::System.EventHandler(this.HandleReplaceButtonClicked); - this.bttnRemoveEquipment.Clicked += new global::System.EventHandler(this.HandleRemoveButtonActivated); - } - } -}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAbout.cs Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,105 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class FrmAbout + { + private global::Gtk.Image image1; + private global::Gtk.Label label1; + private global::Gtk.Label label4; + private global::Gtk.Label label2; + private global::Gtk.Label label3; + private global::Gtk.Button buttonOk; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget IBBoard.WarFoundry.GUI.GTK.FrmAbout + this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmAbout"; + this.Title = global::Mono.Unix.Catalog.GetString("About WarFoundry"); + this.TypeHint = ((global::Gdk.WindowTypeHint)(1)); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + this.Resizable = false; + this.AllowGrow = false; + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmAbout.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "dialog1_VBox"; + w1.BorderWidth = ((uint)(2)); + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.image1 = new global::Gtk.Image(); + this.image1.Name = "image1"; + this.image1.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("IBBoard.WarFoundry.GUI.GTK.App-lrg.png"); + w1.Add(this.image1); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(w1[this.image1])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.label1 = new global::Gtk.Label(); + this.label1.Name = "label1"; + this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("<span font_size=\"x-large\" weight=\"bold\">WarFoundry v0.1 Beta 1</span>"); + this.label1.UseMarkup = true; + w1.Add(this.label1); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(w1[this.label1])); + w3.Position = 1; + w3.Expand = false; + w3.Fill = false; + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.label4 = new global::Gtk.Label(); + this.label4.Name = "label4"; + this.label4.LabelProp = global::Mono.Unix.Catalog.GetString("WarFoundry is an open-source army creation tool that lets you create rosters for multiple game systems."); + this.label4.Wrap = true; + this.label4.Justify = ((global::Gtk.Justification)(2)); + w1.Add(this.label4); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1[this.label4])); + w4.Position = 2; + w4.Expand = false; + w4.Fill = false; + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.label2 = new global::Gtk.Label(); + this.label2.Name = "label2"; + this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("© 2007-2010, IBBoard and others"); + w1.Add(this.label2); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(w1[this.label2])); + w5.Position = 3; + w5.Expand = false; + w5.Fill = false; + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.label3 = new global::Gtk.Label(); + this.label3.Name = "label3"; + this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("<a href=\"http://warfoundry.co.uk\">http://warfoundry.co.uk</a>"); + this.label3.UseMarkup = true; + w1.Add(this.label3); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(w1[this.label3])); + w6.Position = 4; + w6.Expand = false; + w6.Fill = false; + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmAbout.ActionArea + global::Gtk.HButtonBox w7 = this.ActionArea; + w7.Name = "dialog1_ActionArea"; + w7.Spacing = 10; + w7.BorderWidth = ((uint)(5)); + w7.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonOk = new global::Gtk.Button(); + this.buttonOk.CanDefault = true; + this.buttonOk.CanFocus = true; + this.buttonOk.Name = "buttonOk"; + this.buttonOk.UseStock = true; + this.buttonOk.UseUnderline = true; + this.buttonOk.Label = "gtk-ok"; + this.AddActionWidget(this.buttonOk, -5); + global::Gtk.ButtonBox.ButtonBoxChild w8 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w7[this.buttonOk])); + w8.Expand = false; + w8.Fill = false; + if ((this.Child != null)) + { + this.Child.ShowAll(); + } + this.DefaultWidth = 305; + this.DefaultHeight = 300; + this.Show(); + this.buttonOk.Activated += new global::System.EventHandler(this.OkayClicked); + } + } +}
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs Sat Dec 18 16:42:51 2010 +0000 @@ -5,22 +5,22 @@ public partial class FrmAddEquipment { private global::Gtk.Table table1; - private global::Gtk.ScrolledWindow GtkScrolledWindow; - private global::Gtk.TreeView lstEquipment; - private global::Gtk.HBox hbox2; - private global::Gtk.Table table2; - private global::Gtk.Label lblEquipAll; - private global::Gtk.Label lblPercent; - private global::Gtk.SpinButton numericAmount; - private global::Gtk.SpinButton percentageAmount; - private global::Gtk.RadioButton rbEquipAll; - private global::Gtk.RadioButton rbEquipNumeric; - private global::Gtk.RadioButton rbEquipPercent; - private global::Gtk.Label lblEquipAmount; - private global::Gtk.Label lblEquipment; - private global::Gtk.Button buttonCancel; - private global::Gtk.Button buttonOk; - + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView lstEquipment; + private global::Gtk.HBox hbox2; + private global::Gtk.Table table2; + private global::Gtk.Label lblEquipAll; + private global::Gtk.Label lblPercent; + private global::Gtk.SpinButton numericAmount; + private global::Gtk.SpinButton percentageAmount; + private global::Gtk.RadioButton rbEquipAll; + private global::Gtk.RadioButton rbEquipNumeric; + private global::Gtk.RadioButton rbEquipPercent; + private global::Gtk.Label lblEquipAmount; + private global::Gtk.Label lblEquipment; + private global::Gtk.Button buttonCancel; + private global::Gtk.Button buttonOk; + protected virtual void Build() { global::Stetic.Gui.Initialize(this);
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmEditEquipment.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmEditEquipment.cs Sat Dec 18 16:42:51 2010 +0000 @@ -5,19 +5,19 @@ public partial class FrmEditEquipment { private global::Gtk.Table table1; - private global::Gtk.HBox hbox2; - private global::Gtk.Table table2; - private global::Gtk.Label lblEquipAll; - private global::Gtk.Label lblPercent; - private global::Gtk.SpinButton numericAmount; - private global::Gtk.SpinButton percentageAmount; - private global::Gtk.RadioButton rbEquipAll; - private global::Gtk.RadioButton rbEquipNumeric; - private global::Gtk.RadioButton rbEquipPercent; - private global::Gtk.Label lblEquipAmount; - private global::Gtk.Button buttonCancel; - private global::Gtk.Button buttonOk; - + private global::Gtk.HBox hbox2; + private global::Gtk.Table table2; + private global::Gtk.Label lblEquipAll; + private global::Gtk.Label lblPercent; + private global::Gtk.SpinButton numericAmount; + private global::Gtk.SpinButton percentageAmount; + private global::Gtk.RadioButton rbEquipAll; + private global::Gtk.RadioButton rbEquipNumeric; + private global::Gtk.RadioButton rbEquipPercent; + private global::Gtk.Label lblEquipAmount; + private global::Gtk.Button buttonCancel; + private global::Gtk.Button buttonOk; + protected virtual void Build() { global::Stetic.Gui.Initialize(this);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,206 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class FrmMainWindow + { + private global::Gtk.UIManager UIManager; + private global::Gtk.Action menuFile; + private global::Gtk.Action miCreateArmy; + private global::Gtk.Action miOpenArmy; + private global::Gtk.Action miSaveArmy; + private global::Gtk.Action miSaveArmyAs; + private global::Gtk.Action miCloseArmy; + private global::Gtk.Action refreshAction; + private global::Gtk.Action miExit; + private global::Gtk.Action menuEdit; + private global::Gtk.Action miUndo; + private global::Gtk.Action miRedo; + private global::Gtk.Action menuHelp; + private global::Gtk.Action miAbout; + private global::Gtk.Action miDebugInformation; + private global::Gtk.Action newArmyButton; + private global::Gtk.Action openArmyButton; + private global::Gtk.Action saveArmyButton; + private global::Gtk.Action undoActionButton; + private global::Gtk.Action redoActionButton; + private global::Gtk.Action goDown; + private global::Gtk.Action add; + private global::Gtk.Action miExportArmy; + private global::Gtk.Action miExportAsBasicHtml; + private global::Gtk.VBox vbox1; + private global::Gtk.MenuBar menubar1; + private global::Gtk.Toolbar toolbar; + private global::Gtk.HPaned hpaned2; + private global::Gtk.TreeView treeUnits; + private global::Gtk.Notebook unitsNotebook; + private global::Gtk.Statusbar statusbar1; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget IBBoard.WarFoundry.GUI.GTK.FrmMainWindow + this.UIManager = new global::Gtk.UIManager(); + global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default"); + this.menuFile = new global::Gtk.Action("menuFile", global::Mono.Unix.Catalog.GetString("File"), null, null); + this.menuFile.ShortLabel = global::Mono.Unix.Catalog.GetString("File"); + w1.Add(this.menuFile, null); + this.miCreateArmy = new global::Gtk.Action("miCreateArmy", global::Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new"); + this.miCreateArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Create army"); + w1.Add(this.miCreateArmy, null); + this.miOpenArmy = new global::Gtk.Action("miOpenArmy", global::Mono.Unix.Catalog.GetString("Open army"), null, "gtk-open"); + this.miOpenArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Open army"); + w1.Add(this.miOpenArmy, null); + this.miSaveArmy = new global::Gtk.Action("miSaveArmy", global::Mono.Unix.Catalog.GetString("Save army"), null, "gtk-save"); + this.miSaveArmy.Sensitive = false; + this.miSaveArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Save army"); + w1.Add(this.miSaveArmy, null); + this.miSaveArmyAs = new global::Gtk.Action("miSaveArmyAs", global::Mono.Unix.Catalog.GetString("Save army as"), null, "gtk-save-as"); + this.miSaveArmyAs.Sensitive = false; + this.miSaveArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Save army as"); + w1.Add(this.miSaveArmyAs, null); + this.miCloseArmy = new global::Gtk.Action("miCloseArmy", global::Mono.Unix.Catalog.GetString("Close army"), null, "gtk-close"); + this.miCloseArmy.Sensitive = false; + this.miCloseArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Close army"); + w1.Add(this.miCloseArmy, null); + this.refreshAction = new global::Gtk.Action("refreshAction", global::Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh"); + this.refreshAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Reload files"); + w1.Add(this.refreshAction, null); + this.miExit = new global::Gtk.Action("miExit", global::Mono.Unix.Catalog.GetString("Exit"), null, "gtk-quit"); + this.miExit.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit"); + w1.Add(this.miExit, null); + this.menuEdit = new global::Gtk.Action("menuEdit", global::Mono.Unix.Catalog.GetString("Edit"), null, null); + this.menuEdit.ShortLabel = global::Mono.Unix.Catalog.GetString("Edit"); + w1.Add(this.menuEdit, null); + this.miUndo = new global::Gtk.Action("miUndo", global::Mono.Unix.Catalog.GetString("Undo"), null, "gtk-undo"); + this.miUndo.Sensitive = false; + this.miUndo.ShortLabel = global::Mono.Unix.Catalog.GetString("Undo"); + w1.Add(this.miUndo, null); + this.miRedo = new global::Gtk.Action("miRedo", global::Mono.Unix.Catalog.GetString("Redo"), null, "gtk-redo"); + this.miRedo.Sensitive = false; + this.miRedo.ShortLabel = global::Mono.Unix.Catalog.GetString("Redo"); + w1.Add(this.miRedo, null); + this.menuHelp = new global::Gtk.Action("menuHelp", global::Mono.Unix.Catalog.GetString("Help"), null, null); + this.menuHelp.ShortLabel = global::Mono.Unix.Catalog.GetString("Help"); + w1.Add(this.menuHelp, null); + this.miAbout = new global::Gtk.Action("miAbout", global::Mono.Unix.Catalog.GetString("About"), null, "gtk-about"); + this.miAbout.ShortLabel = global::Mono.Unix.Catalog.GetString("About"); + w1.Add(this.miAbout, null); + this.miDebugInformation = new global::Gtk.Action("miDebugInformation", global::Mono.Unix.Catalog.GetString("Debug Information"), null, null); + this.miDebugInformation.ShortLabel = global::Mono.Unix.Catalog.GetString("Debug Information"); + w1.Add(this.miDebugInformation, null); + this.newArmyButton = new global::Gtk.Action("newArmyButton", null, null, "gtk-new"); + w1.Add(this.newArmyButton, null); + this.openArmyButton = new global::Gtk.Action("openArmyButton", null, null, "gtk-open"); + w1.Add(this.openArmyButton, null); + this.saveArmyButton = new global::Gtk.Action("saveArmyButton", null, null, "gtk-save"); + this.saveArmyButton.Sensitive = false; + w1.Add(this.saveArmyButton, null); + this.undoActionButton = new global::Gtk.Action("undoActionButton", null, null, "gtk-undo"); + this.undoActionButton.Sensitive = false; + w1.Add(this.undoActionButton, null); + this.redoActionButton = new global::Gtk.Action("redoActionButton", null, null, "gtk-redo"); + this.redoActionButton.Sensitive = false; + w1.Add(this.redoActionButton, null); + this.goDown = new global::Gtk.Action("goDown", null, null, null); + w1.Add(this.goDown, null); + this.add = new global::Gtk.Action("add", null, null, "gtk-add"); + w1.Add(this.add, null); + this.miExportArmy = new global::Gtk.Action("miExportArmy", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert"); + this.miExportArmy.Sensitive = false; + this.miExportArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army"); + w1.Add(this.miExportArmy, null); + this.miExportAsBasicHtml = new global::Gtk.Action("miExportAsBasicHtml", global::Mono.Unix.Catalog.GetString("Basic HTML"), null, null); + this.miExportAsBasicHtml.ShortLabel = global::Mono.Unix.Catalog.GetString("Basic HTML"); + w1.Add(this.miExportAsBasicHtml, null); + this.UIManager.InsertActionGroup(w1, 0); + this.AddAccelGroup(this.UIManager.AccelGroup); + this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmMainWindow"; + this.Title = global::Mono.Unix.Catalog.GetString("MainWindow"); + this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico"); + // Container child IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.Gtk.Container+ContainerChild + this.vbox1 = new global::Gtk.VBox(); + this.vbox1.Name = "vbox1"; + // Container child vbox1.Gtk.Box+BoxChild + this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miCreateArmy' action='miCreateArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmy' action='miExportArmy'><menuitem name='miExportAsBasicHtml' action='miExportAsBasicHtml'/></menu><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='refreshAction' action='refreshAction'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/></menu></menubar></ui>"); + this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); + this.menubar1.Name = "menubar1"; + this.vbox1.Add(this.menubar1); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.UIManager.AddUiFromString("<ui><toolbar name='toolbar'><toolitem name='newArmyButton' action='newArmyButton'/><toolitem name='openArmyButton' action='openArmyButton'/><toolitem name='saveArmyButton' action='saveArmyButton'/><separator/><toolitem name='undoActionButton' action='undoActionButton'/><toolitem name='redoActionButton' action='redoActionButton'/><separator/></toolbar></ui>"); + this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar"))); + this.toolbar.HeightRequest = 36; + this.toolbar.Name = "toolbar"; + this.toolbar.ShowArrow = false; + this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); + this.toolbar.IconSize = ((global::Gtk.IconSize)(3)); + this.vbox1.Add(this.toolbar); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.toolbar])); + w3.Position = 1; + w3.Expand = false; + w3.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.hpaned2 = new global::Gtk.HPaned(); + this.hpaned2.CanFocus = true; + this.hpaned2.Name = "hpaned2"; + this.hpaned2.Position = 178; + // Container child hpaned2.Gtk.Paned+PanedChild + this.treeUnits = new global::Gtk.TreeView(); + this.treeUnits.CanFocus = true; + this.treeUnits.Name = "treeUnits"; + this.hpaned2.Add(this.treeUnits); + global::Gtk.Paned.PanedChild w4 = ((global::Gtk.Paned.PanedChild)(this.hpaned2[this.treeUnits])); + w4.Resize = false; + // Container child hpaned2.Gtk.Paned+PanedChild + this.unitsNotebook = new global::Gtk.Notebook(); + this.unitsNotebook.CanFocus = true; + this.unitsNotebook.Name = "unitsNotebook"; + this.unitsNotebook.CurrentPage = -1; + this.unitsNotebook.Scrollable = true; + this.hpaned2.Add(this.unitsNotebook); + this.vbox1.Add(this.hpaned2); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hpaned2])); + w6.Position = 2; + // Container child vbox1.Gtk.Box+BoxChild + this.statusbar1 = new global::Gtk.Statusbar(); + this.statusbar1.Name = "statusbar1"; + this.statusbar1.Spacing = 2; + this.vbox1.Add(this.statusbar1); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); + w7.Position = 3; + w7.Expand = false; + w7.Fill = false; + this.Add(this.vbox1); + if ((this.Child != null)) + { + this.Child.ShowAll(); + } + this.DefaultWidth = 832; + this.DefaultHeight = 659; + this.hpaned2.Hide(); + this.Show(); + this.miCreateArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated); + this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated); + this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated); + this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated); + this.miCloseArmy.Activated += new global::System.EventHandler(this.OnCloseArmyActivated); + this.refreshAction.Activated += new global::System.EventHandler(this.OnReloadFilesActivated); + this.miExit.Activated += new global::System.EventHandler(this.OnExitActivated); + this.miAbout.Activated += new global::System.EventHandler(this.HelpAboutActivated); + this.newArmyButton.Activated += new global::System.EventHandler(this.newTBButtonActivated); + this.openArmyButton.Activated += new global::System.EventHandler(this.openTBButtonActivated); + this.saveArmyButton.Activated += new global::System.EventHandler(this.saveTBButtonActivated); + this.undoActionButton.Activated += new global::System.EventHandler(this.undoTBButtonActivated); + this.redoActionButton.Activated += new global::System.EventHandler(this.redoTBButtonActivated); + this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated); + this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler(this.ArmyRowActivated); + this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler(this.OnTreeUnitsPopupMenu); + this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(this.UnitTreeButtonPressed); + this.unitsNotebook.Removed += new global::Gtk.RemovedHandler(this.NotebookPageRemoved); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,217 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class FrmNewArmy + { + private global::Gtk.Table table1; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView lstRaces; + private global::Gtk.HBox hbox2; + private global::Gtk.SpinButton sbPointsValue; + private global::Gtk.Label label1; + private global::Gtk.Label label2; + private global::Gtk.Label label3; + private global::Gtk.Label label4; + private global::Gtk.ComboBoxEntry systemCombo; + private global::Gtk.Entry txtArmyName; + private global::Gtk.Button bttnCancel; + private global::Gtk.Button bttnCreate; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget IBBoard.WarFoundry.GUI.GTK.FrmNewArmy + this.Events = ((global::Gdk.EventMask)(256)); + this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmNewArmy"; + this.Title = global::Mono.Unix.Catalog.GetString("Create new army"); + this.Icon = global::Stetic.IconLoader.LoadIcon(this, "gtk-new", global::Gtk.IconSize.Menu); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + this.SkipPagerHint = true; + this.SkipTaskbarHint = true; + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.VBox + global::Gtk.VBox w1 = this.VBox; + w1.CanFocus = true; + w1.Events = ((global::Gdk.EventMask)(256)); + w1.Name = "dialog_VBox"; + w1.BorderWidth = ((uint)(2)); + // Container child dialog_VBox.Gtk.Box+BoxChild + this.table1 = new global::Gtk.Table(((uint)(4)), ((uint)(2)), false); + this.table1.Name = "table1"; + this.table1.RowSpacing = ((uint)(6)); + this.table1.ColumnSpacing = ((uint)(6)); + // Container child table1.Gtk.Table+TableChild + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow.Name = "GtkScrolledWindow"; + this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow.Gtk.Container+ContainerChild + this.lstRaces = new global::Gtk.TreeView(); + this.lstRaces.HeightRequest = 150; + this.lstRaces.CanFocus = true; + this.lstRaces.Name = "lstRaces"; + this.lstRaces.HeadersVisible = false; + this.lstRaces.RulesHint = true; + this.GtkScrolledWindow.Add(this.lstRaces); + this.table1.Add(this.GtkScrolledWindow); + global::Gtk.Table.TableChild w3 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow])); + w3.TopAttach = ((uint)(1)); + w3.BottomAttach = ((uint)(2)); + w3.LeftAttach = ((uint)(1)); + w3.RightAttach = ((uint)(2)); + w3.XOptions = ((global::Gtk.AttachOptions)(4)); + w3.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.hbox2 = new global::Gtk.HBox(); + this.hbox2.Name = "hbox2"; + // Container child hbox2.Gtk.Box+BoxChild + this.sbPointsValue = new global::Gtk.SpinButton(0, 2000000000, 100); + this.sbPointsValue.WidthRequest = 150; + this.sbPointsValue.CanFocus = true; + this.sbPointsValue.Name = "sbPointsValue"; + this.sbPointsValue.Adjustment.PageIncrement = 1000; + this.sbPointsValue.ClimbRate = 100; + this.sbPointsValue.Numeric = true; + this.sbPointsValue.Value = 1000; + this.hbox2.Add(this.sbPointsValue); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.sbPointsValue])); + w4.Position = 0; + w4.Expand = false; + w4.Fill = false; + this.table1.Add(this.hbox2); + global::Gtk.Table.TableChild w5 = ((global::Gtk.Table.TableChild)(this.table1[this.hbox2])); + w5.TopAttach = ((uint)(3)); + w5.BottomAttach = ((uint)(4)); + w5.LeftAttach = ((uint)(1)); + w5.RightAttach = ((uint)(2)); + w5.XOptions = ((global::Gtk.AttachOptions)(4)); + w5.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.label1 = new global::Gtk.Label(); + this.label1.Name = "label1"; + this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Race"); + this.table1.Add(this.label1); + global::Gtk.Table.TableChild w6 = ((global::Gtk.Table.TableChild)(this.table1[this.label1])); + w6.TopAttach = ((uint)(1)); + w6.BottomAttach = ((uint)(2)); + w6.XOptions = ((global::Gtk.AttachOptions)(4)); + w6.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.label2 = new global::Gtk.Label(); + this.label2.Name = "label2"; + this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Army name"); + this.table1.Add(this.label2); + global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1[this.label2])); + w7.TopAttach = ((uint)(2)); + w7.BottomAttach = ((uint)(3)); + w7.XOptions = ((global::Gtk.AttachOptions)(4)); + w7.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.label3 = new global::Gtk.Label(); + this.label3.Name = "label3"; + this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Points value"); + this.table1.Add(this.label3); + global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1[this.label3])); + w8.TopAttach = ((uint)(3)); + w8.BottomAttach = ((uint)(4)); + w8.XOptions = ((global::Gtk.AttachOptions)(4)); + w8.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.label4 = new global::Gtk.Label(); + this.label4.Name = "label4"; + this.label4.LabelProp = global::Mono.Unix.Catalog.GetString("game system"); + this.table1.Add(this.label4); + global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.label4])); + w9.XOptions = ((global::Gtk.AttachOptions)(4)); + w9.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.systemCombo = global::Gtk.ComboBoxEntry.NewText(); + this.systemCombo.Name = "systemCombo"; + this.table1.Add(this.systemCombo); + global::Gtk.Table.TableChild w10 = ((global::Gtk.Table.TableChild)(this.table1[this.systemCombo])); + w10.LeftAttach = ((uint)(1)); + w10.RightAttach = ((uint)(2)); + w10.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.txtArmyName = new global::Gtk.Entry(); + this.txtArmyName.CanFocus = true; + this.txtArmyName.Name = "txtArmyName"; + this.txtArmyName.IsEditable = true; + this.txtArmyName.InvisibleChar = '•'; + this.table1.Add(this.txtArmyName); + global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.txtArmyName])); + w11.TopAttach = ((uint)(2)); + w11.BottomAttach = ((uint)(3)); + w11.LeftAttach = ((uint)(1)); + w11.RightAttach = ((uint)(2)); + w11.XOptions = ((global::Gtk.AttachOptions)(4)); + w11.YOptions = ((global::Gtk.AttachOptions)(4)); + w1.Add(this.table1); + global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(w1[this.table1])); + w12.Position = 0; + w12.Expand = false; + w12.Fill = false; + w12.Padding = ((uint)(6)); + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.ActionArea + global::Gtk.HButtonBox w13 = this.ActionArea; + w13.CanFocus = true; + w13.Events = ((global::Gdk.EventMask)(256)); + w13.Name = "WarFoundrySharp.FrmNewArmy_ActionArea"; + w13.Spacing = 6; + w13.BorderWidth = ((uint)(5)); + w13.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.bttnCancel = new global::Gtk.Button(); + this.bttnCancel.CanFocus = true; + this.bttnCancel.Name = "bttnCancel"; + this.bttnCancel.UseStock = true; + this.bttnCancel.UseUnderline = true; + this.bttnCancel.Label = "gtk-cancel"; + this.AddActionWidget(this.bttnCancel, -6); + global::Gtk.ButtonBox.ButtonBoxChild w14 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCancel])); + w14.Expand = false; + w14.Fill = false; + // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.bttnCreate = new global::Gtk.Button(); + this.bttnCreate.Sensitive = false; + this.bttnCreate.CanDefault = true; + this.bttnCreate.CanFocus = true; + this.bttnCreate.Name = "bttnCreate"; + this.bttnCreate.UseUnderline = true; + // Container child bttnCreate.Gtk.Container+ContainerChild + global::Gtk.Alignment w15 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F); + // Container child GtkAlignment.Gtk.Container+ContainerChild + global::Gtk.HBox w16 = new global::Gtk.HBox(); + w16.Spacing = 2; + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Image w17 = new global::Gtk.Image(); + w17.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-ok", global::Gtk.IconSize.Menu); + w16.Add(w17); + // Container child GtkHBox.Gtk.Container+ContainerChild + global::Gtk.Label w19 = new global::Gtk.Label(); + w19.LabelProp = global::Mono.Unix.Catalog.GetString("C_reate"); + w19.UseUnderline = true; + w16.Add(w19); + w15.Add(w16); + this.bttnCreate.Add(w15); + this.AddActionWidget(this.bttnCreate, -5); + global::Gtk.ButtonBox.ButtonBoxChild w23 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCreate])); + w23.Position = 1; + w23.Expand = false; + w23.Fill = false; + if ((this.Child != null)) + { + this.Child.ShowAll(); + } + this.DefaultWidth = 370; + this.DefaultHeight = 348; + this.Show(); + this.txtArmyName.Changed += new global::System.EventHandler(this.OnTextChanged); + this.systemCombo.Changed += new global::System.EventHandler(this.OnSystemComboChanged); + this.sbPointsValue.ChangeValue += new global::Gtk.ChangeValueHandler(this.OnSpinChangeValue); + this.sbPointsValue.ValueChanged += new global::System.EventHandler(this.OnSpinValueChanged); + this.sbPointsValue.Changed += new global::System.EventHandler(this.OnSpinValueChanged); + this.bttnCancel.Clicked += new global::System.EventHandler(this.OnCancelClicked); + this.bttnCreate.Clicked += new global::System.EventHandler(this.OnCreateClicked); + } + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,126 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class FrmNewUnit + { + private global::Gtk.VBox vbox2; + private global::Gtk.HBox hbox1; + private global::Gtk.Label label1; + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView lstUnitTypes; + private global::Gtk.Label lblNewUnitWarning; + private global::Gtk.Button buttonCancel; + private global::Gtk.Button buttonOk; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget IBBoard.WarFoundry.GUI.GTK.FrmNewUnit + this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmNewUnit"; + this.Title = global::Mono.Unix.Catalog.GetString("Add new unit"); + this.Icon = global::Stetic.IconLoader.LoadIcon(this, "gtk-new", global::Gtk.IconSize.Menu); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + this.Modal = true; + this.SkipPagerHint = true; + this.SkipTaskbarHint = true; + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "dialog1_VBox"; + w1.BorderWidth = ((uint)(2)); + // Container child dialog1_VBox.Gtk.Box+BoxChild + this.vbox2 = new global::Gtk.VBox(); + this.vbox2.Name = "vbox2"; + this.vbox2.Spacing = 6; + // Container child vbox2.Gtk.Box+BoxChild + this.hbox1 = new global::Gtk.HBox(); + this.hbox1.Name = "hbox1"; + this.hbox1.Spacing = 6; + // Container child hbox1.Gtk.Box+BoxChild + this.label1 = new global::Gtk.Label(); + this.label1.Name = "label1"; + this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Unit Type:"); + this.hbox1.Add(this.label1); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.label1])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + // Container child hbox1.Gtk.Box+BoxChild + this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow.Name = "GtkScrolledWindow"; + this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow.Gtk.Container+ContainerChild + this.lstUnitTypes = new global::Gtk.TreeView(); + this.lstUnitTypes.HeightRequest = 150; + this.lstUnitTypes.CanFocus = true; + this.lstUnitTypes.Name = "lstUnitTypes"; + this.lstUnitTypes.HeadersVisible = false; + this.GtkScrolledWindow.Add(this.lstUnitTypes); + this.hbox1.Add(this.GtkScrolledWindow); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.GtkScrolledWindow])); + w4.Position = 1; + this.vbox2.Add(this.hbox1); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.hbox1])); + w5.Position = 0; + w5.Expand = false; + w5.Fill = false; + // Container child vbox2.Gtk.Box+BoxChild + this.lblNewUnitWarning = new global::Gtk.Label(); + this.lblNewUnitWarning.Name = "lblNewUnitWarning"; + this.lblNewUnitWarning.Xalign = 0F; + this.lblNewUnitWarning.Yalign = 0F; + this.vbox2.Add(this.lblNewUnitWarning); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox2[this.lblNewUnitWarning])); + w6.Position = 1; + w6.Expand = false; + w6.Fill = false; + w1.Add(this.vbox2); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(w1[this.vbox2])); + w7.Position = 0; + w7.Expand = false; + w7.Fill = false; + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.ActionArea + global::Gtk.HButtonBox w8 = this.ActionArea; + w8.Name = "dialog1_ActionArea"; + w8.Spacing = 6; + w8.BorderWidth = ((uint)(5)); + w8.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonCancel = new global::Gtk.Button(); + this.buttonCancel.CanDefault = true; + this.buttonCancel.CanFocus = true; + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.UseStock = true; + this.buttonCancel.UseUnderline = true; + this.buttonCancel.Label = "gtk-cancel"; + this.AddActionWidget(this.buttonCancel, -6); + global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.buttonCancel])); + w9.Expand = false; + w9.Fill = false; + // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonOk = new global::Gtk.Button(); + this.buttonOk.Sensitive = false; + this.buttonOk.CanDefault = true; + this.buttonOk.CanFocus = true; + this.buttonOk.Name = "buttonOk"; + this.buttonOk.UseStock = true; + this.buttonOk.UseUnderline = true; + this.buttonOk.Label = "gtk-ok"; + this.AddActionWidget(this.buttonOk, -5); + global::Gtk.ButtonBox.ButtonBoxChild w10 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.buttonOk])); + w10.Position = 1; + w10.Expand = false; + w10.Fill = false; + if ((this.Child != null)) + { + this.Child.ShowAll(); + } + this.DefaultWidth = 400; + this.DefaultHeight = 318; + this.Show(); + this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler(this.OnRowActivated); + this.buttonCancel.Activated += new global::System.EventHandler(this.OnButtonCancelActivated); + this.buttonOk.Clicked += new global::System.EventHandler(this.OnButtonOkClicked); + } + } +}
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmReplaceEquipment.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmReplaceEquipment.cs Sat Dec 18 16:42:51 2010 +0000 @@ -5,22 +5,22 @@ public partial class FrmReplaceEquipment { private global::Gtk.Table table1; - private global::Gtk.ScrolledWindow GtkScrolledWindow; - private global::Gtk.TreeView lstEquipment; - private global::Gtk.HBox hbox2; - private global::Gtk.Table table2; - private global::Gtk.Label lblEquipAll; - private global::Gtk.Label lblPercent; - private global::Gtk.SpinButton numericAmount; - private global::Gtk.SpinButton percentageAmount; - private global::Gtk.RadioButton rbEquipAll; - private global::Gtk.RadioButton rbEquipNumeric; - private global::Gtk.RadioButton rbEquipPercent; - private global::Gtk.Label lblEquipAmount; - private global::Gtk.Label lblEquipment; - private global::Gtk.Button buttonCancel; - private global::Gtk.Button buttonOk; - + private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.TreeView lstEquipment; + private global::Gtk.HBox hbox2; + private global::Gtk.Table table2; + private global::Gtk.Label lblEquipAll; + private global::Gtk.Label lblPercent; + private global::Gtk.SpinButton numericAmount; + private global::Gtk.SpinButton percentageAmount; + private global::Gtk.RadioButton rbEquipAll; + private global::Gtk.RadioButton rbEquipNumeric; + private global::Gtk.RadioButton rbEquipPercent; + private global::Gtk.Label lblEquipAmount; + private global::Gtk.Label lblEquipment; + private global::Gtk.Button buttonCancel; + private global::Gtk.Button buttonOk; + protected virtual void Build() { global::Stetic.Gui.Initialize(this);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.cs Sat Dec 18 16:42:51 2010 +0000 @@ -0,0 +1,262 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace IBBoard.WarFoundry.GUI.GTK.Widgets +{ + public partial class UnitDisplayWidget + { + private global::Gtk.VBox vbox1; + private global::Gtk.HBox hbox1; + private global::Gtk.Entry unitName; + private global::Gtk.SpinButton unitSize; + private global::Gtk.ScrolledWindow statsScrollPanel; + private global::Gtk.VBox statsRepeatBox; + private global::Gtk.HSeparator hseparator1; + private global::Gtk.HBox hbox2; + private global::Gtk.Table table1; + private global::Gtk.Label equipmentLabel; + private global::Gtk.ScrolledWindow GtkScrolledWindow2; + private global::Gtk.NodeView equipmentList; + private global::Gtk.ScrolledWindow GtkScrolledWindow3; + private global::Gtk.TextView notesView; + private global::Gtk.ScrolledWindow GtkScrolledWindow4; + private global::Gtk.NodeView abilitiesList; + private global::Gtk.Label lblAbilities; + private global::Gtk.Label lblNotes; + private global::Gtk.VBox vbox3; + private global::Gtk.Button bttnAddEquipment; + private global::Gtk.Button bttnEditEquipment; + private global::Gtk.Button bttnReplaceEquipment; + private global::Gtk.Button bttnRemoveEquipment; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget + global::Stetic.BinContainer.Attach(this); + this.Name = "IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget"; + // Container child IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget.Gtk.Container+ContainerChild + this.vbox1 = new global::Gtk.VBox(); + this.vbox1.Name = "vbox1"; + this.vbox1.Spacing = 6; + // Container child vbox1.Gtk.Box+BoxChild + this.hbox1 = new global::Gtk.HBox(); + this.hbox1.Name = "hbox1"; + this.hbox1.Spacing = 6; + // Container child hbox1.Gtk.Box+BoxChild + this.unitName = new global::Gtk.Entry(); + this.unitName.CanFocus = true; + this.unitName.Name = "unitName"; + this.unitName.IsEditable = true; + this.unitName.InvisibleChar = '•'; + this.hbox1.Add(this.unitName); + global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.unitName])); + w1.Position = 0; + // Container child hbox1.Gtk.Box+BoxChild + this.unitSize = new global::Gtk.SpinButton(0, 100, 1); + this.unitSize.CanFocus = true; + this.unitSize.Name = "unitSize"; + this.unitSize.Adjustment.PageIncrement = 10; + this.unitSize.ClimbRate = 1; + this.unitSize.Numeric = true; + this.hbox1.Add(this.unitSize); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.unitSize])); + w2.Position = 1; + w2.Expand = false; + w2.Fill = false; + this.vbox1.Add(this.hbox1); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); + w3.Position = 0; + w3.Expand = false; + w3.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.statsScrollPanel = new global::Gtk.ScrolledWindow(); + this.statsScrollPanel.CanFocus = true; + this.statsScrollPanel.Name = "statsScrollPanel"; + this.statsScrollPanel.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child statsScrollPanel.Gtk.Container+ContainerChild + global::Gtk.Viewport w4 = new global::Gtk.Viewport(); + w4.ShadowType = ((global::Gtk.ShadowType)(0)); + // Container child GtkViewport.Gtk.Container+ContainerChild + this.statsRepeatBox = new global::Gtk.VBox(); + this.statsRepeatBox.Name = "statsRepeatBox"; + this.statsRepeatBox.Spacing = 6; + w4.Add(this.statsRepeatBox); + this.statsScrollPanel.Add(w4); + this.vbox1.Add(this.statsScrollPanel); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statsScrollPanel])); + w7.Position = 1; + // Container child vbox1.Gtk.Box+BoxChild + this.hseparator1 = new global::Gtk.HSeparator(); + this.hseparator1.Name = "hseparator1"; + this.vbox1.Add(this.hseparator1); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hseparator1])); + w8.Position = 2; + w8.Expand = false; + w8.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.hbox2 = new global::Gtk.HBox(); + this.hbox2.Name = "hbox2"; + this.hbox2.Spacing = 6; + // Container child hbox2.Gtk.Box+BoxChild + this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(2)), false); + this.table1.Name = "table1"; + this.table1.RowSpacing = ((uint)(6)); + this.table1.ColumnSpacing = ((uint)(6)); + // Container child table1.Gtk.Table+TableChild + this.equipmentLabel = new global::Gtk.Label(); + this.equipmentLabel.Name = "equipmentLabel"; + this.equipmentLabel.LabelProp = global::Mono.Unix.Catalog.GetString("equipment:"); + this.table1.Add(this.equipmentLabel); + global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.equipmentLabel])); + w9.XOptions = ((global::Gtk.AttachOptions)(4)); + w9.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.GtkScrolledWindow2 = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow2.Name = "GtkScrolledWindow2"; + this.GtkScrolledWindow2.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow2.Gtk.Container+ContainerChild + this.equipmentList = new global::Gtk.NodeView(); + this.equipmentList.CanFocus = true; + this.equipmentList.Name = "equipmentList"; + this.equipmentList.HeadersVisible = false; + this.GtkScrolledWindow2.Add(this.equipmentList); + this.table1.Add(this.GtkScrolledWindow2); + global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow2])); + w11.LeftAttach = ((uint)(1)); + w11.RightAttach = ((uint)(2)); + w11.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.GtkScrolledWindow3 = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow3.Name = "GtkScrolledWindow3"; + this.GtkScrolledWindow3.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow3.Gtk.Container+ContainerChild + this.notesView = new global::Gtk.TextView(); + this.notesView.CanFocus = true; + this.notesView.Name = "notesView"; + this.notesView.Editable = false; + this.GtkScrolledWindow3.Add(this.notesView); + this.table1.Add(this.GtkScrolledWindow3); + global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow3])); + w13.TopAttach = ((uint)(2)); + w13.BottomAttach = ((uint)(3)); + w13.LeftAttach = ((uint)(1)); + w13.RightAttach = ((uint)(2)); + w13.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.GtkScrolledWindow4 = new global::Gtk.ScrolledWindow(); + this.GtkScrolledWindow4.Name = "GtkScrolledWindow4"; + this.GtkScrolledWindow4.ShadowType = ((global::Gtk.ShadowType)(1)); + // Container child GtkScrolledWindow4.Gtk.Container+ContainerChild + this.abilitiesList = new global::Gtk.NodeView(); + this.abilitiesList.CanFocus = true; + this.abilitiesList.Name = "abilitiesList"; + this.abilitiesList.HeadersVisible = false; + this.GtkScrolledWindow4.Add(this.abilitiesList); + this.table1.Add(this.GtkScrolledWindow4); + global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow4])); + w15.TopAttach = ((uint)(1)); + w15.BottomAttach = ((uint)(2)); + w15.LeftAttach = ((uint)(1)); + w15.RightAttach = ((uint)(2)); + w15.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.lblAbilities = new global::Gtk.Label(); + this.lblAbilities.Name = "lblAbilities"; + this.lblAbilities.LabelProp = global::Mono.Unix.Catalog.GetString("abilities:"); + this.table1.Add(this.lblAbilities); + global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.lblAbilities])); + w16.TopAttach = ((uint)(1)); + w16.BottomAttach = ((uint)(2)); + w16.XOptions = ((global::Gtk.AttachOptions)(4)); + w16.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.lblNotes = new global::Gtk.Label(); + this.lblNotes.Name = "lblNotes"; + this.lblNotes.LabelProp = global::Mono.Unix.Catalog.GetString("notes:"); + this.table1.Add(this.lblNotes); + global::Gtk.Table.TableChild w17 = ((global::Gtk.Table.TableChild)(this.table1[this.lblNotes])); + w17.TopAttach = ((uint)(2)); + w17.BottomAttach = ((uint)(3)); + w17.XOptions = ((global::Gtk.AttachOptions)(4)); + w17.YOptions = ((global::Gtk.AttachOptions)(4)); + this.hbox2.Add(this.table1); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.table1])); + w18.Position = 0; + // Container child hbox2.Gtk.Box+BoxChild + this.vbox3 = new global::Gtk.VBox(); + this.vbox3.Name = "vbox3"; + this.vbox3.Spacing = 6; + // Container child vbox3.Gtk.Box+BoxChild + this.bttnAddEquipment = new global::Gtk.Button(); + this.bttnAddEquipment.CanFocus = true; + this.bttnAddEquipment.Name = "bttnAddEquipment"; + this.bttnAddEquipment.UseUnderline = true; + this.bttnAddEquipment.Label = global::Mono.Unix.Catalog.GetString("Add"); + this.vbox3.Add(this.bttnAddEquipment); + global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddEquipment])); + w19.Position = 0; + w19.Expand = false; + w19.Fill = false; + // Container child vbox3.Gtk.Box+BoxChild + this.bttnEditEquipment = new global::Gtk.Button(); + this.bttnEditEquipment.Sensitive = false; + this.bttnEditEquipment.CanFocus = true; + this.bttnEditEquipment.Name = "bttnEditEquipment"; + this.bttnEditEquipment.UseUnderline = true; + this.bttnEditEquipment.Label = global::Mono.Unix.Catalog.GetString("Edit"); + this.vbox3.Add(this.bttnEditEquipment); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditEquipment])); + w20.Position = 1; + w20.Expand = false; + w20.Fill = false; + // Container child vbox3.Gtk.Box+BoxChild + this.bttnReplaceEquipment = new global::Gtk.Button(); + this.bttnReplaceEquipment.Sensitive = false; + this.bttnReplaceEquipment.CanFocus = true; + this.bttnReplaceEquipment.Name = "bttnReplaceEquipment"; + this.bttnReplaceEquipment.UseUnderline = true; + this.bttnReplaceEquipment.Label = global::Mono.Unix.Catalog.GetString("Replace"); + this.vbox3.Add(this.bttnReplaceEquipment); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnReplaceEquipment])); + w21.Position = 2; + w21.Expand = false; + w21.Fill = false; + // Container child vbox3.Gtk.Box+BoxChild + this.bttnRemoveEquipment = new global::Gtk.Button(); + this.bttnRemoveEquipment.Sensitive = false; + this.bttnRemoveEquipment.CanFocus = true; + this.bttnRemoveEquipment.Name = "bttnRemoveEquipment"; + this.bttnRemoveEquipment.UseUnderline = true; + this.bttnRemoveEquipment.Label = global::Mono.Unix.Catalog.GetString("Remove"); + this.vbox3.Add(this.bttnRemoveEquipment); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemoveEquipment])); + w22.Position = 3; + w22.Expand = false; + w22.Fill = false; + this.hbox2.Add(this.vbox3); + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.vbox3])); + w23.Position = 1; + w23.Expand = false; + w23.Fill = false; + this.vbox1.Add(this.hbox2); + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox2])); + w24.Position = 3; + w24.Expand = false; + w24.Fill = false; + this.Add(this.vbox1); + if ((this.Child != null)) + { + this.Child.ShowAll(); + } + this.Show(); + this.unitName.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitNameFocusOut); + this.unitName.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitNameKeyPress); + this.unitSize.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitSizeFocusOut); + this.unitSize.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitSizeKeyPress); + this.bttnAddEquipment.Clicked += new global::System.EventHandler(this.OnBttnAddEquipmentClicked); + this.bttnEditEquipment.Clicked += new global::System.EventHandler(this.HandleEditButtonClicked); + this.bttnReplaceEquipment.Clicked += new global::System.EventHandler(this.HandleReplaceButtonClicked); + this.bttnRemoveEquipment.Clicked += new global::System.EventHandler(this.HandleRemoveButtonActivated); + } + } +}
--- a/gtk-gui/generated.cs Tue Nov 23 21:03:46 2010 +0000 +++ b/gtk-gui/generated.cs Sat Dec 18 16:42:51 2010 +0000 @@ -6,7 +6,7 @@ { private static bool initialized; - static internal void Initialize(Gtk.Widget iconRenderer) + internal static void Initialize(Gtk.Widget iconRenderer) { if ((Stetic.Gui.initialized == false)) { @@ -24,12 +24,11 @@ { return res; } - else { int sz; int sy; - global::Gtk.Icon.SizeLookup(size, out sz, out sy); + global::Gtk.Icon.SizeLookup(size, out sz, out sy); try { return Gtk.IconTheme.Default.LoadIcon(name, sz, 0); @@ -40,7 +39,6 @@ { return Stetic.IconLoader.LoadIcon(widget, "gtk-missing-image", size); } - else { Gdk.Pixmap pmap = new Gdk.Pixmap(Gdk.Screen.Default.RootWindow, sz, sz); @@ -63,7 +61,6 @@ internal class BinContainer { private Gtk.Widget child; - private Gtk.UIManager uimanager; public static BinContainer Attach(Gtk.Bin bin)
--- a/gtk-gui/gui.stetic Tue Nov 23 21:03:46 2010 +0000 +++ b/gtk-gui/gui.stetic Sat Dec 18 16:42:51 2010 +0000 @@ -5,10 +5,10 @@ <target-gtk-version>2.12</target-gtk-version> </configuration> <import> - <widget-library name="../../IBBoard.GtkSharp/bin/Debug/IBBoard.GtkSharp.dll" /> - <widget-library name="../bin/Debug/WarFoundryGTK.exe" internal="true" /> + <widget-library name="../../IBBoard.GtkSharp/bin/Release/IBBoard.GtkSharp.dll" /> + <widget-library name="../bin/Release/WarFoundry-GTK.exe" internal="true" /> </import> - <widget class="Gtk.Window" id="IBBoard.WarFoundry.GTK.FrmMainWindow" design-size="832 659"> + <widget class="Gtk.Window" id="IBBoard.WarFoundry.GUI.GTK.FrmMainWindow" design-size="832 659"> <action-group name="Default"> <action id="menuFile"> <property name="Type">Action</property> @@ -96,6 +96,7 @@ <property name="Label" translatable="yes">About</property> <property name="ShortLabel" translatable="yes">About</property> <property name="StockId">gtk-about</property> + <signal name="Activated" handler="HelpAboutActivated" /> </action> <action id="miDebugInformation"> <property name="Type">Action</property> @@ -188,7 +189,6 @@ </node> <node type="Menu" action="menuHelp"> <node type="Menuitem" action="miAbout" /> - <node type="Menuitem" action="miDebugInformation" /> </node> </node> </widget> @@ -277,7 +277,7 @@ </widget> </child> </widget> - <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GTK.FrmNewArmy" design-size="370 348"> + <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmNewArmy" design-size="370 348"> <property name="MemberName" /> <property name="Events">ButtonPressMask</property> <property name="Title" translatable="yes">Create new army</property> @@ -552,7 +552,7 @@ </widget> </child> </widget> - <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GTK.FrmNewUnit" design-size="400 318"> + <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmNewUnit" design-size="400 318"> <property name="MemberName" /> <property name="Title" translatable="yes">Add new unit</property> <property name="Icon">stock:gtk-new Menu</property> @@ -683,7 +683,7 @@ </widget> </child> </widget> - <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget" design-size="649 458"> + <widget class="Gtk.Bin" id="IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget" design-size="649 458"> <property name="MemberName" /> <child> <widget class="Gtk.VBox" id="vbox1"> @@ -2015,4 +2015,110 @@ </widget> </child> </widget> + <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmAbout" design-size="305 300"> + <property name="MemberName" /> + <property name="Title" translatable="yes">About WarFoundry</property> + <property name="TypeHint">Dialog</property> + <property name="WindowPosition">CenterOnParent</property> + <property name="Resizable">False</property> + <property name="AllowGrow">False</property> + <property name="Buttons">1</property> + <property name="HelpButton">False</property> + <child internal-child="VBox"> + <widget class="Gtk.VBox" id="dialog1_VBox"> + <property name="MemberName" /> + <property name="BorderWidth">2</property> + <child> + <widget class="Gtk.Image" id="image1"> + <property name="MemberName" /> + <property name="Pixbuf">resource:IBBoard.WarFoundry.GUI.GTK.App-lrg.png</property> + </widget> + <packing> + <property name="Position">0</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Label" id="label1"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes"><span font_size="x-large" weight="bold">WarFoundry v0.1 Beta 1</span></property> + <property name="UseMarkup">True</property> + </widget> + <packing> + <property name="Position">1</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Label" id="label4"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">WarFoundry is an open-source army creation tool that lets you create rosters for multiple game systems.</property> + <property name="Wrap">True</property> + <property name="Justify">Center</property> + </widget> + <packing> + <property name="Position">2</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Label" id="label2"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes">© 2007-2010, IBBoard and others</property> + </widget> + <packing> + <property name="Position">3</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + <child> + <widget class="Gtk.Label" id="label3"> + <property name="MemberName" /> + <property name="LabelProp" translatable="yes"><a href="http://warfoundry.co.uk">http://warfoundry.co.uk</a></property> + <property name="UseMarkup">True</property> + </widget> + <packing> + <property name="Position">4</property> + <property name="AutoSize">True</property> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + </widget> + </child> + <child internal-child="ActionArea"> + <widget class="Gtk.HButtonBox" id="dialog1_ActionArea"> + <property name="MemberName" /> + <property name="Spacing">10</property> + <property name="BorderWidth">5</property> + <property name="Size">1</property> + <property name="LayoutStyle">End</property> + <child> + <widget class="Gtk.Button" id="buttonOk"> + <property name="MemberName" /> + <property name="CanDefault">True</property> + <property name="CanFocus">True</property> + <property name="UseStock">True</property> + <property name="Type">StockItem</property> + <property name="StockId">gtk-ok</property> + <property name="ResponseId">-5</property> + <signal name="Activated" handler="OkayClicked" /> + <property name="label">gtk-ok</property> + </widget> + <packing> + <property name="Expand">False</property> + <property name="Fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> </stetic-interface> \ No newline at end of file
--- a/gtk-gui/objects.xml Tue Nov 23 21:03:46 2010 +0000 +++ b/gtk-gui/objects.xml Sat Dec 18 16:42:51 2010 +0000 @@ -1,5 +1,5 @@ <objects attr-sync="on"> - <object type="IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget" palette-category="WarFoundry GTK# GUI" allow-children="false" base-type="Gtk.Bin"> + <object type="IBBoard.WarFoundry.GUI.GTK.Widgets.UnitDisplayWidget" palette-category="WarFoundry GTK# GUI" allow-children="false" base-type="Gtk.Bin"> <itemgroups /> <signals /> </object>