changeset 12:6284c091b132

Merge local with IBBoard
author Tsudico
date Fri, 17 Dec 2010 22:14:43 -0600
parents b42ba80ec613 (current diff) 38f0ed348ca8 (diff)
children 372f921c20fc
files IBBoard.WarFoundry.Forge.WinForms.suo bin/Debug/IBBoard.WarFoundry.API.dll bin/Debug/IBBoard.dll bin/Debug/IBBoardWF.dll bin/Debug/ICSharpCode.SharpZipLib.dll bin/Debug/schemas/system.xsd obj/Debug/IBBoard.WarFoundry.Forge.WinForms.csproj.FileListAbsolute.txt obj/Debug/IBBoard.WarFoundry.Forge.WinForms.csproj.GenerateResource.Cache obj/Debug/ResolveAssemblyReference.cache
diffstat 12 files changed, 76 insertions(+), 107 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Fri Dec 17 20:14:43 2010 +0000
+++ b/.hgignore	Fri Dec 17 22:14:43 2010 -0600
@@ -1,8 +1,8 @@
 syntax:glob
-bin/*
-obj/*
-bin/Debug/*
+/bin/*
+/obj/*
 *.orig
 *.user
 *.userprefs
-*.suo
\ No newline at end of file
+*.suo
+*.pdb
\ No newline at end of file
--- a/FrmSystem.Designer.cs	Fri Dec 17 20:14:43 2010 +0000
+++ b/FrmSystem.Designer.cs	Fri Dec 17 22:14:43 2010 -0600
@@ -520,6 +520,7 @@
 			this.btnCategoryUp.TabIndex = 17;
 			this.btnCategoryUp.Text = "Up";
 			this.btnCategoryUp.UseVisualStyleBackColor = true;
+			this.btnCategoryUp.Click += new System.EventHandler(this.btnCategoryUp_Click);
 			// 
 			// listCategories
 			// 
@@ -538,6 +539,7 @@
 			this.btnCategoryDown.TabIndex = 16;
 			this.btnCategoryDown.Text = "Down";
 			this.btnCategoryDown.UseVisualStyleBackColor = true;
+			this.btnCategoryDown.Click += new System.EventHandler(this.btnCategoryDown_Click);
 			// 
 			// btnCategoryAdd
 			// 
--- a/FrmSystem.cs	Fri Dec 17 20:14:43 2010 +0000
+++ b/FrmSystem.cs	Fri Dec 17 22:14:43 2010 -0600
@@ -211,6 +211,22 @@
 					break;
 				}
 			}
+			if(this.listCategories.SelectedIndex == 0)
+			{
+				this.btnCategoryUp.Enabled = false;
+			}
+			else
+			{
+				this.btnCategoryUp.Enabled = true;
+			}
+			if (this.listCategories.SelectedIndex == this.listCategories.Items.Count - 1)
+			{
+				this.btnCategoryDown.Enabled = false;
+			}
+			else
+			{
+				this.btnCategoryDown.Enabled = true;
+			}
 		}
 
 		private void btnCategoryAdd_Click(object sender, EventArgs e)
@@ -254,6 +270,60 @@
 			updateCategoryList();
 		}
 
+		private void btnCategoryUp_Click(object sender, EventArgs e)
+		{
+			int index = this.listCategories.SelectedIndex;
+			IBBoard.WarFoundry.API.Objects.Category[] catList = new IBBoard.WarFoundry.API.Objects.Category[this.listCategories.Items.Count];
+			
+			for(int i = 0; i < system.Categories.Length; i++)
+			{
+				catList[i] = system.Categories[i];
+			}
+			foreach(IBBoard.WarFoundry.API.Objects.Category cat in system.Categories)
+			{
+				system.RemoveCategory(cat.ID);
+			}
+			
+			IBBoard.WarFoundry.API.Objects.Category temp = catList[index];
+			catList[index] = catList[index - 1];
+			catList[index - 1] = temp;
+			
+			for(int i = catList.Length - 1; i >= 0; i--)
+			{
+				system.AddCategory(catList[i]);
+			}
+			
+			updateCategoryList();
+			this.listCategories.SelectedIndex = index - 1;
+		}
+
+		private void btnCategoryDown_Click(object sender, EventArgs e)
+		{
+			int index = this.listCategories.SelectedIndex;
+			IBBoard.WarFoundry.API.Objects.Category[] catList = new IBBoard.WarFoundry.API.Objects.Category[this.listCategories.Items.Count];
+
+			for (int i = 0; i < system.Categories.Length; i++)
+			{
+				catList[i] = system.Categories[i];
+			}
+			foreach (IBBoard.WarFoundry.API.Objects.Category cat in system.Categories)
+			{
+				system.RemoveCategory(cat.ID);
+			}
+
+			IBBoard.WarFoundry.API.Objects.Category temp = catList[index];
+			catList[index] = catList[index + 1];
+			catList[index + 1] = temp;
+
+			for (int i = catList.Length - 1; i >= 0; i--)
+			{
+				system.AddCategory(catList[i]);
+			}
+
+			updateCategoryList();
+			this.listCategories.SelectedIndex = index + 1;
+		}
+
 		private void txtCategoryName_TextChanged(object sender, EventArgs e)
 		{
 			if (this.UpdateCategory)
Binary file IBBoard.WarFoundry.Forge.WinForms.suo has changed
Binary file bin/Debug/IBBoard.WarFoundry.API.dll has changed
Binary file bin/Debug/IBBoard.dll has changed
Binary file bin/Debug/IBBoardWF.dll has changed
Binary file bin/Debug/ICSharpCode.SharpZipLib.dll has changed
--- a/bin/Debug/schemas/system.xsd	Fri Dec 17 20:14:43 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:core="http://ibboard.co.uk/warfoundry/core" xmlns:cats="http://ibboard.co.uk/warfoundry/cats"
-targetNamespace="http://ibboard.co.uk/warfoundry/system" xmlns="http://ibboard.co.uk/warfoundry/system" xmlns:sys="http://ibboard.co.uk/warfoundry/system" elementFormDefault="qualified">
-<xs:element name="system">
-	<xs:complexType>
-		<xs:sequence>
-			<xs:element name="categories" type="cats:categoriestype">
-				<xs:key name="catsKey">
-					<xs:selector xpath="cats:cat"/>
-					<xs:field xpath="@id"/>
-				</xs:key>
-			</xs:element>
-			<xs:element name="sysStatsList">
-				<xs:complexType>
-					<xs:sequence>
-						<xs:element name="sysStats" maxOccurs="unbounded">
-							<xs:complexType>
-								<xs:sequence>
-									<xs:element name="sysStat" maxOccurs="unbounded">
-										<xs:complexType>
-											<xs:sequence>
-												<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
-											</xs:sequence>
-											<xs:attribute name="name" type="xs:string" use="required"/>
-											<xs:anyAttribute processContents="lax"/>
-										</xs:complexType>
-									</xs:element>
-								</xs:sequence>
-								<xs:attribute name="id" type="xs:string" />
-								<xs:anyAttribute processContents="lax"/>
-							</xs:complexType>
-						</xs:element>
-					</xs:sequence>
-					<xs:attribute name="defaultStats" type="xs:string" use="required" />
-					<xs:anyAttribute processContents="lax"/>
-				</xs:complexType>
-			</xs:element>
-			<xs:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
-		</xs:sequence>
-		<xs:attribute name="id" type="xs:string" />
-		<xs:attribute name="name" type="xs:string" use="required"/>
-		<xs:attribute name="warn" type="xs:boolean" default="false"/>
-		<xs:attribute name="allowAllies" type="xs:boolean" default="true"/>
-		<xs:anyAttribute processContents="lax"/>
-	</xs:complexType>
-	<xs:keyref name="defaultStatsRef" refer="statsKey">
-		<xs:selector xpath="sys:sysStatsList"/>
-		<xs:field xpath="@defaultStats"/>
-	</xs:keyref>
-	<xs:key name="statsKey">
-		<xs:selector xpath="sys:sysStatsList/sys:sysStats"/>
-		<xs:field xpath="@id"/>
-	</xs:key>
-</xs:element>
-</xs:schema>
\ No newline at end of file
--- a/obj/Debug/IBBoard.WarFoundry.Forge.WinForms.csproj.FileListAbsolute.txt	Fri Dec 17 20:14:43 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\obj\Debug\ResolveAssemblyReference.cache
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.FrmMain.resources
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.FrmSystem.resources
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.Properties.Resources.resources
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.csproj.GenerateResource.Cache
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\bin\Debug\IBBoard.WarFoundry.Forge.WinForms.exe
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\bin\Debug\IBBoard.WarFoundry.Forge.WinForms.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.exe
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\IBBoard.WarFoundry.Forge.WinForms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\army.xsd
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\race.xsd
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\system.xsd
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\warfoundry-cats.xsd
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\warfoundry-core.xsd
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\xhtml1-strict.dtd
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\xhtml-lat1.ent
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\xhtml-special.ent
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\xhtml-symbol.ent
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\schemas\translation.xsd
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\WarFoundryForgePref.xml
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\de.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\en.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\fi.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\fr.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\it.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\nl.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\ru.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\translations\sv.translation
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\WarFoundryForge.exe.log4net
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\WarFoundryForge.exe
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\WarFoundryForge.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\IBBoard.dll
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\IBBoard.WarFoundry.API.dll
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\IBBoardWF.dll
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\ICSharpCode.SharpZipLib.dll
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\log4net.dll
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\IBBoardWF.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\IBBoard.WarFoundry.API.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\bin\Debug\IBBoard.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\obj\Debug\ResolveAssemblyReference.cache
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.FrmMain.resources
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.FrmSystem.resources
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.Properties.Resources.resources
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\obj\Debug\IBBoard.WarFoundry.Forge.WinForms.csproj.GenerateResource.Cache
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\obj\Debug\WarFoundryForge.exe
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\ibboard.warfoundry.forge.winforms\obj\Debug\WarFoundryForge.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\IBBoard.WarFoundry.Forge.WinForms\bin\Debug\ICSharpCode.SharpZipLib.pdb
-C:\Users\Steven Westcot\Documents\WarFoundry\Repository\IBBoard.WarFoundry.Forge.WinForms\bin\Debug\ICSharpCode.SharpZipLib.xml
Binary file obj/Debug/IBBoard.WarFoundry.Forge.WinForms.csproj.GenerateResource.Cache has changed
Binary file obj/Debug/ResolveAssemblyReference.cache has changed