From 07eb099b3be045e74ff8c031f9c7c17c48adb9b2 Mon Sep 17 00:00:00 2001 From: beedee Date: Fri, 13 Jul 2007 10:09:33 +0000 Subject: [PATCH] Deleted TechTreeTest and moved the useful stuff into a dll git-svn-id: svn://svn.ijw.co.nz/svn/OpenRa@1193 993157c7-ee19-0410-b2c4-bb4e9862e678 --- OpenRa.Game/OpenRa.Game.csproj | 1 + .../Item.cs | 4 +- .../OpenRa.TechTree.csproj | 39 +----- .../Properties/AssemblyInfo.cs | 12 +- .../Race.cs | 2 +- .../TechTree.cs | 4 +- OpenRa.TechTreeTest/Form1.Designer.cs | 65 --------- OpenRa.TechTreeTest/Form1.cs | 47 ------- OpenRa.TechTreeTest/Form1.resx | 123 ------------------ OpenRa.TechTreeTest/Program.cs | 20 --- .../Properties/Resources.Designer.cs | 71 ---------- OpenRa.TechTreeTest/Properties/Resources.resx | 117 ----------------- .../Properties/Settings.Designer.cs | 30 ----- .../Properties/Settings.settings | 7 - OpenRa.sln | 24 ++-- 15 files changed, 29 insertions(+), 537 deletions(-) rename {OpenRa.TechTreeTest => OpenRa.TechTree}/Item.cs (95%) rename OpenRa.TechTreeTest/OpenRa.TechTreeTest.csproj => OpenRa.TechTree/OpenRa.TechTree.csproj (57%) rename {OpenRa.TechTreeTest => OpenRa.TechTree}/Properties/AssemblyInfo.cs (71%) rename {OpenRa.TechTreeTest => OpenRa.TechTree}/Race.cs (76%) rename {OpenRa.TechTreeTest => OpenRa.TechTree}/TechTree.cs (93%) delete mode 100644 OpenRa.TechTreeTest/Form1.Designer.cs delete mode 100644 OpenRa.TechTreeTest/Form1.cs delete mode 100644 OpenRa.TechTreeTest/Form1.resx delete mode 100644 OpenRa.TechTreeTest/Program.cs delete mode 100644 OpenRa.TechTreeTest/Properties/Resources.Designer.cs delete mode 100644 OpenRa.TechTreeTest/Properties/Resources.resx delete mode 100644 OpenRa.TechTreeTest/Properties/Settings.Designer.cs delete mode 100644 OpenRa.TechTreeTest/Properties/Settings.settings diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 5ad4281bfe..05ca24df24 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -52,6 +52,7 @@ + diff --git a/OpenRa.TechTreeTest/Item.cs b/OpenRa.TechTree/Item.cs similarity index 95% rename from OpenRa.TechTreeTest/Item.cs rename to OpenRa.TechTree/Item.cs index fcf4f1a25b..97102d7bca 100644 --- a/OpenRa.TechTreeTest/Item.cs +++ b/OpenRa.TechTree/Item.cs @@ -5,9 +5,9 @@ using System.Drawing; using OpenRa.FileFormats; using System.IO; -namespace OpenRa.TechTreeTest +namespace OpenRa.TechTree { - class Item + public class Item { public Item(string tag, string friendlyName, IniSection section, bool isStructure) { diff --git a/OpenRa.TechTreeTest/OpenRa.TechTreeTest.csproj b/OpenRa.TechTree/OpenRa.TechTree.csproj similarity index 57% rename from OpenRa.TechTreeTest/OpenRa.TechTreeTest.csproj rename to OpenRa.TechTree/OpenRa.TechTree.csproj index dbc18e665f..83fa2b7cca 100644 --- a/OpenRa.TechTreeTest/OpenRa.TechTreeTest.csproj +++ b/OpenRa.TechTree/OpenRa.TechTree.csproj @@ -4,11 +4,11 @@ AnyCPU 8.0.50727 2.0 - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA} - WinExe + {2BFC3861-E90E-4F77-B254-8FB8285E43AC} + Library Properties - OpenRa.TechTreeTest - OpenRa.TechTreeTest + OpenRa.TechTree + OpenRa.TechTree true @@ -30,43 +30,12 @@ - - - - Form - - - Form1.cs - - - - Designer - Form1.cs - - - ResXFileCodeGenerator - Resources.Designer.cs - Designer - - - True - Resources.resx - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - True - Settings.settings - True - diff --git a/OpenRa.TechTreeTest/Properties/AssemblyInfo.cs b/OpenRa.TechTree/Properties/AssemblyInfo.cs similarity index 71% rename from OpenRa.TechTreeTest/Properties/AssemblyInfo.cs rename to OpenRa.TechTree/Properties/AssemblyInfo.cs index 615277e155..643e398cfb 100644 --- a/OpenRa.TechTreeTest/Properties/AssemblyInfo.cs +++ b/OpenRa.TechTree/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("OpenRa.TechTreeTest")] +[assembly: AssemblyTitle("OpenRa.TechTree")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("OpenRa.TechTreeTest")] -[assembly: AssemblyCopyright("Copyright © 2007")] +[assembly: AssemblyCompany("TOSHIBA")] +[assembly: AssemblyProduct("OpenRa.TechTree")] +[assembly: AssemblyCopyright("Copyright © TOSHIBA 2007")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -20,7 +20,7 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0a435def-c144-460f-bc7c-668a73a29b4c")] +[assembly: Guid("af5f7d2f-f905-4a72-9542-f86acbe508ec")] // Version information for an assembly consists of the following four values: // @@ -29,5 +29,7 @@ using System.Runtime.InteropServices; // Build Number // Revision // +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/OpenRa.TechTreeTest/Race.cs b/OpenRa.TechTree/Race.cs similarity index 76% rename from OpenRa.TechTreeTest/Race.cs rename to OpenRa.TechTree/Race.cs index f5a7756e74..4a44acad28 100644 --- a/OpenRa.TechTreeTest/Race.cs +++ b/OpenRa.TechTree/Race.cs @@ -2,7 +2,7 @@ using System; using System.Collections.Generic; using System.Text; -namespace OpenRa.TechTreeTest +namespace OpenRa.TechTree { [Flags] public enum Race diff --git a/OpenRa.TechTreeTest/TechTree.cs b/OpenRa.TechTree/TechTree.cs similarity index 93% rename from OpenRa.TechTreeTest/TechTree.cs rename to OpenRa.TechTree/TechTree.cs index dc62b38ef7..8efe8dcb77 100644 --- a/OpenRa.TechTreeTest/TechTree.cs +++ b/OpenRa.TechTree/TechTree.cs @@ -5,9 +5,9 @@ using OpenRa.FileFormats; using System.IO; using System.Text.RegularExpressions; -namespace OpenRa.TechTreeTest +namespace OpenRa.TechTree { - class TechTree + public class TechTree { Dictionary objects = new Dictionary(); public ICollection built = new List(); diff --git a/OpenRa.TechTreeTest/Form1.Designer.cs b/OpenRa.TechTreeTest/Form1.Designer.cs deleted file mode 100644 index 61e4d5e8d4..0000000000 --- a/OpenRa.TechTreeTest/Form1.Designer.cs +++ /dev/null @@ -1,65 +0,0 @@ -namespace OpenRa.TechTreeTest -{ - partial class Form1 - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Windows Form Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - this.components = new System.ComponentModel.Container(); - this.buildableItems = new System.Windows.Forms.FlowLayoutPanel(); - this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); - this.SuspendLayout(); - // - // buildableItems - // - this.buildableItems.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left))); - this.buildableItems.AutoScroll = true; - this.buildableItems.BackColor = System.Drawing.SystemColors.AppWorkspace; - this.buildableItems.Location = new System.Drawing.Point(13, 13); - this.buildableItems.Name = "buildableItems"; - this.buildableItems.Size = new System.Drawing.Size(336, 591); - this.buildableItems.TabIndex = 0; - // - // Form1 - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(365, 616); - this.Controls.Add(this.buildableItems); - this.Name = "Form1"; - this.Text = "Form1"; - this.ResumeLayout(false); - - } - - #endregion - - private System.Windows.Forms.FlowLayoutPanel buildableItems; - private System.Windows.Forms.ToolTip toolTip1; - } -} - diff --git a/OpenRa.TechTreeTest/Form1.cs b/OpenRa.TechTreeTest/Form1.cs deleted file mode 100644 index 8ae429846d..0000000000 --- a/OpenRa.TechTreeTest/Form1.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -namespace OpenRa.TechTreeTest -{ - public partial class Form1 : Form - { - TechTree techTree = new TechTree(Race.Allies); - - public Form1() - { - InitializeComponent(); - RefreshList(); - } - - void RefreshList() - { - buildableItems.Controls.Clear(); - - foreach (Item b in techTree.BuildableItems) - { - PictureBox box = new PictureBox(); - box.SizeMode = PictureBoxSizeMode.AutoSize; - box.Image = b.Icon; - - toolTip1.SetToolTip(box, b.Tooltip); - - buildableItems.Controls.Add(box); - - Item k = b; - - box.Click += delegate { Build(k); }; - } - } - - void Build(Item b) - { - techTree.Build(b.tag); - RefreshList(); - } - } -} \ No newline at end of file diff --git a/OpenRa.TechTreeTest/Form1.resx b/OpenRa.TechTreeTest/Form1.resx deleted file mode 100644 index 7ce03af83e..0000000000 --- a/OpenRa.TechTreeTest/Form1.resx +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - 17, 17 - - \ No newline at end of file diff --git a/OpenRa.TechTreeTest/Program.cs b/OpenRa.TechTreeTest/Program.cs deleted file mode 100644 index 44e7ef8b1f..0000000000 --- a/OpenRa.TechTreeTest/Program.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; - -namespace OpenRa.TechTreeTest -{ - static class Program - { - /// - /// The main entry point for the application. - /// - [STAThread] - static void Main() - { - Application.EnableVisualStyles(); - Application.SetCompatibleTextRenderingDefault(false); - Application.Run(new Form1()); - } - } -} \ No newline at end of file diff --git a/OpenRa.TechTreeTest/Properties/Resources.Designer.cs b/OpenRa.TechTreeTest/Properties/Resources.Designer.cs deleted file mode 100644 index 28397356e6..0000000000 --- a/OpenRa.TechTreeTest/Properties/Resources.Designer.cs +++ /dev/null @@ -1,71 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.312 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenRa.TechTreeTest.Properties -{ - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenRa.TechTreeTest.Properties.Resources", typeof(Resources).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { - return resourceCulture; - } - set - { - resourceCulture = value; - } - } - } -} diff --git a/OpenRa.TechTreeTest/Properties/Resources.resx b/OpenRa.TechTreeTest/Properties/Resources.resx deleted file mode 100644 index c40a448a31..0000000000 --- a/OpenRa.TechTreeTest/Properties/Resources.resx +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/OpenRa.TechTreeTest/Properties/Settings.Designer.cs b/OpenRa.TechTreeTest/Properties/Settings.Designer.cs deleted file mode 100644 index 952ab2e907..0000000000 --- a/OpenRa.TechTreeTest/Properties/Settings.Designer.cs +++ /dev/null @@ -1,30 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:2.0.50727.312 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace OpenRa.TechTreeTest.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "8.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } - } - } -} diff --git a/OpenRa.TechTreeTest/Properties/Settings.settings b/OpenRa.TechTreeTest/Properties/Settings.settings deleted file mode 100644 index abf36c5d3d..0000000000 --- a/OpenRa.TechTreeTest/Properties/Settings.settings +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/OpenRa.sln b/OpenRa.sln index c1f7514281..68f52e7841 100644 --- a/OpenRa.sln +++ b/OpenRa.sln @@ -17,10 +17,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRa.Game", "OpenRa.Game\ {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1} = {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1} EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRa.TechTreeTest", "OpenRa.TechTreeTest\OpenRa.TechTreeTest.csproj", "{C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}" -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BluntDx", "BluntDx\BluntDx.vcproj", "{4EA97564-C929-4ABE-AC5D-A9D11EDE08E1}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRa.TechTree", "OpenRa.TechTree\OpenRa.TechTree.csproj", "{2BFC3861-E90E-4F77-B254-8FB8285E43AC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -81,16 +81,6 @@ Global {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Mixed Platforms.Build.0 = Release|Any CPU {0DFB103F-2962-400F-8C6D-E2C28CCBA633}.Release|Win32.ActiveCfg = Release|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Debug|Win32.ActiveCfg = Debug|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Release|Any CPU.Build.0 = Release|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C0DA4050-CF36-494B-AEB8-BFFC3F65B2AA}.Release|Win32.ActiveCfg = Release|Any CPU {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1}.Debug|Any CPU.ActiveCfg = Debug|Win32 {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1}.Debug|Mixed Platforms.ActiveCfg = Release|Win32 {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1}.Debug|Mixed Platforms.Build.0 = Release|Win32 @@ -101,6 +91,16 @@ Global {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1}.Release|Mixed Platforms.Build.0 = Release|Win32 {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1}.Release|Win32.ActiveCfg = Release|Win32 {4EA97564-C929-4ABE-AC5D-A9D11EDE08E1}.Release|Win32.Build.0 = Release|Win32 + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Debug|Win32.ActiveCfg = Debug|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Release|Any CPU.Build.0 = Release|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {2BFC3861-E90E-4F77-B254-8FB8285E43AC}.Release|Win32.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE