Preparations for the language changes

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1780 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-04-17 13:31:56 +00:00
parent d6fc1d9649
commit 6f438b2a6c
7 changed files with 68 additions and 147 deletions

View file

@ -86,7 +86,7 @@ namespace ExternalCommand {
commandThread.Name = "Running " + presetCommand; commandThread.Name = "Running " + presetCommand;
commandThread.IsBackground = true; commandThread.IsBackground = true;
commandThread.Start(); commandThread.Start();
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, host.CoreLanguage.GetFormattedString("exported_to", Description)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString("exported_to", Description));
surface.Modified = false; surface.Modified = false;
} }
return true; return true;

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{47F23C86-604E-4CC3-8767-B3D4088F30BB}</ProjectGuid> <ProjectGuid>{47F23C86-604E-4CC3-8767-B3D4088F30BB}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -15,6 +15,26 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
@ -54,15 +74,22 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="ExternalCommandDestination.cs" /> <Compile Include="ExternalCommandDestination.cs" />
<Compile Include="ExternalCommandForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ExternalCommandPlugin.cs" /> <Compile Include="ExternalCommandPlugin.cs" />
<Compile Include="IconCache.cs" /> <Compile Include="IconCache.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ExternalCommandConfiguration.cs" /> <Compile Include="ExternalCommandConfiguration.cs" />
<Compile Include="SettingsForm.cs" /> <Compile Include="SettingsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SettingsForm.Designer.cs"> <Compile Include="SettingsForm.Designer.cs">
<DependentUpon>SettingsForm.cs</DependentUpon> <DependentUpon>SettingsForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="SettingsFormDetail.cs" /> <Compile Include="SettingsFormDetail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SettingsFormDetail.Designer.cs"> <Compile Include="SettingsFormDetail.Designer.cs">
<DependentUpon>SettingsFormDetail.cs</DependentUpon> <DependentUpon>SettingsFormDetail.cs</DependentUpon>
</Compile> </Compile>
@ -83,8 +110,27 @@ copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)bin\$(
<EmbeddedResource Include="SettingsForm.resx"> <EmbeddedResource Include="SettingsForm.resx">
<DependentUpon>SettingsForm.Designer.cs</DependentUpon> <DependentUpon>SettingsForm.Designer.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="SettingsFormDetail.resx"> </ItemGroup>
<DependentUpon>SettingsFormDetail.cs</DependentUpon> <ItemGroup>
</EmbeddedResource> <BootstrapperPackage Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 %28x86 und x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -47,13 +47,13 @@ namespace ExternalCommand {
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
this.buttonCancel = new System.Windows.Forms.Button(); this.buttonCancel = new GreenshotPlugin.Controls.GreenshotButton();
this.buttonOk = new System.Windows.Forms.Button(); this.buttonOk = new GreenshotPlugin.Controls.GreenshotButton();
this.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new GreenshotPlugin.Controls.GreenshotButton();
this.button2 = new System.Windows.Forms.Button(); this.button2 = new GreenshotPlugin.Controls.GreenshotButton();
this.button4 = new System.Windows.Forms.Button(); this.button4 = new GreenshotPlugin.Controls.GreenshotButton();
this.SuspendLayout(); this.SuspendLayout();
// //
// buttonCancel // buttonCancel
@ -142,18 +142,16 @@ namespace ExternalCommand {
this.Controls.Add(this.listView1); this.Controls.Add(this.listView1);
this.Controls.Add(this.buttonOk); this.Controls.Add(this.buttonOk);
this.Controls.Add(this.buttonCancel); this.Controls.Add(this.buttonCancel);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "SettingsForm"; this.Name = "SettingsForm";
this.Text = "Command Editor";
this.ResumeLayout(false); this.ResumeLayout(false);
} }
private System.Windows.Forms.Button button4; private GreenshotPlugin.Controls.GreenshotButton button4;
private System.Windows.Forms.Button button2; private GreenshotPlugin.Controls.GreenshotButton button2;
private System.Windows.Forms.Button button1; private GreenshotPlugin.Controls.GreenshotButton button1;
private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.ColumnHeader columnHeader1;
private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Button buttonOk; private GreenshotPlugin.Controls.GreenshotButton buttonOk;
private System.Windows.Forms.Button buttonCancel; private GreenshotPlugin.Controls.GreenshotButton buttonCancel;
} }
} }

View file

@ -24,14 +24,13 @@ using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using Greenshot.IniFile; using Greenshot.IniFile;
using GreenshotExternalCommandPlugin;
using GreenshotPlugin.Core; using GreenshotPlugin.Core;
namespace ExternalCommand { namespace ExternalCommand {
/// <summary> /// <summary>
/// Description of SettingsForm. /// Description of SettingsForm.
/// </summary> /// </summary>
public partial class SettingsForm : Form { public partial class SettingsForm : ExternalCommandForm {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsForm)); private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(SettingsForm));
private static ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>(); private static ExternalCommandConfiguration config = IniConfig.GetIniSection<ExternalCommandConfiguration>();
@ -40,6 +39,7 @@ namespace ExternalCommand {
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
// //
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
UpdateView(); UpdateView();
} }

View file

@ -6,7 +6,7 @@
* *
* To change this template use Tools | Options | Coding | Edit Standard Headers. * To change this template use Tools | Options | Coding | Edit Standard Headers.
*/ */
namespace GreenshotExternalCommandPlugin namespace ExternalCommand
{ {
partial class SettingsFormDetail partial class SettingsFormDetail
{ {

View file

@ -11,16 +11,13 @@ using System.Drawing;
using System.IO; using System.IO;
using System.Windows.Forms; using System.Windows.Forms;
using ExternalCommand;
using Greenshot.IniFile; using Greenshot.IniFile;
namespace GreenshotExternalCommandPlugin namespace ExternalCommand {
{
/// <summary> /// <summary>
/// Description of SettingsFormDetail. /// Description of SettingsFormDetail.
/// </summary> /// </summary>
public partial class SettingsFormDetail : Form public partial class SettingsFormDetail : ExternalCommandForm {
{
private string commando; private string commando;
private int commandIndex; private int commandIndex;

View file

@ -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>