diff --git a/Greenshot/Configuration/Language.cs b/Greenshot/Configuration/Language.cs deleted file mode 100644 index 66b9ee44c..000000000 --- a/Greenshot/Configuration/Language.cs +++ /dev/null @@ -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 . - */ -using System; -using GreenshotPlugin.Core; -using Greenshot.IniFile; - -namespace Greenshot.Configuration { - /// - /// Wrapper for the language container for the Greenshot base. - /// - 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(); - if (string.IsNullOrEmpty(conf.Language)) { - LanguageContainer.SynchronizeLanguageToCulture(); - } else { - LanguageContainer.SetGlobalLanguage(conf.Language); - } - if (freeResources) { - uniqueInstance.FreeResources(); - } - } - return uniqueInstance; - } - } -} diff --git a/Greenshot/Destinations/ClipboardDestination.cs b/Greenshot/Destinations/ClipboardDestination.cs index 3abc64183..c23cb69e9 100644 --- a/Greenshot/Destinations/ClipboardDestination.cs +++ b/Greenshot/Destinations/ClipboardDestination.cs @@ -39,8 +39,6 @@ namespace Greenshot.Destinations { private static CoreConfiguration conf = IniConfig.GetIniSection(); public const string DESIGNATION = "Clipboard"; - private ILanguage lang = Language.GetInstance(); - public override string Designation { get { return DESIGNATION; @@ -49,7 +47,7 @@ namespace Greenshot.Destinations { public override string Description { get { - return lang.GetString(LangKey.settings_destination_clipboard); + return Language.GetString(LangKey.settings_destination_clipboard); } } public override int Priority { @@ -76,10 +74,10 @@ namespace Greenshot.Destinations { ClipboardHelper.SetClipboardData(image); 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; } catch (Exception) { - surface.SendMessageEvent(this, SurfaceMessageTyp.Error, lang.GetString(LangKey.editor_clipboardfailed)); + surface.SendMessageEvent(this, SurfaceMessageTyp.Error, Language.GetString(LangKey.editor_clipboardfailed)); } return false; diff --git a/Greenshot/Destinations/EditorDestination.cs b/Greenshot/Destinations/EditorDestination.cs index e012c596d..6851e8076 100644 --- a/Greenshot/Destinations/EditorDestination.cs +++ b/Greenshot/Destinations/EditorDestination.cs @@ -40,7 +40,6 @@ namespace Greenshot.Destinations { private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(EditorDestination)); private static CoreConfiguration conf = IniConfig.GetIniSection(); public const string DESIGNATION = "Editor"; - private ILanguage lang = Language.GetInstance(); private IImageEditor editor = null; private static Image greenshotIcon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon().ToBitmap(); @@ -60,9 +59,9 @@ namespace Greenshot.Destinations { public override string Description { get { if (editor == null) { - return lang.GetString(LangKey.settings_destination_editor); + return Language.GetString(LangKey.settings_destination_editor); } 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()) { 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; } diff --git a/Greenshot/Destinations/EmailDestination.cs b/Greenshot/Destinations/EmailDestination.cs index 24fcd113e..7500b4baa 100644 --- a/Greenshot/Destinations/EmailDestination.cs +++ b/Greenshot/Destinations/EmailDestination.cs @@ -49,7 +49,6 @@ namespace Greenshot.Destinations { public const string DESIGNATION = "EMail"; private string outlookInspectorCaption; private OlObjectClass outlookInspectorType; - private ILanguage lang = Language.GetInstance(); static EmailDestination() { // Logic to decide what email implementation we use @@ -110,7 +109,7 @@ namespace Greenshot.Destinations { get { // Make sure there is some kind of "mail" name if (mapiClient == null) { - mapiClient = lang.GetString(LangKey.editor_email); + mapiClient = Language.GetString(LangKey.editor_email); } if (outlookInspectorCaption == null) { @@ -225,7 +224,7 @@ namespace Greenshot.Destinations { } 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; // Don't know how to handle a cancel in the email diff --git a/Greenshot/Destinations/ExcelDestination.cs b/Greenshot/Destinations/ExcelDestination.cs index b62edc3a2..c801e6650 100644 --- a/Greenshot/Destinations/ExcelDestination.cs +++ b/Greenshot/Destinations/ExcelDestination.cs @@ -41,7 +41,6 @@ namespace Greenshot.Destinations { private static string exePath = null; private static Image applicationIcon = null; private static Image workbookIcon = null; - private ILanguage lang = Language.GetInstance(); private string workbookName = null; static ExcelDestination() { @@ -122,7 +121,7 @@ namespace Greenshot.Destinations { } else { 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; return true; } diff --git a/Greenshot/Destinations/FileDestination.cs b/Greenshot/Destinations/FileDestination.cs index 2f4734d00..60d297edb 100644 --- a/Greenshot/Destinations/FileDestination.cs +++ b/Greenshot/Destinations/FileDestination.cs @@ -38,7 +38,6 @@ namespace Greenshot.Destinations { private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(FileDestination)); private static CoreConfiguration conf = IniConfig.GetIniSection(); public const string DESIGNATION = "FileNoDialog"; - private ILanguage lang = Language.GetInstance(); public override string Designation { get { @@ -48,7 +47,7 @@ namespace Greenshot.Destinations { public override string Description { 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) { LOG.Error("Error saving screenshot!", e); // 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 fullPath = ImageOutput.SaveWithDialog(image, captureDetails); outputMade = (fullPath != null); @@ -101,7 +100,7 @@ namespace Greenshot.Destinations { surface.LastSaveFullPath = fullPath; surface.Modified = false; 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 { surface.SendMessageEvent(this, SurfaceMessageTyp.Info, ""); } diff --git a/Greenshot/Destinations/FileWithDialogDestination.cs b/Greenshot/Destinations/FileWithDialogDestination.cs index f12709b6c..155c31d38 100644 --- a/Greenshot/Destinations/FileWithDialogDestination.cs +++ b/Greenshot/Destinations/FileWithDialogDestination.cs @@ -39,8 +39,6 @@ namespace Greenshot.Destinations { private static CoreConfiguration conf = IniConfig.GetIniSection(); public const string DESIGNATION = "FileDialog"; - private ILanguage lang = Language.GetInstance(); - public override string Designation { get { return DESIGNATION; @@ -49,7 +47,7 @@ namespace Greenshot.Destinations { public override string Description { 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.LastSaveFullPath = 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; diff --git a/Greenshot/Destinations/OneNoteDestination.cs b/Greenshot/Destinations/OneNoteDestination.cs index 6854cee7f..e3fb127b1 100644 --- a/Greenshot/Destinations/OneNoteDestination.cs +++ b/Greenshot/Destinations/OneNoteDestination.cs @@ -39,7 +39,6 @@ namespace Greenshot.Destinations { private static string exePath = null; private static Image applicationIcon = null; private static Image notebookIcon = null; - private ILanguage lang = Language.GetInstance(); private OneNotePage page = null; static OneNoteDestination() { diff --git a/Greenshot/Destinations/PickerDestination.cs b/Greenshot/Destinations/PickerDestination.cs index 15795534f..ed6a538c0 100644 --- a/Greenshot/Destinations/PickerDestination.cs +++ b/Greenshot/Destinations/PickerDestination.cs @@ -39,7 +39,6 @@ namespace Greenshot.Destinations { private static log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(PickerDestination)); private static CoreConfiguration conf = IniConfig.GetIniSection(); public const string DESIGNATION = "Picker"; - private static ILanguage lang = Language.GetInstance(); public override string Designation { get { @@ -49,7 +48,7 @@ namespace Greenshot.Destinations { public override string Description { get { - return lang.GetString(LangKey.settings_destination_picker); + return Language.GetString(LangKey.settings_destination_picker); } } @@ -102,7 +101,7 @@ namespace Greenshot.Destinations { } // Close 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.Click += delegate { // This menu entry is the close itself, we can dispose the surface diff --git a/Greenshot/Destinations/PowerpointDestination.cs b/Greenshot/Destinations/PowerpointDestination.cs index d51fa727f..baa3a577f 100644 --- a/Greenshot/Destinations/PowerpointDestination.cs +++ b/Greenshot/Destinations/PowerpointDestination.cs @@ -41,7 +41,6 @@ namespace Greenshot.Destinations { private static string exePath = null; private static Image applicationIcon = null; private static Image presentationIcon = null; - private ILanguage lang = Language.GetInstance(); private string presentationName = null; static PowerpointDestination() { @@ -138,7 +137,7 @@ namespace Greenshot.Destinations { } 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; return true; } diff --git a/Greenshot/Destinations/PrinterDestination.cs b/Greenshot/Destinations/PrinterDestination.cs index ac26f93ff..20fc1f019 100644 --- a/Greenshot/Destinations/PrinterDestination.cs +++ b/Greenshot/Destinations/PrinterDestination.cs @@ -40,8 +40,6 @@ namespace Greenshot.Destinations { private static CoreConfiguration conf = IniConfig.GetIniSection(); public const string DESIGNATION = "Printer"; - private ILanguage lang = Language.GetInstance(); - public override string Designation { get { return DESIGNATION; @@ -50,7 +48,7 @@ namespace Greenshot.Destinations { public override string Description { 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(); if (printerSettings != null) { 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)); } } diff --git a/Greenshot/Destinations/WordDestination.cs b/Greenshot/Destinations/WordDestination.cs index 5c9c8eb0a..5a12ab229 100644 --- a/Greenshot/Destinations/WordDestination.cs +++ b/Greenshot/Destinations/WordDestination.cs @@ -42,7 +42,6 @@ namespace Greenshot.Destinations { private static string exePath = null; private static Image applicationIcon = null; private static Image documentIcon = null; - private ILanguage lang = Language.GetInstance(); private string documentCaption = null; static WordDestination() { @@ -137,7 +136,7 @@ namespace Greenshot.Destinations { } 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; return true; diff --git a/Greenshot/Drawing/DrawableContainerList.cs b/Greenshot/Drawing/DrawableContainerList.cs index 084d1d422..0ca5dac3d 100644 --- a/Greenshot/Drawing/DrawableContainerList.cs +++ b/Greenshot/Drawing/DrawableContainerList.cs @@ -374,7 +374,6 @@ namespace Greenshot.Drawing { /// /// public virtual void AddContextMenuItems(ContextMenuStrip menu, Surface surface) { - ILanguage lang = Language.GetInstance(); bool push = surface.Elements.CanPushDown(this); bool pull = surface.Elements.CanPullUp(this); @@ -382,13 +381,13 @@ namespace Greenshot.Drawing { // Pull "up" if (pull) { - item = new ToolStripMenuItem(lang.GetString(LangKey.editor_uptotop)); + item = new ToolStripMenuItem(Language.GetString(LangKey.editor_uptotop)); item.Click += delegate { surface.Elements.PullElementsToTop(this); surface.Elements.Invalidate(); }; menu.Items.Add(item); - item = new ToolStripMenuItem(lang.GetString(LangKey.editor_uponelevel)); + item = new ToolStripMenuItem(Language.GetString(LangKey.editor_uponelevel)); item.Click += delegate { surface.Elements.PullElementsUp(this); surface.Elements.Invalidate(); @@ -397,13 +396,13 @@ namespace Greenshot.Drawing { } // Push "down" if (push) { - item = new ToolStripMenuItem(lang.GetString(LangKey.editor_downtobottom)); + item = new ToolStripMenuItem(Language.GetString(LangKey.editor_downtobottom)); item.Click += delegate { surface.Elements.PushElementsToBottom(this); surface.Elements.Invalidate(); }; menu.Items.Add(item); - item = new ToolStripMenuItem(lang.GetString(LangKey.editor_downonelevel)); + item = new ToolStripMenuItem(Language.GetString(LangKey.editor_downonelevel)); item.Click += delegate { surface.Elements.PushElementsDown(this); surface.Elements.Invalidate(); @@ -412,7 +411,7 @@ namespace Greenshot.Drawing { } // Duplicate - item = new ToolStripMenuItem(lang.GetString(LangKey.editor_duplicate)); + item = new ToolStripMenuItem(Language.GetString(LangKey.editor_duplicate)); item.Click += delegate { DrawableContainerList dcs = this.Clone(); dcs.Parent = surface; @@ -424,7 +423,7 @@ namespace Greenshot.Drawing { menu.Items.Add(item); // 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.Click += delegate { ClipboardHelper.SetClipboardData(typeof(DrawableContainerList), this); @@ -432,7 +431,7 @@ namespace Greenshot.Drawing { menu.Items.Add(item); // 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.Click += delegate { ClipboardHelper.SetClipboardData(typeof(DrawableContainerList), this); @@ -443,7 +442,7 @@ namespace Greenshot.Drawing { menu.Items.Add(item); // 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.Click += delegate { foreach(DrawableContainer container in this) { diff --git a/Greenshot/Forms/AboutForm.Designer.cs b/Greenshot/Forms/AboutForm.Designer.cs index 72cdd2187..396e1c096 100644 --- a/Greenshot/Forms/AboutForm.Designer.cs +++ b/Greenshot/Forms/AboutForm.Designer.cs @@ -20,7 +20,7 @@ */ using System; using System.Windows.Forms; -using Greenshot.Configuration; + namespace Greenshot { partial class AboutForm { @@ -236,18 +236,5 @@ namespace Greenshot { private System.Windows.Forms.Label lblLicense; private System.Windows.Forms.Label lblTitle; 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)); - } - } } } diff --git a/Greenshot/Forms/AboutForm.cs b/Greenshot/Forms/AboutForm.cs index 2806e759e..078703f9f 100644 --- a/Greenshot/Forms/AboutForm.cs +++ b/Greenshot/Forms/AboutForm.cs @@ -33,8 +33,6 @@ namespace Greenshot { /// Description of AboutForm. /// public partial class AboutForm : Form { - private ILanguage lang; - public AboutForm() { // // The InitializeComponent() call is required for Windows Forms designer support. @@ -45,18 +43,30 @@ namespace Greenshot { Version v = Assembly.GetExecutingAssembly().GetName().Version; // 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)"); - lang = Language.GetInstance(); updateUI(); } void updateUI() { - this.Text = lang.GetString(LangKey.about_title); - this.lblLicense.Text = lang.GetString(LangKey.about_license); - this.lblHost.Text = lang.GetString(LangKey.about_host); - this.lblBugs.Text = lang.GetString(LangKey.about_bugs); - this.lblDonations.Text = lang.GetString(LangKey.about_donations); - this.lblIcons.Text = lang.GetString(LangKey.about_icons); - this.lblTranslation.Text = lang.GetString(LangKey.about_translation); + this.Text = Language.GetString(LangKey.about_title); + this.lblLicense.Text = Language.GetString(LangKey.about_license); + this.lblHost.Text = Language.GetString(LangKey.about_host); + this.lblBugs.Text = Language.GetString(LangKey.about_bugs); + this.lblDonations.Text = Language.GetString(LangKey.about_donations); + this.lblIcons.Text = Language.GetString(LangKey.about_icons); + 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) { diff --git a/Greenshot/Forms/BugReportForm.cs b/Greenshot/Forms/BugReportForm.cs index 19a4a8a9a..efba79c77 100644 --- a/Greenshot/Forms/BugReportForm.cs +++ b/Greenshot/Forms/BugReportForm.cs @@ -26,14 +26,12 @@ using GreenshotPlugin.Core; namespace Greenshot.Forms { public partial class BugReportForm : Form { - private ILanguage lang; private BugReportForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); this.Icon = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon(); - lang = Language.GetInstance(); UpdateUI(); WindowDetails.ToForeground(this.Handle); } @@ -44,9 +42,9 @@ namespace Greenshot.Forms { } void UpdateUI() { - this.Text = lang.GetString(LangKey.bugreport_title); - this.labelBugReportInfo.Text = lang.GetString(LangKey.bugreport_info); - this.btnClose.Text = lang.GetString(LangKey.bugreport_cancel); + this.Text = Language.GetString(LangKey.bugreport_title); + this.labelBugReportInfo.Text = Language.GetString(LangKey.bugreport_info); + this.btnClose.Text = Language.GetString(LangKey.bugreport_cancel); } void LinkLblBugsLinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e) { @@ -58,7 +56,7 @@ namespace Greenshot.Forms { link.LinkVisited = true; System.Diagnostics.Process.Start(link.Text); } 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)); } } } diff --git a/Greenshot/Forms/CaptureForm.cs b/Greenshot/Forms/CaptureForm.cs index 6650d91a9..4a8b3404f 100644 --- a/Greenshot/Forms/CaptureForm.cs +++ b/Greenshot/Forms/CaptureForm.cs @@ -58,7 +58,6 @@ namespace Greenshot.Forms { private bool mouseDown = false; private Rectangle captureRect = Rectangle.Empty; private ICapture capture = null; - private ILanguage lang = Language.GetInstance(); private Point previousMousePos = Point.Empty; private FixMode fixMode = FixMode.None; diff --git a/Greenshot/Forms/ColorDialog.cs b/Greenshot/Forms/ColorDialog.cs index 2c261c0c2..02a8dbf4c 100644 --- a/Greenshot/Forms/ColorDialog.cs +++ b/Greenshot/Forms/ColorDialog.cs @@ -38,7 +38,6 @@ namespace Greenshot { private ColorDialog() { this.SuspendLayout(); InitializeComponent(); - lang = Language.GetInstance(); updateUI(); this.SuspendLayout(); this.createColorPalette(5,5,15,15); @@ -54,7 +53,6 @@ namespace Greenshot { return uniqueInstance; } - private ILanguage lang; private List