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
commit 53af559d22
44 changed files with 472 additions and 874 deletions

View file

@ -374,7 +374,6 @@ namespace Greenshot.Drawing {
/// </summary>
/// <param name="menu"></param>
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) {