remove SequenceEditor, it's no longer useful
This commit is contained in:
14
Makefile
14
Makefile
@@ -6,7 +6,7 @@ PHONY = core tools package all mods clean distclean
|
|||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
core: game renderers mod_ra mod_cnc utility
|
core: game renderers mod_ra mod_cnc utility
|
||||||
tools: editor ralint seqed tsbuild
|
tools: editor ralint tsbuild
|
||||||
package: core editor
|
package: core editor
|
||||||
mods: mod_ra mod_cnc
|
mods: mod_ra mod_cnc
|
||||||
all: core tools
|
all: core tools
|
||||||
@@ -100,18 +100,6 @@ mod_cnc: $(mod_cnc_TARGET)
|
|||||||
#
|
#
|
||||||
# Tools
|
# Tools
|
||||||
#
|
#
|
||||||
# Sequence editor (defunct)
|
|
||||||
seqed_SRCS := $(shell find SequenceEditor/ -iname '*.cs')
|
|
||||||
seqed_TARGET = SequenceEditor.exe
|
|
||||||
seqed_KIND = winexe
|
|
||||||
seqed_DEPS = $(fileformats_TARGET)
|
|
||||||
seqed_LIBS = $(COMMON_LIBS) System.Windows.Forms.dll $(seqed_DEPS)
|
|
||||||
seqed_EXTRA = -resource:SequenceEditor.Form1.resources
|
|
||||||
PROGRAMS += seqed
|
|
||||||
SequenceEditor.Form1.resources:
|
|
||||||
resgen2 SequenceEditor/Form1.resx SequenceEditor.Form1.resources 1> /dev/null
|
|
||||||
seqed: SequenceEditor.Form1.resources $(seqed_TARGET)
|
|
||||||
|
|
||||||
# Map Editor
|
# Map Editor
|
||||||
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
|
editor_SRCS := $(shell find OpenRA.Editor/ -iname '*.cs')
|
||||||
editor_TARGET = OpenRA.Editor.exe
|
editor_TARGET = OpenRA.Editor.exe
|
||||||
|
|||||||
@@ -5,8 +5,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.FileFormats", "OpenR
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Game", "OpenRA.Game\OpenRA.Game.csproj", "{0DFB103F-2962-400F-8C6D-E2C28CCBA633}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Game", "OpenRA.Game\OpenRA.Game.csproj", "{0DFB103F-2962-400F-8C6D-E2C28CCBA633}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SequenceEditor", "SequenceEditor\SequenceEditor.csproj", "{230F65CE-A6DE-4235-8B38-13A3D606C7F7}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.RA", "OpenRA.Mods.RA\OpenRA.Mods.RA.csproj", "{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Mods.RA", "OpenRA.Mods.RA\OpenRA.Mods.RA.csproj", "{4A8A43B5-A9EF-4ED0-99DD-4BAB10A0DB6E}"
|
||||||
ProjectSection(ProjectDependencies) = postProject
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
{F9FA4D9F-2302-470A-8A07-6E37F488C124} = {F9FA4D9F-2302-470A-8A07-6E37F488C124}
|
{F9FA4D9F-2302-470A-8A07-6E37F488C124} = {F9FA4D9F-2302-470A-8A07-6E37F488C124}
|
||||||
|
|||||||
154
SequenceEditor/Form1.Designer.cs
generated
154
SequenceEditor/Form1.Designer.cs
generated
@@ -1,154 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
namespace SequenceEditor
|
|
||||||
{
|
|
||||||
partial class Form1
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
|
||||||
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
|
|
||||||
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
|
||||||
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
|
||||||
this.toolStripButton2 = new System.Windows.Forms.ToolStripButton();
|
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
|
||||||
this.surface1 = new SequenceEditor.Surface();
|
|
||||||
this.toolStripContainer1.ContentPanel.SuspendLayout();
|
|
||||||
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
|
|
||||||
this.toolStripContainer1.SuspendLayout();
|
|
||||||
this.toolStrip1.SuspendLayout();
|
|
||||||
this.panel1.SuspendLayout();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// toolStripContainer1
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// toolStripContainer1.ContentPanel
|
|
||||||
//
|
|
||||||
this.toolStripContainer1.ContentPanel.Controls.Add(this.panel1);
|
|
||||||
this.toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(708, 518);
|
|
||||||
this.toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
||||||
this.toolStripContainer1.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.toolStripContainer1.Name = "toolStripContainer1";
|
|
||||||
this.toolStripContainer1.Size = new System.Drawing.Size(708, 543);
|
|
||||||
this.toolStripContainer1.TabIndex = 0;
|
|
||||||
this.toolStripContainer1.Text = "toolStripContainer1";
|
|
||||||
//
|
|
||||||
// toolStripContainer1.TopToolStripPanel
|
|
||||||
//
|
|
||||||
this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.toolStrip1);
|
|
||||||
//
|
|
||||||
// toolStrip1
|
|
||||||
//
|
|
||||||
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
|
|
||||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
|
||||||
this.toolStripButton1,
|
|
||||||
this.toolStripButton2});
|
|
||||||
this.toolStrip1.Location = new System.Drawing.Point(3, 0);
|
|
||||||
this.toolStrip1.Name = "toolStrip1";
|
|
||||||
this.toolStrip1.Size = new System.Drawing.Size(160, 25);
|
|
||||||
this.toolStrip1.TabIndex = 0;
|
|
||||||
//
|
|
||||||
// toolStripButton1
|
|
||||||
//
|
|
||||||
this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
|
||||||
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
|
||||||
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
|
||||||
this.toolStripButton1.Name = "toolStripButton1";
|
|
||||||
this.toolStripButton1.Size = new System.Drawing.Size(113, 22);
|
|
||||||
this.toolStripButton1.Text = "Add Another SHP...";
|
|
||||||
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
|
||||||
//
|
|
||||||
// toolStripButton2
|
|
||||||
//
|
|
||||||
this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
|
||||||
this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image")));
|
|
||||||
this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta;
|
|
||||||
this.toolStripButton2.Name = "toolStripButton2";
|
|
||||||
this.toolStripButton2.Size = new System.Drawing.Size(35, 22);
|
|
||||||
this.toolStripButton2.Text = "Save";
|
|
||||||
this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click);
|
|
||||||
//
|
|
||||||
// panel1
|
|
||||||
//
|
|
||||||
this.panel1.AutoScroll = true;
|
|
||||||
this.panel1.Controls.Add(this.surface1);
|
|
||||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
||||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.panel1.Name = "panel1";
|
|
||||||
this.panel1.Size = new System.Drawing.Size(708, 518);
|
|
||||||
this.panel1.TabIndex = 0;
|
|
||||||
//
|
|
||||||
// surface1
|
|
||||||
//
|
|
||||||
this.surface1.Dock = System.Windows.Forms.DockStyle.Top;
|
|
||||||
this.surface1.Location = new System.Drawing.Point(0, 0);
|
|
||||||
this.surface1.Name = "surface1";
|
|
||||||
this.surface1.Size = new System.Drawing.Size(708, 518);
|
|
||||||
this.surface1.TabIndex = 0;
|
|
||||||
this.surface1.Text = "surface1";
|
|
||||||
//
|
|
||||||
// Form1
|
|
||||||
//
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.ClientSize = new System.Drawing.Size(708, 543);
|
|
||||||
this.Controls.Add(this.toolStripContainer1);
|
|
||||||
this.Name = "Form1";
|
|
||||||
this.Text = "OpenRA Sequence Viewer";
|
|
||||||
this.toolStripContainer1.ContentPanel.ResumeLayout(false);
|
|
||||||
this.toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
|
|
||||||
this.toolStripContainer1.TopToolStripPanel.PerformLayout();
|
|
||||||
this.toolStripContainer1.ResumeLayout(false);
|
|
||||||
this.toolStripContainer1.PerformLayout();
|
|
||||||
this.toolStrip1.ResumeLayout(false);
|
|
||||||
this.toolStrip1.PerformLayout();
|
|
||||||
this.panel1.ResumeLayout(false);
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.ToolStripContainer toolStripContainer1;
|
|
||||||
private System.Windows.Forms.ToolStrip toolStrip1;
|
|
||||||
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
|
||||||
private System.Windows.Forms.ToolStripButton toolStripButton2;
|
|
||||||
private System.Windows.Forms.Panel panel1;
|
|
||||||
private Surface surface1;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace SequenceEditor
|
|
||||||
{
|
|
||||||
public partial class Form1 : Form
|
|
||||||
{
|
|
||||||
public Form1()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
Text += " - " + Program.UnitName;
|
|
||||||
}
|
|
||||||
|
|
||||||
void toolStripButton1_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var shp = GetTextForm.GetString( "Add SHP...", "" );
|
|
||||||
if (shp == null) return;
|
|
||||||
Program.LoadAndResolve(shp);
|
|
||||||
}
|
|
||||||
|
|
||||||
void toolStripButton2_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
Program.Save();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
|
|
||||||
ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
|
|
||||||
HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
|
|
||||||
rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
|
|
||||||
TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
|
|
||||||
oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
|
|
||||||
7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
|
|
||||||
xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
|
|
||||||
LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
|
|
||||||
KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
<data name="toolStripButton2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>
|
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
|
||||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPpZP7S1NxGMbPPxKaXVUkMEq8IpKUCoY/hGgI
|
|
||||||
ymqkDYYXcCjDZOANURSjCNGFQUTsl4GXVMxKk62YU4fXQpaIlygHQxBRH8/zwvyaIAYe+HLgnPN8nue9
|
|
||||||
HA3nvDTq63oW/jm13XOwvPTB3DYFY5MH+bXfcN8ygfTSMSSXfESicQDxBqdYHwH29g9w2tnZ3UcguIvN
|
|
||||||
rR3417exuBJE5N1n/wfwLgXEOc38Bc6xNRHb+/y4nm49G0Bnit2zf9H6bkliE/jKuYxrd6oVgDWfjB+K
|
|
||||||
TWeKMyrGEVfowITvD9re/9ABVQrAhh0HHK+ZselMMaN/mvwtDb+aVqkA7HYIwIj3ysfluPTorJnP6Ezx
|
|
||||||
oHsD1s5ZXEktUwCOioB5f1CEPR9+wTG6iuiserTo8dkwng7HT/R+XUPF8xlcTjErAOdMcW6NW8STiwG8
|
|
||||||
7vej8oUPN/PsEv3t8Ao0TZP3T1u8uJRkUgAuSYHtO97oLxmXd5t9Ho8aPTK+GzntqNfrLm2fFoihwYOI
|
|
||||||
xGIF4KjoGBLzY1OrF9k6OOFxnwDC4wxIMX1G0pMhgVyMNyoA13PAtS7OrJk1PrC69LUdQWxuF6IybHrX
|
|
||||||
LRI7JrtZdoDAo1XmbjMyD+tjSXxGcXRmnYg5ttD9QuxDhN0uUgDOmbvNTpPOJaGAo2K36cyaGZvOFIfd
|
|
||||||
KlSA8/zRh9ABIDUG+1JpAAAAAElFTkSuQmCC
|
|
||||||
</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
104
SequenceEditor/GetTextForm.Designer.cs
generated
104
SequenceEditor/GetTextForm.Designer.cs
generated
@@ -1,104 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
namespace SequenceEditor
|
|
||||||
{
|
|
||||||
partial class GetTextForm
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// Required designer variable.
|
|
||||||
/// </summary>
|
|
||||||
private System.ComponentModel.IContainer components = null;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Clean up any resources being used.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && (components != null))
|
|
||||||
{
|
|
||||||
components.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Windows Form Designer generated code
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Required method for Designer support - do not modify
|
|
||||||
/// the contents of this method with the code editor.
|
|
||||||
/// </summary>
|
|
||||||
private void InitializeComponent()
|
|
||||||
{
|
|
||||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
|
||||||
this.button2 = new System.Windows.Forms.Button();
|
|
||||||
this.SuspendLayout();
|
|
||||||
//
|
|
||||||
// textBox1
|
|
||||||
//
|
|
||||||
this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.textBox1.Location = new System.Drawing.Point(13, 13);
|
|
||||||
this.textBox1.Name = "textBox1";
|
|
||||||
this.textBox1.Size = new System.Drawing.Size(337, 20);
|
|
||||||
this.textBox1.TabIndex = 0;
|
|
||||||
//
|
|
||||||
// button1
|
|
||||||
//
|
|
||||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.button1.DialogResult = System.Windows.Forms.DialogResult.OK;
|
|
||||||
this.button1.Location = new System.Drawing.Point(194, 50);
|
|
||||||
this.button1.Name = "button1";
|
|
||||||
this.button1.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.button1.TabIndex = 1;
|
|
||||||
this.button1.Text = "OK";
|
|
||||||
this.button1.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// button2
|
|
||||||
//
|
|
||||||
this.button2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
|
||||||
this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
|
||||||
this.button2.Location = new System.Drawing.Point(275, 50);
|
|
||||||
this.button2.Name = "button2";
|
|
||||||
this.button2.Size = new System.Drawing.Size(75, 23);
|
|
||||||
this.button2.TabIndex = 2;
|
|
||||||
this.button2.Text = "Cancel";
|
|
||||||
this.button2.UseVisualStyleBackColor = true;
|
|
||||||
//
|
|
||||||
// GetTextForm
|
|
||||||
//
|
|
||||||
this.AcceptButton = this.button1;
|
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
|
||||||
this.CancelButton = this.button2;
|
|
||||||
this.ClientSize = new System.Drawing.Size(362, 85);
|
|
||||||
this.Controls.Add(this.button2);
|
|
||||||
this.Controls.Add(this.button1);
|
|
||||||
this.Controls.Add(this.textBox1);
|
|
||||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
|
||||||
this.MaximizeBox = false;
|
|
||||||
this.MinimizeBox = false;
|
|
||||||
this.Name = "GetTextForm";
|
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
|
||||||
this.Text = "Placeholder";
|
|
||||||
this.ResumeLayout(false);
|
|
||||||
this.PerformLayout();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
private System.Windows.Forms.TextBox textBox1;
|
|
||||||
private System.Windows.Forms.Button button1;
|
|
||||||
private System.Windows.Forms.Button button2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System.Windows.Forms;
|
|
||||||
|
|
||||||
namespace SequenceEditor
|
|
||||||
{
|
|
||||||
public partial class GetTextForm : Form
|
|
||||||
{
|
|
||||||
public GetTextForm()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string GetString(string title, string defaultValue)
|
|
||||||
{
|
|
||||||
using (var f = new GetTextForm())
|
|
||||||
{
|
|
||||||
f.textBox1.Text = defaultValue;
|
|
||||||
f.Text = title;
|
|
||||||
if (DialogResult.OK != f.ShowDialog())
|
|
||||||
return null;
|
|
||||||
return f.textBox1.Text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
||||||
@@ -1,137 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Xml;
|
|
||||||
using OpenRA.FileFormats;
|
|
||||||
|
|
||||||
namespace SequenceEditor
|
|
||||||
{
|
|
||||||
static class Program
|
|
||||||
{
|
|
||||||
static string XmlFilename;
|
|
||||||
public static string UnitName;
|
|
||||||
public static XmlDocument Doc;
|
|
||||||
public static Dictionary<string, Bitmap[]> Shps = new Dictionary<string, Bitmap[]>();
|
|
||||||
public static Palette Pal;
|
|
||||||
public static Dictionary<string, Sequence> Sequences = new Dictionary<string, Sequence>();
|
|
||||||
|
|
||||||
public static void LoadAndResolve( string shp )
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (Shps.ContainsKey(shp)) return;
|
|
||||||
|
|
||||||
var reader = new ShpReader(FileSystem.OpenWithExts(shp, ".tem", ".sno", ".int", ".shp"));
|
|
||||||
Shps[shp] = reader.Select(ih =>
|
|
||||||
{
|
|
||||||
var bmp = new Bitmap(reader.Width, reader.Height);
|
|
||||||
for (var j = 0; j < bmp.Height; j++)
|
|
||||||
for (var i = 0; i < bmp.Width; i++)
|
|
||||||
bmp.SetPixel(i, j, Pal.GetColor(ih.Image[j * bmp.Width + i]));
|
|
||||||
return bmp;
|
|
||||||
}).ToArray();
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void Save()
|
|
||||||
{
|
|
||||||
var e = Doc.SelectSingleNode(string.Format("//unit[@name=\"{0}\"]", UnitName)) as XmlElement;
|
|
||||||
if (e == null)
|
|
||||||
{
|
|
||||||
e = Doc.CreateElement("unit");
|
|
||||||
e.SetAttribute( "name", UnitName );
|
|
||||||
e = Doc.SelectSingleNode("sequences").AppendChild(e) as XmlElement;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (e.HasChildNodes) e.RemoveChild(e.FirstChild); /* what a fail */
|
|
||||||
|
|
||||||
foreach (var s in Sequences)
|
|
||||||
{
|
|
||||||
var seqnode = Doc.CreateElement("sequence");
|
|
||||||
seqnode.SetAttribute("name", s.Key);
|
|
||||||
seqnode.SetAttribute("start", s.Value.start.ToString());
|
|
||||||
seqnode.SetAttribute("length", s.Value.length.ToString());
|
|
||||||
if (s.Value.shp != UnitName)
|
|
||||||
seqnode.SetAttribute("src", s.Value.shp);
|
|
||||||
|
|
||||||
e.AppendChild(seqnode);
|
|
||||||
}
|
|
||||||
|
|
||||||
Doc.Save(XmlFilename);
|
|
||||||
}
|
|
||||||
|
|
||||||
[STAThread]
|
|
||||||
static void Main( string[] args )
|
|
||||||
{
|
|
||||||
Application.EnableVisualStyles();
|
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
|
||||||
|
|
||||||
if (args.Length != 3)
|
|
||||||
{
|
|
||||||
MessageBox.Show( "usage: SequenceEditor mod[,mod]* sequences-file.xml palette.pal");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var mods = args[0].Split(',');
|
|
||||||
var manifest = new Manifest(mods);
|
|
||||||
FileSystem.LoadFromManifest( manifest );
|
|
||||||
|
|
||||||
XmlFilename = args[1];
|
|
||||||
Doc = new XmlDocument();
|
|
||||||
Doc.Load(XmlFilename);
|
|
||||||
|
|
||||||
var tempPal = new Palette(FileSystem.Open(args[2]), true);
|
|
||||||
Pal = tempPal;
|
|
||||||
|
|
||||||
UnitName = GetTextForm.GetString("Unit to edit?", "e1");
|
|
||||||
if (string.IsNullOrEmpty(UnitName))
|
|
||||||
return;
|
|
||||||
|
|
||||||
LoadAndResolve(UnitName);
|
|
||||||
|
|
||||||
var xpath = string.Format("//unit[@name=\"{0}\"]/sequence", UnitName);
|
|
||||||
foreach (XmlElement e in Doc.SelectNodes(xpath))
|
|
||||||
{
|
|
||||||
if (e.HasAttribute("src"))
|
|
||||||
LoadAndResolve(e.GetAttribute("src"));
|
|
||||||
Sequences[e.GetAttribute("name")] = new Sequence(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
Application.Run(new Form1());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Sequence
|
|
||||||
{
|
|
||||||
public int start;
|
|
||||||
public int length;
|
|
||||||
public string shp;
|
|
||||||
|
|
||||||
public Sequence(XmlElement e)
|
|
||||||
{
|
|
||||||
start = int.Parse(e.GetAttribute("start"));
|
|
||||||
shp = e.GetAttribute("src");
|
|
||||||
if (shp == "") shp = Program.UnitName;
|
|
||||||
var a = e.GetAttribute("length");
|
|
||||||
|
|
||||||
length = (a == "*")
|
|
||||||
? Program.Shps[shp].Length - start
|
|
||||||
: ((a == "") ? 1 : int.Parse(a));
|
|
||||||
}
|
|
||||||
|
|
||||||
public Sequence() { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
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("SequenceEditor")]
|
|
||||||
[assembly: AssemblyDescription("")]
|
|
||||||
[assembly: AssemblyConfiguration("")]
|
|
||||||
[assembly: AssemblyCompany("")]
|
|
||||||
[assembly: AssemblyProduct("SequenceEditor")]
|
|
||||||
[assembly: AssemblyCopyright("Copyright © 2009")]
|
|
||||||
[assembly: AssemblyTrademark("")]
|
|
||||||
[assembly: AssemblyCulture("")]
|
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
|
||||||
// to COM components. If you need to access a type in this assembly from
|
|
||||||
// COM, set the ComVisible attribute to true on that type.
|
|
||||||
[assembly: ComVisible(false)]
|
|
||||||
|
|
||||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
|
||||||
[assembly: Guid("7e4566b7-a3cc-4d8f-ba9c-1a071883ba2c")]
|
|
||||||
|
|
||||||
// Version information for an assembly consists of the following four values:
|
|
||||||
//
|
|
||||||
// Major Version
|
|
||||||
// Minor Version
|
|
||||||
// Build Number
|
|
||||||
// Revision
|
|
||||||
//
|
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
|
||||||
// by using the '*' as shown below:
|
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
|
||||||
[assembly: AssemblyVersion("1.0.0.0")]
|
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
||||||
71
SequenceEditor/Properties/Resources.Designer.cs
generated
71
SequenceEditor/Properties/Resources.Designer.cs
generated
@@ -1,71 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:2.0.50727.4927
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace SequenceEditor.Properties
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
|
||||||
/// </summary>
|
|
||||||
// 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()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Returns the cached ResourceManager instance used by this class.
|
|
||||||
/// </summary>
|
|
||||||
[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("SequenceEditor.Properties.Resources", typeof(Resources).Assembly);
|
|
||||||
resourceMan = temp;
|
|
||||||
}
|
|
||||||
return resourceMan;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Overrides the current thread's CurrentUICulture property for all
|
|
||||||
/// resource lookups using this strongly typed resource class.
|
|
||||||
/// </summary>
|
|
||||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
|
||||||
internal static global::System.Globalization.CultureInfo Culture
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return resourceCulture;
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
resourceCulture = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
</root>
|
|
||||||
30
SequenceEditor/Properties/Settings.Designer.cs
generated
30
SequenceEditor/Properties/Settings.Designer.cs
generated
@@ -1,30 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <auto-generated>
|
|
||||||
// This code was generated by a tool.
|
|
||||||
// Runtime Version:2.0.50727.4927
|
|
||||||
//
|
|
||||||
// Changes to this file may cause incorrect behavior and will be lost if
|
|
||||||
// the code is regenerated.
|
|
||||||
// </auto-generated>
|
|
||||||
//------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
namespace SequenceEditor.Properties
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
|
||||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
|
||||||
<Profiles>
|
|
||||||
<Profile Name="(Default)" />
|
|
||||||
</Profiles>
|
|
||||||
<Settings />
|
|
||||||
</SettingsFile>
|
|
||||||
@@ -1,124 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProductVersion>9.0.30729</ProductVersion>
|
|
||||||
<SchemaVersion>2.0</SchemaVersion>
|
|
||||||
<ProjectGuid>{230F65CE-A6DE-4235-8B38-13A3D606C7F7}</ProjectGuid>
|
|
||||||
<OutputType>WinExe</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>SequenceEditor</RootNamespace>
|
|
||||||
<AssemblyName>SequenceEditor</AssemblyName>
|
|
||||||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
|
|
||||||
<FileAlignment>512</FileAlignment>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
|
||||||
<DebugSymbols>true</DebugSymbols>
|
|
||||||
<OutputPath>..\</OutputPath>
|
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
|
||||||
<DebugType>full</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
|
||||||
<Optimize>true</Optimize>
|
|
||||||
<DebugType>pdbonly</DebugType>
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<ErrorReport>prompt</ErrorReport>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
|
||||||
<OutputPath>..\</OutputPath>
|
|
||||||
<DebugType>none</DebugType>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
|
||||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
|
||||||
<DebugType>none</DebugType>
|
|
||||||
<WarningLevel>4</WarningLevel>
|
|
||||||
<Optimize>false</Optimize>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Reference Include="System" />
|
|
||||||
<Reference Include="System.Core">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Xml.Linq">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data.DataSetExtensions">
|
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Drawing" />
|
|
||||||
<Reference Include="System.Windows.Forms" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="Form1.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Form1.Designer.cs">
|
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="GetTextForm.cs">
|
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="GetTextForm.Designer.cs">
|
|
||||||
<DependentUpon>GetTextForm.cs</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Program.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<EmbeddedResource Include="Form1.resx">
|
|
||||||
<DependentUpon>Form1.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="GetTextForm.resx">
|
|
||||||
<DependentUpon>GetTextForm.cs</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="Properties\Resources.resx">
|
|
||||||
<Generator>ResXFileCodeGenerator</Generator>
|
|
||||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<Compile Include="Properties\Resources.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Resources.resx</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<None Include="Properties\Settings.settings">
|
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
|
||||||
</None>
|
|
||||||
<Compile Include="Properties\Settings.Designer.cs">
|
|
||||||
<AutoGen>True</AutoGen>
|
|
||||||
<DependentUpon>Settings.settings</DependentUpon>
|
|
||||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="Surface.cs">
|
|
||||||
<SubType>Component</SubType>
|
|
||||||
</Compile>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
|
||||||
<Project>{BDAEAB25-991E-46A7-AF1E-4F0E03358DAA}</Project>
|
|
||||||
<Name>OpenRA.FileFormats</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
|
||||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
|
||||||
Other similar extension points exist, see Microsoft.Common.targets.
|
|
||||||
<Target Name="BeforeBuild">
|
|
||||||
</Target>
|
|
||||||
<Target Name="AfterBuild">
|
|
||||||
</Target>
|
|
||||||
-->
|
|
||||||
</Project>
|
|
||||||
@@ -1,230 +0,0 @@
|
|||||||
#region Copyright & License Information
|
|
||||||
/*
|
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
|
||||||
* available to you under the terms of the GNU General Public License
|
|
||||||
* as published by the Free Software Foundation. For more information,
|
|
||||||
* see COPYING.
|
|
||||||
*/
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using OpenRA.FileFormats;
|
|
||||||
|
|
||||||
namespace SequenceEditor
|
|
||||||
{
|
|
||||||
public class Surface : Control
|
|
||||||
{
|
|
||||||
public Surface()
|
|
||||||
{
|
|
||||||
SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
|
|
||||||
SetStyle(ControlStyles.ResizeRedraw, true);
|
|
||||||
UpdateStyles();
|
|
||||||
}
|
|
||||||
|
|
||||||
Dictionary<string, Dictionary<int, Rectangle>> items
|
|
||||||
= new Dictionary<string, Dictionary<int, Rectangle>>();
|
|
||||||
|
|
||||||
Point mousePos;
|
|
||||||
Point clickPos;
|
|
||||||
bool isDragging;
|
|
||||||
|
|
||||||
protected override void OnMouseMove(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnMouseMove(e);
|
|
||||||
mousePos = e.Location;
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
isDragging = true;
|
|
||||||
|
|
||||||
Invalidate();
|
|
||||||
}
|
|
||||||
|
|
||||||
Pair<string, int>? FindFrameAt(Point p)
|
|
||||||
{
|
|
||||||
if (items.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (var shp in items)
|
|
||||||
{
|
|
||||||
var sel = shp.Value.FirstOrDefault(a => a.Value.Contains(p));
|
|
||||||
if (!sel.Value.IsEmpty)
|
|
||||||
return Pair.New(shp.Key, sel.Key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
string lastName = "";
|
|
||||||
|
|
||||||
protected override void OnMouseUp(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnMouseUp(e);
|
|
||||||
|
|
||||||
if (isDragging && e.Button == MouseButtons.Left)
|
|
||||||
{
|
|
||||||
isDragging = false;
|
|
||||||
|
|
||||||
/* create a new sequence! */
|
|
||||||
var start = FindFrameAt(clickPos);
|
|
||||||
var end = FindFrameAt(mousePos);
|
|
||||||
|
|
||||||
if (start != null && end != null
|
|
||||||
&& start.Value.First == end.Value.First)
|
|
||||||
{
|
|
||||||
var s = new Sequence()
|
|
||||||
{
|
|
||||||
start = start.Value.Second,
|
|
||||||
length = end.Value.Second - start.Value.Second + 1,
|
|
||||||
shp = start.Value.First
|
|
||||||
};
|
|
||||||
|
|
||||||
var name = GetTextForm.GetString("Name of new sequence", lastName);
|
|
||||||
if (name == null) return;
|
|
||||||
|
|
||||||
Program.Sequences.Add(name, s);
|
|
||||||
lastName = name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnMouseDown(MouseEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnMouseDown(e);
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Left)
|
|
||||||
clickPos = e.Location;
|
|
||||||
|
|
||||||
if (e.Button == MouseButtons.Right)
|
|
||||||
{
|
|
||||||
var frameAtPoint = FindFrameAt(e.Location);
|
|
||||||
if (frameAtPoint == null) return;
|
|
||||||
var seq = Program.Sequences
|
|
||||||
.Where(kv => kv.Value.shp == frameAtPoint.Value.First &&
|
|
||||||
frameAtPoint.Value.Second.IsInRange( kv.Value.start, kv.Value.length )).ToArray();
|
|
||||||
|
|
||||||
foreach (var s in seq)
|
|
||||||
Program.Sequences.Remove(s.Key);
|
|
||||||
|
|
||||||
Invalidate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Sequence tempSequence;
|
|
||||||
|
|
||||||
protected override void OnPaint(PaintEventArgs e)
|
|
||||||
{
|
|
||||||
base.OnPaint(e);
|
|
||||||
|
|
||||||
var x = 0;
|
|
||||||
var y = 0;
|
|
||||||
|
|
||||||
Point? toolPoint = null;
|
|
||||||
string toolText = "";
|
|
||||||
|
|
||||||
var frameAtPoint = FindFrameAt(mousePos);
|
|
||||||
if (frameAtPoint != null)
|
|
||||||
{
|
|
||||||
var rect = items[frameAtPoint.Value.First][frameAtPoint.Value.Second];
|
|
||||||
e.Graphics.FillRectangle(Brushes.Silver, rect);
|
|
||||||
toolPoint = new Point(rect.Left, rect.Bottom);
|
|
||||||
toolText = frameAtPoint.Value.Second.ToString();
|
|
||||||
}
|
|
||||||
|
|
||||||
tempSequence = null;
|
|
||||||
if (isDragging)
|
|
||||||
{
|
|
||||||
/* create a new sequence! */
|
|
||||||
var start = FindFrameAt(clickPos);
|
|
||||||
var end = FindFrameAt(mousePos);
|
|
||||||
|
|
||||||
if (start != null && end != null
|
|
||||||
&& start.Value.First == end.Value.First)
|
|
||||||
tempSequence = new Sequence() {
|
|
||||||
start = start.Value.Second,
|
|
||||||
length = end.Value.Second - start.Value.Second + 1,
|
|
||||||
shp = start.Value.First };
|
|
||||||
}
|
|
||||||
|
|
||||||
items.Clear();
|
|
||||||
|
|
||||||
foreach (var shp in Program.Shps)
|
|
||||||
{
|
|
||||||
x = 0;
|
|
||||||
e.Graphics.DrawString(shp.Key + ".shp", Font, Brushes.Black, x, y);
|
|
||||||
y += Font.Height;
|
|
||||||
var u = 0;
|
|
||||||
var i = 0;
|
|
||||||
|
|
||||||
var dict = items[shp.Key] = new Dictionary<int, Rectangle>();
|
|
||||||
|
|
||||||
foreach (var frame in shp.Value)
|
|
||||||
{
|
|
||||||
if (x + frame.Width >= ClientSize.Width)
|
|
||||||
{
|
|
||||||
x = 0;
|
|
||||||
y += u;
|
|
||||||
u = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
dict[i++] = new Rectangle(x, y, frame.Width, frame.Height);
|
|
||||||
|
|
||||||
e.Graphics.DrawImage(frame, x, y);
|
|
||||||
x += frame.Width;
|
|
||||||
u = Math.Max(u, frame.Height);
|
|
||||||
}
|
|
||||||
|
|
||||||
y += u;
|
|
||||||
x = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
var brushes = new[] { Brushes.Green, Brushes.Red, Brushes.Blue, Brushes.Magenta, Brushes.DarkOrange, Brushes.Navy };
|
|
||||||
|
|
||||||
var seqid = 0;
|
|
||||||
var seqs = Program.Sequences.Select(a => a); /* shorter than teh typename!! */
|
|
||||||
if (tempSequence != null)
|
|
||||||
seqs = seqs.Concat(new[] { new KeyValuePair<string, Sequence>("New sequence...", tempSequence) });
|
|
||||||
|
|
||||||
foreach (var seq in seqs)
|
|
||||||
{
|
|
||||||
var firstFrame = seq.Value.start;
|
|
||||||
var r = items[seq.Value.shp][firstFrame];
|
|
||||||
|
|
||||||
for (var i = 0; i < seq.Value.length; i++)
|
|
||||||
{
|
|
||||||
var q = items[seq.Value.shp][i + firstFrame];
|
|
||||||
e.Graphics.FillRectangle(brushes[seqid], q.Left, q.Top, q.Width, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
var z = e.Graphics.MeasureString(seq.Key, Font);
|
|
||||||
e.Graphics.FillRectangle(brushes[seqid], r.Left, r.Top, z.Width, z.Height);
|
|
||||||
e.Graphics.DrawString(seq.Key, Font, Brushes.White, r.Left, r.Top);
|
|
||||||
|
|
||||||
seqid = ++seqid % brushes.Length;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (toolPoint.HasValue)
|
|
||||||
{
|
|
||||||
var size = e.Graphics.MeasureString(toolText, Font);
|
|
||||||
e.Graphics.FillRectangle(Brushes.Silver, toolPoint.Value.X, toolPoint.Value.Y, size.Width, size.Height);
|
|
||||||
e.Graphics.DrawString(toolText, Font, Brushes.Black, toolPoint.Value.X, toolPoint.Value.Y);
|
|
||||||
}
|
|
||||||
|
|
||||||
var newHeight = Math.Max( Parent.ClientSize.Height, y );
|
|
||||||
if (Height != newHeight)
|
|
||||||
Height = newHeight;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static class Exts
|
|
||||||
{
|
|
||||||
public static bool IsInRange(this int x, int start, int len)
|
|
||||||
{
|
|
||||||
return x >= start && x < start + len;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user