Preparations for the language changes

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1783 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-04-17 14:16:10 +00:00
parent d6c608bf65
commit 53af559d22
44 changed files with 472 additions and 874 deletions

View file

@ -1,55 +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 GreenshotPlugin.Core;
using Greenshot.IniFile;
namespace Greenshot.Configuration {
/// <summary>
/// Wrapper for the language container for the Greenshot base.
/// </summary>
public class Language : LanguageContainer, ILanguage {
private static ILanguage uniqueInstance;
private const string LANGUAGE_FILENAME_PATTERN = @"language-*.xml";
public static ILanguage GetInstance() {
return GetInstance(true);
}
public static ILanguage GetInstance(bool freeResources) {
if(uniqueInstance == null) {
uniqueInstance = new LanguageContainer();
uniqueInstance.LanguageFilePattern = LANGUAGE_FILENAME_PATTERN;
uniqueInstance.Load();
CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
if (string.IsNullOrEmpty(conf.Language)) {
LanguageContainer.SynchronizeLanguageToCulture();
} else {
LanguageContainer.SetGlobalLanguage(conf.Language);
}
if (freeResources) {
uniqueInstance.FreeResources();
}
}
return uniqueInstance;
}
}
}

View file

@ -39,8 +39,6 @@ namespace Greenshot.Destinations {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public const string DESIGNATION = "Clipboard"; public const string DESIGNATION = "Clipboard";
private ILanguage lang = Language.GetInstance();
public override string Designation { public override string Designation {
get { get {
return DESIGNATION; return DESIGNATION;
@ -49,7 +47,7 @@ namespace Greenshot.Destinations {
public override string Description { public override string Description {
get { get {
return lang.GetString(LangKey.settings_destination_clipboard); return Language.GetString(LangKey.settings_destination_clipboard);
} }
} }
public override int Priority { public override int Priority {
@ -76,10 +74,10 @@ namespace Greenshot.Destinations {
ClipboardHelper.SetClipboardData(image); ClipboardHelper.SetClipboardData(image);
surface.Modified = false; surface.Modified = false;
} }
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetString(LangKey.editor_storedtoclipboard)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetString(LangKey.editor_storedtoclipboard));
return true; return true;
} catch (Exception) { } catch (Exception) {
surface.SendMessageEvent(this, SurfaceMessageTyp.Error, lang.GetString(LangKey.editor_clipboardfailed)); surface.SendMessageEvent(this, SurfaceMessageTyp.Error, Language.GetString(LangKey.editor_clipboardfailed));
} }
return false; return false;

View file

@ -40,7 +40,6 @@ namespace Greenshot.Destinations {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(EditorDestination)); private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(EditorDestination));
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public const string DESIGNATION = "Editor"; public const string DESIGNATION = "Editor";
private ILanguage lang = Language.GetInstance();
private IImageEditor editor = null; private IImageEditor editor = null;
private static Image greenshotIcon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon().ToBitmap(); private static Image greenshotIcon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon().ToBitmap();
@ -60,9 +59,9 @@ namespace Greenshot.Destinations {
public override string Description { public override string Description {
get { get {
if (editor == null) { if (editor == null) {
return lang.GetString(LangKey.settings_destination_editor); return Language.GetString(LangKey.settings_destination_editor);
} else { } else {
return lang.GetString(LangKey.settings_destination_editor) + " - " + editor.CaptureDetails.Title; return Language.GetString(LangKey.settings_destination_editor) + " - " + editor.CaptureDetails.Title;
} }
} }
} }
@ -114,7 +113,7 @@ namespace Greenshot.Destinations {
using (Bitmap image = (Bitmap)surface.GetImageForExport()) { using (Bitmap image = (Bitmap)surface.GetImageForExport()) {
editor.Surface.AddBitmapContainer(image, 10, 10); editor.Surface.AddBitmapContainer(image, 10, 10);
} }
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString(LangKey.exported_to, Description));
} }
return false; return false;
} }

View file

