ContentCompiler:

- added missing icon
- implemented Preview (still buggy though)

ProjectConverter:
- added GUI that is used when no parameters are supplied.
- added icon
This commit is contained in:
SND\eagleeyestudios_cp 2012-11-17 17:52:49 +00:00 committed by Konstantin Koch
parent 47c57e3222
commit cd9d34aad5
10 changed files with 492 additions and 12 deletions

View File

@ -247,6 +247,10 @@
<Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project> <Project>{6899F0C9-70B9-4EB0-9DD3-E598D4BE3E35}</Project>
<Name>ANX.Framework</Name> <Name>ANX.Framework</Name>
</ProjectReference> </ProjectReference>
<ProjectReference Include="..\..\RenderSystems\ANX.Framework.GL3\ANX.RenderSystem.GL3.csproj">
<Project>{eb8258e0-6741-4db9-b756-1ebdf67b1ed6}</Project>
<Name>ANX.RenderSystem.GL3</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -71,6 +71,7 @@
// //
// drawSurface // drawSurface
// //
this.drawSurface.BackColor = System.Drawing.Color.Transparent;
this.drawSurface.Controls.Add(this.labelStatus); this.drawSurface.Controls.Add(this.labelStatus);
this.drawSurface.Location = new System.Drawing.Point(12, 27); this.drawSurface.Location = new System.Drawing.Point(12, 27);
this.drawSurface.Name = "drawSurface"; this.drawSurface.Name = "drawSurface";

View File

