mirror of
https://github.com/greenshot/greenshot
synced 2025-08-21 05:53:27 -07:00
Moving back to trunk!
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
ad265b2c54
commit
8d458998a1
332 changed files with 17647 additions and 9466 deletions
|
@ -19,25 +19,17 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Greenshot.Drawing;
|
||||
using Greenshot.Drawing.Fields;
|
||||
using Greenshot.Helpers;
|
||||
using Greenshot.UnmanagedHelpers;
|
||||
using GreenshotPlugin.Controls;
|
||||
using GreenshotPlugin.UnmanagedHelpers;
|
||||
using GreenshotPlugin.Core;
|
||||
using Greenshot.Plugin;
|
||||
using IniFile;
|
||||
|
||||
namespace Greenshot.Configuration {
|
||||
public enum ScreenshotDestinations {Editor=1, FileDefault=2, FileWithDialog=4, Clipboard=8, Printer=16, EMail=32}
|
||||
|
@ -183,22 +175,22 @@ namespace Greenshot.Configuration {
|
|||
}
|
||||
coreConfiguration.CaptureDelay = delay;
|
||||
if ((appConfig.Output_Destinations & ScreenshotDestinations.Clipboard) == ScreenshotDestinations.Clipboard) {
|
||||
coreConfiguration.OutputDestinations.Add(Destination.Clipboard);
|
||||
coreConfiguration.OutputDestinations.Add("Clipboard");
|
||||
}
|
||||
if ((appConfig.Output_Destinations & ScreenshotDestinations.Editor) == ScreenshotDestinations.Editor) {
|
||||
coreConfiguration.OutputDestinations.Add(Destination.Editor);
|
||||
coreConfiguration.OutputDestinations.Add("Editor");
|
||||
}
|
||||
if ((appConfig.Output_Destinations & ScreenshotDestinations.EMail) == ScreenshotDestinations.EMail) {
|
||||
coreConfiguration.OutputDestinations.Add(Destination.EMail);
|
||||
coreConfiguration.OutputDestinations.Add("EMail");
|
||||
}
|
||||
if ((appConfig.Output_Destinations & ScreenshotDestinations.Printer) == ScreenshotDestinations.Printer) {
|
||||
coreConfiguration.OutputDestinations.Add(Destination.Printer);
|
||||
coreConfiguration.OutputDestinations.Add("Printer");
|
||||
}
|
||||
if ((appConfig.Output_Destinations & ScreenshotDestinations.FileDefault) == ScreenshotDestinations.FileDefault) {
|
||||
coreConfiguration.OutputDestinations.Add(Destination.FileDefault);
|
||||
coreConfiguration.OutputDestinations.Add("File");
|
||||
}
|
||||
if ((appConfig.Output_Destinations & ScreenshotDestinations.FileWithDialog) == ScreenshotDestinations.FileWithDialog) {
|
||||
coreConfiguration.OutputDestinations.Add(Destination.FileWithDialog);
|
||||
coreConfiguration.OutputDestinations.Add("FileWithDialog");
|
||||
}
|
||||
IniConfig.Save();
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -21,15 +21,10 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
|
||||
using Greenshot.Drawing;
|
||||
using Greenshot.Drawing.Fields;
|
||||
using Greenshot.Helpers;
|
||||
using Greenshot.UnmanagedHelpers;
|
||||
using GreenshotPlugin.Core;
|
||||
using GreenshotPlugin.UnmanagedHelpers;
|
||||
using IniFile;
|
||||
|
||||
namespace Greenshot.Configuration {
|
||||
/// <summary>
|
||||
|
@ -56,19 +51,8 @@ namespace Greenshot.Configuration {
|
|||
[IniProperty("WindowNormalPosition", Description="Position of normal window", DefaultValue="100,100,400,400")]
|
||||
public Rectangle WindowNormalPosition;
|
||||
|
||||
/// <summary>
|
||||
/// Supply values we can't put as defaults
|
||||
/// </summary>
|
||||
/// <param name="property">The property to return a default for</param>
|
||||
/// <returns>object with the default value for the supplied property</returns>
|
||||
public override object GetDefault(string property) {
|
||||
switch(property) {
|
||||
case "RecentColors":
|
||||
return new List<Color>();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
[IniProperty("SuppressSaveDialogAtClose", Description="Suppressed the 'do you want to save' dialog when closing the editor.", DefaultValue="False")]
|
||||
public bool SuppressSaveDialogAtClose;
|
||||
/// <param name="requestingType">Type of the class for which to create the field</param>
|
||||
/// <param name="fieldType">FieldType of the field to construct</param>
|
||||
/// <param name="scope">FieldType of the field to construct</param>
|
||||
|
|
|
@ -19,15 +19,8 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
|
||||
using GreenshotPlugin.Core;
|
||||
using IniFile;
|
||||
|
||||
namespace Greenshot.Configuration {
|
||||
/// <summary>
|
||||
|
@ -36,18 +29,25 @@ namespace Greenshot.Configuration {
|
|||
public class Language : LanguageContainer, ILanguage {
|
||||
private static ILanguage uniqueInstance;
|
||||
private const string LANGUAGE_FILENAME_PATTERN = @"language-*.xml";
|
||||
private static CoreConfiguration conf = IniConfig.GetIniSection<CoreConfiguration>();
|
||||
|
||||
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)) {
|
||||
uniqueInstance.SynchronizeLanguageToCulture();
|
||||
} else {
|
||||
uniqueInstance.SetLanguage(conf.Language);
|
||||
}
|
||||
if (freeResources) {
|
||||
uniqueInstance.FreeResources();
|
||||
}
|
||||
}
|
||||
return uniqueInstance;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ using System;
|
|||
|
||||
namespace Greenshot.Configuration {
|
||||
public enum LangKey {
|
||||
none,
|
||||
about_bugs,
|
||||
about_donations,
|
||||
about_host,
|
||||
|
@ -88,6 +89,7 @@ namespace Greenshot.Configuration {
|
|||
editor_drawellipse,
|
||||
editor_drawhighlighter,
|
||||
editor_drawline,
|
||||
editor_drawfreehand,
|
||||
editor_drawrectangle,
|
||||
editor_drawtextbox,
|
||||
editor_duplicate,
|
||||
|
@ -127,6 +129,9 @@ namespace Greenshot.Configuration {
|
|||
editor_title,
|
||||
editor_uponelevel,
|
||||
editor_uptotop,
|
||||
editor_autocrop,
|
||||
editor_undo,
|
||||
editor_redo,
|
||||
error,
|
||||
error_multipleinstances,
|
||||
error_nowriteaccess,
|
||||
|
@ -162,6 +167,7 @@ namespace Greenshot.Configuration {
|
|||
settings_destination_file,
|
||||
settings_destination_fileas,
|
||||
settings_destination_printer,
|
||||
settings_destination_picker,
|
||||
settings_editor,
|
||||
settings_filenamepattern,
|
||||
settings_general,
|
||||
|
@ -187,6 +193,7 @@ namespace Greenshot.Configuration {
|
|||
settings_tooltip_registerhotkeys,
|
||||
settings_tooltip_storagelocation,
|
||||
settings_visualization,
|
||||
settings_shownotify,
|
||||
settings_waittime,
|
||||
settings_windowscapture,
|
||||
settings_window_capture_mode,
|
||||
|
@ -198,6 +205,7 @@ namespace Greenshot.Configuration {
|
|||
warning_hotkeys,
|
||||
hotkeys,
|
||||
wait_ie_capture,
|
||||
update_found
|
||||
update_found,
|
||||
exported_to
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,10 +18,11 @@
|
|||
* 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.Drawing.Imaging;
|
||||
using System.Drawing;
|
||||
using System.Windows.Forms;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
|
||||
using Greenshot.Plugin;
|
||||
|
||||
namespace Greenshot.Configuration {
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue