Cleaning HEAD, to replace it with the branch

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1281 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2011-07-17 11:54:05 +00:00
commit 174f653a5a
506 changed files with 0 additions and 76725 deletions

View file

@ -1,34 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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.Collections.Generic;
using Greenshot.Core;
namespace GreenshotFlickrPlugin {
/// <summary>
/// Description of FlickrConfiguration.
/// </summary>
[IniSection("Flickr", Description="Greenshot Flickr Plugin configuration")]
public class FlickrConfiguration : IniSection {
[IniProperty("authentication.token", Description="Token for Flickr", DefaultValue="")]
public string Token;
}
}

View file

@ -1,203 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Reflection;
using System.Runtime.Serialization.Formatters.Binary;
using System.Text;
using System.Windows.Forms;
using FlickrNet;
using Greenshot.Capturing;
using Greenshot.Core;
using Greenshot.Forms;
using Greenshot.Plugin;
using Microsoft.Win32;
namespace GreenshotFlickrPlugin {
/// <summary>
/// OCR Plugin Greenshot
/// </summary>
public class FlickrPlugin : IGreenshotPlugin {
private static readonly log4net.ILog LOG = log4net.LogManager.GetLogger(typeof(FlickrPlugin));
private const string ApiKey = "f967e5148945cb3c4e149cc5be97796a";
private const string SharedSecret = "4180a21a1d2f8666";
private ILanguage lang = Language.GetInstance();
private IGreenshotPluginHost host;
private ICaptureHost captureHost = null;
private PluginAttribute myAttributes;
private FlickrConfiguration config;
public FlickrPlugin() {}
/// <summary>
/// Implementation of the IGreenshotPlugin.Initialize
/// </summary>
/// <param name="host">Use the IGreenshotPluginHost interface to register events</param>
/// <param name="captureHost">Use the ICaptureHost interface to register in the MainContextMenu</param>
/// <param name="pluginAttribute">My own attributes</param>
public void Initialize(IGreenshotPluginHost host, ICaptureHost captureHost, PluginAttribute myAttributes) {
LOG.Debug("Initialize called of " + myAttributes.Name);
this.host = (IGreenshotPluginHost)host;
this.captureHost = captureHost;
this.myAttributes = myAttributes;
host.OnImageEditorOpen += new OnImageEditorOpenHandler(ImageEditorOpened);
// Make sure the MODI-DLLs are found by adding a resolver
AppDomain.CurrentDomain.AssemblyResolve += new ResolveEventHandler(MyAssemblyResolver);
this.config = IniConfig.GetIniSection<FlickrConfiguration>();
}
/// <summary>
/// Implementation of the OnImageEditorOpen event
/// Using the ImageEditor interface to register in the plugin menu
/// </summary>
private void ImageEditorOpened(object sender, ImageEditorOpenEventArgs eventArgs) {
ToolStripMenuItem toolStripMenuItem = eventArgs.ImageEditor.GetPluginMenuItem();
ToolStripMenuItem item = new ToolStripMenuItem();
item.Text = "Upload to Flickr";
item.Tag = eventArgs.ImageEditor;
item.Click += new System.EventHandler(EditMenuClick);
toolStripMenuItem.DropDownItems.Add(item);
}
/// <summary>
/// Implementation of the IGreenshotPlugin.Shutdown
/// </summary>
public void Shutdown() {
LOG.Debug("Shutdown of " + myAttributes.Name);
host.OnImageEditorOpen -= new OnImageEditorOpenHandler(ImageEditorOpened);
}
/// <summary>
/// Implementation of the IPlugin.Configure
/// </summary>
public virtual void Configure() {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.AppendLine("This plugin doesn't have a configuration screen.");
MessageBox.Show(stringBuilder.ToString());
}
/// <summary>
/// This method helps to resolve the Flickr DLL file
/// </summary>
/// <param name="sender">object which is starting the resolve</param>
/// <param name="args">ResolveEventArgs describing the Assembly that needs to be found</param>
/// <returns></returns>
private Assembly MyAssemblyResolver(object sender, ResolveEventArgs args) {
string dllPath = Path.GetDirectoryName(myAttributes.DllFile);
string dllFilename = args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll";
LOG.Debug("Resolving: " + dllFilename);
if (dllFilename.ToLower().StartsWith("flickr")) {
return Assembly.LoadFile(Path.Combine(dllPath, dllFilename));
}
return null;
}
/// <summary>
/// This will be called when the menu item in the Editor is clicked
/// </summary>
public void EditMenuClick(object sender, EventArgs eventArgs) {
ToolStripMenuItem item = (ToolStripMenuItem)sender;
IImageEditor imageEditor = (IImageEditor)item.Tag;
bool authentication = false;
Flickr flickr = new Flickr(ApiKey, SharedSecret);
if(config.Token == null) {
string frob = flickr.AuthGetFrob();
// Calculate the URL at Flickr to redirect the user to
string flickrUrl = flickr.AuthCalcUrl(frob, AuthLevel.Write);
FlickrAuthenticationForm authForm = new FlickrAuthenticationForm(flickrUrl);
DialogResult authFormResult = authForm.ShowDialog();
if (authFormResult == DialogResult.OK) {
try {
// use the temporary Frob to get the authentication
Auth auth = flickr.AuthGetToken(frob);
// Store this Token for later usage,
// or set your Flickr instance to use it.
LOG.Debug("User authenticated successfully");
LOG.Debug("Authentication token is " + auth.Token);
LOG.Debug("User id is " + auth.User.UserId);
LOG.Debug("User name is " + auth.User.UserName);
LOG.Debug("User fullname is " + auth.User.FullName);
config.Token = auth.Token;
IniConfig.Save();
authentication = true;
} catch (FlickrException ex) {
// If user did not authenticat your application
// then a FlickrException will be thrown.
LOG.Debug("User did not authenticate you", ex);
}
}
} else {
// Token is there
authentication = true;
}
if (!authentication) {
MessageBox.Show("No Authentication made!");
return;
}
flickr.AuthToken = config.Token;
FlickrUploadForm uploader = new FlickrUploadForm();
DialogResult uploaderResult = uploader.ShowDialog();
if (uploaderResult == DialogResult.OK) {
using (MemoryStream stream = new MemoryStream()) {
imageEditor.SaveToStream(stream, OutputFormat.Png, 100);
stream.Seek(0, SeekOrigin.Begin);
try {
string file = "test.png";
string title = "Test Photo";
string description = "This is the description of the photo";
string tags = "greenshot,screenshot";
string photoId = flickr.UploadPicture(stream, file, title, description, tags, false, false, false, ContentType.Screenshot, SafetyLevel.Restricted, HiddenFromSearch.Hidden);
flickr.PhotosSetMeta(photoId, "Greenshot screenshot", "This is a greenshot screenshot!");
// // Get list of users sets
// PhotosetCollection sets = flickr.PhotosetsGetList();
// string photosetId = null;
// if (sets.Count == 0) {
// LOG.Debug("Not photosets found, creating");
// Photoset photoset = flickr.PhotosetsCreate("Greenshot", "Greenshot screenshots", photoId);
// LOG.Debug("Created photoset with description: " + photoset.Description);
// LOG.Debug("Created photoset with id: " + photoset.PhotosetId);
// photosetId = photoset.PhotosetId;
// } else {
// // Get the first set in the collection
// photosetId = sets[0].PhotosetId;
// }
//
// // Add the photo to that set
// flickr.PhotosetsAddPhoto(photosetId, photoId);
MessageBox.Show(lang.GetString(LangKey.upload_success));
} catch(Exception e) {
LOG.Error("Problem uploading", e);
MessageBox.Show(lang.GetString(LangKey.upload_failure) + " " + e.Message);
}
}
}
}
}
}