@ -1,13 +1,16 @@
#region Using Statements #region Using Statements
using System; using System;
using System.Drawing; using System.ComponentModel.Design;
using System.IO; using System.IO;
using System.Threading; using System.Threading;
using System.Windows.Forms; using System.Windows.Forms;
using ANX.Framework;
using ANX.Framework.Content;
using ANX.Framework.Content.Pipeline; using ANX.Framework.Content.Pipeline;
using ANX.Framework.Content.Pipeline.Tasks; using ANX.Framework.Content.Pipeline.Tasks;
using ANX.Framework.Graphics; using ANX.Framework.Graphics;
using ANX.Framework.NonXNA.Development; using ANX.Framework.NonXNA.Development;
using Point = System.Drawing.Point;
using Timer = System.Windows.Forms.Timer; using Timer = System.Windows.Forms.Timer;
#endregion #endregion
@ -18,7 +21,7 @@ using Timer = System.Windows.Forms.Timer;
namespace ANX.ContentCompiler.GUI.Dialogues namespace ANX.ContentCompiler.GUI.Dialogues
{ {
[PercentageComplete(50)] [PercentageComplete(60)]
[Developer("SilentWarrior/Eagle Eye Studios")] [Developer("SilentWarrior/Eagle Eye Studios")]
[TestState(TestStateAttribute.TestState.InProgress)] [TestState(TestStateAttribute.TestState.InProgress)]
public partial class PreviewScreen : Form public partial class PreviewScreen : Form
@ -38,6 +41,8 @@ namespace ANX.ContentCompiler.GUI.Dialogues
private Timer _tickTimer; private Timer _tickTimer;
private readonly GraphicsDevice _graphicsDevice; private readonly GraphicsDevice _graphicsDevice;
private SpriteBatch _batch; private SpriteBatch _batch;
private ContentManager _contentManager;
private GameServiceContainer _services;
#endregion #endregion
#region Constructor #region Constructor
@ -55,6 +60,9 @@ namespace ANX.ContentCompiler.GUI.Dialogues
DeviceWindowHandle = drawSurface.Handle, DeviceWindowHandle = drawSurface.Handle,
PresentationInterval = PresentInterval.Default, PresentationInterval = PresentInterval.Default,
}); });
_services = new GameServiceContainer();
_services.AddService(typeof(GraphicsDevice), _graphicsDevice);
_contentManager = new ContentManager(_services);
} }
#endregion #endregion
@ -86,7 +94,7 @@ namespace ANX.ContentCompiler.GUI.Dialogues
#region Events #region Events
private void ButtonQuitClick(object sender, EventArgs e) private void ButtonQuitClick(object sender, EventArgs e)
{ {
Close(); Hide();
DialogResult = DialogResult.Cancel; DialogResult = DialogResult.Cancel;
} }
@ -120,11 +128,23 @@ namespace ANX.ContentCompiler.GUI.Dialogues
void Tick(object sender, EventArgs e) void Tick(object sender, EventArgs e)
{ {
if (!_outputFile.EndsWith(".xnb") && !File.Exists(_outputFile + ".xnb"))
{
File.Move(_outputFile, _outputFile + ".xnb");
}
_graphicsDevice.Clear(Framework.Color.CornflowerBlue); _graphicsDevice.Clear(Framework.Color.CornflowerBlue);
if (_processor == "TextureProcessor") if (_processor == "TextureProcessor")
{ {
_batch.Begin(); _batch.Begin();
var tex = _contentManager.Load<Texture2D>(_outputFile);
_batch.Draw(tex, Vector2.Zero, Color.White);
_batch.End();
}
else if (_processor == "FontDescriptionProcessor")
{
_batch.Begin();
var font = _contentManager.Load<SpriteFont>(_outputFile);
_batch.DrawString(font, "The quick brown fox jumps over the lazy dog. äöü@", Vector2.One, Color.DarkRed);
_batch.End(); _batch.End();
} }
} }
@ -152,15 +172,16 @@ namespace ANX.ContentCompiler.GUI.Dialogues
} }
_processor = _item.ProcessorName; _processor = _item.ProcessorName;
_item.OutputFilename = _outputFile; _item.OutputFilename = _outputFile;
try builderTask.Execute(new[] { _item });
/*try
{ {
builderTask.Execute(new[] { _item });
} }
catch (Exception ex) catch (Exception ex)
{ {
_error = true; _error = true;
_errorMessage = ex.Message; _errorMessage = ex.Message;
} }*/
} }
public void SetFile(BuildItem item) public void SetFile(BuildItem item)

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -0,0 +1,244 @@
namespace ProjectConverter.GUI
{
partial class MainWindow
{
/// <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.textBoxSource = new System.Windows.Forms.TextBox();
this.buttonSearch = new System.Windows.Forms.Button();
this.comboBoxTarget = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.comboBoxType = new System.Windows.Forms.ComboBox();
this.buttonConvert = new System.Windows.Forms.Button();
this.textBoxDestination = new System.Windows.Forms.TextBox();
this.buttonSearch2 = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.buttonClose = new System.Windows.Forms.Label();
this.buttonHelp = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// textBoxSource
//
this.textBoxSource.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.textBoxSource.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.FileSystem;
this.textBoxSource.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.textBoxSource.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxSource.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBoxSource.ForeColor = System.Drawing.Color.White;
this.textBoxSource.Location = new System.Drawing.Point(59, 80);
this.textBoxSource.MinimumSize = new System.Drawing.Size(2, 25);
this.textBoxSource.Name = "textBoxSource";
this.textBoxSource.Size = new System.Drawing.Size(321, 22);
this.textBoxSource.TabIndex = 0;
this.textBoxSource.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// buttonSearch
//
this.buttonSearch.FlatAppearance.BorderColor = System.Drawing.Color.DimGray;
this.buttonSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonSearch.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonSearch.ForeColor = System.Drawing.Color.White;
this.buttonSearch.Location = new System.Drawing.Point(386, 80);
this.buttonSearch.Name = "buttonSearch";
this.buttonSearch.Size = new System.Drawing.Size(68, 22);
this.buttonSearch.TabIndex = 1;
this.buttonSearch.Text = "Search";
this.buttonSearch.UseVisualStyleBackColor = true;
this.buttonSearch.Click += new System.EventHandler(this.ButtonSearchClick);
//
// comboBoxTarget
//
this.comboBoxTarget.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.comboBoxTarget.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.comboBoxTarget.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.comboBoxTarget.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.comboBoxTarget.ForeColor = System.Drawing.Color.White;
this.comboBoxTarget.FormattingEnabled = true;
this.comboBoxTarget.Items.AddRange(new object[] {
"XNA -> ANX",
"ANX -> XNA"});
this.comboBoxTarget.Location = new System.Drawing.Point(281, 145);
this.comboBoxTarget.Name = "comboBoxTarget";
this.comboBoxTarget.Size = new System.Drawing.Size(159, 21);
this.comboBoxTarget.TabIndex = 3;
//
// label1
//
this.label1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 34);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(462, 43);
this.label1.TabIndex = 4;
this.label1.Text = "Welcome! This tool enables you to convert your existing XNA projects to ANX proje" +
"cts.\r\nPlease select the project file you want to convert below:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label2
//
this.label2.Location = new System.Drawing.Point(56, 112);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(384, 27);
this.label2.TabIndex = 5;
this.label2.Text = "Now, please choose the format you want to convert this project to:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// comboBoxType
//
this.comboBoxType.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
this.comboBoxType.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
this.comboBoxType.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.comboBoxType.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.comboBoxType.ForeColor = System.Drawing.Color.White;
this.comboBoxType.FormattingEnabled = true;
this.comboBoxType.Items.AddRange(new object[] {
"Application",
"Content Project"});
this.comboBoxType.Location = new System.Drawing.Point(59, 145);
this.comboBoxType.Name = "comboBoxType";
this.comboBoxType.Size = new System.Drawing.Size(176, 21);
this.comboBoxType.TabIndex = 6;
//
// buttonConvert
//
this.buttonConvert.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonConvert.Location = new System.Drawing.Point(100, 221);
this.buttonConvert.Name = "buttonConvert";
this.buttonConvert.Size = new System.Drawing.Size(296, 39);
this.buttonConvert.TabIndex = 7;
this.buttonConvert.Text = "Convert Project";
this.buttonConvert.UseVisualStyleBackColor = true;
this.buttonConvert.Click += new System.EventHandler(this.ButtonConvertClick);
//
// textBoxDestination
//
this.textBoxDestination.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.textBoxDestination.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBoxDestination.ForeColor = System.Drawing.Color.White;
this.textBoxDestination.Location = new System.Drawing.Point(59, 193);
this.textBoxDestination.Name = "textBoxDestination";
this.textBoxDestination.Size = new System.Drawing.Size(321, 22);
this.textBoxDestination.TabIndex = 9;
//
// buttonSearch2
//
this.buttonSearch2.FlatAppearance.BorderColor = System.Drawing.Color.DimGray;
this.buttonSearch2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.buttonSearch2.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonSearch2.ForeColor = System.Drawing.Color.White;
this.buttonSearch2.Location = new System.Drawing.Point(386, 193);
this.buttonSearch2.Name = "buttonSearch2";
this.buttonSearch2.Size = new System.Drawing.Size(68, 22);
this.buttonSearch2.TabIndex = 10;
this.buttonSearch2.Text = "Search";
this.buttonSearch2.UseVisualStyleBackColor = true;
this.buttonSearch2.Click += new System.EventHandler(this.Button1Click);
//
// label3
//
this.label3.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(15, 5);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(469, 21);
this.label3.TabIndex = 11;
this.label3.Text = "ANX Project Converter";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.label3.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Label3MouseDown);
this.label3.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Label3MouseMove);
this.label3.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Label3MouseUp);
//
// buttonClose
//
this.buttonClose.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonClose.Location = new System.Drawing.Point(473, 3);
this.buttonClose.Name = "buttonClose";
this.buttonClose.Size = new System.Drawing.Size(20, 20);
this.buttonClose.TabIndex = 12;
this.buttonClose.Text = "X";
this.buttonClose.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.buttonClose.Click += new System.EventHandler(this.ButtonCloseClick);
this.buttonClose.MouseEnter += new System.EventHandler(this.LabelMouseEnter);
this.buttonClose.MouseLeave += new System.EventHandler(this.LabelMouseLeave);
//
// buttonHelp
//
this.buttonHelp.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.buttonHelp.Location = new System.Drawing.Point(449, 3);
this.buttonHelp.Name = "buttonHelp";
this.buttonHelp.Size = new System.Drawing.Size(20, 20);
this.buttonHelp.TabIndex = 14;
this.buttonHelp.Text = "?";
this.buttonHelp.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.buttonHelp.Click += new System.EventHandler(this.ButtonHelpClick);
this.buttonHelp.MouseEnter += new System.EventHandler(this.LabelMouseEnter);
this.buttonHelp.MouseLeave += new System.EventHandler(this.LabelMouseLeave);
//
// MainWindow
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.ClientSize = new System.Drawing.Size(496, 269);
this.Controls.Add(this.buttonHelp);
this.Controls.Add(this.buttonClose);
this.Controls.Add(this.label3);
this.Controls.Add(this.buttonSearch2);
this.Controls.Add(this.textBoxDestination);
this.Controls.Add(this.buttonConvert);
this.Controls.Add(this.comboBoxType);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.comboBoxTarget);
this.Controls.Add(this.buttonSearch);
this.Controls.Add(this.textBoxSource);
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.ForeColor = System.Drawing.Color.White;
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.MaximizeBox = false;
this.Name = "MainWindow";
this.Text = "ANX Project Converter";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBoxSource;
private System.Windows.Forms.Button buttonSearch;
private System.Windows.Forms.ComboBox comboBoxTarget;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox comboBoxType;
private System.Windows.Forms.Button buttonConvert;
private System.Windows.Forms.TextBox textBoxDestination;
private System.Windows.Forms.Button buttonSearch2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label buttonHelp;
private System.Windows.Forms.Label buttonClose;
}
}

View File

@ -0,0 +1,185 @@
#region Using Statements
using System;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Windows.Forms;
#endregion
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ProjectConverter.GUI
{
public partial class MainWindow : Form
{
private Point _lastPos;
private bool _mouseDown;
public MainWindow()
{
InitializeComponent();
}
private void ButtonConvertClick(object sender, EventArgs e)
{
string fileExt = Path.GetExtension(textBoxSource.Text).ToLowerInvariant();
try
{
switch (comboBoxType.SelectedIndex)
{
case 0: //Application
switch (comboBoxTarget.SelectedIndex)
{
case 0:
foreach (
var converter in
Program.Converters.Where(converter => converter.Name.Equals("xna2anx")))
{
if (!fileExt.Equals(".sln"))
converter.ConvertProject(textBoxSource.Text, textBoxDestination.Text);
else
converter.ConvertAllProjects(textBoxSource.Text, textBoxDestination.Text);
}
break;
case 1:
foreach (
var converter in
Program.Converters.Where(converter => converter.Name.Equals("anx2xna")))
{
if (!fileExt.Equals(".sln"))
converter.ConvertProject(textBoxSource.Text, textBoxDestination.Text);
else
converter.ConvertAllProjects(textBoxSource.Text, textBoxDestination.Text);
}
break;
}
break;
case 1: //Content project
switch (comboBoxTarget.SelectedIndex)
{
case 0:
foreach (
var converter in
Program.Converters.Where(converter => converter.Name.Equals("content2anx")))
{
if (!fileExt.Equals(".sln"))
converter.ConvertProject(textBoxSource.Text, textBoxDestination.Text);
else
converter.ConvertAllProjects(textBoxSource.Text, textBoxDestination.Text);
}
break;
case 1:
foreach (
var converter in
Program.Converters.Where(converter => converter.Name.Equals("content2xna")))
{
if (!fileExt.Equals(".sln"))
converter.ConvertAnxContentProject(textBoxSource.Text, textBoxDestination.Text);
else
converter.ConvertAllProjects(textBoxSource.Text, textBoxDestination.Text);
}
break;
}
break;
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message + "\n" + ex.StackTrace, "Conversion error", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
MessageBox.Show("Conversion successful!", "Info", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void ButtonSearchClick(object sender, EventArgs e)
{
using (var openFileDialog = new OpenFileDialog())
{
openFileDialog.CheckFileExists = true;
openFileDialog.Filter =
"All supported files (*.sln, *.csproj, *.contentproj, *.cproj) | *sln; *.csproj; *.contentproj; *.cproj";
openFileDialog.Title = "Select project to convert";
openFileDialog.Multiselect = false;
if (openFileDialog.ShowDialog() == DialogResult.OK)
{
textBoxSource.Text = openFileDialog.FileName;
string fileExt = Path.GetExtension(openFileDialog.FileName).ToLowerInvariant();
switch (fileExt)
{
case ".sln":
case ".csproj":
comboBoxType.SelectedIndex = 0;
break;
case ".contentproject":
comboBoxType.SelectedIndex = 1;
comboBoxTarget.SelectedIndex = 0;
break;
case ".cproj":
comboBoxType.SelectedIndex = 1;
comboBoxTarget.SelectedIndex = 1;
break;
}
}
}
}
private void Button1Click(object sender, EventArgs e)
{
using (var folderDialog = new FolderBrowserDialog())
{
folderDialog.ShowNewFolderButton = true;
folderDialog.Description = "Select the output folder for the converted project";
if (folderDialog.ShowDialog() == DialogResult.OK)
textBoxDestination.Text = folderDialog.SelectedPath;
}
}
private void ButtonHelpClick(object sender, EventArgs e)
{
Process.Start("http://anxframework.codeplex.com/wikipage?title=HowTo%2fConvertXna");
}
private void ButtonCloseClick(object sender, EventArgs e)
{
Application.Exit();
}
private void LabelMouseEnter(object sender, EventArgs e)
{
((Label)sender).BackColor = Color.Green;
}
private void LabelMouseLeave(object sender, EventArgs e)
{
((Label)sender).BackColor = Color.FromArgb(64, 64, 64);
}
#region WindowMovement
private void Label3MouseDown(object sender, MouseEventArgs e)
{
_mouseDown = true;
_lastPos = MousePosition;
}
private void Label3MouseUp(object sender, MouseEventArgs e)
{
_mouseDown = false;
}
private void Label3MouseMove(object sender, MouseEventArgs e)
{
if (!_mouseDown) return;
int xoffset = MousePosition.X - _lastPos.X;
int yoffset = MousePosition.Y - _lastPos.Y;
Left += xoffset;
Top += yoffset;
_lastPos = MousePosition;
}
#endregion
}
}

View File

@ -2,6 +2,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Windows.Forms;
using ProjectConverter.GUI;
using ProjectConverter.Platforms; using ProjectConverter.Platforms;
#endregion #endregion
@ -14,7 +16,7 @@ namespace ProjectConverter
{ {
static class Program static class Program
{ {
private static readonly Converter[] Converters = new Converter[] public static readonly Converter[] Converters = new Converter[]
{ {
new LinuxConverter(), new LinuxConverter(),
new MetroConverter(), new MetroConverter(),
@ -39,6 +41,16 @@ namespace ProjectConverter
Directory.SetCurrentDirectory(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location)); Directory.SetCurrentDirectory(Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location));
if (args.Length == 0)
{
using (var gui = new MainWindow())
{
Application.EnableVisualStyles();
gui.ShowDialog();
}
return;
}
foreach (string arg in args) foreach (string arg in args)
{ {
string larg = arg.Trim(); string larg = arg.Trim();

View File

@ -32,12 +32,16 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationIcon>anx.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="nunit.framework, Version=2.6.1.12217, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <Reference Include="nunit.framework, Version=2.6.1.12217, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\lib\NUnit-2.6.1\bin\framework\nunit.framework.dll</HintPath> <HintPath>..\..\lib\NUnit-2.6.1\bin\framework\nunit.framework.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
@ -48,6 +52,12 @@
<Compile Include="AssemblyInfoFixer.cs" /> <Compile Include="AssemblyInfoFixer.cs" />
<Compile Include="Converter.cs" /> <Compile Include="Converter.cs" />
<Compile Include="DefinesConverter.cs" /> <Compile Include="DefinesConverter.cs" />
<Compile Include="GUI\MainWindow.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="GUI\MainWindow.Designer.cs">
<DependentUpon>MainWindow.cs</DependentUpon>
</Compile>
<Compile Include="NamespaceMapper.cs" /> <Compile Include="NamespaceMapper.cs" />
<Compile Include="Platforms\AbstractXna2AnxConverter.cs" /> <Compile Include="Platforms\AbstractXna2AnxConverter.cs" />
<Compile Include="Platforms\AnxContentProjectConverter.cs" /> <Compile Include="Platforms\AnxContentProjectConverter.cs" />
@ -75,6 +85,9 @@
<Name>ANX.Framework.Content.Pipeline</Name> <Name>ANX.Framework.Content.Pipeline</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Content Include="anx.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- 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. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -5,8 +5,8 @@ using System.Runtime.InteropServices;
// Allgemeine Informationen über eine Assembly werden über die folgenden // Allgemeine Informationen über eine Assembly werden über die folgenden
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, // Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind. // die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("ProjectConverter")] [assembly: AssemblyTitle("ANX Project Converter")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("Tool to convert existing XNA projects to ANX projects")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("ANX Developer Team")] [assembly: AssemblyCompany("ANX Developer Team")]
[assembly: AssemblyProduct("ProjectConverter")] [assembly: AssemblyProduct("ProjectConverter")]
@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.4.*")] [assembly: AssemblyVersion("1.3.0.*")]
[assembly: AssemblyFileVersion("1.2.4.0")] [assembly: AssemblyFileVersion("1.3.0.0")]

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB