From 63274f64825837747979b50a1881a53fee319d03 Mon Sep 17 00:00:00 2001 From: Jaex Date: Wed, 1 Aug 2018 14:44:48 +0300 Subject: [PATCH] Added image history settings form --- .../{ => Forms}/HistoryForm.Designer.cs | 0 ShareX.HistoryLib/{ => Forms}/HistoryForm.cs | 0 .../{ => Forms}/HistoryForm.de.resx | 0 .../{ => Forms}/HistoryForm.es-MX.resx | 0 .../{ => Forms}/HistoryForm.es.resx | 0 .../{ => Forms}/HistoryForm.fr.resx | 0 .../{ => Forms}/HistoryForm.hu.resx | 0 .../{ => Forms}/HistoryForm.it-IT.resx | 0 .../{ => Forms}/HistoryForm.ko-KR.resx | 0 .../{ => Forms}/HistoryForm.nl-NL.resx | 0 .../{ => Forms}/HistoryForm.pt-BR.resx | 0 .../{ => Forms}/HistoryForm.resx | 0 .../{ => Forms}/HistoryForm.ru.resx | 0 .../{ => Forms}/HistoryForm.tr.resx | 0 .../{ => Forms}/HistoryForm.uk.resx | 0 .../{ => Forms}/HistoryForm.vi-VN.resx | 0 .../{ => Forms}/HistoryForm.zh-CN.resx | 0 .../{ => Forms}/HistoryForm.zh-TW.resx | 0 .../HistoryItemInfoForm.Designer.cs | 0 .../{ => Forms}/HistoryItemInfoForm.cs | 0 .../{ => Forms}/HistoryItemInfoForm.de.resx | 0 .../HistoryItemInfoForm.es-MX.resx | 0 .../{ => Forms}/HistoryItemInfoForm.es.resx | 0 .../{ => Forms}/HistoryItemInfoForm.fr.resx | 0 .../{ => Forms}/HistoryItemInfoForm.hu.resx | 0 .../HistoryItemInfoForm.it-IT.resx | 0 .../HistoryItemInfoForm.ko-KR.resx | 0 .../HistoryItemInfoForm.nl-NL.resx | 0 .../HistoryItemInfoForm.pt-BR.resx | 0 .../{ => Forms}/HistoryItemInfoForm.resx | 0 .../{ => Forms}/HistoryItemInfoForm.ru.resx | 0 .../{ => Forms}/HistoryItemInfoForm.tr.resx | 0 .../{ => Forms}/HistoryItemInfoForm.uk.resx | 0 .../HistoryItemInfoForm.vi-VN.resx | 0 .../HistoryItemInfoForm.zh-CN.resx | 0 .../HistoryItemInfoForm.zh-TW.resx | 0 .../{ => Forms}/ImageHistoryForm.Designer.cs | 109 ++---- .../{ => Forms}/ImageHistoryForm.cs | 108 +----- .../{ => Forms}/ImageHistoryForm.de.resx | 0 .../{ => Forms}/ImageHistoryForm.es-MX.resx | 0 .../{ => Forms}/ImageHistoryForm.es.resx | 0 .../{ => Forms}/ImageHistoryForm.fr.resx | 0 .../{ => Forms}/ImageHistoryForm.hu.resx | 0 .../{ => Forms}/ImageHistoryForm.it-IT.resx | 0 .../{ => Forms}/ImageHistoryForm.ko-KR.resx | 0 .../{ => Forms}/ImageHistoryForm.nl-NL.resx | 0 .../{ => Forms}/ImageHistoryForm.pt-BR.resx | 0 .../{ => Forms}/ImageHistoryForm.resx | 149 ++------ .../{ => Forms}/ImageHistoryForm.ru.resx | 0 .../{ => Forms}/ImageHistoryForm.tr.resx | 0 .../{ => Forms}/ImageHistoryForm.uk.resx | 0 .../{ => Forms}/ImageHistoryForm.vi-VN.resx | 0 .../{ => Forms}/ImageHistoryForm.zh-CN.resx | 0 .../{ => Forms}/ImageHistoryForm.zh-TW.resx | 0 .../ImageHistorySettingsForm.Designer.cs | 135 ++++++++ .../Forms/ImageHistorySettingsForm.cs | 70 ++++ .../Forms/ImageHistorySettingsForm.resx | 321 ++++++++++++++++++ ShareX.HistoryLib/ImageHistorySettings.cs | 43 +++ ShareX.HistoryLib/ShareX.HistoryLib.csproj | 113 +++--- ShareX/ApplicationConfig.cs | 5 +- ShareX/TaskHelpers.cs | 8 +- 61 files changed, 701 insertions(+), 360 deletions(-) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.Designer.cs (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.cs (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.de.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.es-MX.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.es.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.fr.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.hu.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.it-IT.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.ko-KR.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.nl-NL.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.pt-BR.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.ru.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.tr.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.uk.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.vi-VN.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.zh-CN.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryForm.zh-TW.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.Designer.cs (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.cs (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.de.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.es-MX.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.es.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.fr.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.hu.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.it-IT.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.ko-KR.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.nl-NL.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.pt-BR.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.ru.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.tr.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.uk.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.vi-VN.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.zh-CN.resx (100%) rename ShareX.HistoryLib/{ => Forms}/HistoryItemInfoForm.zh-TW.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.Designer.cs (53%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.cs (59%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.de.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.es-MX.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.es.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.fr.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.hu.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.it-IT.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.ko-KR.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.nl-NL.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.pt-BR.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.resx (71%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.ru.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.tr.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.uk.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.vi-VN.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.zh-CN.resx (100%) rename ShareX.HistoryLib/{ => Forms}/ImageHistoryForm.zh-TW.resx (100%) create mode 100644 ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs create mode 100644 ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs create mode 100644 ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx create mode 100644 ShareX.HistoryLib/ImageHistorySettings.cs diff --git a/ShareX.HistoryLib/HistoryForm.Designer.cs b/ShareX.HistoryLib/Forms/HistoryForm.Designer.cs similarity index 100% rename from ShareX.HistoryLib/HistoryForm.Designer.cs rename to ShareX.HistoryLib/Forms/HistoryForm.Designer.cs diff --git a/ShareX.HistoryLib/HistoryForm.cs b/ShareX.HistoryLib/Forms/HistoryForm.cs similarity index 100% rename from ShareX.HistoryLib/HistoryForm.cs rename to ShareX.HistoryLib/Forms/HistoryForm.cs diff --git a/ShareX.HistoryLib/HistoryForm.de.resx b/ShareX.HistoryLib/Forms/HistoryForm.de.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.de.resx rename to ShareX.HistoryLib/Forms/HistoryForm.de.resx diff --git a/ShareX.HistoryLib/HistoryForm.es-MX.resx b/ShareX.HistoryLib/Forms/HistoryForm.es-MX.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.es-MX.resx rename to ShareX.HistoryLib/Forms/HistoryForm.es-MX.resx diff --git a/ShareX.HistoryLib/HistoryForm.es.resx b/ShareX.HistoryLib/Forms/HistoryForm.es.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.es.resx rename to ShareX.HistoryLib/Forms/HistoryForm.es.resx diff --git a/ShareX.HistoryLib/HistoryForm.fr.resx b/ShareX.HistoryLib/Forms/HistoryForm.fr.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.fr.resx rename to ShareX.HistoryLib/Forms/HistoryForm.fr.resx diff --git a/ShareX.HistoryLib/HistoryForm.hu.resx b/ShareX.HistoryLib/Forms/HistoryForm.hu.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.hu.resx rename to ShareX.HistoryLib/Forms/HistoryForm.hu.resx diff --git a/ShareX.HistoryLib/HistoryForm.it-IT.resx b/ShareX.HistoryLib/Forms/HistoryForm.it-IT.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.it-IT.resx rename to ShareX.HistoryLib/Forms/HistoryForm.it-IT.resx diff --git a/ShareX.HistoryLib/HistoryForm.ko-KR.resx b/ShareX.HistoryLib/Forms/HistoryForm.ko-KR.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.ko-KR.resx rename to ShareX.HistoryLib/Forms/HistoryForm.ko-KR.resx diff --git a/ShareX.HistoryLib/HistoryForm.nl-NL.resx b/ShareX.HistoryLib/Forms/HistoryForm.nl-NL.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.nl-NL.resx rename to ShareX.HistoryLib/Forms/HistoryForm.nl-NL.resx diff --git a/ShareX.HistoryLib/HistoryForm.pt-BR.resx b/ShareX.HistoryLib/Forms/HistoryForm.pt-BR.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.pt-BR.resx rename to ShareX.HistoryLib/Forms/HistoryForm.pt-BR.resx diff --git a/ShareX.HistoryLib/HistoryForm.resx b/ShareX.HistoryLib/Forms/HistoryForm.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.resx rename to ShareX.HistoryLib/Forms/HistoryForm.resx diff --git a/ShareX.HistoryLib/HistoryForm.ru.resx b/ShareX.HistoryLib/Forms/HistoryForm.ru.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.ru.resx rename to ShareX.HistoryLib/Forms/HistoryForm.ru.resx diff --git a/ShareX.HistoryLib/HistoryForm.tr.resx b/ShareX.HistoryLib/Forms/HistoryForm.tr.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.tr.resx rename to ShareX.HistoryLib/Forms/HistoryForm.tr.resx diff --git a/ShareX.HistoryLib/HistoryForm.uk.resx b/ShareX.HistoryLib/Forms/HistoryForm.uk.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.uk.resx rename to ShareX.HistoryLib/Forms/HistoryForm.uk.resx diff --git a/ShareX.HistoryLib/HistoryForm.vi-VN.resx b/ShareX.HistoryLib/Forms/HistoryForm.vi-VN.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.vi-VN.resx rename to ShareX.HistoryLib/Forms/HistoryForm.vi-VN.resx diff --git a/ShareX.HistoryLib/HistoryForm.zh-CN.resx b/ShareX.HistoryLib/Forms/HistoryForm.zh-CN.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.zh-CN.resx rename to ShareX.HistoryLib/Forms/HistoryForm.zh-CN.resx diff --git a/ShareX.HistoryLib/HistoryForm.zh-TW.resx b/ShareX.HistoryLib/Forms/HistoryForm.zh-TW.resx similarity index 100% rename from ShareX.HistoryLib/HistoryForm.zh-TW.resx rename to ShareX.HistoryLib/Forms/HistoryForm.zh-TW.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.Designer.cs b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.Designer.cs similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.Designer.cs rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.Designer.cs diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.cs b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.cs similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.cs rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.cs diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.de.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.de.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.de.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.de.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.es-MX.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.es-MX.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.es-MX.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.es-MX.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.es.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.es.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.es.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.es.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.fr.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.fr.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.fr.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.fr.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.hu.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.hu.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.hu.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.hu.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.it-IT.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.it-IT.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.it-IT.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.it-IT.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.ko-KR.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.ko-KR.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.ko-KR.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.ko-KR.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.nl-NL.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.nl-NL.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.nl-NL.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.nl-NL.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.pt-BR.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.pt-BR.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.pt-BR.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.pt-BR.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.ru.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.ru.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.ru.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.ru.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.tr.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.tr.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.tr.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.tr.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.uk.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.uk.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.uk.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.uk.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.vi-VN.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.vi-VN.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.vi-VN.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.vi-VN.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.zh-CN.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.zh-CN.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.zh-CN.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.zh-CN.resx diff --git a/ShareX.HistoryLib/HistoryItemInfoForm.zh-TW.resx b/ShareX.HistoryLib/Forms/HistoryItemInfoForm.zh-TW.resx similarity index 100% rename from ShareX.HistoryLib/HistoryItemInfoForm.zh-TW.resx rename to ShareX.HistoryLib/Forms/HistoryItemInfoForm.zh-TW.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.Designer.cs b/ShareX.HistoryLib/Forms/ImageHistoryForm.Designer.cs similarity index 53% rename from ShareX.HistoryLib/ImageHistoryForm.Designer.cs rename to ShareX.HistoryLib/Forms/ImageHistoryForm.Designer.cs index 5969d47d8..911041760 100644 --- a/ShareX.HistoryLib/ImageHistoryForm.Designer.cs +++ b/ShareX.HistoryLib/Forms/ImageHistoryForm.Designer.cs @@ -35,16 +35,8 @@ private void InitializeComponent() this.tslSearch = new System.Windows.Forms.ToolStripLabel(); this.tstbSearch = new System.Windows.Forms.ToolStripTextBox(); this.tsbSearch = new System.Windows.Forms.ToolStripButton(); - this.tsddbViewMode = new System.Windows.Forms.ToolStripDropDownButton(); - this.tsmiViewModeThumbnails = new System.Windows.Forms.ToolStripMenuItem(); - this.tsmiViewModeGallery = new System.Windows.Forms.ToolStripMenuItem(); - this.tsmiViewModePane = new System.Windows.Forms.ToolStripMenuItem(); - this.tsddbThumbnailSize = new System.Windows.Forms.ToolStripDropDownButton(); - this.tsmiThumbnailSize75 = new System.Windows.Forms.ToolStripMenuItem(); - this.tsmiThumbnailSize100 = new System.Windows.Forms.ToolStripMenuItem(); - this.tsmiThumbnailSize150 = new System.Windows.Forms.ToolStripMenuItem(); - this.tsmiThumbnailSize200 = new System.Windows.Forms.ToolStripMenuItem(); - this.tsmiThumbnailSize250 = new System.Windows.Forms.ToolStripMenuItem(); + this.tsbSettings = new System.Windows.Forms.ToolStripButton(); + this.tss1 = new System.Windows.Forms.ToolStripSeparator(); this.tscMain.ContentPanel.SuspendLayout(); this.tscMain.TopToolStripPanel.SuspendLayout(); this.tscMain.SuspendLayout(); @@ -72,6 +64,11 @@ private void InitializeComponent() this.ilvImages.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.ilvImages.CacheLimit = "100MB"; this.ilvImages.ColumnHeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); + this.ilvImages.Columns.AddRange(new Manina.Windows.Forms.ImageListView.ImageListViewColumnHeader[] { + new Manina.Windows.Forms.ImageListView.ImageListViewColumnHeader(Manina.Windows.Forms.ColumnType.Name, "", 100, 0, true), + new Manina.Windows.Forms.ImageListView.ImageListViewColumnHeader(Manina.Windows.Forms.ColumnType.FileSize, "", 100, 1, true), + new Manina.Windows.Forms.ImageListView.ImageListViewColumnHeader(Manina.Windows.Forms.ColumnType.Dimensions, "", 100, 2, true), + new Manina.Windows.Forms.ImageListView.ImageListViewColumnHeader(Manina.Windows.Forms.ColumnType.FilePath, "", 100, 3, true)}); resources.ApplyResources(this.ilvImages, "ilvImages"); this.ilvImages.GroupHeaderFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold); this.ilvImages.Name = "ilvImages"; @@ -91,8 +88,8 @@ private void InitializeComponent() this.tslSearch, this.tstbSearch, this.tsbSearch, - this.tsddbViewMode, - this.tsddbThumbnailSize}); + this.tss1, + this.tsbSettings}); this.tsMain.Name = "tsMain"; this.tsMain.ShowItemToolTips = false; // @@ -116,77 +113,17 @@ private void InitializeComponent() this.tsbSearch.Name = "tsbSearch"; this.tsbSearch.Click += new System.EventHandler(this.tsbSearch_Click); // - // tsddbViewMode + // tsbSettings // - this.tsddbViewMode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.tsddbViewMode.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.tsmiViewModeThumbnails, - this.tsmiViewModeGallery, - this.tsmiViewModePane}); - this.tsddbViewMode.Margin = new System.Windows.Forms.Padding(3, 1, 0, 2); - this.tsddbViewMode.Name = "tsddbViewMode"; - resources.ApplyResources(this.tsddbViewMode, "tsddbViewMode"); + this.tsbSettings.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + resources.ApplyResources(this.tsbSettings, "tsbSettings"); + this.tsbSettings.Name = "tsbSettings"; + this.tsbSettings.Click += new System.EventHandler(this.tsbSettings_Click); // - // tsmiViewModeThumbnails + // tss1 // - this.tsmiViewModeThumbnails.Name = "tsmiViewModeThumbnails"; - resources.ApplyResources(this.tsmiViewModeThumbnails, "tsmiViewModeThumbnails"); - this.tsmiViewModeThumbnails.Click += new System.EventHandler(this.tsmiViewModeThumbnails_Click); - // - // tsmiViewModeGallery - // - this.tsmiViewModeGallery.Name = "tsmiViewModeGallery"; - resources.ApplyResources(this.tsmiViewModeGallery, "tsmiViewModeGallery"); - this.tsmiViewModeGallery.Click += new System.EventHandler(this.tsmiViewModeGallery_Click); - // - // tsmiViewModePane - // - this.tsmiViewModePane.Name = "tsmiViewModePane"; - resources.ApplyResources(this.tsmiViewModePane, "tsmiViewModePane"); - this.tsmiViewModePane.Click += new System.EventHandler(this.tsmiViewModePane_Click); - // - // tsddbThumbnailSize - // - this.tsddbThumbnailSize.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; - this.tsddbThumbnailSize.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.tsmiThumbnailSize75, - this.tsmiThumbnailSize100, - this.tsmiThumbnailSize150, - this.tsmiThumbnailSize200, - this.tsmiThumbnailSize250}); - this.tsddbThumbnailSize.Margin = new System.Windows.Forms.Padding(3, 1, 0, 2); - this.tsddbThumbnailSize.Name = "tsddbThumbnailSize"; - resources.ApplyResources(this.tsddbThumbnailSize, "tsddbThumbnailSize"); - // - // tsmiThumbnailSize75 - // - this.tsmiThumbnailSize75.Name = "tsmiThumbnailSize75"; - resources.ApplyResources(this.tsmiThumbnailSize75, "tsmiThumbnailSize75"); - this.tsmiThumbnailSize75.Click += new System.EventHandler(this.tsmiThumbnailSize75_Click); - // - // tsmiThumbnailSize100 - // - this.tsmiThumbnailSize100.Name = "tsmiThumbnailSize100"; - resources.ApplyResources(this.tsmiThumbnailSize100, "tsmiThumbnailSize100"); - this.tsmiThumbnailSize100.Click += new System.EventHandler(this.tsmiThumbnailSize100_Click); - // - // tsmiThumbnailSize150 - // - this.tsmiThumbnailSize150.Name = "tsmiThumbnailSize150"; - resources.ApplyResources(this.tsmiThumbnailSize150, "tsmiThumbnailSize150"); - this.tsmiThumbnailSize150.Click += new System.EventHandler(this.tsmiThumbnailSize150_Click); - // - // tsmiThumbnailSize200 - // - this.tsmiThumbnailSize200.Name = "tsmiThumbnailSize200"; - resources.ApplyResources(this.tsmiThumbnailSize200, "tsmiThumbnailSize200"); - this.tsmiThumbnailSize200.Click += new System.EventHandler(this.tsmiThumbnailSize200_Click); - // - // tsmiThumbnailSize250 - // - this.tsmiThumbnailSize250.Name = "tsmiThumbnailSize250"; - resources.ApplyResources(this.tsmiThumbnailSize250, "tsmiThumbnailSize250"); - this.tsmiThumbnailSize250.Click += new System.EventHandler(this.tsmiThumbnailSize250_Click); + this.tss1.Name = "tss1"; + resources.ApplyResources(this.tss1, "tss1"); // // ImageHistoryForm // @@ -214,18 +151,10 @@ private void InitializeComponent() private Manina.Windows.Forms.ImageListView ilvImages; private System.Windows.Forms.ToolStripContainer tscMain; private System.Windows.Forms.ToolStrip tsMain; - private System.Windows.Forms.ToolStripDropDownButton tsddbThumbnailSize; - private System.Windows.Forms.ToolStripMenuItem tsmiThumbnailSize75; - private System.Windows.Forms.ToolStripMenuItem tsmiThumbnailSize100; - private System.Windows.Forms.ToolStripMenuItem tsmiThumbnailSize150; - private System.Windows.Forms.ToolStripMenuItem tsmiThumbnailSize200; - private System.Windows.Forms.ToolStripMenuItem tsmiThumbnailSize250; - private System.Windows.Forms.ToolStripDropDownButton tsddbViewMode; - private System.Windows.Forms.ToolStripMenuItem tsmiViewModeThumbnails; - private System.Windows.Forms.ToolStripMenuItem tsmiViewModeGallery; - private System.Windows.Forms.ToolStripMenuItem tsmiViewModePane; private System.Windows.Forms.ToolStripLabel tslSearch; private System.Windows.Forms.ToolStripTextBox tstbSearch; private System.Windows.Forms.ToolStripButton tsbSearch; + private System.Windows.Forms.ToolStripSeparator tss1; + private System.Windows.Forms.ToolStripButton tsbSettings; } } \ No newline at end of file diff --git a/ShareX.HistoryLib/ImageHistoryForm.cs b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs similarity index 59% rename from ShareX.HistoryLib/ImageHistoryForm.cs rename to ShareX.HistoryLib/Forms/ImageHistoryForm.cs index e863dd23a..2147bb71b 100644 --- a/ShareX.HistoryLib/ImageHistoryForm.cs +++ b/ShareX.HistoryLib/Forms/ImageHistoryForm.cs @@ -38,63 +38,28 @@ namespace ShareX.HistoryLib public partial class ImageHistoryForm : Form { public string HistoryPath { get; private set; } - public int ViewMode { get; set; } - public Size ThumbnailSize { get; set; } + public ImageHistorySettings Settings { get; private set; } public string SearchText { get; set; } private HistoryManager history; private HistoryItemManager him; - public ImageHistoryForm(string historyPath, int viewMode, Size thumbnailSize, Action uploadFile = null, Action editImage = null) + public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action uploadFile = null, Action editImage = null) { InitializeComponent(); Icon = ShareXResources.Icon; HistoryPath = historyPath; + Settings = settings; tsMain.Renderer = new CustomToolStripProfessionalRenderer(); - ViewMode = viewMode.Between(0, 3); - ilvImages.View = (View)ViewMode; - - switch (ilvImages.View) - { - default: - case View.Thumbnails: - tsmiViewModeThumbnails.RadioCheck(); - break; - case View.Gallery: - tsmiViewModeGallery.RadioCheck(); - break; - case View.Pane: - tsmiViewModePane.RadioCheck(); - break; - } - - ThumbnailSize = thumbnailSize; - ilvImages.ThumbnailSize = ThumbnailSize; - - switch (ThumbnailSize.Width) - { - case 75: - tsmiThumbnailSize75.RadioCheck(); - break; - default: - case 100: - tsmiThumbnailSize100.RadioCheck(); - break; - case 150: - tsmiThumbnailSize150.RadioCheck(); - break; - case 200: - tsmiThumbnailSize200.RadioCheck(); - break; - case 250: - tsmiThumbnailSize250.RadioCheck(); - break; - } + ilvImages.View = (View)Settings.ViewMode; + ilvImages.ThumbnailSize = Settings.ThumbnailSize; him = new HistoryItemManager(uploadFile, editImage); him.GetHistoryItems += him_GetHistoryItems; + + Settings.WindowState.AutoHandleFormState(this); } private void RefreshHistoryItems() @@ -181,60 +146,15 @@ private void tsbSearch_Click(object sender, EventArgs e) RefreshHistoryItems(); } - private void tsmiViewModeThumbnails_Click(object sender, EventArgs e) + private void tsbSettings_Click(object sender, EventArgs e) { - tsmiViewModeThumbnails.RadioCheck(); - ilvImages.View = View.Thumbnails; - ViewMode = (int)ilvImages.View; - } + using (ImageHistorySettingsForm form = new ImageHistorySettingsForm(Settings)) + { + form.ShowDialog(); + } - private void tsmiViewModeGallery_Click(object sender, EventArgs e) - { - tsmiViewModeGallery.RadioCheck(); - ilvImages.View = View.Gallery; - ViewMode = (int)ilvImages.View; - } - - private void tsmiViewModePane_Click(object sender, EventArgs e) - { - tsmiViewModePane.RadioCheck(); - ilvImages.View = View.Pane; - ViewMode = (int)ilvImages.View; - } - - private void tsmiThumbnailSize75_Click(object sender, EventArgs e) - { - tsmiThumbnailSize75.RadioCheck(); - ilvImages.ThumbnailSize = new Size(75, 75); - ThumbnailSize = ilvImages.ThumbnailSize; - } - - private void tsmiThumbnailSize100_Click(object sender, EventArgs e) - { - tsmiThumbnailSize100.RadioCheck(); - ilvImages.ThumbnailSize = new Size(100, 100); - ThumbnailSize = ilvImages.ThumbnailSize; - } - - private void tsmiThumbnailSize150_Click(object sender, EventArgs e) - { - tsmiThumbnailSize150.RadioCheck(); - ilvImages.ThumbnailSize = new Size(150, 150); - ThumbnailSize = ilvImages.ThumbnailSize; - } - - private void tsmiThumbnailSize200_Click(object sender, EventArgs e) - { - tsmiThumbnailSize200.RadioCheck(); - ilvImages.ThumbnailSize = new Size(200, 200); - ThumbnailSize = ilvImages.ThumbnailSize; - } - - private void tsmiThumbnailSize250_Click(object sender, EventArgs e) - { - tsmiThumbnailSize250.RadioCheck(); - ilvImages.ThumbnailSize = new Size(250, 250); - ThumbnailSize = ilvImages.ThumbnailSize; + ilvImages.View = (View)Settings.ViewMode; + ilvImages.ThumbnailSize = Settings.ThumbnailSize; } private void ilvImages_KeyDown(object sender, KeyEventArgs e) diff --git a/ShareX.HistoryLib/ImageHistoryForm.de.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.de.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.de.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.de.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.es-MX.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.es-MX.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.es-MX.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.es-MX.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.es.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.es.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.es.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.es.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.fr.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.fr.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.fr.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.fr.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.hu.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.hu.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.hu.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.hu.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.it-IT.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.it-IT.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.it-IT.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.it-IT.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.ko-KR.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.ko-KR.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.ko-KR.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.ko-KR.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.nl-NL.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.nl-NL.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.nl-NL.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.nl-NL.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.pt-BR.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.pt-BR.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.pt-BR.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.pt-BR.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.resx similarity index 71% rename from ShareX.HistoryLib/ImageHistoryForm.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.resx index 1ce80bb74..bb822578b 100644 --- a/ShareX.HistoryLib/ImageHistoryForm.resx +++ b/ShareX.HistoryLib/Forms/ImageHistoryForm.resx @@ -220,7 +220,7 @@ Search: - 200, 25 + 300, 25 Magenta @@ -228,74 +228,41 @@ 23, 22 - - toolStripButton1 + + Search - - 137, 22 + + 6, 25 - - Thumbnails + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + - - 137, 22 + + Magenta - - Gallery + + 62, 22 - - 137, 22 - - - Pane - - - 79, 22 - - - View mode - - - 121, 22 - - - 75 x 75 - - - 121, 22 - - - 100 x 100 - - - 121, 22 - - - 150 x 150 - - - 121, 22 - - - 200 x 200 - - - 121, 22 - - - 250 x 250 - - - 100, 22 - - - Thumbnail size + + Settings... 3, 0 - 458, 25 + 441, 25 0 @@ -369,65 +336,17 @@ System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tsddbViewMode + + tsbSettings - - System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStripButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tsmiViewModeThumbnails + + tss1 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiViewModeGallery - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiViewModePane - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsddbThumbnailSize - - - System.Windows.Forms.ToolStripDropDownButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiThumbnailSize75 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiThumbnailSize100 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiThumbnailSize150 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiThumbnailSize200 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tsmiThumbnailSize250 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ImageHistoryForm diff --git a/ShareX.HistoryLib/ImageHistoryForm.ru.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.ru.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.ru.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.ru.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.tr.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.tr.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.tr.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.tr.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.uk.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.uk.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.uk.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.uk.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.vi-VN.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.vi-VN.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.vi-VN.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.vi-VN.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.zh-CN.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.zh-CN.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.zh-CN.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.zh-CN.resx diff --git a/ShareX.HistoryLib/ImageHistoryForm.zh-TW.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.zh-TW.resx similarity index 100% rename from ShareX.HistoryLib/ImageHistoryForm.zh-TW.resx rename to ShareX.HistoryLib/Forms/ImageHistoryForm.zh-TW.resx diff --git a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs new file mode 100644 index 000000000..146c78aa8 --- /dev/null +++ b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs @@ -0,0 +1,135 @@ +namespace ShareX.HistoryLib +{ + partial class ImageHistorySettingsForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ImageHistorySettingsForm)); + this.lblViewMode = new System.Windows.Forms.Label(); + this.lblThumbnailSize = new System.Windows.Forms.Label(); + this.lblMaximumImageLimit = new System.Windows.Forms.Label(); + this.cbViewMode = new System.Windows.Forms.ComboBox(); + this.nudThumbnailSize = new System.Windows.Forms.NumericUpDown(); + this.nudMaximumImageLimit = new System.Windows.Forms.NumericUpDown(); + this.lblThumbnailSizeUnit = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.nudThumbnailSize)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaximumImageLimit)).BeginInit(); + this.SuspendLayout(); + // + // lblViewMode + // + resources.ApplyResources(this.lblViewMode, "lblViewMode"); + this.lblViewMode.Name = "lblViewMode"; + // + // lblThumbnailSize + // + resources.ApplyResources(this.lblThumbnailSize, "lblThumbnailSize"); + this.lblThumbnailSize.Name = "lblThumbnailSize"; + // + // lblMaximumImageLimit + // + resources.ApplyResources(this.lblMaximumImageLimit, "lblMaximumImageLimit"); + this.lblMaximumImageLimit.Name = "lblMaximumImageLimit"; + // + // cbViewMode + // + this.cbViewMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbViewMode.FormattingEnabled = true; + resources.ApplyResources(this.cbViewMode, "cbViewMode"); + this.cbViewMode.Name = "cbViewMode"; + this.cbViewMode.SelectedIndexChanged += new System.EventHandler(this.cbViewMode_SelectedIndexChanged); + // + // nudThumbnailSize + // + resources.ApplyResources(this.nudThumbnailSize, "nudThumbnailSize"); + this.nudThumbnailSize.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.nudThumbnailSize.Minimum = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.nudThumbnailSize.Name = "nudThumbnailSize"; + this.nudThumbnailSize.Value = new decimal(new int[] { + 50, + 0, + 0, + 0}); + this.nudThumbnailSize.ValueChanged += new System.EventHandler(this.nudThumbnailSize_ValueChanged); + // + // nudMaximumImageLimit + // + resources.ApplyResources(this.nudMaximumImageLimit, "nudMaximumImageLimit"); + this.nudMaximumImageLimit.Maximum = new decimal(new int[] { + 10000, + 0, + 0, + 0}); + this.nudMaximumImageLimit.Name = "nudMaximumImageLimit"; + this.nudMaximumImageLimit.ValueChanged += new System.EventHandler(this.nudMaximumImageLimit_ValueChanged); + // + // lblThumbnailSizeUnit + // + resources.ApplyResources(this.lblThumbnailSizeUnit, "lblThumbnailSizeUnit"); + this.lblThumbnailSizeUnit.Name = "lblThumbnailSizeUnit"; + // + // ImageHistorySettingsForm + // + resources.ApplyResources(this, "$this"); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.Window; + this.Controls.Add(this.lblThumbnailSizeUnit); + this.Controls.Add(this.nudMaximumImageLimit); + this.Controls.Add(this.nudThumbnailSize); + this.Controls.Add(this.cbViewMode); + this.Controls.Add(this.lblMaximumImageLimit); + this.Controls.Add(this.lblThumbnailSize); + this.Controls.Add(this.lblViewMode); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.MaximizeBox = false; + this.Name = "ImageHistorySettingsForm"; + ((System.ComponentModel.ISupportInitialize)(this.nudThumbnailSize)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudMaximumImageLimit)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label lblViewMode; + private System.Windows.Forms.Label lblThumbnailSize; + private System.Windows.Forms.Label lblMaximumImageLimit; + private System.Windows.Forms.ComboBox cbViewMode; + private System.Windows.Forms.NumericUpDown nudThumbnailSize; + private System.Windows.Forms.NumericUpDown nudMaximumImageLimit; + private System.Windows.Forms.Label lblThumbnailSizeUnit; + } +} \ No newline at end of file diff --git a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs new file mode 100644 index 000000000..51654c459 --- /dev/null +++ b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs @@ -0,0 +1,70 @@ +#region License Information (GPL v3) + +/* + ShareX - A program that allows you to take screenshots and share any file type + Copyright (c) 2007-2018 ShareX Team + + 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 2 + 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, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Optionally you can also view the license at . +*/ + +#endregion License Information (GPL v3) + +using ShareX.HelpersLib; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ShareX.HistoryLib +{ + public partial class ImageHistorySettingsForm : Form + { + public ImageHistorySettings Settings { get; private set; } + + public ImageHistorySettingsForm(ImageHistorySettings settings) + { + InitializeComponent(); + Icon = ShareXResources.Icon; + + Settings = settings; + cbViewMode.Items.AddRange(Enum.GetNames(typeof(Manina.Windows.Forms.View))); + cbViewMode.SelectedIndex = Settings.ViewMode; + nudThumbnailSize.SetValue(Settings.ThumbnailSize.Width); + nudMaximumImageLimit.SetValue(Settings.MaxItemCount); + } + + private void cbViewMode_SelectedIndexChanged(object sender, EventArgs e) + { + Settings.ViewMode = cbViewMode.SelectedIndex; + } + + private void nudThumbnailSize_ValueChanged(object sender, EventArgs e) + { + Settings.ThumbnailSize = new Size((int)nudThumbnailSize.Value, (int)nudThumbnailSize.Value); + } + + private void nudMaximumImageLimit_ValueChanged(object sender, EventArgs e) + { + Settings.MaxItemCount = (int)nudMaximumImageLimit.Value; + } + } +} \ No newline at end of file diff --git a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx new file mode 100644 index 000000000..24dd245c2 --- /dev/null +++ b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + True + + + + 5, 8 + + + 62, 13 + + + 0 + + + View mode: + + + lblViewMode + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 6 + + + True + + + 5, 56 + + + 80, 13 + + + 1 + + + Thumbnail size: + + + lblThumbnailSize + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 5 + + + True + + + 5, 104 + + + 105, 13 + + + 2 + + + Maximum image limit: + + + lblMaximumImageLimit + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + 8, 24 + + + 120, 21 + + + 3 + + + cbViewMode + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + 8, 72 + + + 64, 20 + + + 4 + + + + Center + + + nudThumbnailSize + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 8, 120 + + + 64, 20 + + + 5 + + + Center + + + nudMaximumImageLimit + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + + + True + + + 77, 76 + + + 18, 13 + + + 6 + + + px + + + lblThumbnailSizeUnit + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + 6, 13 + + + 344, 226 + + + CenterScreen + + + ShareX - Image history settings + + + ImageHistorySettingsForm + + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ShareX.HistoryLib/ImageHistorySettings.cs b/ShareX.HistoryLib/ImageHistorySettings.cs new file mode 100644 index 000000000..a4cd9ea93 --- /dev/null +++ b/ShareX.HistoryLib/ImageHistorySettings.cs @@ -0,0 +1,43 @@ +#region License Information (GPL v3) + +/* + ShareX - A program that allows you to take screenshots and share any file type + Copyright (c) 2007-2018 ShareX Team + + 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 2 + 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, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + Optionally you can also view the license at . +*/ + +#endregion License Information (GPL v3) + +using ShareX.HelpersLib; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShareX.HistoryLib +{ + public class ImageHistorySettings + { + public WindowState WindowState { get; set; } = new WindowState(); + public int ViewMode { get; set; } = 3; + public Size ThumbnailSize { get; set; } = new Size(150, 150); + public int MaxItemCount { get; set; } = 250; + } +} \ No newline at end of file diff --git a/ShareX.HistoryLib/ShareX.HistoryLib.csproj b/ShareX.HistoryLib/ShareX.HistoryLib.csproj index c04b1cf32..14d77ae96 100644 --- a/ShareX.HistoryLib/ShareX.HistoryLib.csproj +++ b/ShareX.HistoryLib/ShareX.HistoryLib.csproj @@ -76,6 +76,7 @@ + @@ -86,12 +87,19 @@ Properties\SharedAssemblyInfo.cs - + Form - + ImageHistoryForm.cs + + Form + + + ImageHistorySettingsForm.cs + + True True @@ -101,17 +109,17 @@ Component - + Form - + HistoryForm.cs - + Form - + HistoryItemInfoForm.cs @@ -126,141 +134,144 @@ - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + HistoryItemInfoForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs - + ImageHistoryForm.cs + + ImageHistorySettingsForm.cs + diff --git a/ShareX/ApplicationConfig.cs b/ShareX/ApplicationConfig.cs index 8f91fb8dd..4ae5a29e6 100644 --- a/ShareX/ApplicationConfig.cs +++ b/ShareX/ApplicationConfig.cs @@ -24,6 +24,7 @@ #endregion License Information (GPL v3) using ShareX.HelpersLib; +using ShareX.HistoryLib; using ShareX.ScreenCaptureLib; using ShareX.UploadersLib; using ShareX.UploadersLib.OtherServices; @@ -126,9 +127,7 @@ public ApplicationConfig() public int HistoryMaxItemCount = 0; public int HistorySplitterDistance = 550; - public WindowState ImageHistoryWindowState = new WindowState(); - public int ImageHistoryViewMode = 3; - public Size ImageHistoryThumbnailSize = new Size(150, 150); + public ImageHistorySettings ImageHistorySettings = new ImageHistorySettings(); #endregion History diff --git a/ShareX/TaskHelpers.cs b/ShareX/TaskHelpers.cs index 4b8cfa73b..25986a703 100644 --- a/ShareX/TaskHelpers.cs +++ b/ShareX/TaskHelpers.cs @@ -723,14 +723,8 @@ public static void OpenHistory() public static void OpenImageHistory() { - ImageHistoryForm imageHistoryForm = new ImageHistoryForm(Program.HistoryFilePath, Program.Settings.ImageHistoryViewMode, Program.Settings.ImageHistoryThumbnailSize, + ImageHistoryForm imageHistoryForm = new ImageHistoryForm(Program.HistoryFilePath, Program.Settings.ImageHistorySettings, filePath => UploadManager.UploadFile(filePath), filePath => AnnotateImageFromFile(filePath)); - Program.Settings.ImageHistoryWindowState.AutoHandleFormState(imageHistoryForm); - imageHistoryForm.FormClosed += (sender, e) => - { - Program.Settings.ImageHistoryViewMode = imageHistoryForm.ViewMode; - Program.Settings.ImageHistoryThumbnailSize = imageHistoryForm.ThumbnailSize; - }; imageHistoryForm.Show(); }