@ -49,7 +49,6 @@ namespace Greenshot.Destinations {
public const string DESIGNATION = "EMail"; public const string DESIGNATION = "EMail";
private string outlookInspectorCaption; private string outlookInspectorCaption;
private OlObjectClass outlookInspectorType; private OlObjectClass outlookInspectorType;
private ILanguage lang = Language.GetInstance();
static EmailDestination() { static EmailDestination() {
// Logic to decide what email implementation we use // Logic to decide what email implementation we use
@ -110,7 +109,7 @@ namespace Greenshot.Destinations {
get { get {
// Make sure there is some kind of "mail" name // Make sure there is some kind of "mail" name
if (mapiClient == null) { if (mapiClient == null) {
mapiClient = lang.GetString(LangKey.editor_email); mapiClient = Language.GetString(LangKey.editor_email);
} }
if (outlookInspectorCaption == null) { if (outlookInspectorCaption == null) {
@ -225,7 +224,7 @@ namespace Greenshot.Destinations {
} }
OutlookEmailExporter.ExportToOutlook(conf.OutlookEmailFormat, tmpFile, captureDetails.Title, attachmentName); OutlookEmailExporter.ExportToOutlook(conf.OutlookEmailFormat, tmpFile, captureDetails.Title, attachmentName);
} }
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString(LangKey.exported_to, Description));
surface.Modified = false; surface.Modified = false;
// Don't know how to handle a cancel in the email // Don't know how to handle a cancel in the email

View file

@ -41,7 +41,6 @@ namespace Greenshot.Destinations {
private static string exePath = null; private static string exePath = null;
private static Image applicationIcon = null; private static Image applicationIcon = null;
private static Image workbookIcon = null; private static Image workbookIcon = null;
private ILanguage lang = Language.GetInstance();
private string workbookName = null; private string workbookName = null;
static ExcelDestination() { static ExcelDestination() {
@ -122,7 +121,7 @@ namespace Greenshot.Destinations {
} else { } else {
ExcelExporter.InsertIntoNewWorkbook(tmpFile); ExcelExporter.InsertIntoNewWorkbook(tmpFile);
} }
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString(LangKey.exported_to, Description));
surface.Modified = false; surface.Modified = false;
return true; return true;
} }

View file

@ -38,7 +38,6 @@ namespace Greenshot.Destinations {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(FileDestination)); private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(FileDestination));
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public const string DESIGNATION = "FileNoDialog"; public const string DESIGNATION = "FileNoDialog";
private ILanguage lang = Language.GetInstance();
public override string Designation { public override string Designation {
get { get {
@ -48,7 +47,7 @@ namespace Greenshot.Destinations {
public override string Description { public override string Description {
get { get {
return lang.GetString(LangKey.quicksettings_destination_file); return Language.GetString(LangKey.quicksettings_destination_file);
} }
} }
@ -90,7 +89,7 @@ namespace Greenshot.Destinations {
} catch (Exception e) { } catch (Exception e) {
LOG.Error("Error saving screenshot!", e); LOG.Error("Error saving screenshot!", e);
// Show the problem // Show the problem
MessageBox.Show(lang.GetString(LangKey.error_save), lang.GetString(LangKey.error)); MessageBox.Show(Language.GetString(LangKey.error_save), Language.GetString(LangKey.error));
// when save failed we present a SaveWithDialog // when save failed we present a SaveWithDialog
fullPath = ImageOutput.SaveWithDialog(image, captureDetails); fullPath = ImageOutput.SaveWithDialog(image, captureDetails);
outputMade = (fullPath != null); outputMade = (fullPath != null);
@ -101,7 +100,7 @@ namespace Greenshot.Destinations {
surface.LastSaveFullPath = fullPath; surface.LastSaveFullPath = fullPath;
surface.Modified = false; surface.Modified = false;
captureDetails.Filename = fullPath; captureDetails.Filename = fullPath;
surface.SendMessageEvent(this, SurfaceMessageTyp.FileSaved, lang.GetFormattedString(LangKey.editor_imagesaved,surface.LastSaveFullPath)); surface.SendMessageEvent(this, SurfaceMessageTyp.FileSaved, Language.GetFormattedString(LangKey.editor_imagesaved, surface.LastSaveFullPath));
} else { } else {
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, ""); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, "");
} }

View file

@ -39,8 +39,6 @@ namespace Greenshot.Destinations {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public const string DESIGNATION = "FileDialog"; public const string DESIGNATION = "FileDialog";
private ILanguage lang = Language.GetInstance();
public override string Designation { public override string Designation {
get { get {
return DESIGNATION; return DESIGNATION;
@ -49,7 +47,7 @@ namespace Greenshot.Destinations {
public override string Description { public override string Description {
get { get {
return lang.GetString(LangKey.settings_destination_fileas); return Language.GetString(LangKey.settings_destination_fileas);
} }
} }
@ -80,7 +78,7 @@ namespace Greenshot.Destinations {
surface.Modified = false; surface.Modified = false;
surface.LastSaveFullPath = savedTo; surface.LastSaveFullPath = savedTo;
captureDetails.Filename = savedTo; captureDetails.Filename = savedTo;
surface.SendMessageEvent(this, SurfaceMessageTyp.FileSaved, lang.GetFormattedString(LangKey.editor_imagesaved,surface.LastSaveFullPath)); surface.SendMessageEvent(this, SurfaceMessageTyp.FileSaved, Language.GetFormattedString(LangKey.editor_imagesaved, surface.LastSaveFullPath));
} }
} }
return savedTo != null; return savedTo != null;

View file

@ -39,7 +39,6 @@ namespace Greenshot.Destinations {
private static string exePath = null; private static string exePath = null;
private static Image applicationIcon = null; private static Image applicationIcon = null;
private static Image notebookIcon = null; private static Image notebookIcon = null;
private ILanguage lang = Language.GetInstance();
private OneNotePage page = null; private OneNotePage page = null;
static OneNoteDestination() { static OneNoteDestination() {

View file

@ -39,7 +39,6 @@ namespace Greenshot.Destinations {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(PickerDestination)); private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(PickerDestination));
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public const string DESIGNATION = "Picker"; public const string DESIGNATION = "Picker";
private static ILanguage lang = Language.GetInstance();
public override string Designation { public override string Designation {
get { get {
@ -49,7 +48,7 @@ namespace Greenshot.Destinations {
public override string Description { public override string Description {
get { get {
return lang.GetString(LangKey.settings_destination_picker); return Language.GetString(LangKey.settings_destination_picker);
} }
} }
@ -102,7 +101,7 @@ namespace Greenshot.Destinations {
} }
// Close // Close
menu.Items.Add(new ToolStripSeparator()); menu.Items.Add(new ToolStripSeparator());
ToolStripMenuItem closeItem = new ToolStripMenuItem(lang.GetString(LangKey.editor_close)); ToolStripMenuItem closeItem = new ToolStripMenuItem(Language.GetString(LangKey.editor_close));
closeItem.Image = ((System.Drawing.Image)(new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorForm)).GetObject("closeToolStripMenuItem.Image"))); closeItem.Image = ((System.Drawing.Image)(new System.ComponentModel.ComponentResourceManager(typeof(ImageEditorForm)).GetObject("closeToolStripMenuItem.Image")));
closeItem.Click += delegate { closeItem.Click += delegate {
// This menu entry is the close itself, we can dispose the surface // This menu entry is the close itself, we can dispose the surface

View file

@ -41,7 +41,6 @@ namespace Greenshot.Destinations {
private static string exePath = null; private static string exePath = null;
private static Image applicationIcon = null; private static Image applicationIcon = null;
private static Image presentationIcon = null; private static Image presentationIcon = null;
private ILanguage lang = Language.GetInstance();
private string presentationName = null; private string presentationName = null;
static PowerpointDestination() { static PowerpointDestination() {
@ -138,7 +137,7 @@ namespace Greenshot.Destinations {
} }
PowerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails.Title); PowerpointExporter.InsertIntoNewPresentation(tmpFile, imageSize, captureDetails.Title);
} }
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString(LangKey.exported_to, Description));
surface.Modified = false; surface.Modified = false;
return true; return true;
} }

View file

@ -40,8 +40,6 @@ namespace Greenshot.Destinations {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
public const string DESIGNATION = "Printer"; public const string DESIGNATION = "Printer";
private ILanguage lang = Language.GetInstance();
public override string Designation { public override string Designation {
get { get {
return DESIGNATION; return DESIGNATION;
@ -50,7 +48,7 @@ namespace Greenshot.Destinations {
public override string Description { public override string Description {
get { get {
return lang.GetString(LangKey.settings_destination_printer); return Language.GetString(LangKey.settings_destination_printer);
} }
} }
@ -78,7 +76,7 @@ namespace Greenshot.Destinations {
printerSettings = new PrintHelper(image, captureDetails).PrintWithDialog(); printerSettings = new PrintHelper(image, captureDetails).PrintWithDialog();
if (printerSettings != null) { if (printerSettings != null) {
surface.Modified = false; surface.Modified = false;
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.editor_senttoprinter, printerSettings.PrinterName)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString(LangKey.editor_senttoprinter, printerSettings.PrinterName));
} }
} }

View file

@ -42,7 +42,6 @@ namespace Greenshot.Destinations {
private static string exePath = null; private static string exePath = null;
private static Image applicationIcon = null; private static Image applicationIcon = null;
private static Image documentIcon = null; private static Image documentIcon = null;
private ILanguage lang = Language.GetInstance();
private string documentCaption = null; private string documentCaption = null;
static WordDestination() { static WordDestination() {
@ -137,7 +136,7 @@ namespace Greenshot.Destinations {
} }
WordExporter.InsertIntoNewDocument(tmpFile); WordExporter.InsertIntoNewDocument(tmpFile);
} }
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, lang.GetFormattedString(LangKey.exported_to, Description)); surface.SendMessageEvent(this, SurfaceMessageTyp.Info, Language.GetFormattedString(LangKey.exported_to, Description));
surface.Modified = false; surface.Modified = false;
return true; return true;

View file

@ -374,7 +374,6 @@ namespace Greenshot.Drawing {
/// </summary> /// </summary>
/// <param name="menu"></param> /// <param name="menu"></param>
public virtual void AddContextMenuItems(ContextMenuStrip menu, Surface surface) { public virtual void AddContextMenuItems(ContextMenuStrip menu, Surface surface) {
ILanguage lang = Language.GetInstance();
bool push = surface.Elements.CanPushDown(this); bool push = surface.Elements.CanPushDown(this);
bool pull = surface.Elements.CanPullUp(this); bool pull = surface.Elements.CanPullUp(this);
@ -382,13 +381,13 @@ namespace Greenshot.Drawing {
// Pull "up" // Pull "up"
if (pull) { if (pull) {
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_uptotop)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_uptotop));
item.Click += delegate { item.Click += delegate {
surface.Elements.PullElementsToTop(this); surface.Elements.PullElementsToTop(this);
surface.Elements.Invalidate(); surface.Elements.Invalidate();
}; };
menu.Items.Add(item); menu.Items.Add(item);
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_uponelevel)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_uponelevel));
item.Click += delegate { item.Click += delegate {
surface.Elements.PullElementsUp(this); surface.Elements.PullElementsUp(this);
surface.Elements.Invalidate(); surface.Elements.Invalidate();
@ -397,13 +396,13 @@ namespace Greenshot.Drawing {
} }
// Push "down" // Push "down"
if (push) { if (push) {
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_downtobottom)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_downtobottom));
item.Click += delegate { item.Click += delegate {
surface.Elements.PushElementsToBottom(this); surface.Elements.PushElementsToBottom(this);
surface.Elements.Invalidate(); surface.Elements.Invalidate();
}; };
menu.Items.Add(item); menu.Items.Add(item);
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_downonelevel)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_downonelevel));
item.Click += delegate { item.Click += delegate {
surface.Elements.PushElementsDown(this); surface.Elements.PushElementsDown(this);
surface.Elements.Invalidate(); surface.Elements.Invalidate();
@ -412,7 +411,7 @@ namespace Greenshot.Drawing {
} }
// Duplicate // Duplicate
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_duplicate)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_duplicate));
item.Click += delegate { item.Click += delegate {
DrawableContainerList dcs = this.Clone(); DrawableContainerList dcs = this.Clone();
dcs.Parent = surface; dcs.Parent = surface;
@ -424,7 +423,7 @@ namespace Greenshot.Drawing {
menu.Items.Add(item); menu.Items.Add(item);
// Copy // Copy
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_copytoclipboard)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_copytoclipboard));
item.Image = ((System.Drawing.Image)(editorFormResources.GetObject("copyToolStripMenuItem.Image"))); item.Image = ((System.Drawing.Image)(editorFormResources.GetObject("copyToolStripMenuItem.Image")));
item.Click += delegate { item.Click += delegate {
ClipboardHelper.SetClipboardData(typeof(DrawableContainerList), this); ClipboardHelper.SetClipboardData(typeof(DrawableContainerList), this);
@ -432,7 +431,7 @@ namespace Greenshot.Drawing {
menu.Items.Add(item); menu.Items.Add(item);
// Cut // Cut
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_cuttoclipboard)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_cuttoclipboard));
item.Image = ((System.Drawing.Image)(editorFormResources.GetObject("btnCut.Image"))); item.Image = ((System.Drawing.Image)(editorFormResources.GetObject("btnCut.Image")));
item.Click += delegate { item.Click += delegate {
ClipboardHelper.SetClipboardData(typeof(DrawableContainerList), this); ClipboardHelper.SetClipboardData(typeof(DrawableContainerList), this);
@ -443,7 +442,7 @@ namespace Greenshot.Drawing {
menu.Items.Add(item); menu.Items.Add(item);
// Delete // Delete
item = new ToolStripMenuItem(lang.GetString(LangKey.editor_deleteelement)); item = new ToolStripMenuItem(Language.GetString(LangKey.editor_deleteelement));
item.Image = ((System.Drawing.Image)(editorFormResources.GetObject("removeObjectToolStripMenuItem.Image"))); item.Image = ((System.Drawing.Image)(editorFormResources.GetObject("removeObjectToolStripMenuItem.Image")));
item.Click += delegate { item.Click += delegate {
foreach(DrawableContainer container in this) { foreach(DrawableContainer container in this) {

View file

@ -20,7 +20,7 @@
*/ */
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
using Greenshot.Configuration;
namespace Greenshot { namespace Greenshot {
partial class AboutForm { partial class AboutForm {
@ -236,18 +236,5 @@ namespace Greenshot {
private System.Windows.Forms.Label lblLicense; private System.Windows.Forms.Label lblLicense;
private System.Windows.Forms.Label lblTitle; private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
void LinkLabelClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {
openLink((LinkLabel)sender);
}
private void openLink(LinkLabel link) {
try {
link.LinkVisited = true;
System.Diagnostics.Process.Start(link.Text);
} catch (Exception) {
MessageBox.Show(lang.GetFormattedString(LangKey.error_openlink, link.Text),lang.GetString(LangKey.error));
}
}
} }
} }

View file

@ -33,8 +33,6 @@ namespace Greenshot {
/// Description of AboutForm. /// Description of AboutForm.
/// </summary> /// </summary>
public partial class AboutForm : Form { public partial class AboutForm : Form {
private ILanguage lang;
public AboutForm() { public AboutForm() {
// //
// The InitializeComponent() call is required for Windows Forms designer support. // The InitializeComponent() call is required for Windows Forms designer support.
@ -45,18 +43,30 @@ namespace Greenshot {
Version v = Assembly.GetExecutingAssembly().GetName().Version; Version v = Assembly.GetExecutingAssembly().GetName().Version;
// Format is like this: AssemblyVersion("Major.Minor.Build.Revision")] // Format is like this: AssemblyVersion("Major.Minor.Build.Revision")]
lblTitle.Text = "Greenshot " + v.Major + "." + v.Minor + "." + v.Build + " Build " + v.Revision + (IniConfig.IsPortable?" Portable":"") + (" (" + OSInfo.Bits +" bit)"); lblTitle.Text = "Greenshot " + v.Major + "." + v.Minor + "." + v.Build + " Build " + v.Revision + (IniConfig.IsPortable?" Portable":"") + (" (" + OSInfo.Bits +" bit)");
lang = Language.GetInstance();
updateUI(); updateUI();
} }
void updateUI() { void updateUI() {
this.Text = lang.GetString(LangKey.about_title); this.Text = Language.GetString(LangKey.about_title);
this.lblLicense.Text = lang.GetString(LangKey.about_license); this.lblLicense.Text = Language.GetString(LangKey.about_license);
this.lblHost.Text = lang.GetString(LangKey.about_host); this.lblHost.Text = Language.GetString(LangKey.about_host);
this.lblBugs.Text = lang.GetString(LangKey.about_bugs); this.lblBugs.Text = Language.GetString(LangKey.about_bugs);
this.lblDonations.Text = lang.GetString(LangKey.about_donations); this.lblDonations.Text = Language.GetString(LangKey.about_donations);
this.lblIcons.Text = lang.GetString(LangKey.about_icons); this.lblIcons.Text = Language.GetString(LangKey.about_icons);
this.lblTranslation.Text = lang.GetString(LangKey.about_translation); this.lblTranslation.Text = Language.GetString(LangKey.about_translation);
}
void LinkLabelClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {
openLink((LinkLabel)sender);
}
private void openLink(LinkLabel link) {
try {
link.LinkVisited = true;
System.Diagnostics.Process.Start(link.Text);
} catch (Exception) {
MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, link.Text), Language.GetString(LangKey.error));
}
} }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {

View file

@ -26,14 +26,12 @@ using GreenshotPlugin.Core;
namespace Greenshot.Forms { namespace Greenshot.Forms {
public partial class BugReportForm : Form { public partial class BugReportForm : Form {
private ILanguage lang;
private BugReportForm() { private BugReportForm() {
// //
// 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(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
lang = Language.GetInstance();
UpdateUI(); UpdateUI();
WindowDetails.ToForeground(this.Handle); WindowDetails.ToForeground(this.Handle);
} }
@ -44,9 +42,9 @@ namespace Greenshot.Forms {
} }
void UpdateUI() { void UpdateUI() {
this.Text = lang.GetString(LangKey.bugreport_title); this.Text = Language.GetString(LangKey.bugreport_title);
this.labelBugReportInfo.Text = lang.GetString(LangKey.bugreport_info); this.labelBugReportInfo.Text = Language.GetString(LangKey.bugreport_info);
this.btnClose.Text = lang.GetString(LangKey.bugreport_cancel); this.btnClose.Text = Language.GetString(LangKey.bugreport_cancel);
} }
void LinkLblBugsLinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { void LinkLblBugsLinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) {
@ -58,7 +56,7 @@ namespace Greenshot.Forms {
link.LinkVisited = true; link.LinkVisited = true;
System.Diagnostics.Process.Start(link.Text); System.Diagnostics.Process.Start(link.Text);
} catch (Exception) { } catch (Exception) {
MessageBox.Show(lang.GetFormattedString(LangKey.error_openlink, link.Text),lang.GetString(LangKey.error)); MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, link.Text), Language.GetString(LangKey.error));
} }
} }
} }

View file

@ -58,7 +58,6 @@ namespace Greenshot.Forms {
private bool mouseDown = false; private bool mouseDown = false;
private Rectangle captureRect = Rectangle.Empty; private Rectangle captureRect = Rectangle.Empty;
private ICapture capture = null; private ICapture capture = null;
private ILanguage lang = Language.GetInstance();
private Point previousMousePos = Point.Empty; private Point previousMousePos = Point.Empty;
private FixMode fixMode = FixMode.None; private FixMode fixMode = FixMode.None;

View file

@ -38,7 +38,6 @@ namespace Greenshot {
private ColorDialog() { private ColorDialog() {
this.SuspendLayout(); this.SuspendLayout();
InitializeComponent(); InitializeComponent();
lang = Language.GetInstance();
updateUI(); updateUI();
this.SuspendLayout(); this.SuspendLayout();
this.createColorPalette(5,5,15,15); this.createColorPalette(5,5,15,15);
@ -54,7 +53,6 @@ namespace Greenshot {
return uniqueInstance; return uniqueInstance;
} }
private ILanguage lang;
private List<Button> colorButtons = new List<Button>(); private List<Button> colorButtons = new List<Button>();
private List<Button> recentColorButtons = new List<Button>(); private List<Button> recentColorButtons = new List<Button>();
private ToolTip toolTip = new ToolTip(); private ToolTip toolTip = new ToolTip();
@ -66,15 +64,15 @@ namespace Greenshot {
} }
private void updateUI() { private void updateUI() {
this.Text = lang.GetString(LangKey.colorpicker_title); this.Text = Language.GetString(LangKey.colorpicker_title);
this.btnApply.Text = lang.GetString(LangKey.colorpicker_apply); this.btnApply.Text = Language.GetString(LangKey.colorpicker_apply);
this.btnTransparent.Text = lang.GetString(LangKey.colorpicker_transparent); this.btnTransparent.Text = Language.GetString(LangKey.colorpicker_transparent);
this.labelHtmlColor.Text = lang.GetString(LangKey.colorpicker_htmlcolor); this.labelHtmlColor.Text = Language.GetString(LangKey.colorpicker_htmlcolor);
this.labelRed.Text = lang.GetString(LangKey.colorpicker_red); this.labelRed.Text = Language.GetString(LangKey.colorpicker_red);
this.labelGreen.Text = lang.GetString(LangKey.colorpicker_green); this.labelGreen.Text = Language.GetString(LangKey.colorpicker_green);
this.labelBlue.Text = lang.GetString(LangKey.colorpicker_blue); this.labelBlue.Text = Language.GetString(LangKey.colorpicker_blue);
this.labelAlpha.Text = lang.GetString(LangKey.colorpicker_alpha); this.labelAlpha.Text = Language.GetString(LangKey.colorpicker_alpha);
this.labelRecentColors.Text = lang.GetString(LangKey.colorpicker_recentcolors); this.labelRecentColors.Text = Language.GetString(LangKey.colorpicker_recentcolors);
} }
#region user interface generation #region user interface generation

View file

@ -53,8 +53,6 @@ namespace Greenshot {
private static List<string> ignoreDestinations = new List<string>() {PickerDestination.DESIGNATION, EditorDestination.DESIGNATION}; private static List<string> ignoreDestinations = new List<string>() {PickerDestination.DESIGNATION, EditorDestination.DESIGNATION};
private static List<IImageEditor> editorList = new List<IImageEditor>(); private static List<IImageEditor> editorList = new List<IImageEditor>();
private ILanguage lang;
private Surface surface; private Surface surface;
private System.Windows.Forms.ToolStripButton[] toolbarButtons; private System.Windows.Forms.ToolStripButton[] toolbarButtons;
@ -123,8 +121,6 @@ namespace Greenshot {
highlightModeButton.DropDownItemClicked += FilterPresetDropDownItemClicked; highlightModeButton.DropDownItemClicked += FilterPresetDropDownItemClicked;
panel1.Controls.Add(surface); panel1.Controls.Add(surface);
lang = Language.GetInstance();
// Make sure the editor is placed on the same location as the last editor was on close // Make sure the editor is placed on the same location as the last editor was on close
WindowDetails thisForm = new WindowDetails(this.Handle); WindowDetails thisForm = new WindowDetails(this.Handle);
@ -286,102 +282,102 @@ namespace Greenshot {
} }
private void updateUI() { private void updateUI() {
string editorTitle = lang.GetString(LangKey.editor_title); string editorTitle = Language.GetString(LangKey.editor_title);
if (surface != null && surface.CaptureDetails != null && surface.CaptureDetails.Title != null) { if (surface != null && surface.CaptureDetails != null && surface.CaptureDetails.Title != null) {
editorTitle = surface.CaptureDetails.Title + " - " + editorTitle; editorTitle = surface.CaptureDetails.Title + " - " + editorTitle;
} }
this.Text = editorTitle; this.Text = editorTitle;
this.fileStripMenuItem.Text = lang.GetString(LangKey.editor_file);
this.btnSave.Text = lang.GetString(LangKey.editor_save);
this.btnClipboard.Text = lang.GetString(LangKey.editor_copyimagetoclipboard);
this.btnPrint.Text = lang.GetString(LangKey.editor_print); this.fileStripMenuItem.Text = Language.GetString(LangKey.editor_file);
this.closeToolStripMenuItem.Text = lang.GetString(LangKey.editor_close); this.btnSave.Text = Language.GetString(LangKey.editor_save);
this.btnClipboard.Text = Language.GetString(LangKey.editor_copyimagetoclipboard);
this.editToolStripMenuItem.Text = lang.GetString(LangKey.editor_edit);
this.btnCursor.Text = lang.GetString(LangKey.editor_cursortool);
this.btnRect.Text = lang.GetString(LangKey.editor_drawrectangle);
this.addRectangleToolStripMenuItem.Text = lang.GetString(LangKey.editor_drawrectangle);
this.btnEllipse.Text = lang.GetString(LangKey.editor_drawellipse);
this.addEllipseToolStripMenuItem.Text = lang.GetString(LangKey.editor_drawellipse);
this.btnText.Text = lang.GetString(LangKey.editor_drawtextbox);
this.addTextBoxToolStripMenuItem.Text = lang.GetString(LangKey.editor_drawtextbox);
this.btnLine.Text = lang.GetString(LangKey.editor_drawline);
this.drawLineToolStripMenuItem.Text = lang.GetString(LangKey.editor_drawline);
this.drawFreehandToolStripMenuItem.Text = lang.GetString(LangKey.editor_drawfreehand);
this.btnArrow.Text = lang.GetString(LangKey.editor_drawarrow);
this.drawArrowToolStripMenuItem.Text = lang.GetString(LangKey.editor_drawarrow);
this.btnHighlight.Text = lang.GetString(LangKey.editor_drawhighlighter);
this.btnObfuscate.Text = lang.GetString(LangKey.editor_obfuscate); this.btnPrint.Text = Language.GetString(LangKey.editor_print);
this.btnFreehand.Text = lang.GetString(LangKey.editor_drawfreehand); this.closeToolStripMenuItem.Text = Language.GetString(LangKey.editor_close);
this.btnCrop.Text = lang.GetString(LangKey.editor_crop);
this.btnDelete.Text = lang.GetString(LangKey.editor_deleteelement);
this.btnSettings.Text = lang.GetString(LangKey.contextmenu_settings);
this.btnCut.Text = lang.GetString(LangKey.editor_cuttoclipboard);
this.btnCopy.Text = lang.GetString(LangKey.editor_copytoclipboard);
this.btnPaste.Text = lang.GetString(LangKey.editor_pastefromclipboard);
this.selectAllToolStripMenuItem.Text = lang.GetString(LangKey.editor_selectall);
this.preferencesToolStripMenuItem.Text = lang.GetString(LangKey.contextmenu_settings);
this.removeObjectToolStripMenuItem.Text = lang.GetString(LangKey.editor_deleteelement);
this.copyToolStripMenuItem.Text = lang.GetString(LangKey.editor_copytoclipboard);
this.pasteToolStripMenuItem.Text = lang.GetString(LangKey.editor_pastefromclipboard);
this.cutToolStripMenuItem.Text = lang.GetString(LangKey.editor_cuttoclipboard);
this.duplicateToolStripMenuItem.Text = lang.GetString(LangKey.editor_duplicate);
this.objectToolStripMenuItem.Text = lang.GetString(LangKey.editor_object);
this.arrangeToolStripMenuItem.Text = lang.GetString(LangKey.editor_arrange);
this.upToTopToolStripMenuItem.Text = lang.GetString(LangKey.editor_uptotop);
this.upOneLevelToolStripMenuItem.Text = lang.GetString(LangKey.editor_uponelevel);
this.downOneLevelToolStripMenuItem.Text = lang.GetString(LangKey.editor_downonelevel);
this.downToBottomToolStripMenuItem.Text = lang.GetString(LangKey.editor_downtobottom);
this.btnLineColor.Text = lang.GetString(LangKey.editor_forecolor);
this.btnFillColor.Text = lang.GetString(LangKey.editor_backcolor);
this.lineThicknessLabel.Text = lang.GetString(LangKey.editor_thickness);
this.arrowHeadsDropDownButton.Text = lang.GetString(LangKey.editor_arrowheads);
this.helpToolStripMenuItem.Text = lang.GetString(LangKey.contextmenu_help);
this.helpToolStripMenuItem1.Text = lang.GetString(LangKey.contextmenu_help);
this.btnHelp.Text = lang.GetString(LangKey.contextmenu_help);
this.aboutToolStripMenuItem.Text = lang.GetString(LangKey.contextmenu_about);
this.copyPathMenuItem.Text = lang.GetString(LangKey.editor_copypathtoclipboard);
this.openDirectoryMenuItem.Text = lang.GetString(LangKey.editor_opendirinexplorer);
this.obfuscateModeButton.Text = lang.GetString(LangKey.editor_obfuscate_mode);
this.highlightModeButton.Text = lang.GetString(LangKey.editor_highlight_mode);
this.pixelizeToolStripMenuItem.Text = lang.GetString(LangKey.editor_obfuscate_pixelize);
this.blurToolStripMenuItem.Text = lang.GetString(LangKey.editor_obfuscate_blur);
this.textHighlightMenuItem.Text = lang.GetString(LangKey.editor_highlight_text);
this.areaHighlightMenuItem.Text = lang.GetString(LangKey.editor_highlight_area);
this.grayscaleHighlightMenuItem.Text = lang.GetString(LangKey.editor_highlight_grayscale);
this.magnifyMenuItem.Text = lang.GetString(LangKey.editor_highlight_magnify);
this.blurRadiusLabel.Text = lang.GetString(LangKey.editor_blur_radius); this.editToolStripMenuItem.Text = Language.GetString(LangKey.editor_edit);
this.brightnessLabel.Text = lang.GetString(LangKey.editor_brightness); this.btnCursor.Text = Language.GetString(LangKey.editor_cursortool);
this.previewQualityLabel.Text = lang.GetString(LangKey.editor_preview_quality); this.btnRect.Text = Language.GetString(LangKey.editor_drawrectangle);
this.magnificationFactorLabel.Text = lang.GetString(LangKey.editor_magnification_factor); this.addRectangleToolStripMenuItem.Text = Language.GetString(LangKey.editor_drawrectangle);
this.pixelSizeLabel.Text = lang.GetString(LangKey.editor_pixel_size); this.btnEllipse.Text = Language.GetString(LangKey.editor_drawellipse);
this.arrowHeadsLabel.Text = lang.GetString(LangKey.editor_arrowheads); this.addEllipseToolStripMenuItem.Text = Language.GetString(LangKey.editor_drawellipse);
this.arrowHeadStartMenuItem.Text = lang.GetString(LangKey.editor_arrowheads_start); this.btnText.Text = Language.GetString(LangKey.editor_drawtextbox);
this.arrowHeadEndMenuItem.Text = lang.GetString(LangKey.editor_arrowheads_end); this.addTextBoxToolStripMenuItem.Text = Language.GetString(LangKey.editor_drawtextbox);
this.arrowHeadBothMenuItem.Text = lang.GetString(LangKey.editor_arrowheads_both); this.btnLine.Text = Language.GetString(LangKey.editor_drawline);
this.arrowHeadNoneMenuItem.Text = lang.GetString(LangKey.editor_arrowheads_none); this.drawLineToolStripMenuItem.Text = Language.GetString(LangKey.editor_drawline);
this.shadowButton.Text = lang.GetString(LangKey.editor_shadow); this.drawFreehandToolStripMenuItem.Text = Language.GetString(LangKey.editor_drawfreehand);
this.btnArrow.Text = Language.GetString(LangKey.editor_drawarrow);
this.drawArrowToolStripMenuItem.Text = Language.GetString(LangKey.editor_drawarrow);
this.btnHighlight.Text = Language.GetString(LangKey.editor_drawhighlighter);
this.fontSizeLabel.Text = lang.GetString(LangKey.editor_fontsize); this.btnObfuscate.Text = Language.GetString(LangKey.editor_obfuscate);
this.fontBoldButton.Text = lang.GetString(LangKey.editor_bold); this.btnFreehand.Text = Language.GetString(LangKey.editor_drawfreehand);
this.fontItalicButton.Text = lang.GetString(LangKey.editor_italic); this.btnCrop.Text = Language.GetString(LangKey.editor_crop);
this.btnDelete.Text = Language.GetString(LangKey.editor_deleteelement);
this.btnSettings.Text = Language.GetString(LangKey.contextmenu_settings);
this.btnCut.Text = Language.GetString(LangKey.editor_cuttoclipboard);
this.btnCopy.Text = Language.GetString(LangKey.editor_copytoclipboard);
this.btnPaste.Text = Language.GetString(LangKey.editor_pastefromclipboard);
this.btnConfirm.Text = lang.GetString(LangKey.editor_confirm); this.selectAllToolStripMenuItem.Text = Language.GetString(LangKey.editor_selectall);
this.btnCancel.Text = lang.GetString(LangKey.editor_cancel); this.preferencesToolStripMenuItem.Text = Language.GetString(LangKey.contextmenu_settings);
this.removeObjectToolStripMenuItem.Text = Language.GetString(LangKey.editor_deleteelement);
this.saveElementsToolStripMenuItem.Text = lang.GetString(LangKey.editor_save_objects); this.copyToolStripMenuItem.Text = Language.GetString(LangKey.editor_copytoclipboard);
this.loadElementsToolStripMenuItem.Text = lang.GetString(LangKey.editor_load_objects); this.pasteToolStripMenuItem.Text = Language.GetString(LangKey.editor_pastefromclipboard);
this.autoCropToolStripMenuItem.Text = lang.GetString(LangKey.editor_autocrop); this.cutToolStripMenuItem.Text = Language.GetString(LangKey.editor_cuttoclipboard);
this.duplicateToolStripMenuItem.Text = Language.GetString(LangKey.editor_duplicate);
this.objectToolStripMenuItem.Text = Language.GetString(LangKey.editor_object);
this.arrangeToolStripMenuItem.Text = Language.GetString(LangKey.editor_arrange);
this.upToTopToolStripMenuItem.Text = Language.GetString(LangKey.editor_uptotop);
this.upOneLevelToolStripMenuItem.Text = Language.GetString(LangKey.editor_uponelevel);
this.downOneLevelToolStripMenuItem.Text = Language.GetString(LangKey.editor_downonelevel);
this.downToBottomToolStripMenuItem.Text = Language.GetString(LangKey.editor_downtobottom);
this.btnLineColor.Text = Language.GetString(LangKey.editor_forecolor);
this.btnFillColor.Text = Language.GetString(LangKey.editor_backcolor);
this.lineThicknessLabel.Text = Language.GetString(LangKey.editor_thickness);
this.arrowHeadsDropDownButton.Text = Language.GetString(LangKey.editor_arrowheads);
this.helpToolStripMenuItem.Text = Language.GetString(LangKey.contextmenu_help);
this.helpToolStripMenuItem1.Text = Language.GetString(LangKey.contextmenu_help);
this.btnHelp.Text = Language.GetString(LangKey.contextmenu_help);
this.aboutToolStripMenuItem.Text = Language.GetString(LangKey.contextmenu_about);
this.copyPathMenuItem.Text = Language.GetString(LangKey.editor_copypathtoclipboard);
this.openDirectoryMenuItem.Text = Language.GetString(LangKey.editor_opendirinexplorer);
this.obfuscateModeButton.Text = Language.GetString(LangKey.editor_obfuscate_mode);
this.highlightModeButton.Text = Language.GetString(LangKey.editor_highlight_mode);
this.pixelizeToolStripMenuItem.Text = Language.GetString(LangKey.editor_obfuscate_pixelize);
this.blurToolStripMenuItem.Text = Language.GetString(LangKey.editor_obfuscate_blur);
this.textHighlightMenuItem.Text = Language.GetString(LangKey.editor_highlight_text);
this.areaHighlightMenuItem.Text = Language.GetString(LangKey.editor_highlight_area);
this.grayscaleHighlightMenuItem.Text = Language.GetString(LangKey.editor_highlight_grayscale);
this.magnifyMenuItem.Text = Language.GetString(LangKey.editor_highlight_magnify);
this.blurRadiusLabel.Text = Language.GetString(LangKey.editor_blur_radius);
this.brightnessLabel.Text = Language.GetString(LangKey.editor_brightness);
this.previewQualityLabel.Text = Language.GetString(LangKey.editor_preview_quality);
this.magnificationFactorLabel.Text = Language.GetString(LangKey.editor_magnification_factor);
this.pixelSizeLabel.Text = Language.GetString(LangKey.editor_pixel_size);
this.arrowHeadsLabel.Text = Language.GetString(LangKey.editor_arrowheads);
this.arrowHeadStartMenuItem.Text = Language.GetString(LangKey.editor_arrowheads_start);
this.arrowHeadEndMenuItem.Text = Language.GetString(LangKey.editor_arrowheads_end);
this.arrowHeadBothMenuItem.Text = Language.GetString(LangKey.editor_arrowheads_both);
this.arrowHeadNoneMenuItem.Text = Language.GetString(LangKey.editor_arrowheads_none);
this.shadowButton.Text = Language.GetString(LangKey.editor_shadow);
this.fontSizeLabel.Text = Language.GetString(LangKey.editor_fontsize);
this.fontBoldButton.Text = Language.GetString(LangKey.editor_bold);
this.fontItalicButton.Text = Language.GetString(LangKey.editor_italic);
this.btnConfirm.Text = Language.GetString(LangKey.editor_confirm);
this.btnCancel.Text = Language.GetString(LangKey.editor_cancel);
this.saveElementsToolStripMenuItem.Text = Language.GetString(LangKey.editor_save_objects);
this.loadElementsToolStripMenuItem.Text = Language.GetString(LangKey.editor_load_objects);
this.autoCropToolStripMenuItem.Text = Language.GetString(LangKey.editor_autocrop);
this.editToolStripMenuItem.DropDownItems.Add(new ToolStripSeparator()); this.editToolStripMenuItem.DropDownItems.Add(new ToolStripSeparator());
this.editToolStripMenuItem.DropDownItems.Add(insert_window_toolstripmenuitem); this.editToolStripMenuItem.DropDownItems.Add(insert_window_toolstripmenuitem);
} }
@ -400,8 +396,8 @@ namespace Greenshot {
if (fullpath == null) { if (fullpath == null) {
return; return;
} }
updateStatusLabel(lang.GetFormattedString(LangKey.editor_imagesaved,fullpath),fileSavedStatusContextMenu); updateStatusLabel(Language.GetFormattedString(LangKey.editor_imagesaved, fullpath), fileSavedStatusContextMenu);
this.Text = lang.GetString(LangKey.editor_title) + " - " + Path.GetFileName(fullpath); this.Text = Language.GetString(LangKey.editor_title) + " - " + Path.GetFileName(fullpath);
} }
void surface_DrawingModeChanged(object source, DrawingModes drawingMode) { void surface_DrawingModeChanged(object source, DrawingModes drawingMode) {
@ -710,7 +706,7 @@ namespace Greenshot {
if (e.CloseReason == CloseReason.ApplicationExitCall || e.CloseReason == CloseReason.WindowsShutDown || e.CloseReason == CloseReason.TaskManagerClosing) { if (e.CloseReason == CloseReason.ApplicationExitCall || e.CloseReason == CloseReason.WindowsShutDown || e.CloseReason == CloseReason.TaskManagerClosing) {
buttons = MessageBoxButtons.YesNo; buttons = MessageBoxButtons.YesNo;
} }
DialogResult result = MessageBox.Show(lang.GetString(LangKey.editor_close_on_save), lang.GetString(LangKey.editor_close_on_save_title), buttons, MessageBoxIcon.Question); DialogResult result = MessageBox.Show(Language.GetString(LangKey.editor_close_on_save), Language.GetString(LangKey.editor_close_on_save_title), buttons, MessageBoxIcon.Question);
if (result.Equals(DialogResult.Cancel)) { if (result.Equals(DialogResult.Cancel)) {
e.Cancel = true; e.Cancel = true;
return; return;
@ -827,9 +823,9 @@ namespace Greenshot {
this.undoToolStripMenuItem.Enabled = canUndo; this.undoToolStripMenuItem.Enabled = canUndo;
string undoAction = ""; string undoAction = "";
if (canUndo) { if (canUndo) {
undoAction = lang.GetString(surface.UndoActionKey); undoAction = Language.GetString(surface.UndoActionKey);
} }
string undoText = lang.GetFormattedString(LangKey.editor_undo, undoAction); string undoText = Language.GetFormattedString(LangKey.editor_undo, undoAction);
this.btnUndo.Text = undoText; this.btnUndo.Text = undoText;
this.undoToolStripMenuItem.Text = undoText; this.undoToolStripMenuItem.Text = undoText;
@ -838,9 +834,9 @@ namespace Greenshot {
this.redoToolStripMenuItem.Enabled = canRedo; this.redoToolStripMenuItem.Enabled = canRedo;
string redoAction = ""; string redoAction = "";
if (canRedo) { if (canRedo) {
redoAction = lang.GetString(surface.RedoActionKey); redoAction = Language.GetString(surface.RedoActionKey);
} }
string redoText = lang.GetFormattedString(LangKey.editor_redo, redoAction); string redoText = Language.GetFormattedString(LangKey.editor_redo, redoAction);
this.btnRedo.Text = redoText; this.btnRedo.Text = redoText;
this.redoToolStripMenuItem.Text = redoText; this.redoToolStripMenuItem.Text = redoText;

View file

@ -32,7 +32,6 @@ namespace Greenshot.Forms {
public partial class LanguageDialog : Form { public partial class LanguageDialog : Form {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(LanguageDialog)); private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(LanguageDialog));
private static LanguageDialog uniqueInstance; private static LanguageDialog uniqueInstance;
private ILanguage language = Language.GetInstance(false);
private bool properOkPressed = false; private bool properOkPressed = false;
private LanguageDialog() { private LanguageDialog() {
@ -48,8 +47,6 @@ namespace Greenshot.Forms {
private void PreventFormClose(object sender, FormClosingEventArgs e) { private void PreventFormClose(object sender, FormClosingEventArgs e) {
if(!properOkPressed) { if(!properOkPressed) {
e.Cancel = true; e.Cancel = true;
} else {
language.FreeResources();
} }
} }
@ -64,20 +61,20 @@ namespace Greenshot.Forms {
// Set datasource last to prevent problems // Set datasource last to prevent problems
// See: http://www.codeproject.com/KB/database/scomlistcontrolbinding.aspx?fid=111644 // See: http://www.codeproject.com/KB/database/scomlistcontrolbinding.aspx?fid=111644
this.comboBoxLanguage.DataSource = language.SupportedLanguages; this.comboBoxLanguage.DataSource = Language.SupportedLanguages;
if (language.CurrentLanguage != null) { if (Language.CurrentLanguage != null) {
LOG.DebugFormat("Selecting {0}", language.CurrentLanguage); LOG.DebugFormat("Selecting {0}", Language.CurrentLanguage);
this.comboBoxLanguage.SelectedValue = language.CurrentLanguage; this.comboBoxLanguage.SelectedValue = Language.CurrentLanguage;
} else { } else {
this.comboBoxLanguage.SelectedValue = Thread.CurrentThread.CurrentUICulture.Name; this.comboBoxLanguage.SelectedValue = Thread.CurrentThread.CurrentUICulture.Name;
} }
// Close again when there is only one language, this shows the form briefly! // Close again when there is only one language, this shows the form briefly!
// But the use-case is not so interesting, only happens once, to invest a lot of time here. // But the use-case is not so interesting, only happens once, to invest a lot of time here.
if (language.SupportedLanguages.Count == 1) { if (Language.SupportedLanguages.Count == 1) {
this.comboBoxLanguage.SelectedValue = language.SupportedLanguages[0].Ietf; this.comboBoxLanguage.SelectedValue = Language.SupportedLanguages[0].Ietf;
LanguageContainer.SetGlobalLanguage(SelectedLanguage); Language.CurrentLanguage = SelectedLanguage;
properOkPressed = true; properOkPressed = true;
this.Close(); this.Close();
} }
@ -86,7 +83,7 @@ namespace Greenshot.Forms {
void BtnOKClick(object sender, EventArgs e) { void BtnOKClick(object sender, EventArgs e) {
properOkPressed = true; properOkPressed = true;
// Fix for Bug #3431100 // Fix for Bug #3431100
LanguageContainer.SetGlobalLanguage(SelectedLanguage); Language.CurrentLanguage = SelectedLanguage;
this.Close(); this.Close();
} }

View file

@ -212,11 +212,10 @@ namespace Greenshot {
if (isAlreadyRunning) { if (isAlreadyRunning) {
// We didn't initialize the language yet, do it here just for the message box // We didn't initialize the language yet, do it here just for the message box
ILanguage lang = Language.GetInstance();
if (filesToOpen.Count > 0) { if (filesToOpen.Count > 0) {
SendData(transport); SendData(transport);
} else { } else {
MessageBox.Show(lang.GetString(LangKey.error_multipleinstances), lang.GetString(LangKey.error)); MessageBox.Show(Language.GetString(LangKey.error_multipleinstances), Language.GetString(LangKey.error));
} }
FreeMutex(); FreeMutex();
Application.Exit(); Application.Exit();
@ -275,7 +274,6 @@ namespace Greenshot {
public static MainForm instance = null; public static MainForm instance = null;
private ILanguage lang;
private ToolTip tooltip; private ToolTip tooltip;
private CopyData copyData = null; private CopyData copyData = null;
@ -300,7 +298,6 @@ namespace Greenshot {
this.notifyIcon.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.notifyIcon.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
lang = Language.GetInstance();
IniConfig.IniChanged += new FileSystemEventHandler(ReloadConfiguration); IniConfig.IniChanged += new FileSystemEventHandler(ReloadConfiguration);
// Make sure all hotkeys pass this window! // Make sure all hotkeys pass this window!
@ -394,7 +391,7 @@ namespace Greenshot {
}; };
notifyIcon.BalloonTipClicked += balloonTipClickedHandler; notifyIcon.BalloonTipClicked += balloonTipClickedHandler;
notifyIcon.BalloonTipClosed += balloonTipClosedHandler; notifyIcon.BalloonTipClosed += balloonTipClosedHandler;
notifyIcon.ShowBalloonTip(2000, "Greenshot", lang.GetFormattedString(LangKey.tooltip_firststart, HotkeyControl.GetLocalizedHotkeyStringFromString(conf.RegionHotkey)), ToolTipIcon.Info); notifyIcon.ShowBalloonTip(2000, "Greenshot", Language.GetFormattedString(LangKey.tooltip_firststart, HotkeyControl.GetLocalizedHotkeyStringFromString(conf.RegionHotkey)), ToolTipIcon.Info);
} catch {} } catch {}
break; break;
case CommandEnum.ReloadConfig: case CommandEnum.ReloadConfig:
@ -428,9 +425,7 @@ namespace Greenshot {
/// <param name="source"></param> /// <param name="source"></param>
/// <param name="e"></param> /// <param name="e"></param>
private void ReloadConfiguration(object source, FileSystemEventArgs e) { private void ReloadConfiguration(object source, FileSystemEventArgs e) {
lang.Load(); Language.CurrentLanguage = null; // Reload
LanguageContainer.SetGlobalLanguage(conf.Language);
lang.FreeResources();
this.Invoke((MethodInvoker) delegate { this.Invoke((MethodInvoker) delegate {
// Even update language when needed // Even update language when needed
UpdateUI(); UpdateUI();
@ -515,28 +510,27 @@ namespace Greenshot {
} }
if (!success) { if (!success) {
ILanguage lang = Language.GetInstance(); MessageBox.Show(Language.GetFormattedString(LangKey.warning_hotkeys, failedKeys.ToString()),Language.GetString(LangKey.warning));
MessageBox.Show(lang.GetFormattedString(LangKey.warning_hotkeys, failedKeys.ToString()),lang.GetString(LangKey.warning));
} }
} }
#endregion #endregion
public void UpdateUI() { public void UpdateUI() {
this.Text = lang.GetString(LangKey.application_title); this.Text = Language.GetString(LangKey.application_title);
this.contextmenu_settings.Text = lang.GetString(LangKey.contextmenu_settings); this.contextmenu_settings.Text = Language.GetString(LangKey.contextmenu_settings);
this.contextmenu_capturearea.Text = lang.GetString(LangKey.contextmenu_capturearea); this.contextmenu_capturearea.Text = Language.GetString(LangKey.contextmenu_capturearea);
this.contextmenu_capturelastregion.Text = lang.GetString(LangKey.contextmenu_capturelastregion); this.contextmenu_capturelastregion.Text = Language.GetString(LangKey.contextmenu_capturelastregion);
this.contextmenu_capturewindow.Text = lang.GetString(LangKey.contextmenu_capturewindow); this.contextmenu_capturewindow.Text = Language.GetString(LangKey.contextmenu_capturewindow);
this.contextmenu_capturefullscreen.Text = lang.GetString(LangKey.contextmenu_capturefullscreen); this.contextmenu_capturefullscreen.Text = Language.GetString(LangKey.contextmenu_capturefullscreen);
this.contextmenu_captureclipboard.Text = lang.GetString(LangKey.contextmenu_captureclipboard); this.contextmenu_captureclipboard.Text = Language.GetString(LangKey.contextmenu_captureclipboard);
this.contextmenu_openfile.Text = lang.GetString(LangKey.contextmenu_openfile); this.contextmenu_openfile.Text = Language.GetString(LangKey.contextmenu_openfile);
this.contextmenu_quicksettings.Text = lang.GetString(LangKey.contextmenu_quicksettings); this.contextmenu_quicksettings.Text = Language.GetString(LangKey.contextmenu_quicksettings);
this.contextmenu_help.Text = lang.GetString(LangKey.contextmenu_help); this.contextmenu_help.Text = Language.GetString(LangKey.contextmenu_help);
this.contextmenu_about.Text = lang.GetString(LangKey.contextmenu_about); this.contextmenu_about.Text = Language.GetString(LangKey.contextmenu_about);
this.contextmenu_donate.Text = lang.GetString(LangKey.contextmenu_donate); this.contextmenu_donate.Text = Language.GetString(LangKey.contextmenu_donate);
this.contextmenu_exit.Text = lang.GetString(LangKey.contextmenu_exit); this.contextmenu_exit.Text = Language.GetString(LangKey.contextmenu_exit);
this.contextmenu_captureie.Text = lang.GetString(LangKey.contextmenu_captureie); this.contextmenu_captureie.Text = Language.GetString(LangKey.contextmenu_captureie);
this.contextmenu_openrecentcapture.Text = lang.GetString(LangKey.contextmenu_openrecentcapture); this.contextmenu_openrecentcapture.Text = Language.GetString(LangKey.contextmenu_openrecentcapture);
// Show hotkeys in Contextmenu // Show hotkeys in Contextmenu
this.contextmenu_capturearea.ShortcutKeyDisplayString = HotkeyControl.GetLocalizedHotkeyStringFromString(conf.RegionHotkey); this.contextmenu_capturearea.ShortcutKeyDisplayString = HotkeyControl.GetLocalizedHotkeyStringFromString(conf.RegionHotkey);
@ -746,7 +740,6 @@ namespace Greenshot {
} }
public void AddCaptureWindowMenuItems(ToolStripMenuItem menuItem, EventHandler eventHandler) { public void AddCaptureWindowMenuItems(ToolStripMenuItem menuItem, EventHandler eventHandler) {
ILanguage lang = Language.GetInstance();
menuItem.DropDownItems.Clear(); menuItem.DropDownItems.Clear();
// check if thumbnailPreview is enabled and DWM is enabled // check if thumbnailPreview is enabled and DWM is enabled
bool thumbnailPreview = conf.ThumnailPreview && DWM.isDWMEnabled(); bool thumbnailPreview = conf.ThumnailPreview && DWM.isDWMEnabled();
@ -883,7 +876,7 @@ namespace Greenshot {
this.contextmenu_quicksettings.DropDownItems.Clear(); this.contextmenu_quicksettings.DropDownItems.Clear();
// screenshot destination // screenshot destination
ToolStripMenuSelectList selectList = new ToolStripMenuSelectList("destinations",true); ToolStripMenuSelectList selectList = new ToolStripMenuSelectList("destinations",true);
selectList.Text = lang.GetString(LangKey.settings_destination); selectList.Text = Language.GetString(LangKey.settings_destination);
// Working with IDestination: // Working with IDestination:
foreach(IDestination destination in DestinationHelper.GetAllDestinations()) { foreach(IDestination destination in DestinationHelper.GetAllDestinations()) {
selectList.AddItem(destination.Description, destination, conf.OutputDestinations.Contains(destination.Designation)); selectList.AddItem(destination.Description, destination, conf.OutputDestinations.Contains(destination.Designation));
@ -893,24 +886,24 @@ namespace Greenshot {
// Capture Modes // Capture Modes
selectList = new ToolStripMenuSelectList("capturemodes", false); selectList = new ToolStripMenuSelectList("capturemodes", false);
selectList.Text = lang.GetString(LangKey.settings_window_capture_mode); selectList.Text = Language.GetString(LangKey.settings_window_capture_mode);
string enumTypeName = typeof(WindowCaptureMode).Name; string enumTypeName = typeof(WindowCaptureMode).Name;
foreach(WindowCaptureMode captureMode in Enum.GetValues(typeof(WindowCaptureMode))) { foreach(WindowCaptureMode captureMode in Enum.GetValues(typeof(WindowCaptureMode))) {
selectList.AddItem(lang.GetString(enumTypeName + "." + captureMode.ToString()), captureMode, conf.WindowCaptureMode == captureMode); selectList.AddItem(Language.GetString(enumTypeName + "." + captureMode.ToString()), captureMode, conf.WindowCaptureMode == captureMode);
} }
selectList.CheckedChanged += new EventHandler(this.QuickSettingCaptureModeChanged); selectList.CheckedChanged += new EventHandler(this.QuickSettingCaptureModeChanged);
this.contextmenu_quicksettings.DropDownItems.Add(selectList); this.contextmenu_quicksettings.DropDownItems.Add(selectList);
// print options // print options
selectList = new ToolStripMenuSelectList("printoptions",true); selectList = new ToolStripMenuSelectList("printoptions",true);
selectList.Text = lang.GetString(LangKey.settings_printoptions); selectList.Text = Language.GetString(LangKey.settings_printoptions);
IniValue iniValue; IniValue iniValue;
foreach(string propertyName in conf.Values.Keys) { foreach(string propertyName in conf.Values.Keys) {
if (propertyName.StartsWith("OutputPrint")) { if (propertyName.StartsWith("OutputPrint")) {
iniValue = conf.Values[propertyName]; iniValue = conf.Values[propertyName];
if (iniValue.Attributes.LanguageKey != null) { if (iniValue.Attributes.LanguageKey != null) {
selectList.AddItem(lang.GetString(iniValue.Attributes.LanguageKey), iniValue, (bool)iniValue.Value); selectList.AddItem(Language.GetString(iniValue.Attributes.LanguageKey), iniValue, (bool)iniValue.Value);
} }
} }
} }
@ -919,12 +912,12 @@ namespace Greenshot {
// effects // effects
selectList = new ToolStripMenuSelectList("effects",true); selectList = new ToolStripMenuSelectList("effects",true);
selectList.Text = lang.GetString(LangKey.settings_visualization); selectList.Text = Language.GetString(LangKey.settings_visualization);
iniValue = conf.Values["PlayCameraSound"]; iniValue = conf.Values["PlayCameraSound"];
selectList.AddItem(lang.GetString(iniValue.Attributes.LanguageKey), iniValue, (bool)iniValue.Value); selectList.AddItem(Language.GetString(iniValue.Attributes.LanguageKey), iniValue, (bool)iniValue.Value);
iniValue = conf.Values["ShowTrayNotification"]; iniValue = conf.Values["ShowTrayNotification"];
selectList.AddItem(lang.GetString(iniValue.Attributes.LanguageKey), iniValue, (bool)iniValue.Value); selectList.AddItem(Language.GetString(iniValue.Attributes.LanguageKey), iniValue, (bool)iniValue.Value);
selectList.CheckedChanged += new EventHandler(this.QuickSettingBoolItemChanged); selectList.CheckedChanged += new EventHandler(this.QuickSettingBoolItemChanged);
this.contextmenu_quicksettings.DropDownItems.Add(selectList); this.contextmenu_quicksettings.DropDownItems.Add(selectList);
} }

View file

@ -30,7 +30,6 @@ namespace Greenshot.Forms {
/// </summary> /// </summary>
public partial class PrintOptionsDialog : Form { public partial class PrintOptionsDialog : Form {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
ILanguage lang;
public bool AllowPrintCenter; public bool AllowPrintCenter;
public bool AllowPrintEnlarge; public bool AllowPrintEnlarge;
@ -45,8 +44,7 @@ namespace Greenshot.Forms {
// //
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
lang = Language.GetInstance();
this.AllowPrintCenter = this.checkboxAllowCenter.Checked = conf.OutputPrintCenter; this.AllowPrintCenter = this.checkboxAllowCenter.Checked = conf.OutputPrintCenter;
this.AllowPrintEnlarge = this.checkboxAllowEnlarge.Checked = conf.OutputPrintAllowEnlarge; this.AllowPrintEnlarge = this.checkboxAllowEnlarge.Checked = conf.OutputPrintAllowEnlarge;
this.AllowPrintRotate = this.checkboxAllowRotate.Checked = conf.OutputPrintAllowRotate; this.AllowPrintRotate = this.checkboxAllowRotate.Checked = conf.OutputPrintAllowRotate;
@ -58,14 +56,14 @@ namespace Greenshot.Forms {
} }
void UpdateUI() { void UpdateUI() {
this.Text = lang.GetString(LangKey.printoptions_title); this.Text = Language.GetString(LangKey.printoptions_title);
this.checkboxAllowCenter.Text = lang.GetString(LangKey.printoptions_allowcenter); this.checkboxAllowCenter.Text = Language.GetString(LangKey.printoptions_allowcenter);
this.checkboxAllowEnlarge.Text = lang.GetString(LangKey.printoptions_allowenlarge); this.checkboxAllowEnlarge.Text = Language.GetString(LangKey.printoptions_allowenlarge);
this.checkboxAllowRotate.Text = lang.GetString(LangKey.printoptions_allowrotate); this.checkboxAllowRotate.Text = Language.GetString(LangKey.printoptions_allowrotate);
this.checkboxAllowShrink.Text = lang.GetString(LangKey.printoptions_allowshrink); this.checkboxAllowShrink.Text = Language.GetString(LangKey.printoptions_allowshrink);
this.checkbox_dontaskagain.Text = lang.GetString(LangKey.printoptions_dontaskagain); this.checkbox_dontaskagain.Text = Language.GetString(LangKey.printoptions_dontaskagain);
this.checkboxDateTime.Text = lang.GetString(LangKey.printoptions_timestamp); this.checkboxDateTime.Text = Language.GetString(LangKey.printoptions_timestamp);
this.checkboxPrintInverted.Text = lang.GetString(LangKey.printoptions_inverted); this.checkboxPrintInverted.Text = Language.GetString(LangKey.printoptions_inverted);
} }

View file

@ -30,7 +30,6 @@ namespace Greenshot {
/// </summary> /// </summary>
public partial class QualityDialog : Form { public partial class QualityDialog : Form {
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
ILanguage lang;
public int Quality = 0; public int Quality = 0;
public bool ReduceColors = false; public bool ReduceColors = false;
public QualityDialog(bool isJPG) { public QualityDialog(bool isJPG) {
@ -40,7 +39,6 @@ namespace Greenshot {
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
lang = Language.GetInstance();
this.checkBox_reduceColors.Checked = conf.OutputFileReduceColors; this.checkBox_reduceColors.Checked = conf.OutputFileReduceColors;
this.trackBarJpegQuality.Enabled = isJPG; this.trackBarJpegQuality.Enabled = isJPG;
this.trackBarJpegQuality.Value = conf.OutputFileJpegQuality; this.trackBarJpegQuality.Value = conf.OutputFileJpegQuality;
@ -62,10 +60,10 @@ namespace Greenshot {
} }
void UpdateUI() { void UpdateUI() {
this.Text = lang.GetString(LangKey.jpegqualitydialog_title); this.Text = Language.GetString(LangKey.jpegqualitydialog_title);
this.label_choosejpegquality.Text = lang.GetString(LangKey.jpegqualitydialog_choosejpegquality); this.label_choosejpegquality.Text = Language.GetString(LangKey.jpegqualitydialog_choosejpegquality);
this.checkbox_dontaskagain.Text = lang.GetString(LangKey.jpegqualitydialog_dontaskagain); this.checkbox_dontaskagain.Text = Language.GetString(LangKey.jpegqualitydialog_dontaskagain);
this.checkBox_reduceColors.Text = lang.GetString(LangKey.reduce_colors); this.checkBox_reduceColors.Text = Language.GetString(LangKey.reduce_colors);
} }
void TrackBarJpegQualityScroll(object sender, System.EventArgs e) { void TrackBarJpegQualityScroll(object sender, System.EventArgs e) {

View file

@ -46,10 +46,6 @@ namespace Greenshot {
private ToolTip toolTip = new ToolTip(); private ToolTip toolTip = new ToolTip();
public SettingsForm() : base() { public SettingsForm() : base() {
// language is in the base class
language = Language.GetInstance();
// Force re-loading of languages
language.Load();
InitializeComponent(); InitializeComponent();
} }
@ -92,10 +88,10 @@ namespace Greenshot {
comboBox.Items.Clear(); comboBox.Items.Clear();
string enumTypeName = typeof(ET).Name; string enumTypeName = typeof(ET).Name;
foreach(ET enumValue in availableValues) { foreach(ET enumValue in availableValues) {
string translation = language.GetString(enumTypeName + "." + enumValue.ToString()); string translation = Language.GetString(enumTypeName + "." + enumValue.ToString());
comboBox.Items.Add(translation); comboBox.Items.Add(translation);
} }
comboBox.SelectedItem = language.GetString(enumTypeName + "." + selectedValue.ToString()); comboBox.SelectedItem = Language.GetString(enumTypeName + "." + selectedValue.ToString());
} }
@ -110,7 +106,7 @@ namespace Greenshot {
ET[] availableValues = (ET[])Enum.GetValues(typeof(ET)); ET[] availableValues = (ET[])Enum.GetValues(typeof(ET));
ET returnValue = availableValues[0]; ET returnValue = availableValues[0];
foreach(ET enumValue in availableValues) { foreach(ET enumValue in availableValues) {
string translation = language.GetString(enumTypeName + "." + enumValue.ToString()); string translation = Language.GetString(enumTypeName + "." + enumValue.ToString());
if (translation.Equals(selectedValue)) { if (translation.Equals(selectedValue)) {
returnValue = enumValue; returnValue = enumValue;
break; break;
@ -167,10 +163,10 @@ namespace Greenshot {
/// Update the UI to reflect the language and other text settings /// Update the UI to reflect the language and other text settings
/// </summary> /// </summary>
private void UpdateUI() { private void UpdateUI() {
toolTip.SetToolTip(label_language, language.GetString(LangKey.settings_tooltip_language)); toolTip.SetToolTip(label_language, Language.GetString(LangKey.settings_tooltip_language));
toolTip.SetToolTip(label_storagelocation, language.GetString(LangKey.settings_tooltip_storagelocation)); toolTip.SetToolTip(label_storagelocation, Language.GetString(LangKey.settings_tooltip_storagelocation));
toolTip.SetToolTip(label_screenshotname, language.GetString(LangKey.settings_tooltip_filenamepattern)); toolTip.SetToolTip(label_screenshotname, Language.GetString(LangKey.settings_tooltip_filenamepattern));
toolTip.SetToolTip(label_primaryimageformat, language.GetString(LangKey.settings_tooltip_primaryimageformat)); toolTip.SetToolTip(label_primaryimageformat, Language.GetString(LangKey.settings_tooltip_primaryimageformat));
// Removing, otherwise we keep getting the event multiple times! // Removing, otherwise we keep getting the event multiple times!
this.combobox_language.SelectedIndexChanged -= new System.EventHandler(this.Combobox_languageSelectedIndexChanged); this.combobox_language.SelectedIndexChanged -= new System.EventHandler(this.Combobox_languageSelectedIndexChanged);
@ -178,12 +174,12 @@ namespace Greenshot {
// Initialize the Language ComboBox // Initialize the Language ComboBox
this.combobox_language.DisplayMember = "Description"; this.combobox_language.DisplayMember = "Description";
this.combobox_language.ValueMember = "Ietf"; this.combobox_language.ValueMember = "Ietf";
if (language.CurrentLanguage != null) {
this.combobox_language.SelectedValue = language.CurrentLanguage;
}
// Set datasource last to prevent problems // Set datasource last to prevent problems
// See: http://www.codeproject.com/KB/database/scomlistcontrolbinding.aspx?fid=111644 // See: http://www.codeproject.com/KB/database/scomlistcontrolbinding.aspx?fid=111644
this.combobox_language.DataSource = language.SupportedLanguages; this.combobox_language.DataSource = Language.SupportedLanguages;
if (Language.CurrentLanguage != null) {
this.combobox_language.SelectedValue = Language.CurrentLanguage;
}
// Delaying the SelectedIndexChanged events untill all is initiated // Delaying the SelectedIndexChanged events untill all is initiated
this.combobox_language.SelectedIndexChanged += new System.EventHandler(this.Combobox_languageSelectedIndexChanged); this.combobox_language.SelectedIndexChanged += new System.EventHandler(this.Combobox_languageSelectedIndexChanged);
@ -254,9 +250,9 @@ namespace Greenshot {
private void DisplaySettings() { private void DisplaySettings() {
colorButton_window_background.SelectedColor = coreConfiguration.DWMBackgroundColor; colorButton_window_background.SelectedColor = coreConfiguration.DWMBackgroundColor;
if (language.CurrentLanguage != null) { if (Language.CurrentLanguage != null) {
combobox_language.SelectedValue = language.CurrentLanguage; combobox_language.SelectedValue = Language.CurrentLanguage;
} }
textbox_storagelocation.Text = FilenameHelper.FillVariables(coreConfiguration.OutputFilePath, false); textbox_storagelocation.Text = FilenameHelper.FillVariables(coreConfiguration.OutputFilePath, false);
@ -339,7 +335,6 @@ namespace Greenshot {
void Settings_cancelClick(object sender, System.EventArgs e) { void Settings_cancelClick(object sender, System.EventArgs e) {
DialogResult = DialogResult.Cancel; DialogResult = DialogResult.Cancel;
language.FreeResources();
} }
void Settings_okayClick(object sender, System.EventArgs e) { void Settings_okayClick(object sender, System.EventArgs e) {
@ -349,7 +344,6 @@ namespace Greenshot {
} else { } else {
this.tabcontrol.SelectTab(this.tab_output); this.tabcontrol.SelectTab(this.tab_output);
} }
language.FreeResources();
} }
void BrowseClick(object sender, System.EventArgs e) { void BrowseClick(object sender, System.EventArgs e) {
@ -370,10 +364,10 @@ namespace Greenshot {
void BtnPatternHelpClick(object sender, EventArgs e) { void BtnPatternHelpClick(object sender, EventArgs e) {
string filenamepatternText = language.GetString(LangKey.settings_message_filenamepattern); string filenamepatternText = Language.GetString(LangKey.settings_message_filenamepattern);
// Convert %NUM% to ${NUM} for old language files! // Convert %NUM% to ${NUM} for old language files!
filenamepatternText = Regex.Replace(filenamepatternText, "%([a-zA-Z_0-9]+)%", @"${$1}"); filenamepatternText = Regex.Replace(filenamepatternText, "%([a-zA-Z_0-9]+)%", @"${$1}");
MessageBox.Show(filenamepatternText, language.GetString(LangKey.settings_filenamepattern)); MessageBox.Show(filenamepatternText, Language.GetString(LangKey.settings_filenamepattern));
} }
void Listview_pluginsSelectedIndexChanged(object sender, EventArgs e) { void Listview_pluginsSelectedIndexChanged(object sender, EventArgs e) {
@ -390,7 +384,7 @@ namespace Greenshot {
WindowCaptureMode selectedWindowCaptureMode = GetSelected<WindowCaptureMode>(combobox_window_capture_mode); WindowCaptureMode selectedWindowCaptureMode = GetSelected<WindowCaptureMode>(combobox_window_capture_mode);
if (combobox_language.SelectedItem != null) { if (combobox_language.SelectedItem != null) {
LOG.Debug("Setting language to: " + (string)combobox_language.SelectedValue); LOG.Debug("Setting language to: " + (string)combobox_language.SelectedValue);
LanguageContainer.SetGlobalLanguage((string)combobox_language.SelectedValue); Language.CurrentLanguage = (string)combobox_language.SelectedValue;
} }
// Reflect language changes to the settings form // Reflect language changes to the settings form
UpdateUI(); UpdateUI();

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}</ProjectGuid> <ProjectGuid>{CD642BF4-D815-4D67-A0B5-C69F0B8231AF}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -54,20 +54,41 @@
<Compile Include="AssemblyInfo.cs" /> <Compile Include="AssemblyInfo.cs" />
<Compile Include="Configuration\AppConfig.cs" /> <Compile Include="Configuration\AppConfig.cs" />
<Compile Include="Configuration\EditorConfiguration.cs" /> <Compile Include="Configuration\EditorConfiguration.cs" />
<Compile Include="Configuration\Language.cs" />
<Compile Include="Configuration\LanguageKeys.cs" /> <Compile Include="Configuration\LanguageKeys.cs" />
<Compile Include="Configuration\RuntimeConfig.cs" /> <Compile Include="Configuration\RuntimeConfig.cs" />
<Compile Include="Controls\BindableToolStripComboBox.cs" /> <Compile Include="Controls\BindableToolStripComboBox.cs">
<Compile Include="Controls\BindableToolStripButton.cs" /> <SubType>Component</SubType>
<Compile Include="Controls\BindableToolStripDropDownButton.cs" /> </Compile>
<Compile Include="Controls\ColorButton.cs" /> <Compile Include="Controls\BindableToolStripButton.cs">
<Compile Include="Controls\NonJumpingPanel.cs" /> <SubType>Component</SubType>
<Compile Include="Controls\ToolStripColorButton.cs" /> </Compile>
<Compile Include="Controls\FontFamilyComboBox.cs" /> <Compile Include="Controls\BindableToolStripDropDownButton.cs">
<Compile Include="Controls\ToolStripNumericUpDown.cs" /> <SubType>Component</SubType>
<Compile Include="Controls\ToolStripEx.cs" /> </Compile>
<Compile Include="Controls\MenuStripEx.cs" /> <Compile Include="Controls\ColorButton.cs">
<Compile Include="Controls\Pipette.cs" /> <SubType>Component</SubType>
</Compile>
<Compile Include="Controls\NonJumpingPanel.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ToolStripColorButton.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\FontFamilyComboBox.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ToolStripNumericUpDown.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\ToolStripEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\MenuStripEx.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Controls\Pipette.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Destinations\ClipboardDestination.cs" /> <Compile Include="Destinations\ClipboardDestination.cs" />
<Compile Include="Destinations\EditorDestination.cs" /> <Compile Include="Destinations\EditorDestination.cs" />
<Compile Include="Destinations\EmailDestination.cs" /> <Compile Include="Destinations\EmailDestination.cs" />
@ -104,7 +125,9 @@
<Compile Include="Drawing\Filters\MagnifierFilter.cs" /> <Compile Include="Drawing\Filters\MagnifierFilter.cs" />
<Compile Include="Drawing\Filters\PixelizationFilter.cs" /> <Compile Include="Drawing\Filters\PixelizationFilter.cs" />
<Compile Include="Drawing\Filters\BlurFilter.cs" /> <Compile Include="Drawing\Filters\BlurFilter.cs" />
<Compile Include="Drawing\Gripper.cs" /> <Compile Include="Drawing\Gripper.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Drawing\HighlightContainer.cs" /> <Compile Include="Drawing\HighlightContainer.cs" />
<Compile Include="Drawing\IconContainer.cs" /> <Compile Include="Drawing\IconContainer.cs" />
<Compile Include="Drawing\LineContainer.cs" /> <Compile Include="Drawing\LineContainer.cs" />
@ -118,44 +141,68 @@
<Compile Include="Drawing\FreehandContainer.cs" /> <Compile Include="Drawing\FreehandContainer.cs" />
<Compile Include="Drawing\RectangleContainer.cs" /> <Compile Include="Drawing\RectangleContainer.cs" />
<Compile Include="Drawing\RoundedRectangle.cs" /> <Compile Include="Drawing\RoundedRectangle.cs" />
<Compile Include="Drawing\Surface.cs" /> <Compile Include="Drawing\Surface.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Drawing\TextContainer.cs" /> <Compile Include="Drawing\TextContainer.cs" />
<Compile Include="Forms\AboutForm.cs" /> <Compile Include="Forms\AboutForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\AboutForm.Designer.cs"> <Compile Include="Forms\AboutForm.Designer.cs">
<DependentUpon>AboutForm.cs</DependentUpon> <DependentUpon>AboutForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\CaptureForm.cs" /> <Compile Include="Forms\CaptureForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\CaptureForm.Designer.cs"> <Compile Include="Forms\CaptureForm.Designer.cs">
<DependentUpon>CaptureForm.cs</DependentUpon> <DependentUpon>CaptureForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\FormWithoutActivation.cs" /> <Compile Include="Forms\FormWithoutActivation.cs">
<Compile Include="Forms\ImageEditorForm.cs" /> <SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ImageEditorForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ImageEditorForm.Designer.cs"> <Compile Include="Forms\ImageEditorForm.Designer.cs">
<DependentUpon>ImageEditorForm.cs</DependentUpon> <DependentUpon>ImageEditorForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\LanguageDialog.cs" /> <Compile Include="Forms\LanguageDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\LanguageDialog.Designer.cs"> <Compile Include="Forms\LanguageDialog.Designer.cs">
<DependentUpon>LanguageDialog.cs</DependentUpon> <DependentUpon>LanguageDialog.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\MainForm.cs" /> <Compile Include="Forms\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\MainForm.Designer.cs"> <Compile Include="Forms\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon> <DependentUpon>MainForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\PrintOptionsDialog.cs" /> <Compile Include="Forms\PrintOptionsDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\PrintOptionsDialog.Designer.cs"> <Compile Include="Forms\PrintOptionsDialog.Designer.cs">
<DependentUpon>PrintOptionsDialog.cs</DependentUpon> <DependentUpon>PrintOptionsDialog.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\SaveImageFileDialog.cs" /> <Compile Include="Forms\SaveImageFileDialog.cs" />
<Compile Include="Forms\SettingsForm.cs" /> <Compile Include="Forms\SettingsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\SettingsForm.Designer.cs"> <Compile Include="Forms\SettingsForm.Designer.cs">
<DependentUpon>SettingsForm.cs</DependentUpon> <DependentUpon>SettingsForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\ToolStripMenuSelectList.cs" /> <Compile Include="Forms\ToolStripMenuSelectList.cs">
<Compile Include="Forms\BugReportForm.cs" /> <SubType>Component</SubType>
</Compile>
<Compile Include="Forms\BugReportForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\BugReportForm.Designer.cs"> <Compile Include="Forms\BugReportForm.Designer.cs">
<DependentUpon>BugReportForm.cs</DependentUpon> <DependentUpon>BugReportForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\MovableShowColorForm.cs" /> <Compile Include="Forms\MovableShowColorForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\MovableShowColorForm.Designer.cs"> <Compile Include="Forms\MovableShowColorForm.Designer.cs">
<DependentUpon>MovableShowColorForm.cs</DependentUpon> <DependentUpon>MovableShowColorForm.cs</DependentUpon>
</Compile> </Compile>
@ -333,37 +380,21 @@
<None Include="log4net.xml"> <None Include="log4net.xml">
<CopyToOutputDirectory>Never</CopyToOutputDirectory> <CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None> </None>
<Compile Include="Help\HelpBrowserForm.cs" />
<Compile Include="Help\HelpBrowserForm.Designer.cs">
<DependentUpon>HelpBrowserForm.cs</DependentUpon>
</Compile>
<Compile Include="Helpers\FilenameHelper.cs" /> <Compile Include="Helpers\FilenameHelper.cs" />
<Compile Include="Forms\QualityDialog.Designer.cs"> <Compile Include="Forms\QualityDialog.Designer.cs">
<DependentUpon>QualityDialog.cs</DependentUpon> <DependentUpon>QualityDialog.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\QualityDialog.cs" /> <Compile Include="Forms\QualityDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\ColorDialog.Designer.cs"> <Compile Include="Forms\ColorDialog.Designer.cs">
<DependentUpon>ColorDialog.cs</DependentUpon> <DependentUpon>ColorDialog.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Forms\ColorDialog.cs" /> <Compile Include="Forms\ColorDialog.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Drawing\Fields\Binding" />
<Folder Include="Drawing\Filters" />
<Folder Include="Drawing\Fields" />
<Folder Include="Forms" />
<Folder Include="Helpers" />
<Folder Include="Configuration" />
<Folder Include="Helpers" />
<Folder Include="Drawing" />
<Folder Include="Controls" />
<Folder Include="Helpers\IEInterop" />
<Folder Include="Memento" />
<Folder Include="Lib" />
<Folder Include="Languages" />
<Folder Include="Help" />
<Folder Include="Destinations" />
<Folder Include="Processors" />
<ProjectReference Include="..\GreenshotPlugin\GreenshotPlugin.csproj"> <ProjectReference Include="..\GreenshotPlugin\GreenshotPlugin.csproj">
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project> <Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
<Name>GreenshotPlugin</Name> <Name>GreenshotPlugin</Name>

View file

@ -25,14 +25,13 @@ namespace Greenshot.Help
private const string EXT_HELP_URL = @"http://getgreenshot.org/help/"; private const string EXT_HELP_URL = @"http://getgreenshot.org/help/";
private HelpFileLoader() private HelpFileLoader() {
{
} }
public static void LoadHelp() { public static void LoadHelp() {
string uri = findOnlineHelpUrl(Language.GetInstance().CurrentLanguage); string uri = findOnlineHelpUrl(Language.CurrentLanguage);
if(uri == null) { if(uri == null) {
uri = Language.GetInstance().GetHelpFilePath(); uri = Language.HelpFilePath;
} }
Process.Start(uri); Process.Start(uri);
} }
@ -43,22 +42,22 @@ namespace Greenshot.Help
string extHelpUrlForCurrrentIETF = EXT_HELP_URL; string extHelpUrlForCurrrentIETF = EXT_HELP_URL;
if(!currentIETF.Equals("en_US")) { if(!currentIETF.Equals("en-US")) {
extHelpUrlForCurrrentIETF += currentIETF.ToLower() + "/"; extHelpUrlForCurrrentIETF += currentIETF.ToLower() + "/";
} }
HttpStatusCode? s = getHttpStatus(extHelpUrlForCurrrentIETF); HttpStatusCode? httpStatusCode = getHttpStatus(extHelpUrlForCurrrentIETF);
if(s == HttpStatusCode.OK) { if(httpStatusCode == HttpStatusCode.OK) {
ret = extHelpUrlForCurrrentIETF; ret = extHelpUrlForCurrrentIETF;
} else if(s != null && !extHelpUrlForCurrrentIETF.Equals(EXT_HELP_URL)) { } else if(httpStatusCode != null && !extHelpUrlForCurrrentIETF.Equals(EXT_HELP_URL)) {
LOG.Debug(String.Format("Localized online help not found at %s, will try %s as fallback", extHelpUrlForCurrrentIETF, EXT_HELP_URL)); LOG.DebugFormat("Localized online help not found at {0}, will try {1} as fallback", extHelpUrlForCurrrentIETF, EXT_HELP_URL);
s = getHttpStatus(EXT_HELP_URL); httpStatusCode = getHttpStatus(EXT_HELP_URL);
if(s == HttpStatusCode.OK) { if(httpStatusCode == HttpStatusCode.OK) {
ret = EXT_HELP_URL; ret = EXT_HELP_URL;
} else { } else {
LOG.Warn(String.Format("%s returned status %s", EXT_HELP_URL, s)); LOG.WarnFormat("{0} returned status {1}", EXT_HELP_URL, httpStatusCode);
} }
} else if(s == null){ } else if(httpStatusCode == null){
LOG.Info("Internet connection does not seem to be available, will load help from file system."); LOG.Info("Internet connection does not seem to be available, will load help from file system.");
} }
@ -72,7 +71,7 @@ namespace Greenshot.Help
/// <returns>An HTTP status code, or null if there is none (probably indicating that there is no internet connection available</returns> /// <returns>An HTTP status code, or null if there is none (probably indicating that there is no internet connection available</returns>
private static HttpStatusCode? getHttpStatus(string url) { private static HttpStatusCode? getHttpStatus(string url) {
try { try {
HttpWebRequest req = (HttpWebRequest)HttpWebRequest.Create(url); HttpWebRequest req = (HttpWebRequest)NetworkHelper.CreateWebRequest(url);
HttpWebResponse res = (HttpWebResponse)req.GetResponse(); HttpWebResponse res = (HttpWebResponse)req.GetResponse();
return res.StatusCode; return res.StatusCode;
} catch(WebException e) { } catch(WebException e) {

View file

@ -51,7 +51,6 @@ namespace Greenshot.Helpers {
private Rectangle captureRect = Rectangle.Empty; private Rectangle captureRect = Rectangle.Empty;
private bool captureMouseCursor = false; private bool captureMouseCursor = false;
private ICapture capture = null; private ICapture capture = null;
private ILanguage lang = Language.GetInstance();
private CaptureMode captureMode; private CaptureMode captureMode;
private Thread windowDetailsThread = null; private Thread windowDetailsThread = null;
@ -254,7 +253,7 @@ namespace Greenshot.Helpers {
fileBitmap = ImageHelper.LoadBitmap(filename); fileBitmap = ImageHelper.LoadBitmap(filename);
} catch (Exception e) { } catch (Exception e) {
LOG.Error(e.Message, e); LOG.Error(e.Message, e);
MessageBox.Show(lang.GetFormattedString(LangKey.error_openfile, filename)); MessageBox.Show(Language.GetFormattedString(LangKey.error_openfile, filename));
} }
} }
if (fileBitmap != null) { if (fileBitmap != null) {

View file

@ -138,11 +138,10 @@ EndSelection:<<<<<<<4
if (retryCount == 0) { if (retryCount == 0) {
string messageText = null; string messageText = null;
string clipboardOwner = GetClipboardOwner(); string clipboardOwner = GetClipboardOwner();
ILanguage lang = Language.GetInstance();
if (clipboardOwner != null) { if (clipboardOwner != null) {
messageText = String.Format(lang.GetString(LangKey.clipboard_inuse), clipboardOwner); messageText = Language.GetFormattedString(LangKey.clipboard_inuse, clipboardOwner);
} else { } else {
messageText = lang.GetString(LangKey.clipboard_error); messageText = Language.GetString(LangKey.clipboard_error);
} }
LOG.Error(messageText, ee); LOG.Error(messageText, ee);
} else { } else {
@ -170,11 +169,10 @@ EndSelection:<<<<<<<4
if (retryCount == 0) { if (retryCount == 0) {
string messageText = null; string messageText = null;
string clipboardOwner = GetClipboardOwner(); string clipboardOwner = GetClipboardOwner();
ILanguage lang = Language.GetInstance();
if (clipboardOwner != null) { if (clipboardOwner != null) {
messageText = String.Format(lang.GetString(LangKey.clipboard_inuse), clipboardOwner); messageText = Language.GetFormattedString(LangKey.clipboard_inuse, clipboardOwner);
} else { } else {
messageText = lang.GetString(LangKey.clipboard_error); messageText = Language.GetString(LangKey.clipboard_error);
} }
LOG.Error(messageText, ee); LOG.Error(messageText, ee);
} else { } else {
@ -203,11 +201,10 @@ EndSelection:<<<<<<<4
if (retryCount == 0) { if (retryCount == 0) {
string messageText = null; string messageText = null;
string clipboardOwner = GetClipboardOwner(); string clipboardOwner = GetClipboardOwner();
ILanguage lang = Language.GetInstance();
if (clipboardOwner != null) { if (clipboardOwner != null) {
messageText = String.Format(lang.GetString(LangKey.clipboard_inuse), clipboardOwner); messageText = Language.GetFormattedString(LangKey.clipboard_inuse, clipboardOwner);
} else { } else {
messageText = lang.GetString(LangKey.clipboard_error); messageText = Language.GetString(LangKey.clipboard_error);
} }
LOG.Error(messageText, ee); LOG.Error(messageText, ee);
} else { } else {
@ -236,11 +233,10 @@ EndSelection:<<<<<<<4
if (retryCount == 0) { if (retryCount == 0) {
string messageText = null; string messageText = null;
string clipboardOwner = GetClipboardOwner(); string clipboardOwner = GetClipboardOwner();
ILanguage lang = Language.GetInstance();
if (clipboardOwner != null) { if (clipboardOwner != null) {
messageText = String.Format(lang.GetString(LangKey.clipboard_inuse), clipboardOwner); messageText = Language.GetFormattedString(LangKey.clipboard_inuse, clipboardOwner);
} else { } else {
messageText = lang.GetString(LangKey.clipboard_error); messageText = Language.GetString(LangKey.clipboard_error);
} }
LOG.Error(messageText, ee); LOG.Error(messageText, ee);
} else { } else {
@ -269,11 +265,10 @@ EndSelection:<<<<<<<4
if (retryCount == 0) { if (retryCount == 0) {
string messageText = null; string messageText = null;
string clipboardOwner = GetClipboardOwner(); string clipboardOwner = GetClipboardOwner();
ILanguage lang = Language.GetInstance();
if (clipboardOwner != null) { if (clipboardOwner != null) {
messageText = String.Format(lang.GetString(LangKey.clipboard_inuse), clipboardOwner); messageText = Language.GetFormattedString(LangKey.clipboard_inuse, clipboardOwner);
} else { } else {
messageText = lang.GetString(LangKey.clipboard_error); messageText = Language.GetString(LangKey.clipboard_error);
} }
LOG.Error(messageText, ee); LOG.Error(messageText, ee);
} else { } else {

View file

@ -44,7 +44,6 @@ namespace Greenshot.Helpers {
public static class IECaptureHelper { public static class IECaptureHelper {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(IECaptureHelper)); private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(IECaptureHelper));
private static CoreConfiguration configuration = IniConfig.GetIniSection<CoreConfiguration>(); private static CoreConfiguration configuration = IniConfig.GetIniSection<CoreConfiguration>();
private static ILanguage language = Language.GetInstance();
// Helper method to activate a certain IE Tab // Helper method to activate a certain IE Tab
public static void ActivateIETab(WindowDetails ieWindowDetails, int tabIndex) { public static void ActivateIETab(WindowDetails ieWindowDetails, int tabIndex) {
@ -238,7 +237,7 @@ namespace Greenshot.Helpers {
WindowDetails activeWindow = WindowDetails.GetActiveWindow(); WindowDetails activeWindow = WindowDetails.GetActiveWindow();
// Show backgroundform after retrieving the active window.. // Show backgroundform after retrieving the active window..
BackgroundForm backgroundForm = new BackgroundForm(language.GetString(LangKey.contextmenu_captureie), language.GetString(LangKey.wait_ie_capture)); BackgroundForm backgroundForm = new BackgroundForm(Language.GetString(LangKey.contextmenu_captureie), Language.GetString(LangKey.wait_ie_capture));
backgroundForm.Show(); backgroundForm.Show();
//BackgroundForm backgroundForm = BackgroundForm.ShowAndWait(language.GetString(LangKey.contextmenu_captureie), language.GetString(LangKey.wait_ie_capture)); //BackgroundForm backgroundForm = BackgroundForm.ShowAndWait(language.GetString(LangKey.contextmenu_captureie), language.GetString(LangKey.wait_ie_capture));
try { try {

View file

@ -254,7 +254,7 @@ namespace Greenshot.Helpers {
conf.OutputFileAsFullpath = fileNameWithExtension; conf.OutputFileAsFullpath = fileNameWithExtension;
IniConfig.Save(); IniConfig.Save();
} catch(System.Runtime.InteropServices.ExternalException) { } catch(System.Runtime.InteropServices.ExternalException) {
MessageBox.Show(Language.GetInstance().GetFormattedString(LangKey.error_nowriteaccess,saveImageFileDialog.FileName).Replace(@"\\",@"\"), Language.GetInstance().GetString(LangKey.error)); MessageBox.Show(Language.GetFormattedString(LangKey.error_nowriteaccess,saveImageFileDialog.FileName).Replace(@"\\",@"\"), Language.GetString(LangKey.error));
} }
} }
return returnValue; return returnValue;

View file

@ -95,12 +95,6 @@ namespace Greenshot.Helpers {
#region Implementation of IGreenshotPluginHost #region Implementation of IGreenshotPluginHost
private ContextMenuStrip mainMenu = null; private ContextMenuStrip mainMenu = null;
public ILanguage CoreLanguage {
get {
return Language.GetInstance();
}
}
public void SaveToStream(Image img, Stream stream, OutputFormat extension, int quality, bool reduceColors) { public void SaveToStream(Image img, Stream stream, OutputFormat extension, int quality, bool reduceColors) {
ImageOutput.SaveToStream(img, stream, extension, quality, reduceColors); ImageOutput.SaveToStream(img, stream, extension, quality, reduceColors);
} }

View file

@ -117,8 +117,7 @@ namespace Greenshot.Helpers {
} }
} catch (Exception e) { } catch (Exception e) {
LOG.Error("An error ocurred while trying to print", e); LOG.Error("An error ocurred while trying to print", e);
ILanguage lang = Language.GetInstance(); MessageBox.Show(Language.GetString(LangKey.print_error), Language.GetString(LangKey.error));
MessageBox.Show(lang.GetString(LangKey.print_error), lang.GetString(LangKey.error));
} }
} }

View file

@ -78,10 +78,9 @@ namespace Greenshot.Experimental {
try { try {
UpdateHelper.ProcessRSSInfo(currentVersion); UpdateHelper.ProcessRSSInfo(currentVersion);
if (latestGreenshot != null) { if (latestGreenshot != null) {
ILanguage lang = Language.GetInstance();
MainForm.instance.notifyIcon.BalloonTipClicked += HandleBalloonTipClick; MainForm.instance.notifyIcon.BalloonTipClicked += HandleBalloonTipClick;
MainForm.instance.notifyIcon.BalloonTipClosed += CleanupBalloonTipClick; MainForm.instance.notifyIcon.BalloonTipClosed += CleanupBalloonTipClick;
MainForm.instance.notifyIcon.ShowBalloonTip(10000, "Greenshot", lang.GetFormattedString(LangKey.update_found, latestGreenshot.Version), ToolTipIcon.Info); MainForm.instance.notifyIcon.ShowBalloonTip(10000, "Greenshot", Language.GetFormattedString(LangKey.update_found, latestGreenshot.Version), ToolTipIcon.Info);
} }
conf.LastUpdateCheck = DateTime.Now; conf.LastUpdateCheck = DateTime.Now;
IniConfig.Save(); IniConfig.Save();
@ -105,8 +104,7 @@ namespace Greenshot.Experimental {
Process.Start(DOWNLOAD_LINK); Process.Start(DOWNLOAD_LINK);
} }
} catch (Exception) { } catch (Exception) {
ILanguage lang = Language.GetInstance(); MessageBox.Show(Language.GetFormattedString(LangKey.error_openlink, latestGreenshot.Link), Language.GetString(LangKey.error));
MessageBox.Show(lang.GetFormattedString(LangKey.error_openlink, latestGreenshot.Link),lang.GetString(LangKey.error));
} finally { } finally {
MainForm.instance.notifyIcon.BalloonTipClicked -= HandleBalloonTipClick; MainForm.instance.notifyIcon.BalloonTipClicked -= HandleBalloonTipClick;
MainForm.instance.notifyIcon.BalloonTipClosed -= CleanupBalloonTipClick; MainForm.instance.notifyIcon.BalloonTipClosed -= CleanupBalloonTipClick;

View file

@ -39,7 +39,6 @@ namespace GreenshotConfluencePlugin {
private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluenceDestination)); private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluenceDestination));
private static ConfluenceConfiguration config = IniConfig.GetIniSection<ConfluenceConfiguration>(); private static ConfluenceConfiguration config = IniConfig.GetIniSection<ConfluenceConfiguration>();
private static Image confluenceIcon = null; private static Image confluenceIcon = null;
private ILanguage lang = Language.GetInstance();
private Confluence.Page page; private Confluence.Page page;
static ConfluenceDestination() { static ConfluenceDestination() {
@ -67,9 +66,9 @@ namespace GreenshotConfluencePlugin {
public override string Description { public override string Description {
get { get {
if (page == null) { if (page == null) {
return lang.GetString(LangKey.upload_menu_item); return Language.GetString(LangKey.upload_menu_item);
} else { } else {
return lang.GetString(LangKey.upload_menu_item) + ": \"" + page.Title + "\""; return Language.GetString(LangKey.upload_menu_item) + ": \"" + page.Title + "\"";
} }
} }
} }
@ -132,7 +131,7 @@ namespace GreenshotConfluencePlugin {
using (Image image = surface.GetImageForExport()) { using (Image image = surface.GetImageForExport()) {
bool uploaded = upload(image, selectedPage, filename, openPage); bool uploaded = upload(image, selectedPage, filename, openPage);
if (uploaded) { if (uploaded) {
surface.SendMessageEvent(this, SurfaceMessageTyp.Info, ConfluencePlugin.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;
} }
@ -174,11 +173,11 @@ namespace GreenshotConfluencePlugin {
Process.Start(page.Url); Process.Start(page.Url);
} catch {} } catch {}
} else { } else {
System.Windows.MessageBox.Show(lang.GetString(LangKey.upload_success)); System.Windows.MessageBox.Show(Language.GetString(LangKey.upload_success));
} }
return true; return true;
} catch(Exception e) { } catch(Exception e) {
System.Windows.MessageBox.Show(lang.GetString(LangKey.upload_failure) + " " + e.Message); System.Windows.MessageBox.Show(Language.GetString(LangKey.upload_failure) + " " + e.Message);
} }
return false; return false;
} }

View file

@ -40,7 +40,6 @@ namespace GreenshotConfluencePlugin {
private static ConfluenceConnector confluenceConnector = null; private static ConfluenceConnector confluenceConnector = null;
private static PluginAttribute ConfluencePluginAttributes; private static PluginAttribute ConfluencePluginAttributes;
private static ConfluenceConfiguration config = null; private static ConfluenceConfiguration config = null;
private static ILanguage lang = Language.GetInstance();
private static IGreenshotHost host; private static IGreenshotHost host;
public static ConfluenceConnector ConfluenceConnectorNoLogin { public static ConfluenceConnector ConfluenceConnectorNoLogin {
@ -66,7 +65,7 @@ namespace GreenshotConfluencePlugin {
confluenceConnector.login(); confluenceConnector.login();
} }
} catch (Exception e) { } catch (Exception e) {
MessageBox.Show(lang.GetFormattedString(LangKey.login_error, e.Message)); MessageBox.Show(Language.GetFormattedString(LangKey.login_error, e.Message));
} }
return confluenceConnector; return confluenceConnector;
} }

View file

@ -31,7 +31,6 @@ using GreenshotPlugin.Core;
namespace GreenshotConfluencePlugin { namespace GreenshotConfluencePlugin {
public class EnumDisplayer : IValueConverter { public class EnumDisplayer : IValueConverter {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(EnumDisplayer)); private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(EnumDisplayer));
private ILanguage lang = Language.GetInstance();
private Type type; private Type type;
private IDictionary displayValues; private IDictionary displayValues;
@ -68,8 +67,8 @@ namespace GreenshotConfluencePlugin {
object enumValue = field.GetValue(null); object enumValue = field.GetValue(null);
string displayString = null; string displayString = null;
if (displayKey != null && lang.hasKey(displayKey)) { if (displayKey != null && Language.hasKey(displayKey)) {
displayString = lang.GetString(displayKey); displayString = Language.GetString(displayKey);
} if (displayKey != null) { } if (displayKey != null) {
displayString = displayKey; displayString = displayKey;
} else { } else {

View file

@ -31,7 +31,6 @@ namespace GreenshotConfluencePlugin {
public partial class ConfluenceSearch : System.Windows.Controls.Page { public partial class ConfluenceSearch : System.Windows.Controls.Page {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluenceSearch)); private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluenceSearch));
private static ConfluenceConfiguration config = IniConfig.GetIniSection<ConfluenceConfiguration>(); private static ConfluenceConfiguration config = IniConfig.GetIniSection<ConfluenceConfiguration>();
private ILanguage language = GreenshotConfluencePlugin.Language.GetInstance();
private ConfluenceConnector confluenceConnector; private ConfluenceConnector confluenceConnector;
private ConfluenceUpload confluenceUpload; private ConfluenceUpload confluenceUpload;

View file

@ -35,7 +35,6 @@ namespace GreenshotConfluencePlugin {
/// </summary> /// </summary>
public partial class ConfluenceTreePicker : System.Windows.Controls.Page { public partial class ConfluenceTreePicker : System.Windows.Controls.Page {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluenceTreePicker)); private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(ConfluenceTreePicker));
private ILanguage language = GreenshotConfluencePlugin.Language.GetInstance();
private ConfluenceConnector confluenceConnector; private ConfluenceConnector confluenceConnector;
private ConfluenceUpload confluenceUpload; private ConfluenceUpload confluenceUpload;
private bool isInitDone = false; private bool isInitDone = false;

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>{C3052651-598A-44E2-AAB3-2E41311D50F9}</ProjectGuid> <ProjectGuid>{C3052651-598A-44E2-AAB3-2E41311D50F9}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -15,7 +15,27 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors> <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent> <RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<TargetFrameworkProfile>Client</TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<IsWebBootstrapper>false</IsWebBootstrapper>
<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>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
@ -55,6 +75,7 @@
<RequiredTargetFramework>3.5</RequiredTargetFramework> <RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference> </Reference>
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.Services" /> <Reference Include="System.Web.Services" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
@ -94,7 +115,6 @@
<DependentUpon>ConfluenceUpload.xaml</DependentUpon> <DependentUpon>ConfluenceUpload.xaml</DependentUpon>
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>
<Compile Include="Language.cs" />
<Compile Include="LanguageKeys.cs" /> <Compile Include="LanguageKeys.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Support\ITranslationProvider.cs" /> <Compile Include="Support\ITranslationProvider.cs" />
@ -108,6 +128,63 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>Reference.map</DependentUpon> <DependentUpon>Reference.map</DependentUpon>
</Compile> </Compile>
<None Include="Web References\confluence\RemoteAttachment1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteBlogEntry1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteBlogEntrySummary1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteClusterInformation1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteComment1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteContentPermissionSet1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteLabel1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteNodeStatus1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemotePage1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemotePageHistory1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemotePageSummary1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemotePermission1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteSearchResult1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteServerInfo1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteSpace1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteSpaceGroup1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteSpaceSummary1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteUser1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<None Include="Web References\confluence\RemoteUserInformation1.datasource">
<DependentUpon>Reference.map</DependentUpon>
</None>
<Resource Include="Images\Confluence.ico" /> <Resource Include="Images\Confluence.ico" />
<None Include="Languages\language_confluenceplugin-de-DE.xml"> <None Include="Languages\language_confluenceplugin-de-DE.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@ -126,14 +203,6 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Forms" />
<Folder Include="Languages" />
<Folder Include="Images" />
<Folder Include="Support" />
<ProjectReference Include="..\GreenshotPlugin\GreenshotPlugin.csproj">
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
<Name>GreenshotPlugin</Name>
</ProjectReference>
<WebReferences Include="Web References\" /> <WebReferences Include="Web References\" />
<WebReferenceUrl Include="http://confluence/rpc/soap-axis/confluenceservice-v1%3fwsdl"> <WebReferenceUrl Include="http://confluence/rpc/soap-axis/confluenceservice-v1%3fwsdl">
<UrlBehavior>Static</UrlBehavior> <UrlBehavior>Static</UrlBehavior>
@ -143,11 +212,54 @@
</WebReferenceUrl> </WebReferenceUrl>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Page Include="Forms\ConfluenceConfigurationForm.xaml" /> <Page Include="Forms\ConfluenceConfigurationForm.xaml">
<Page Include="Forms\ConfluencePagePicker.xaml" /> <Generator>MSBuild:Compile</Generator>
<Page Include="Forms\ConfluenceSearch.xaml" /> <SubType>Designer</SubType>
<Page Include="Forms\ConfluenceTreePicker.xaml" /> </Page>
<Page Include="Forms\ConfluenceUpload.xaml" /> <Page Include="Forms\ConfluencePagePicker.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Forms\ConfluenceSearch.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Forms\ConfluenceTreePicker.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Forms\ConfluenceUpload.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.0,Profile=Client">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4 Client Profile %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>
<ProjectReference Include="..\GreenshotPlugin\GreenshotPlugin.csproj">
<Project>{5B924697-4DCD-4F98-85F1-105CB84B7341}</Project>
<Name>GreenshotPlugin</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<PreBuildEvent>"$(SolutionDir)\tools\TortoiseSVN\SubWCRev.exe" "$(ProjectDir)\" "$(ProjectDir)\Properties\AssemblyInfo.cs.template" "$(ProjectDir)\Properties\AssemblyInfo.cs"</PreBuildEvent> <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 GreenshotConfluencePlugin {
/// <summary>
/// Wrapper for the language container for the Confluence plugin.
/// </summary>
public class Language : LanguageContainer, ILanguage {
private static ILanguage uniqueInstance;
private const string LANGUAGE_FILENAME_PATTERN = @"language_confluenceplugin-*.xml";
public static ILanguage GetInstance() {
if(uniqueInstance == null) {
uniqueInstance = new LanguageContainer(LANGUAGE_FILENAME_PATTERN);
}
return uniqueInstance;
}
}
}

View file

@ -12,8 +12,6 @@ namespace TranslationByMarkupExtension {
public class LanguageXMLTranslationProvider : ITranslationProvider { public class LanguageXMLTranslationProvider : ITranslationProvider {
#region Private Members #region Private Members
private readonly ILanguage language = Language.GetInstance();
#endregion #endregion
#region Construction #region Construction
@ -34,8 +32,8 @@ namespace TranslationByMarkupExtension {
/// See <see cref="ITranslationProvider.Translate" /> /// See <see cref="ITranslationProvider.Translate" />
/// </summary> /// </summary>
public object Translate(string key) { public object Translate(string key) {
if (language.hasKey(key)) { if (Language.hasKey(key)) {
return language.GetString(key); return Language.GetString(key);
} }
return key; return key;
} }
@ -49,7 +47,7 @@ namespace TranslationByMarkupExtension {
/// </summary> /// </summary>
public IEnumerable<CultureInfo> Languages { public IEnumerable<CultureInfo> Languages {
get { get {
foreach (LanguageConfiguration supportedLanguage in language.SupportedLanguages) { foreach (LanguageFile supportedLanguage in Language.SupportedLanguages) {
yield return new CultureInfo(supportedLanguage.Ietf); yield return new CultureInfo(supportedLanguage.Ietf);
} }
} }

View file

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// Dieser Code wurde von einem Tool generiert. // Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.239 // Laufzeitversion:4.0.30319.261
// //
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn // Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird. // der Code erneut generiert wird.
@ -9,7 +9,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// //
// Der Quellcode wurde automatisch mit Microsoft.VSDesigner generiert. Version 4.0.30319.239. // Der Quellcode wurde automatisch mit Microsoft.VSDesigner generiert. Version 4.0.30319.261.
// //
#pragma warning disable 1591 #pragma warning disable 1591

View file

@ -1,379 +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>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAUAAAAAAAEACAClFwAAVgAAADAwAAABAAgAqA4AAPsXAAAgIAAAAQAIAKgIAACjJgAAGBgAAAEA
CADIBgAASy8AABAQAAABAAgAaAUAABM2AACJUE5HDQoaCgAAAA1JSERSAAABAAAAAQAIBgAAAFxyqGYA
ABdsSURBVHja7Z1fqFVVHsf3YQqnUTJQSJMcujkK3UHuFW5geBXGYK5B0EP6Gto8zIsG8zKY82rCvKXP
6bv2FqQP9eAfEhS8Eilozo0xTAOFbGycKLjTd9u6nnvvXnuvvff6/dbea30/cEioPPucs9Z3/dbv72By
cnI2I4QkyYACQEi6UAAISRgKACEJQwEgJGEoAIQkDAWAkIShABCSMBQAQhKGAkBIwlAACEkYCgAhCUMB
ICRhKACEJAwFgJCEoQAQkjAUAEIShgJASMJQAAhJGAoAIQlDASAkYSgAhCQMBYCQhKEAEJIwFABCEoYC
QEjCUAAISRgKACEJQwEgJGEoAIQkDAWAkIShABCSMBQAQhKGAkBIwlAACEkYCgAhCUMBICRhKACEJAwF
gJCEoQAQkjAUAEIShgJASMJQAAhJmOgF4MllP2dP/+GH/M8rx77L7t9Ylv304Ins4e0l2X/v/Db04xES
lCgF4Her/pc9v+PbbNXkvezpdT9Y/7uHd5Zkt8+tzL4++Wz2/ZdLQz82IepEJQDY+Ov33Myen/q29v97
7/Ly7Nqx32f3ppeH/hiEqBGNAIzsvJVv/ieX/tzq75n5cE12/eja/JpASOxEIQBj715vdOrb+P7G0uyz
fRspAiR6ei8Avje/gSJAUqDXArBh97+z9btviv398AtABAiJld4KwIrx+9kr738u/j5XjoxkMyfWhP64
hIjQWwF45fDn2Yqx++Lv89MPT2Sf7pzgVYBESS8FQOv0N1w/tjYPERISG70UgIn3rmarttxTez9YAad2
bA79sQnxTu8EAKm9Ux+fV3/fiwdeyu6cXRH64xPild4JANJ7Jw5eVX9fJAhdOTwS+uMT4pXeCYB06M9G
m5AgfBYoRDJ/BihK+vk/v8nuXn6G6cckGL0TA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AAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
</value>
</data>
</root>

View file

@ -27,7 +27,7 @@ namespace ExternalCommand {
public SettingsFormDetail(string commando) public SettingsFormDetail(string commando)
{ {
InitializeComponent(); InitializeComponent();
this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();
this.commando = commando; this.commando = commando;
if (commando != null) { if (commando != null) {