- added operators to MouseState
- working on AdapterList for OpenGL - working on XNA to ANX converter tool
This commit is contained in:
parent
a3c8033799
commit
5872a780b8
@ -37,6 +37,7 @@
|
||||
<HintPath>..\lib\OpenTK\OpenTK.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -2,6 +2,10 @@
|
||||
using System.IO;
|
||||
using ANX.Framework.Graphics;
|
||||
using ANX.Framework.NonXNA;
|
||||
using System.Collections.ObjectModel;
|
||||
using OpenTK;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
|
||||
#region License
|
||||
|
||||
@ -224,10 +228,64 @@ namespace ANX.Framework.Windows.GL3
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region GetAdapterList
|
||||
/// <summary>
|
||||
/// Get a list of available graphics adapter information.
|
||||
/// </summary>
|
||||
/// <returns>List of graphics adapters.</returns>
|
||||
public ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
||||
{
|
||||
var result = new List<GraphicsAdapter>();
|
||||
foreach (DisplayDevice device in DisplayDevice.AvailableDisplays)
|
||||
{
|
||||
var displayModeCollection = new DisplayModeCollection();
|
||||
foreach (string format in Enum.GetNames(typeof(SurfaceFormat)))
|
||||
{
|
||||
SurfaceFormat surfaceFormat =
|
||||
(SurfaceFormat)Enum.Parse(typeof(SurfaceFormat), format);
|
||||
|
||||
public System.Collections.ObjectModel.ReadOnlyCollection<GraphicsAdapter> GetAdapterList()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
// TODO: device.BitsPerPixel
|
||||
if (surfaceFormat != SurfaceFormat.Color)//adapter.Supports(surfaceFormat) == false)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var modes = new List<DisplayMode>();
|
||||
|
||||
foreach (DisplayResolution res in device.AvailableResolutions)
|
||||
{
|
||||
float aspect = (float)res.Width / (float)res.Height;
|
||||
modes.Add(new DisplayMode
|
||||
{
|
||||
AspectRatio = aspect,
|
||||
Width = res.Width,
|
||||
Height = res.Height,
|
||||
TitleSafeArea = new Rectangle(0, 0, res.Width, res.Height),
|
||||
Format = surfaceFormat,
|
||||
});
|
||||
}
|
||||
|
||||
displayModeCollection[surfaceFormat] = modes.ToArray();
|
||||
}
|
||||
|
||||
GraphicsAdapter newAdapter = new GraphicsAdapter
|
||||
{
|
||||
SupportedDisplayModes = displayModeCollection,
|
||||
IsDefaultAdapter = device.IsPrimary,
|
||||
|
||||
// TODO:
|
||||
DeviceId = 0,
|
||||
DeviceName = "",
|
||||
Revision = 0,
|
||||
SubSystemId = 0,
|
||||
VendorId = 0,
|
||||
};
|
||||
|
||||
result.Add(newAdapter);
|
||||
}
|
||||
|
||||
return new ReadOnlyCollection<GraphicsAdapter>(result);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -43,11 +43,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xinput", "Samples\Xinput\Xi
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsGame", "Samples\WindowsGame\WindowsGame.csproj", "{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XNAToANXConverter", "Tools\XNAToANXConverter\XNAToANXConverter.csproj", "{B5209A04-B2F8-4033-A5E7-545BE771214C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|Mixed Platforms = Debug|Mixed Platforms
|
||||
@ -211,6 +209,16 @@ Global
|
||||
{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}.Release|x86.ActiveCfg = Release|x86
|
||||
{A08575E0-7B21-4822-9D4C-6B9EEB7EFFF7}.Release|x86.Build.0 = Release|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Debug|Mixed Platforms.Build.0 = Debug|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Debug|x86.Build.0 = Debug|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Release|Mixed Platforms.ActiveCfg = Release|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Release|Mixed Platforms.Build.0 = Release|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Release|x86.ActiveCfg = Release|x86
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@ -220,6 +228,7 @@ Global
|
||||
{B30DE9C2-0926-46B6-8351-9AF276C472D5} = {D421509A-9AE3-4D7E-881B-EAFED598B028}
|
||||
{5BE49183-2F6F-4527-AC90-D816911FCF90} = {D421509A-9AE3-4D7E-881B-EAFED598B028}
|
||||
{9D8DC781-2E0D-4348-BAD9-745F91428A3F} = {B24A8593-562A-4A25-BB08-46C163F10F3F}
|
||||
{B5209A04-B2F8-4033-A5E7-545BE771214C} = {B24A8593-562A-4A25-BB08-46C163F10F3F}
|
||||
{F945515B-394D-4ED4-80E0-98EB59B69D24} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{AAA20E99-A897-4C91-A23E-D02B8F08ACA5} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
{BC79B021-10E4-4D01-945A-7048FFF53A22} = {9B0DD48B-3912-4F33-AF3F-691AF02B73F9}
|
||||
@ -229,4 +238,8 @@ Global
|
||||
{60D08399-244F-46A3-91F1-4CFD26D961A3} = {7AD65E6B-2A48-437F-81D9-4CA9C9A85C64}
|
||||
{6A582788-C4D2-410C-96CD-177F75712D65} = {5725DA44-4F5C-4E93-A957-AC5C85603EE9}
|
||||
EndGlobalSection
|
||||
GlobalSection(SubversionScc) = preSolution
|
||||
Svn-Managed = True
|
||||
Manager = AnkhSVN - Subversion Support for Visual Studio
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -57,7 +57,18 @@ using ANX.Framework.Graphics;
|
||||
|
||||
namespace ANX.Framework.Graphics
|
||||
{
|
||||
public class TextureCollection
|
||||
public sealed class TextureCollection
|
||||
{
|
||||
public Texture this[int index]
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
set
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,6 +84,38 @@ namespace ANX.Framework.Input
|
||||
public int X { get { return this.x; } }
|
||||
public int Y { get { return this.y; } }
|
||||
|
||||
public static bool operator ==(MouseState left, MouseState right)
|
||||
{
|
||||
return left.X == right.X &&
|
||||
left.Y == right.Y &&
|
||||
left.LeftButton == right.LeftButton &&
|
||||
left.MiddleButton == right.MiddleButton &&
|
||||
left.RightButton == right.RightButton &&
|
||||
left.XButton1 == right.XButton1 &&
|
||||
left.XButton2 == right.XButton2 &&
|
||||
left.ScrollWheelValue == right.ScrollWheelValue;
|
||||
}
|
||||
|
||||
public static bool operator !=(MouseState left, MouseState right)
|
||||
{
|
||||
return left.X != right.X ||
|
||||
left.Y != right.Y ||
|
||||
left.LeftButton != right.LeftButton ||
|
||||
left.MiddleButton != right.MiddleButton ||
|
||||
left.RightButton != right.RightButton ||
|
||||
left.XButton1 != right.XButton1 ||
|
||||
left.XButton2 != right.XButton2 ||
|
||||
left.ScrollWheelValue != right.ScrollWheelValue;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is MouseState)
|
||||
{
|
||||
return this == (MouseState)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -142,7 +142,7 @@ namespace ANXStatusComparer.Output
|
||||
{0}
|
||||
<td>{1}</td>
|
||||
</tr>",
|
||||
EmptyCell, classData.Handle.Name);
|
||||
EmptyCell, classData.Handle.FullName);
|
||||
}
|
||||
|
||||
text += @"
|
||||
@ -181,7 +181,7 @@ namespace ANXStatusComparer.Output
|
||||
{0}
|
||||
<td>{1}</td>
|
||||
</tr>",
|
||||
EmptyCell, structData.Handle.Name);
|
||||
EmptyCell, structData.Handle.FullName);
|
||||
}
|
||||
|
||||
text += @"
|
||||
|
147
Tools/XNAToANXConverter/ConverterForm.Designer.cs
generated
Normal file
147
Tools/XNAToANXConverter/ConverterForm.Designer.cs
generated
Normal file
@ -0,0 +1,147 @@
|
||||
namespace XnaToAnxConverter
|
||||
{
|
||||
partial class ConverterForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Erforderliche Designervariable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Verwendete Ressourcen bereinigen.
|
||||
/// </summary>
|
||||
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Vom Windows Form-Designer generierter Code
|
||||
|
||||
/// <summary>
|
||||
/// Erforderliche Methode für die Designerunterstützung.
|
||||
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.convertButton = new System.Windows.Forms.Button();
|
||||
this.sourcePath = new System.Windows.Forms.TextBox();
|
||||
this.destPath = new System.Windows.Forms.TextBox();
|
||||
this.browsePath1 = new System.Windows.Forms.Button();
|
||||
this.browsePath2 = new System.Windows.Forms.Button();
|
||||
this.checkBox1 = new System.Windows.Forms.CheckBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// convertButton
|
||||
//
|
||||
this.convertButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.convertButton.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.convertButton.Location = new System.Drawing.Point(161, 64);
|
||||
this.convertButton.Name = "convertButton";
|
||||
this.convertButton.Size = new System.Drawing.Size(275, 25);
|
||||
this.convertButton.TabIndex = 0;
|
||||
this.convertButton.Text = "Convert";
|
||||
this.convertButton.UseVisualStyleBackColor = true;
|
||||
this.convertButton.Click += new System.EventHandler(this.convertButton_Click);
|
||||
//
|
||||
// sourcePath
|
||||
//
|
||||
this.sourcePath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.sourcePath.Location = new System.Drawing.Point(161, 13);
|
||||
this.sourcePath.Name = "sourcePath";
|
||||
this.sourcePath.Size = new System.Drawing.Size(203, 20);
|
||||
this.sourcePath.TabIndex = 1;
|
||||
//
|
||||
// destPath
|
||||
//
|
||||
this.destPath.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.destPath.Location = new System.Drawing.Point(161, 38);
|
||||
this.destPath.Name = "destPath";
|
||||
this.destPath.Size = new System.Drawing.Size(203, 20);
|
||||
this.destPath.TabIndex = 2;
|
||||
//
|
||||
// browsePath1
|
||||
//
|
||||
this.browsePath1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.browsePath1.Location = new System.Drawing.Point(370, 13);
|
||||
this.browsePath1.Name = "browsePath1";
|
||||
this.browsePath1.Size = new System.Drawing.Size(66, 20);
|
||||
this.browsePath1.TabIndex = 3;
|
||||
this.browsePath1.Text = "•••";
|
||||
this.browsePath1.UseVisualStyleBackColor = true;
|
||||
this.browsePath1.Click += new System.EventHandler(this.browsePath1_Click);
|
||||
//
|
||||
// browsePath2
|
||||
//
|
||||
this.browsePath2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.browsePath2.Location = new System.Drawing.Point(370, 38);
|
||||
this.browsePath2.Name = "browsePath2";
|
||||
this.browsePath2.Size = new System.Drawing.Size(66, 20);
|
||||
this.browsePath2.TabIndex = 4;
|
||||
this.browsePath2.Text = "•••";
|
||||
this.browsePath2.UseVisualStyleBackColor = true;
|
||||
this.browsePath2.Click += new System.EventHandler(this.browsePath2_Click);
|
||||
//
|
||||
// checkBox1
|
||||
//
|
||||
this.checkBox1.AutoSize = true;
|
||||
this.checkBox1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.checkBox1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
this.checkBox1.Location = new System.Drawing.Point(15, 39);
|
||||
this.checkBox1.Name = "checkBox1";
|
||||
this.checkBox1.Size = new System.Drawing.Size(140, 17);
|
||||
this.checkBox1.TabIndex = 5;
|
||||
this.checkBox1.Text = "Convert to different path";
|
||||
this.checkBox1.UseVisualStyleBackColor = false;
|
||||
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.label1.Location = new System.Drawing.Point(114, 15);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(41, 13);
|
||||
this.label1.TabIndex = 6;
|
||||
this.label1.Text = "Source";
|
||||
//
|
||||
// ConverterForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(451, 101);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.checkBox1);
|
||||
this.Controls.Add(this.browsePath2);
|
||||
this.Controls.Add(this.browsePath1);
|
||||
this.Controls.Add(this.destPath);
|
||||
this.Controls.Add(this.sourcePath);
|
||||
this.Controls.Add(this.convertButton);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "ConverterForm";
|
||||
this.ShowIcon = false;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "XNA To ANX Converter";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button convertButton;
|
||||
private System.Windows.Forms.TextBox sourcePath;
|
||||
private System.Windows.Forms.TextBox destPath;
|
||||
private System.Windows.Forms.Button browsePath1;
|
||||
private System.Windows.Forms.Button browsePath2;
|
||||
private System.Windows.Forms.CheckBox checkBox1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
}
|
||||
}
|
||||
|
98
Tools/XNAToANXConverter/ConverterForm.cs
Normal file
98
Tools/XNAToANXConverter/ConverterForm.cs
Normal file
@ -0,0 +1,98 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace XnaToAnxConverter
|
||||
{
|
||||
public partial class ConverterForm : Form
|
||||
{
|
||||
#region Constructor
|
||||
public ConverterForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
destPath.Enabled = false;
|
||||
browsePath2.Enabled = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OnPaintBackground
|
||||
protected override void OnPaintBackground(PaintEventArgs e)
|
||||
{
|
||||
base.OnPaintBackground(e);
|
||||
|
||||
e.Graphics.FillRectangle(new LinearGradientBrush(
|
||||
Point.Empty, new Point(0, ClientSize.Height),
|
||||
Color.CornflowerBlue, Color.White),
|
||||
ClientRectangle);
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
destPath.Enabled = checkBox1.Checked;
|
||||
browsePath2.Enabled = checkBox1.Checked;
|
||||
}
|
||||
|
||||
private void browsePath1_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (OpenFileDialog dialog = new OpenFileDialog())
|
||||
{
|
||||
dialog.Title = "Select a .csproj file to convert...";
|
||||
dialog.InitialDirectory = "C:\\";
|
||||
dialog.Filter = "csproj file|*.csproj";
|
||||
dialog.CheckFileExists = true;
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
sourcePath.Text = dialog.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void browsePath2_Click(object sender, EventArgs e)
|
||||
{
|
||||
using (SaveFileDialog dialog = new SaveFileDialog())
|
||||
{
|
||||
dialog.Title = "Select where to save the converted files...";
|
||||
dialog.InitialDirectory = "C:\\";
|
||||
dialog.Filter = "csproj file|*.csproj";
|
||||
dialog.CheckFileExists = false;
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
destPath.Text = dialog.FileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void convertButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string source = sourcePath.Text;
|
||||
string dest = checkBox1.Checked ? destPath.Text : sourcePath.Text;
|
||||
|
||||
if (String.IsNullOrEmpty(source))
|
||||
{
|
||||
MessageBox.Show("Failed to convert because you need to enter a " +
|
||||
"source filepath!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (File.Exists(source) == false)
|
||||
{
|
||||
MessageBox.Show("Failed to convert because the source project file " +
|
||||
"doesn't exist!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(dest))
|
||||
{
|
||||
MessageBox.Show("Failed to convert because you need to enter a " +
|
||||
"destination filepath!");
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO: convert
|
||||
}
|
||||
}
|
||||
}
|
120
Tools/XNAToANXConverter/ConverterForm.resx
Normal file
120
Tools/XNAToANXConverter/ConverterForm.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
21
Tools/XNAToANXConverter/Program.cs
Normal file
21
Tools/XNAToANXConverter/Program.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace XnaToAnxConverter
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// Der Haupteinstiegspunkt für die Anwendung.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new ConverterForm());
|
||||
}
|
||||
}
|
||||
}
|
36
Tools/XNAToANXConverter/Properties/AssemblyInfo.cs
Normal file
36
Tools/XNAToANXConverter/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Allgemeine Informationen über eine Assembly werden über die folgenden
|
||||
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
|
||||
// die mit einer Assembly verknüpft sind.
|
||||
[assembly: AssemblyTitle("XNAToANXConverter")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("XNAToANXConverter")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
|
||||
// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
|
||||
// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
|
||||
[assembly: Guid("6ad195a6-d002-433a-9e7e-1643e179ba08")]
|
||||
|
||||
// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
|
||||
//
|
||||
// Hauptversion
|
||||
// Nebenversion
|
||||
// Buildnummer
|
||||
// Revision
|
||||
//
|
||||
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
|
||||
// übernehmen, indem Sie "*" eingeben:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
64
Tools/XNAToANXConverter/XNAToANXConverter.csproj
Normal file
64
Tools/XNAToANXConverter/XNAToANXConverter.csproj
Normal file
@ -0,0 +1,64 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B5209A04-B2F8-4033-A5E7-545BE771214C}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>XNAToANXConverter</RootNamespace>
|
||||
<AssemblyName>XNAToANXConverter</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ConverterForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ConverterForm.Designer.cs">
|
||||
<DependentUpon>ConverterForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="ConverterForm.resx">
|
||||
<DependentUpon>ConverterForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\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>
|
Loading…
x
Reference in New Issue
Block a user