Preparations for the language changes

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1782 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-04-17 14:11:22 +00:00
commit d6c608bf65
4 changed files with 8 additions and 50 deletions

View file

@ -1,5 +1,5 @@
<?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>
<ProjectGuid>{C6988EE8-2FEE-4349-9F09-F9628A0D8965}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -51,14 +51,15 @@
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="Language.cs" />
<Compile Include="LanguageKeys.cs" />
<Compile Include="ModiInterop.cs" />
<Compile Include="OCRConfiguration.cs" />
<Compile Include="OCRDestination.cs" />
<Compile Include="OCRPlugin.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SettingsForm.cs" />
<Compile Include="SettingsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SettingsForm.Designer.cs">
<DependentUpon>SettingsForm.cs</DependentUpon>
</Compile>
@ -82,7 +83,6 @@
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
<Name>GreenshotPlugin</Name>
</ProjectReference>
<Folder Include="Languages" />
</ItemGroup>
<PropertyGroup>
<PreBuildEvent>"$(SolutionDir)\tools\TortoiseSVN\SubWCRev.exe" "$(ProjectDir)\" "$(ProjectDir)\Properties\AssemblyInfo.cs.template" "$(ProjectDir)\Properties\AssemblyInfo.cs"</PreBuildEvent>

View file

@ -1,40 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2012 Thomas Braun, Jens Klingen, Robin Krom
*
* For more information see: http://getgreenshot.org/
* The Greenshot project is hosted on Sourceforge: http://sourceforge.net/projects/greenshot/
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Threading;
using GreenshotPlugin.Core;
namespace GreenshotOCR {
/// <summary>
/// Wrapper for the language container for the Jira plugin.
/// </summary>
public class Language : LanguageContainer, ILanguage {
private static ILanguage uniqueInstance;
private const string LANGUAGE_FILENAME_PATTERN = @"language_ocrplugin-*.xml";
public static ILanguage GetInstance() {
if (uniqueInstance == null) {
uniqueInstance = new LanguageContainer(LANGUAGE_FILENAME_PATTERN);
}
return uniqueInstance;
}
}
}

View file

@ -37,7 +37,6 @@ namespace GreenshotOCR {
private static OCRConfiguration config = IniConfig.GetIniSection<OCRConfiguration>();
private const int MIN_WIDTH = 130;
private const int MIN_HEIGHT = 130;
private ILanguage lang = Language.GetInstance();
public override string Designation {
get {

View file

@ -27,7 +27,6 @@ namespace GreenshotOCR {
/// Description of SettingsForm.
/// </summary>
public partial class SettingsForm : Form {
private ILanguage language = Language.GetInstance();
private OCRConfiguration config;
public SettingsForm(string [] languages, OCRConfiguration config) {
@ -36,7 +35,7 @@ namespace GreenshotOCR {
//
this.config = config;
InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
this.Icon = GreenshotResources.getGreenshotIcon();
initializeComponentText();
comboBox_languages.Items.Clear();
@ -61,8 +60,8 @@ namespace GreenshotOCR {
}
private void initializeComponentText() {
this.label_language.Text = language.GetString(LangKey.language);
this.checkBox_orientImage.Text = language.GetString(LangKey.orient_image);
this.label_language.Text = Language.GetString("ocr", LangKey.language);
this.checkBox_orientImage.Text = Language.GetString("ocr", LangKey.orient_image);
}
void ButtonCancelClick(object sender, EventArgs e) {