View file

@ -1,110 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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/>.
*/
namespace GreenshotFlickrPlugin {
partial class FlickrAuthenticationForm {
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.okButton = new System.Windows.Forms.Button();
this.cancelButton = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(116, 229);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 6;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.OkButtonClick);
//
// cancelButton
//
this.cancelButton.Location = new System.Drawing.Point(197, 229);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 5;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.CancelButtonClick);
//
// button1
//
this.button1.Location = new System.Drawing.Point(102, 89);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(89, 23);
this.button1.TabIndex = 4;
this.button1.Text = "Authentication";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.AuthenticationButtonClick);
//
// label1
//
this.label1.Location = new System.Drawing.Point(13, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(259, 51);
this.label1.TabIndex = 7;
this.label1.Text = "Please press the authentication button, this will open a browser. Login to Flickr" +
" and allow Greenshot access";
//
// FlickrAuthenticationForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 264);
this.Controls.Add(this.label1);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
this.Controls.Add(this.button1);
this.Name = "FlickrAuthenticationForm";
this.Text = "FlickrAuthenticationForm";
this.ResumeLayout(false);
}
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
}
}

View file

@ -1,52 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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.Drawing;
using System.Windows.Forms;
namespace GreenshotFlickrPlugin {
/// <summary>
/// Description of FlickrAuthenticationForm.
/// </summary>
public partial class FlickrAuthenticationForm : Form {
private string authenticationUrl = null;
public FlickrAuthenticationForm(string authenticationUrl) {
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
this.authenticationUrl = authenticationUrl;
}
void AuthenticationButtonClick(object sender, EventArgs e) {
// The following line will load the URL in the users default browser.
System.Diagnostics.Process.Start(authenticationUrl);
}
void OkButtonClick(object sender, EventArgs e) {
DialogResult = DialogResult.OK;
}
void CancelButtonClick(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;
}
}
}

View file

@ -1,85 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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/>.
*/
namespace GreenshotFlickrPlugin {
partial class FlickrUploadForm {
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing) {
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent() {
this.cancelButton = new System.Windows.Forms.Button();
this.okButton = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// cancelButton
//
this.cancelButton.Location = new System.Drawing.Point(197, 229);
this.cancelButton.Name = "cancelButton";
this.cancelButton.Size = new System.Drawing.Size(75, 23);
this.cancelButton.TabIndex = 2;
this.cancelButton.Text = "Cancel";
this.cancelButton.UseVisualStyleBackColor = true;
this.cancelButton.Click += new System.EventHandler(this.CancelButtonClick);
//
// okButton
//
this.okButton.Location = new System.Drawing.Point(116, 229);
this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(75, 23);
this.okButton.TabIndex = 3;
this.okButton.Text = "OK";
this.okButton.UseVisualStyleBackColor = true;
this.okButton.Click += new System.EventHandler(this.OkButtonClick);
//
// FlickrUploadForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 264);
this.Controls.Add(this.okButton);
this.Controls.Add(this.cancelButton);
this.Name = "FlickrUploadForm";
this.Text = "FlickrUploadForm";
this.ResumeLayout(false);
}
private System.Windows.Forms.Button cancelButton;
private System.Windows.Forms.Button okButton;
}
}

View file

@ -1,47 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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.Drawing;
using System.IO;
using System.Windows.Forms;
namespace GreenshotFlickrPlugin {
/// <summary>
/// Description of FlickrUploadForm.
/// </summary>
public partial class FlickrUploadForm : Form {
public FlickrUploadForm() {
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
}
void OkButtonClick(object sender, EventArgs e) {
DialogResult = DialogResult.OK;
}
void CancelButtonClick(object sender, EventArgs e) {
DialogResult = DialogResult.Cancel;
}
}
}

View file

@ -1,96 +0,0 @@
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{56828D7F-F227-41EC-8873-CC32A23A1783}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<RootNamespace>GreenshotFlickrPlugin</RootNamespace>
<AssemblyName>GreenshotFlickrPlugin</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<SourceAnalysisOverrideSettingsFile>C:\Users\Robin\AppData\Roaming\ICSharpCode/SharpDevelop3.0\Settings.SourceAnalysis</SourceAnalysisOverrideSettingsFile>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'x86' ">
<PlatformTarget>x86</PlatformTarget>
<RegisterForComInterop>False</RegisterForComInterop>
<GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
<BaseAddress>4194304</BaseAddress>
<FileAlignment>4096</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<OutputPath>bin\Debug\</OutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>Full</DebugType>
<Optimize>False</Optimize>
<CheckForOverflowUnderflow>True</CheckForOverflowUnderflow>
<DefineConstants>DEBUG;TRACE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<OutputPath>bin\Release\</OutputPath>
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
<Optimize>True</Optimize>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<DefineConstants>TRACE</DefineConstants>
</PropertyGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.Targets" />
<ItemGroup>
<Reference Include="FlickrNet">
<HintPath>Lib\FlickrNet.dll</HintPath>
</Reference>
<Reference Include="log4net">
<HintPath>..\GreenshotCore\Lib\log4net.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
<ItemGroup>
<Compile Include="FlickrConfiguration.cs" />
<Compile Include="FlickrPlugin.cs" />
<Compile Include="Forms\FlickrAuthenticationForm.cs" />
<Compile Include="Forms\FlickrAuthenticationForm.Designer.cs">
<DependentUpon>FlickrAuthenticationForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\FlickrUploadForm.cs" />
<Compile Include="Forms\FlickrUploadForm.Designer.cs">
<DependentUpon>FlickrUploadForm.cs</DependentUpon>
</Compile>
<Compile Include="Language.cs" />
<Compile Include="LanguageKeys.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<None Include="Languages\language_flickrplugin-de-DE.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Languages\language_flickrplugin-en-US.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Languages\language_flickrplugin-nl-NL.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Lib\FlickrNet.dll" />
<None Include="Properties\AssemblyInfo.cs.template" />
</ItemGroup>
<ItemGroup>
<Folder Include="Lib" />
<Folder Include="Languages" />
<Folder Include="Forms" />
<ProjectReference Include="..\GreenshotCore\GreenshotCore.csproj">
<Project>{BDC408EE-DEA1-4474-B59D-7F05757B12EC}</Project>
<Name>GreenshotCore</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup>
<PreBuildEvent>"$(SolutionDir)\tools\TortoiseSVN\SubWCRev.exe" "$(ProjectDir)\" "$(ProjectDir)\Properties\AssemblyInfo.cs.template" "$(ProjectDir)\Properties\AssemblyInfo.cs"</PreBuildEvent>
<PostBuildEvent>mkdir "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)"
copy "$(ProjectDir)bin\$(Configuration)\$(TargetFileName)" "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)\*.gsp"
copy "$(ProjectDir)bin\$(Configuration)\FlickrNet.dll" "$(SolutionDir)bin\$(Configuration)\Plugins\$(ProjectName)\*"
mkdir "$(SolutionDir)bin\$(Configuration)\Languages\Plugins\$(ProjectName)"
copy "$(ProjectDir)bin\$(Configuration)\Languages\*.xml" "$(SolutionDir)bin\$(Configuration)\Languages\Plugins\$(ProjectName)\"</PostBuildEvent>
</PropertyGroup>
</Project>

View file

@ -1,47 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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.Diagnostics;
using System.Globalization;
using System.Resources;
using System.Threading;
using Greenshot.Core;
namespace GreenshotFlickrPlugin {
/// <summary>
/// Wrapper for the language container for the Jira plugin.
/// </summary>
public class Language : LanguageContainer, ILanguage {
private static ILanguage uniqueInstance;
private const string LANGUAGE_FILENAME_PATTERN = @"language_flickrplugin-*.xml";
public static ILanguage GetInstance() {
if(uniqueInstance == null) {
uniqueInstance = new LanguageContainer();
uniqueInstance.LanguageFilePattern = LANGUAGE_FILENAME_PATTERN;
uniqueInstance.Load();
uniqueInstance.SetLanguage(Thread.CurrentThread.CurrentUICulture.Name);
}
return uniqueInstance;
}
}
}

View file

@ -1,29 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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;
namespace GreenshotFlickrPlugin {
public enum LangKey {
login_error,
upload_success,
upload_failure
}
}

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<language description="Deutsch" ietf="de-DE" version="0.8.0">
<resources>
<resource name="login_error">
Es gab ein Problem während dem Login: {0}
</resource>
<resource name="upload_success">
Ein erfolg beim Hochladen zum Flickr!
</resource>
<resource name="upload_failure">
Es gab einen Fehler beim Hochladen zum Flickr:
</resource>
</resources>
</language>

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<language description="English" ietf="en-US" version="0.8.0">
<resources>
<resource name="login_error">
There was a problem during the login: {0}
</resource>
<resource name="upload_success">
Successfully uploaded image to Flickr!
</resource>
<resource name="upload_failure">
An error occured while uploading to Flickr:
</resource>
</resources>
</language>

View file

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<language description="Nederlands" ietf="nl-NL" version="0.8.0">
<resources>
<resource name="login_error">
Tijden de login is een fout opgetreden: {0}
</resource>
<resource name="upload_success">
Het uploaden naar Flickr is geslaagt!
</resource>
<resource name="upload_failure">
Tijdens het uploaden naar Flickr is een fout opgetreden:
</resource>
</resources>
</language>

View file

@ -1,54 +0,0 @@
/*
* Greenshot - a free and open source screenshot tool
* Copyright (C) 2007-2010 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/>.
*/
#region Using directives
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using Greenshot.Plugin;
#endregion
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("GreenshotFlickrPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GreenshotFlickrPlugin")]
[assembly: AssemblyCopyright("Copyright 2010")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The PluginAttribute describes the "entryType" and if the plugin is configurable
[assembly: PluginAttribute("GreenshotFlickrPlugin.FlickrPlugin", true)]
// This sets the default COM visibility of types in the assembly to invisible.
// If you need to expose a type to COM, use [ComVisible(true)] on that type.
[assembly: ComVisible(false)]
// The assembly version has following format :
//
// Major.Minor.Build.Revision
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.$WCREV$")]