Start of 'About' dialog.
This commit is contained in:
parent
278697bb8b
commit
00b2baacb6
@ -293,6 +293,12 @@
|
||||
<Compile Include="Dialogs\SteamDialog.Designer.cs">
|
||||
<DependentUpon>SteamDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\ThankYou.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\ThankYou.Designer.cs">
|
||||
<DependentUpon>ThankYou.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Dialogs\TriggerFilterDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@ -710,6 +716,9 @@
|
||||
<EmbeddedResource Include="Dialogs\SteamDialog.resx">
|
||||
<DependentUpon>SteamDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\ThankYou.resx">
|
||||
<DependentUpon>ThankYou.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Dialogs\TriggerFilterDialog.resx">
|
||||
<DependentUpon>TriggerFilterDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
47
CnCTDRAMapEditor/Dialogs/ThankYou.Designer.cs
generated
Normal file
47
CnCTDRAMapEditor/Dialogs/ThankYou.Designer.cs
generated
Normal file
@ -0,0 +1,47 @@
|
||||
namespace MobiusEditor.Dialogs
|
||||
{
|
||||
partial class ThankYou
|
||||
{
|
||||
/// <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.SuspendLayout();
|
||||
//
|
||||
// ThankYou
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(422, 205);
|
||||
this.Icon = global::MobiusEditor.Properties.Resources.GameIcon00;
|
||||
this.Name = "ThankYou";
|
||||
this.Text = "Thank You!";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
21
CnCTDRAMapEditor/Dialogs/ThankYou.cs
Normal file
21
CnCTDRAMapEditor/Dialogs/ThankYou.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MobiusEditor.Dialogs
|
||||
{
|
||||
public partial class ThankYou : Form
|
||||
{
|
||||
public ThankYou()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Text = "About " + Program.ProgramVersionTitle;
|
||||
}
|
||||
}
|
||||
}
|
120
CnCTDRAMapEditor/Dialogs/ThankYou.resx
Normal file
120
CnCTDRAMapEditor/Dialogs/ThankYou.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>
|
@ -192,7 +192,7 @@ namespace MobiusEditor
|
||||
private void SetTitle()
|
||||
{
|
||||
const string noname = "Untitled";
|
||||
String mainTitle = GetProgramVersionTitle();
|
||||
String mainTitle = Program.ProgramVersionTitle;
|
||||
string updating = this.startedUpdate ? " [CHECKING FOR UPDATES]" : String.Empty;
|
||||
if (plugin == null)
|
||||
{
|
||||
@ -219,13 +219,6 @@ namespace MobiusEditor
|
||||
this.Text = string.Format("{0}{1} [{2}] - {3}{4}", mainTitle, updating, plugin.Name, mapShowName, plugin != null && plugin.Dirty ? " *" : String.Empty);
|
||||
}
|
||||
|
||||
private String GetProgramVersionTitle()
|
||||
{
|
||||
AssemblyName assn = Assembly.GetExecutingAssembly().GetName();
|
||||
System.Version currentVersion = assn.Version;
|
||||
return string.Format(Program.ProgramName + " v{0}", currentVersion);
|
||||
}
|
||||
|
||||
private void SteamUpdateTimer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
if (SteamworksUGC.IsInit)
|
||||
@ -689,7 +682,7 @@ namespace MobiusEditor
|
||||
|
||||
private void EditClearUndoRedoMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (DialogResult.Yes == MessageBox.Show("This will remove all undo/redo information. Are you sure?", GetProgramVersionTitle(), MessageBoxButtons.YesNo))
|
||||
if (DialogResult.Yes == MessageBox.Show("This will remove all undo/redo information. Are you sure?", Program.ProgramVersionTitle, MessageBoxButtons.YesNo))
|
||||
{
|
||||
url.Clear();
|
||||
}
|
||||
@ -757,7 +750,7 @@ namespace MobiusEditor
|
||||
{
|
||||
using (ErrorMessageBox emb = new ErrorMessageBox())
|
||||
{
|
||||
emb.Title = GetProgramVersionTitle();
|
||||
emb.Title = Program.ProgramVersionTitle;
|
||||
emb.Message = "Errors occurred when applying rule changes:";
|
||||
emb.Errors = errors;
|
||||
emb.StartPosition = FormStartPosition.CenterParent;
|
||||
@ -1079,7 +1072,7 @@ namespace MobiusEditor
|
||||
if (plugin != null)
|
||||
{
|
||||
String feedback = TemplateTool.RandomizeTiles(plugin, mapPanel, url);
|
||||
MessageBox.Show(feedback, GetProgramVersionTitle());
|
||||
MessageBox.Show(feedback, Program.ProgramVersionTitle);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2559,11 +2552,11 @@ namespace MobiusEditor
|
||||
private void InfoAboutMenuItem_Click(Object sender, EventArgs e)
|
||||
{
|
||||
StringBuilder editorInfo = new StringBuilder();
|
||||
editorInfo.Append(GetProgramVersionTitle()).Append('\n').Append('\n')
|
||||
editorInfo.Append(Program.ProgramVersionTitle).Append('\n').Append('\n')
|
||||
.Append(Program.ProgramInfo).Append('\n')
|
||||
.Append('\n').Append('\n')
|
||||
.Append("For info and updates, go to \"").Append(infoToolStripMenuItem.Text).Append("\" → \"").Append(InfoWebsiteMenuItem.Text).Append("\"");
|
||||
MessageBox.Show(this,editorInfo.ToString(), GetProgramVersionTitle(), MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
MessageBox.Show(this,editorInfo.ToString(), Program.ProgramVersionTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void InfoWebsiteMenuItem_Click(Object sender, EventArgs e)
|
||||
@ -2573,7 +2566,7 @@ namespace MobiusEditor
|
||||
|
||||
private async void InfoCheckForUpdatesMenuItem_Click(Object sender, EventArgs e)
|
||||
{
|
||||
string title = GetProgramVersionTitle();
|
||||
string title = Program.ProgramVersionTitle;
|
||||
if (this.startedUpdate)
|
||||
{
|
||||
MessageBox.Show(this, "Update check already started. Please wait.", title, MessageBoxButtons.OK);
|
||||
|
@ -46,6 +46,16 @@ namespace MobiusEditor
|
||||
|
||||
public static readonly String ApplicationPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
|
||||
|
||||
public static String ProgramVersionTitle
|
||||
{
|
||||
get
|
||||
{
|
||||
AssemblyName assn = Assembly.GetExecutingAssembly().GetName();
|
||||
System.Version currentVersion = assn.Version;
|
||||
return string.Format(ProgramName + " v{0}", currentVersion);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
|
Loading…
x
Reference in New Issue
Block a user