diff --git a/quick-picture-viewer/Properties/Resources.Designer.cs b/quick-picture-viewer/Properties/Resources.Designer.cs index a94c6bf..3be852f 100644 --- a/quick-picture-viewer/Properties/Resources.Designer.cs +++ b/quick-picture-viewer/Properties/Resources.Designer.cs @@ -19,7 +19,7 @@ namespace quick_picture_viewer.Properties { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -100,6 +100,16 @@ internal static System.Drawing.Bitmap black_arrows { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap black_bilinear { + get { + object obj = ResourceManager.GetObject("black_bilinear", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -190,6 +200,16 @@ internal static System.Drawing.Bitmap black_effects { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap black_filtering { + get { + object obj = ResourceManager.GetObject("black_filtering", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -230,6 +250,16 @@ internal static System.Drawing.Bitmap black_line { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap black_nearest_neighbor { + get { + object obj = ResourceManager.GetObject("black_nearest_neighbor", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -520,6 +550,16 @@ internal static System.Drawing.Bitmap white_autozoom { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap white_bilinear { + get { + object obj = ResourceManager.GetObject("white_bilinear", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -650,6 +690,16 @@ internal static System.Drawing.Bitmap white_exe { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap white_filtering { + get { + object obj = ResourceManager.GetObject("white_filtering", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -790,6 +840,16 @@ internal static System.Drawing.Bitmap white_move { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap white_nearest_neighbor { + get { + object obj = ResourceManager.GetObject("white_nearest_neighbor", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// diff --git a/quick-picture-viewer/Properties/Resources.resx b/quick-picture-viewer/Properties/Resources.resx index 728f7c9..e94cfd5 100644 --- a/quick-picture-viewer/Properties/Resources.resx +++ b/quick-picture-viewer/Properties/Resources.resx @@ -451,4 +451,22 @@ ..\resources\imgs\light\white-save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\resources\imgs\dark\black-filtering.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\imgs\dark\black-bilinear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\imgs\dark\black-nearest-neighbor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\imgs\light\white-bilinear.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\imgs\light\white-filtering.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\resources\imgs\light\white-nearest-neighbor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/quick-picture-viewer/bin/Debug/languages/lang_cn.resx b/quick-picture-viewer/bin/Debug/languages/lang_cn.resx index e2c78f0..72c1b83 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_cn.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_cn.resx @@ -358,6 +358,18 @@ 填充 Wallpaper + + 过滤 + Menu + + + 双线性 + Menu + + + 最近邻 + Menu + 适应 Wallpaper diff --git a/quick-picture-viewer/bin/Debug/languages/lang_de.resx b/quick-picture-viewer/bin/Debug/languages/lang_de.resx index 486a58a..b297098 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_de.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_de.resx @@ -154,7 +154,7 @@ Status bar, zoom text field - Automatische Grösse + Automatische Größe SVG options @@ -198,7 +198,7 @@ Picture in picture - Überprüfe nach App-Updates + Suche nach App-Updates Settings @@ -356,6 +356,18 @@ Ausfüllen Wallpaper + + + Filterung + Menu + + + Bilinear + Menu + + + Nächster Nachbar + Menu Passend @@ -454,7 +466,7 @@ Settings - Lokalisierung + Sprache Settings @@ -642,7 +654,7 @@ Suggestion - Vorheriges Bild in Verzeichnis + Vorheriges Bild im Verzeichnis Menu @@ -654,11 +666,11 @@ Print - Dokumentenränder können nicht eingestellt werden + Dokumentränder können nicht eingestellt werden Print - Druck-Grösse + Druck-Größe Image info @@ -674,7 +686,7 @@ Plugin manager - Größe der SVG ändern + Größe der SVG ändern SVG options @@ -730,7 +742,7 @@ Settings - Wählen Sie Alle + Alle auswählen RMB menu @@ -778,7 +790,7 @@ RMB menu - Grösse + Größe Status bar @@ -798,7 +810,7 @@ Image info - Startup/Inbetriebnahme + Startverhalten Settings @@ -814,7 +826,7 @@ Message box - Die Schaltdauer beträgt + Die Umschaltdauer beträgt Settings @@ -866,7 +878,7 @@ Main window - Das aktuelle Bild hat nicht gespeicherte Änderungen. Was würden Sie gerne tun? + Das aktuelle Bild hat nicht gespeicherte Änderungen. Was möchten Sie tun? Main window @@ -914,7 +926,7 @@ Status bar - Bild vergrößern/Heranzoomen + Bild vergrößern Menu @@ -922,7 +934,7 @@ Settings - Bild verkleinern/Hinauszoomen + Bild verkleinern Menu diff --git a/quick-picture-viewer/bin/Debug/languages/lang_en.resx b/quick-picture-viewer/bin/Debug/languages/lang_en.resx index 7e8ea81..33a1554 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_en.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_en.resx @@ -357,6 +357,18 @@ Fill Wallpaper + + Filtering + Menu + + + Bilinear + Menu + + + Nearest Neighbor + Menu + Fit Wallpaper diff --git a/quick-picture-viewer/bin/Debug/languages/lang_es.resx b/quick-picture-viewer/bin/Debug/languages/lang_es.resx index d0a43dc..bd5b5b3 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_es.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_es.resx @@ -357,6 +357,18 @@ Rellenar Wallpaper + + Filtrado + Menu + + + Bilineal + Menu + + + Vecino más cercano + Menu + Ajustar Wallpaper diff --git a/quick-picture-viewer/bin/Debug/languages/lang_fr.resx b/quick-picture-viewer/bin/Debug/languages/lang_fr.resx index d32b2d8..d0d23eb 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_fr.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_fr.resx @@ -357,6 +357,18 @@ Remplir Wallpaper + + Filtrage + Menu + + + Bilinéaire + Menu + + + Plus proche voisin + Menu + Ajuster Wallpaper diff --git a/quick-picture-viewer/bin/Debug/languages/lang_hr.resx b/quick-picture-viewer/bin/Debug/languages/lang_hr.resx index 83cd745..55fe2b5 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_hr.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_hr.resx @@ -357,6 +357,18 @@ Ispuni Wallpaper + + Filtriranje + Menu + + + Bilinearno + Menu + + + Najbliži susjed + Menu + Prilagodi veličinu Wallpaper diff --git a/quick-picture-viewer/bin/Debug/languages/lang_hu.resx b/quick-picture-viewer/bin/Debug/languages/lang_hu.resx index fab92f5..285ba6c 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_hu.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_hu.resx @@ -357,6 +357,18 @@ Kitöltés Wallpaper + + Szűrés + Menu + + + Bilineáris + Menu + + + Legközelebbi szomszéd + Menu + Illesztés Wallpaper diff --git a/quick-picture-viewer/bin/Debug/languages/lang_ru.resx b/quick-picture-viewer/bin/Debug/languages/lang_ru.resx index fd17dad..f7cca92 100644 --- a/quick-picture-viewer/bin/Debug/languages/lang_ru.resx +++ b/quick-picture-viewer/bin/Debug/languages/lang_ru.resx @@ -357,6 +357,18 @@ Заполнить Wallpaper + + Фильтрация + Menu + + + Билинейная + Menu + + + Ближайший сосед + Menu + Подогнать Wallpaper diff --git a/quick-picture-viewer/bin/Release/languages/lang_de.resx b/quick-picture-viewer/bin/Release/languages/lang_de.resx index 486a58a..75648ab 100644 --- a/quick-picture-viewer/bin/Release/languages/lang_de.resx +++ b/quick-picture-viewer/bin/Release/languages/lang_de.resx @@ -154,7 +154,7 @@ Status bar, zoom text field - Automatische Grösse + Automatische Größe SVG options @@ -198,7 +198,7 @@ Picture in picture - Überprüfe nach App-Updates + Suche nach App-Updates Settings @@ -454,7 +454,7 @@ Settings - Lokalisierung + Sprache Settings @@ -642,7 +642,7 @@ Suggestion - Vorheriges Bild in Verzeichnis + Vorheriges Bild im Verzeichnis Menu @@ -654,11 +654,11 @@ Print - Dokumentenränder können nicht eingestellt werden + Dokumentränder können nicht eingestellt werden Print - Druck-Grösse + Druck-Größe Image info @@ -674,7 +674,7 @@ Plugin manager - Größe der SVG ändern + Größe der SVG ändern SVG options @@ -730,7 +730,7 @@ Settings - Wählen Sie Alle + Alle auswählen RMB menu @@ -778,7 +778,7 @@ RMB menu - Grösse + Größe Status bar @@ -798,7 +798,7 @@ Image info - Startup/Inbetriebnahme + Startverhalten Settings @@ -814,7 +814,7 @@ Message box - Die Schaltdauer beträgt + Die Umschaltdauer beträgt Settings @@ -866,7 +866,7 @@ Main window - Das aktuelle Bild hat nicht gespeicherte Änderungen. Was würden Sie gerne tun? + Das aktuelle Bild hat nicht gespeicherte Änderungen. Was möchten Sie tun? Main window @@ -914,7 +914,7 @@ Status bar - Bild vergrößern/Heranzoomen + Bild vergrößern Menu @@ -922,7 +922,7 @@ Settings - Bild verkleinern/Hinauszoomen + Bild verkleinern Menu diff --git a/quick-picture-viewer/controls/QuickPictureBox.cs b/quick-picture-viewer/controls/QuickPictureBox.cs new file mode 100644 index 0000000..4b63eb5 --- /dev/null +++ b/quick-picture-viewer/controls/QuickPictureBox.cs @@ -0,0 +1,74 @@ +using QuickLibrary; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.Windows.Forms; + +namespace quick_picture_viewer +{ + internal class QuickPictureBox : PictureBox + { + private InterpolationMode interpolationMode = InterpolationMode.Default; + + /// + /// Sets the interpolation mode (AKA filtering mode) for the underlying Image + /// + /// Interpolation mode to use + public void SetInterpolationMode(InterpolationMode mode) + { + interpolationMode = mode; + Invalidate(); + } + + public void ApplyCheckerboardBackground(bool apply, bool darkMode = false) + { + if (!apply) + { + BackgroundImage?.Dispose(); + BackgroundImage = null; + return; + } + + Color col = darkMode ? Color.FromArgb(76, 76, 76) : Color.FromArgb(191, 191, 191); + Bitmap bmp = new Bitmap(16, 16); + using (SolidBrush brush = new SolidBrush(col)) + using (Graphics G = Graphics.FromImage(bmp)) + { + G.FillRectangle(brush, 0, 0, 8, 8); + G.FillRectangle(brush, 8, 8, 8, 8); + } + + BackgroundImage = bmp; + BackgroundImageLayout = ImageLayout.Tile; + } + + public void UpdatePictureBoxLocation(Panel picturePanel) + { + int x, y; + + if (Width < picturePanel.Width) x = (int)((double)(picturePanel.Width - Width) / (double)2); + else x = -picturePanel.HorizontalScroll.Value; + + if (Height < picturePanel.Height) y = (int)((double)(picturePanel.Height - Height) / (double)2); + else y = -picturePanel.VerticalScroll.Value; + + Location = new Point(x, y); + + if (picturePanel != null) + { + if (Width > picturePanel.Width && Height > picturePanel.Height) NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_BOTH, true); + else if (Width > picturePanel.Width) NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_HORZ, true); + else if (Height > picturePanel.Height) NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_VERT, true); + else NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_BOTH, false); + } + } + + protected override void OnPaint(PaintEventArgs e) + { + // Set the interpolation mode to nearest-neighbor + e.Graphics.InterpolationMode = interpolationMode; + + // Call the base class to draw the image with the specified interpolation mode + base.OnPaint(e); + } + } +} diff --git a/quick-picture-viewer/forms/MainForm.Designer.cs b/quick-picture-viewer/forms/MainForm.Designer.cs index 0e322a3..8a22a9a 100644 --- a/quick-picture-viewer/forms/MainForm.Designer.cs +++ b/quick-picture-viewer/forms/MainForm.Designer.cs @@ -34,6 +34,27 @@ private void InitializeComponent() this.fileSystemWatcher1 = new System.IO.FileSystemWatcher(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); + this.printDialog1 = new System.Windows.Forms.PrintDialog(); + this.printDocument1 = new System.Drawing.Printing.PrintDocument(); + this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.toolStrip1 = new QuickLibrary.QlibToolbar(); + this.toolStripSeparator4 = new QuickLibrary.QlibToolsep(); + this.toolStripSeparator1 = new QuickLibrary.QlibToolsep(); + this.zoomTextBox = new System.Windows.Forms.ToolStripTextBox(); + this.toolStripSeparator2 = new QuickLibrary.QlibToolsep(); + this.toolStripSeparator3 = new QuickLibrary.QlibToolsep(); + this.qlibToolsep1 = new QuickLibrary.QlibToolsep(); + this.rmbMenu = new QuickLibrary.QlibContextMenuStrip(this.components); + this.qlibToolsep5 = new QuickLibrary.QlibToolsep(); + this.qlibToolsep3 = new QuickLibrary.QlibToolsep(); + this.infoTooltip = new System.Windows.Forms.ToolTip(this.components); + this.suggestionLabel = new System.Windows.Forms.Label(); + this.picturePanel = new quick_picture_viewer.CustomPanel(); + this.pleaseOpenLabel = new System.Windows.Forms.Label(); + this.suggestionIcon = new System.Windows.Forms.PictureBox(); + this.navNextBtn = new System.Windows.Forms.Button(); + this.navPrevBtn = new System.Windows.Forms.Button(); + this.typeOpsButton = new System.Windows.Forms.Button(); this.selectionLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.directoryLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.fileLabel = new System.Windows.Forms.ToolStripStatusLabel(); @@ -42,10 +63,6 @@ private void InitializeComponent() this.zoomLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.dateCreatedLabel = new System.Windows.Forms.ToolStripStatusLabel(); this.dateModifiedLabel = new System.Windows.Forms.ToolStripStatusLabel(); - this.printDialog1 = new System.Windows.Forms.PrintDialog(); - this.printDocument1 = new System.Drawing.Printing.PrintDocument(); - this.colorDialog1 = new System.Windows.Forms.ColorDialog(); - this.toolStrip1 = new QuickLibrary.QlibToolbar(); this.openBtn = new System.Windows.Forms.ToolStripDropDownButton(); this.openFileBtn = new System.Windows.Forms.ToolStripMenuItem(); this.openFolderBtn = new System.Windows.Forms.ToolStripMenuItem(); @@ -58,17 +75,13 @@ private void InitializeComponent() this.externalFavoriteBtn = new System.Windows.Forms.ToolStripMenuItem(); this.externalChooseBtn = new System.Windows.Forms.ToolStripMenuItem(); this.infoButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator4 = new QuickLibrary.QlibToolsep(); this.prevButton = new System.Windows.Forms.ToolStripButton(); this.slideshowButton = new System.Windows.Forms.ToolStripButton(); this.nextButton = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator1 = new QuickLibrary.QlibToolsep(); this.autoZoomButton = new System.Windows.Forms.ToolStripButton(); this.zoomOutButton = new System.Windows.Forms.ToolStripButton(); - this.zoomTextBox = new System.Windows.Forms.ToolStripTextBox(); this.zoomInButton = new System.Windows.Forms.ToolStripButton(); this.zoom100Btn = new System.Windows.Forms.ToolStripButton(); - this.toolStripSeparator2 = new QuickLibrary.QlibToolsep(); this.selectionBtn = new System.Windows.Forms.ToolStripButton(); this.editButton = new System.Windows.Forms.ToolStripDropDownButton(); this.flipHorizontalButton = new System.Windows.Forms.ToolStripMenuItem(); @@ -80,13 +93,14 @@ private void InitializeComponent() this.customAngleBtn = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator7 = new QuickLibrary.QlibToolsep(); this.cropBtn = new System.Windows.Forms.ToolStripMenuItem(); + this.filteringModeBtn = new System.Windows.Forms.ToolStripDropDownButton(); + this.bilinearBtn = new System.Windows.Forms.ToolStripMenuItem(); + this.nearestNeighborBtn = new System.Windows.Forms.ToolStripMenuItem(); this.effectsBtn = new System.Windows.Forms.ToolStripDropDownButton(); this.toolsBtn = new System.Windows.Forms.ToolStripDropDownButton(); - this.toolStripSeparator3 = new QuickLibrary.QlibToolsep(); this.checkboardButton = new System.Windows.Forms.ToolStripButton(); this.fullscreenBtn = new System.Windows.Forms.ToolStripButton(); this.miniViewButton = new System.Windows.Forms.ToolStripButton(); - this.qlibToolsep1 = new QuickLibrary.QlibToolsep(); this.moreButton = new System.Windows.Forms.ToolStripDropDownButton(); this.reloadButton = new System.Windows.Forms.ToolStripMenuItem(); this.deleteBtn = new System.Windows.Forms.ToolStripMenuItem(); @@ -106,34 +120,23 @@ private void InitializeComponent() this.settingsButton = new System.Windows.Forms.ToolStripMenuItem(); this.aboutBtn = new System.Windows.Forms.ToolStripMenuItem(); this.framelessCloseBtn = new System.Windows.Forms.ToolStripButton(); - this.rmbMenu = new QuickLibrary.QlibContextMenuStrip(this.components); + this.pictureBox = new quick_picture_viewer.QuickPictureBox(); this.showMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.showNavArrowsBtn = new System.Windows.Forms.ToolStripMenuItem(); this.showToolbarBtn = new System.Windows.Forms.ToolStripMenuItem(); this.showStatusbarBtn = new System.Windows.Forms.ToolStripMenuItem(); - this.qlibToolsep5 = new QuickLibrary.QlibToolsep(); this.wallpaperBtn = new System.Windows.Forms.ToolStripMenuItem(); - this.qlibToolsep3 = new QuickLibrary.QlibToolsep(); this.copyBtn = new System.Windows.Forms.ToolStripMenuItem(); this.copyImageBtn = new System.Windows.Forms.ToolStripMenuItem(); this.copyFileBtn = new System.Windows.Forms.ToolStripMenuItem(); this.pasteBtn = new System.Windows.Forms.ToolStripMenuItem(); this.selectAllBtn = new System.Windows.Forms.ToolStripMenuItem(); - this.navNextBtn = new System.Windows.Forms.Button(); - this.navPrevBtn = new System.Windows.Forms.Button(); - this.typeOpsButton = new System.Windows.Forms.Button(); - this.infoTooltip = new System.Windows.Forms.ToolTip(this.components); - this.suggestionIcon = new System.Windows.Forms.PictureBox(); - this.suggestionLabel = new System.Windows.Forms.Label(); - this.picturePanel = new quick_picture_viewer.CustomPanel(); - this.pleaseOpenLabel = new System.Windows.Forms.Label(); - this.pictureBox = new System.Windows.Forms.PictureBox(); ((System.ComponentModel.ISupportInitialize)(this.fileSystemWatcher1)).BeginInit(); this.statusStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout(); this.rmbMenu.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.suggestionIcon)).BeginInit(); this.picturePanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.suggestionIcon)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit(); this.SuspendLayout(); // @@ -151,8 +154,8 @@ private void InitializeComponent() // this.saveFileDialog1.FileName = "Image"; this.saveFileDialog1.Filter = "PNG (*.png)|*.png|JPG (*.jpg, *.jpeg, *.jpe, *.jfif, *.exif)|*.jpg|GIF (*.gif)|*." + - "gif|BMP (*.bmp, *.dib, *.rle)|*.bmp|TIF (*.tiff, *.tif)|*.tiff|ICO (*.ico)|*.ico" + - "|WEBP (*.webp)|*.webp"; + "gif|BMP (*.bmp, *.dib, *.rle)|*.bmp|TIF (*.tiff, *.tif)|*.tiff|ICO (*.ico)|*.ico" + + "|WEBP (*.webp)|*.webp"; // // statusStrip1 // @@ -160,14 +163,14 @@ private void InitializeComponent() this.statusStrip1.Font = new System.Drawing.Font("Segoe UI", 9.75F); this.statusStrip1.GripMargin = new System.Windows.Forms.Padding(0); this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.selectionLabel, - this.directoryLabel, - this.fileLabel, - this.hasChangesLabel, - this.sizeLabel, - this.zoomLabel, - this.dateCreatedLabel, - this.dateModifiedLabel}); + this.selectionLabel, + this.directoryLabel, + this.fileLabel, + this.hasChangesLabel, + this.sizeLabel, + this.zoomLabel, + this.dateCreatedLabel, + this.dateModifiedLabel}); this.statusStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; this.statusStrip1.Location = new System.Drawing.Point(0, 419); this.statusStrip1.Name = "statusStrip1"; @@ -177,6 +180,328 @@ private void InitializeComponent() this.statusStrip1.Text = "statusStrip1"; this.statusStrip1.VisibleChanged += new System.EventHandler(this.statusStrip1_VisibleChanged); // + // printDialog1 + // + this.printDialog1.Document = this.printDocument1; + this.printDialog1.UseEXDialog = true; + // + // printDocument1 + // + this.printDocument1.DocumentName = ""; + this.printDocument1.OriginAtMargins = true; + this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage); + // + // colorDialog1 + // + this.colorDialog1.Color = System.Drawing.Color.Blue; + // + // toolStrip1 + // + this.toolStrip1.AlternativeAppearance = true; + this.toolStrip1.AutoSize = false; + this.toolStrip1.BackColor = System.Drawing.Color.White; + this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.toolStrip1.CanOverflow = false; + this.toolStrip1.DarkMode = false; + this.toolStrip1.DragForm = true; + this.toolStrip1.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.toolStrip1.ForeColor = System.Drawing.Color.Black; + this.toolStrip1.GripMargin = new System.Windows.Forms.Padding(0); + this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.openBtn, + this.saveMenuBtn, + this.externalBtn, + this.infoButton, + this.toolStripSeparator4, + this.prevButton, + this.slideshowButton, + this.nextButton, + this.toolStripSeparator1, + this.autoZoomButton, + this.zoomOutButton, + this.zoomTextBox, + this.zoomInButton, + this.zoom100Btn, + this.toolStripSeparator2, + this.selectionBtn, + this.editButton, + this.filteringModeBtn, + this.effectsBtn, + this.toolsBtn, + this.toolStripSeparator3, + this.checkboardButton, + this.fullscreenBtn, + this.miniViewButton, + this.qlibToolsep1, + this.moreButton, + this.framelessCloseBtn}); + this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.toolStrip1.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.toolStrip1.Size = new System.Drawing.Size(684, 32); + this.toolStrip1.TabIndex = 1; + this.toolStrip1.VisibleChanged += new System.EventHandler(this.toolStrip1_VisibleChanged); + // + // toolStripSeparator4 + // + this.toolStripSeparator4.AutoSize = false; + this.toolStripSeparator4.BackColor = System.Drawing.SystemColors.ControlLight; + this.toolStripSeparator4.DarkMode = false; + this.toolStripSeparator4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.toolStripSeparator4.InsideMenu = false; + this.toolStripSeparator4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.toolStripSeparator4.Name = "toolStripSeparator4"; + this.toolStripSeparator4.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.toolStripSeparator4.Size = new System.Drawing.Size(1, 24); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.AutoSize = false; + this.toolStripSeparator1.BackColor = System.Drawing.SystemColors.ControlLight; + this.toolStripSeparator1.DarkMode = false; + this.toolStripSeparator1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.toolStripSeparator1.InsideMenu = false; + this.toolStripSeparator1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.toolStripSeparator1.Size = new System.Drawing.Size(1, 24); + // + // zoomTextBox + // + this.zoomTextBox.BackColor = System.Drawing.Color.White; + this.zoomTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.zoomTextBox.Enabled = false; + this.zoomTextBox.Font = new System.Drawing.Font("Segoe UI", 9.75F); + this.zoomTextBox.Margin = new System.Windows.Forms.Padding(7, -1, 7, -1); + this.zoomTextBox.MaxLength = 12; + this.zoomTextBox.Name = "zoomTextBox"; + this.zoomTextBox.Size = new System.Drawing.Size(44, 24); + this.zoomTextBox.Text = "Auto"; + this.zoomTextBox.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.zoomTextBox.ToolTipText = "Zoom"; + this.zoomTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.zoomTextBox_KeyPress); + this.zoomTextBox.MouseEnter += new System.EventHandler(this.zoomTextBox_MouseEnter); + this.zoomTextBox.MouseLeave += new System.EventHandler(this.zoomTextBox_MouseLeave); + this.zoomTextBox.TextChanged += new System.EventHandler(this.zoomComboBox_TextChanged); + // + // toolStripSeparator2 + // + this.toolStripSeparator2.AutoSize = false; + this.toolStripSeparator2.BackColor = System.Drawing.SystemColors.ControlLight; + this.toolStripSeparator2.DarkMode = false; + this.toolStripSeparator2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.toolStripSeparator2.InsideMenu = false; + this.toolStripSeparator2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.toolStripSeparator2.Size = new System.Drawing.Size(1, 24); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.AutoSize = false; + this.toolStripSeparator3.BackColor = System.Drawing.SystemColors.ControlLight; + this.toolStripSeparator3.DarkMode = false; + this.toolStripSeparator3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.toolStripSeparator3.InsideMenu = false; + this.toolStripSeparator3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.toolStripSeparator3.Size = new System.Drawing.Size(1, 24); + // + // qlibToolsep1 + // + this.qlibToolsep1.AutoSize = false; + this.qlibToolsep1.BackColor = System.Drawing.SystemColors.ControlLight; + this.qlibToolsep1.DarkMode = false; + this.qlibToolsep1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.qlibToolsep1.InsideMenu = false; + this.qlibToolsep1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.qlibToolsep1.Name = "qlibToolsep1"; + this.qlibToolsep1.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.qlibToolsep1.Size = new System.Drawing.Size(1, 24); + // + // rmbMenu + // + this.rmbMenu.BackColor = System.Drawing.SystemColors.ControlLight; + this.rmbMenu.DarkMode = false; + this.rmbMenu.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); + this.rmbMenu.ForeColor = System.Drawing.Color.Black; + this.rmbMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.showMenuItem, + this.qlibToolsep5, + this.wallpaperBtn, + this.qlibToolsep3, + this.copyBtn, + this.pasteBtn, + this.selectAllBtn}); + this.rmbMenu.Name = "rmbMenu"; + this.rmbMenu.Size = new System.Drawing.Size(288, 152); + this.rmbMenu.Opening += new System.ComponentModel.CancelEventHandler(this.rmbMenu_Opening); + // + // qlibToolsep5 + // + this.qlibToolsep5.AutoSize = false; + this.qlibToolsep5.BackColor = System.Drawing.SystemColors.ControlLight; + this.qlibToolsep5.DarkMode = false; + this.qlibToolsep5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.qlibToolsep5.InsideMenu = true; + this.qlibToolsep5.Margin = new System.Windows.Forms.Padding(4); + this.qlibToolsep5.Name = "qlibToolsep5"; + this.qlibToolsep5.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.qlibToolsep5.Size = new System.Drawing.Size(284, 6); + // + // qlibToolsep3 + // + this.qlibToolsep3.AutoSize = false; + this.qlibToolsep3.BackColor = System.Drawing.SystemColors.ControlLight; + this.qlibToolsep3.DarkMode = false; + this.qlibToolsep3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); + this.qlibToolsep3.InsideMenu = true; + this.qlibToolsep3.Margin = new System.Windows.Forms.Padding(4); + this.qlibToolsep3.Name = "qlibToolsep3"; + this.qlibToolsep3.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.qlibToolsep3.Size = new System.Drawing.Size(284, 6); + // + // suggestionLabel + // + this.suggestionLabel.AutoSize = true; + this.suggestionLabel.BackColor = System.Drawing.Color.Black; + this.suggestionLabel.Font = new System.Drawing.Font("Segoe UI", 10F); + this.suggestionLabel.ForeColor = System.Drawing.Color.White; + this.suggestionLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.suggestionLabel.Location = new System.Drawing.Point(53, 59); + this.suggestionLabel.Margin = new System.Windows.Forms.Padding(0, 27, 0, 0); + this.suggestionLabel.Name = "suggestionLabel"; + this.suggestionLabel.Padding = new System.Windows.Forms.Padding(0, 3, 3, 4); + this.suggestionLabel.Size = new System.Drawing.Size(79, 26); + this.suggestionLabel.TabIndex = 3; + this.suggestionLabel.Text = "suggestion"; + this.suggestionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.suggestionLabel.Visible = false; + // + // picturePanel + // + this.picturePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.picturePanel.AutoScroll = true; + this.picturePanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.picturePanel.BackColor = System.Drawing.Color.Transparent; + this.picturePanel.Controls.Add(this.pleaseOpenLabel); + this.picturePanel.Controls.Add(this.pictureBox); + this.picturePanel.Location = new System.Drawing.Point(0, 32); + this.picturePanel.Margin = new System.Windows.Forms.Padding(0); + this.picturePanel.Name = "picturePanel"; + this.picturePanel.Size = new System.Drawing.Size(684, 385); + this.picturePanel.TabIndex = 2; + this.picturePanel.SizeChanged += new System.EventHandler(this.picturePanel_SizeChanged); + this.picturePanel.DoubleClick += new System.EventHandler(this.picturePanel_DoubleClick); + this.picturePanel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseClick); + this.picturePanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseDown); + this.picturePanel.MouseEnter += new System.EventHandler(this.picturePanel_MouseEnter); + this.picturePanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseMove); + this.picturePanel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseUp); + // + // pleaseOpenLabel + // + this.pleaseOpenLabel.Dock = System.Windows.Forms.DockStyle.Fill; + this.pleaseOpenLabel.Enabled = false; + this.pleaseOpenLabel.Font = new System.Drawing.Font("Segoe UI", 10F); + this.pleaseOpenLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.pleaseOpenLabel.Location = new System.Drawing.Point(0, 0); + this.pleaseOpenLabel.Margin = new System.Windows.Forms.Padding(0); + this.pleaseOpenLabel.Name = "pleaseOpenLabel"; + this.pleaseOpenLabel.Size = new System.Drawing.Size(684, 385); + this.pleaseOpenLabel.TabIndex = 5; + this.pleaseOpenLabel.Text = "please open image"; + this.pleaseOpenLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.pleaseOpenLabel.DoubleClick += new System.EventHandler(this.picturePanel_DoubleClick); + // + // suggestionIcon + // + this.suggestionIcon.BackColor = System.Drawing.Color.Black; + this.suggestionIcon.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.suggestionIcon.Location = new System.Drawing.Point(27, 59); + this.suggestionIcon.Margin = new System.Windows.Forms.Padding(27, 27, 0, 0); + this.suggestionIcon.Name = "suggestionIcon"; + this.suggestionIcon.Size = new System.Drawing.Size(26, 26); + this.suggestionIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; + this.suggestionIcon.TabIndex = 6; + this.suggestionIcon.TabStop = false; + this.suggestionIcon.Visible = false; + // + // navNextBtn + // + this.navNextBtn.Anchor = System.Windows.Forms.AnchorStyles.Right; + this.navNextBtn.BackColor = System.Drawing.Color.Black; + this.navNextBtn.FlatAppearance.BorderSize = 0; + this.navNextBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(67))))); + this.navNextBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); + this.navNextBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.navNextBtn.Font = new System.Drawing.Font("Segoe UI", 9.75F); + this.navNextBtn.ForeColor = System.Drawing.SystemColors.ControlText; + this.navNextBtn.Image = global::quick_picture_viewer.Properties.Resources.white_next; + this.navNextBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.navNextBtn.Location = new System.Drawing.Point(625, 193); + this.navNextBtn.Margin = new System.Windows.Forms.Padding(27); + this.navNextBtn.Name = "navNextBtn"; + this.navNextBtn.Size = new System.Drawing.Size(32, 64); + this.navNextBtn.TabIndex = 8; + this.navNextBtn.TabStop = false; + this.navNextBtn.UseVisualStyleBackColor = false; + this.navNextBtn.Visible = false; + this.navNextBtn.Click += new System.EventHandler(this.navNextBtn_Click); + // + // navPrevBtn + // + this.navPrevBtn.Anchor = System.Windows.Forms.AnchorStyles.Left; + this.navPrevBtn.BackColor = System.Drawing.Color.Black; + this.navPrevBtn.FlatAppearance.BorderSize = 0; + this.navPrevBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(67))))); + this.navPrevBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); + this.navPrevBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.navPrevBtn.Font = new System.Drawing.Font("Segoe UI", 9.75F); + this.navPrevBtn.ForeColor = System.Drawing.SystemColors.ControlText; + this.navPrevBtn.Image = global::quick_picture_viewer.Properties.Resources.white_prev; + this.navPrevBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.navPrevBtn.Location = new System.Drawing.Point(27, 193); + this.navPrevBtn.Margin = new System.Windows.Forms.Padding(27); + this.navPrevBtn.Name = "navPrevBtn"; + this.navPrevBtn.Size = new System.Drawing.Size(32, 64); + this.navPrevBtn.TabIndex = 7; + this.navPrevBtn.TabStop = false; + this.navPrevBtn.UseVisualStyleBackColor = false; + this.navPrevBtn.Visible = false; + this.navPrevBtn.Click += new System.EventHandler(this.navPrevBtn_Click); + // + // typeOpsButton + // + this.typeOpsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.typeOpsButton.BackColor = System.Drawing.Color.Black; + this.typeOpsButton.FlatAppearance.BorderSize = 0; + this.typeOpsButton.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(67))))); + this.typeOpsButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); + this.typeOpsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.typeOpsButton.Font = new System.Drawing.Font("Segoe UI", 10F); + this.typeOpsButton.ForeColor = System.Drawing.Color.White; + this.typeOpsButton.Image = global::quick_picture_viewer.Properties.Resources.white_options; + this.typeOpsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; + this.typeOpsButton.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.typeOpsButton.Location = new System.Drawing.Point(537, 358); + this.typeOpsButton.Margin = new System.Windows.Forms.Padding(27); + this.typeOpsButton.Name = "typeOpsButton"; + this.typeOpsButton.Size = new System.Drawing.Size(120, 32); + this.typeOpsButton.TabIndex = 0; + this.typeOpsButton.TabStop = false; + this.typeOpsButton.Text = " type options"; + this.typeOpsButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.typeOpsButton.UseVisualStyleBackColor = false; + this.typeOpsButton.Visible = false; + this.typeOpsButton.Click += new System.EventHandler(this.typeOpsButton_Click); + // // selectionLabel // this.selectionLabel.ActiveLinkColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); @@ -267,78 +592,14 @@ private void InitializeComponent() this.dateModifiedLabel.Text = "modified"; this.dateModifiedLabel.Visible = false; // - // printDialog1 - // - this.printDialog1.Document = this.printDocument1; - this.printDialog1.UseEXDialog = true; - // - // printDocument1 - // - this.printDocument1.DocumentName = ""; - this.printDocument1.OriginAtMargins = true; - this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage); - // - // colorDialog1 - // - this.colorDialog1.Color = System.Drawing.Color.Blue; - // - // toolStrip1 - // - this.toolStrip1.AlternativeAppearance = true; - this.toolStrip1.AutoSize = false; - this.toolStrip1.BackColor = System.Drawing.Color.White; - this.toolStrip1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.toolStrip1.CanOverflow = false; - this.toolStrip1.DarkMode = false; - this.toolStrip1.DragForm = true; - this.toolStrip1.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.toolStrip1.ForeColor = System.Drawing.Color.Black; - this.toolStrip1.GripMargin = new System.Windows.Forms.Padding(0); - this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.openBtn, - this.saveMenuBtn, - this.externalBtn, - this.infoButton, - this.toolStripSeparator4, - this.prevButton, - this.slideshowButton, - this.nextButton, - this.toolStripSeparator1, - this.autoZoomButton, - this.zoomOutButton, - this.zoomTextBox, - this.zoomInButton, - this.zoom100Btn, - this.toolStripSeparator2, - this.selectionBtn, - this.editButton, - this.effectsBtn, - this.toolsBtn, - this.toolStripSeparator3, - this.checkboardButton, - this.fullscreenBtn, - this.miniViewButton, - this.qlibToolsep1, - this.moreButton, - this.framelessCloseBtn}); - this.toolStrip1.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; - this.toolStrip1.Location = new System.Drawing.Point(0, 0); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.toolStrip1.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.toolStrip1.Size = new System.Drawing.Size(684, 32); - this.toolStrip1.TabIndex = 1; - this.toolStrip1.VisibleChanged += new System.EventHandler(this.toolStrip1_VisibleChanged); - // // openBtn // this.openBtn.AutoSize = false; this.openBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.openBtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.openFileBtn, - this.openFolderBtn, - this.openRecursive}); + this.openFileBtn, + this.openFolderBtn, + this.openRecursive}); this.openBtn.Image = global::quick_picture_viewer.Properties.Resources.black_open; this.openBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.openBtn.ImageTransparentColor = System.Drawing.Color.Magenta; @@ -364,7 +625,7 @@ private void InitializeComponent() this.openFolderBtn.Image = global::quick_picture_viewer.Properties.Resources.black_imgfile; this.openFolderBtn.Name = "openFolderBtn"; this.openFolderBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.O))); + | System.Windows.Forms.Keys.O))); this.openFolderBtn.Size = new System.Drawing.Size(237, 24); this.openFolderBtn.Text = "open folder"; this.openFolderBtn.Click += new System.EventHandler(this.openFolderBtn_Click); @@ -385,8 +646,8 @@ private void InitializeComponent() this.saveMenuBtn.AutoSize = false; this.saveMenuBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.saveMenuBtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.saveBtn, - this.saveAsBtn}); + this.saveBtn, + this.saveAsBtn}); this.saveMenuBtn.Image = global::quick_picture_viewer.Properties.Resources.black_save; this.saveMenuBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.saveMenuBtn.ImageTransparentColor = System.Drawing.Color.Magenta; @@ -414,7 +675,7 @@ private void InitializeComponent() this.saveAsBtn.Image = global::quick_picture_viewer.Properties.Resources.black_saveas; this.saveAsBtn.Name = "saveAsBtn"; this.saveAsBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.S))); + | System.Windows.Forms.Keys.S))); this.saveAsBtn.Size = new System.Drawing.Size(207, 24); this.saveAsBtn.Text = "save as"; this.saveAsBtn.Click += new System.EventHandler(this.saveAsButton_Click); @@ -424,9 +685,9 @@ private void InitializeComponent() this.externalBtn.AutoSize = false; this.externalBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.externalBtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.externalRunBtn, - this.externalFavoriteBtn, - this.externalChooseBtn}); + this.externalRunBtn, + this.externalFavoriteBtn, + this.externalChooseBtn}); this.externalBtn.Image = ((System.Drawing.Image)(resources.GetObject("externalBtn.Image"))); this.externalBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.externalBtn.ImageTransparentColor = System.Drawing.Color.Magenta; @@ -455,7 +716,7 @@ private void InitializeComponent() this.externalFavoriteBtn.Image = global::quick_picture_viewer.Properties.Resources.black_paint; this.externalFavoriteBtn.Name = "externalFavoriteBtn"; this.externalFavoriteBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.O))); + | System.Windows.Forms.Keys.O))); this.externalFavoriteBtn.Size = new System.Drawing.Size(277, 24); this.externalFavoriteBtn.Text = "open with custom"; this.externalFavoriteBtn.Click += new System.EventHandler(this.externalFavoriteBtn_Click); @@ -468,7 +729,7 @@ private void InitializeComponent() this.externalChooseBtn.Image = ((System.Drawing.Image)(resources.GetObject("externalChooseBtn.Image"))); this.externalChooseBtn.Name = "externalChooseBtn"; this.externalChooseBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.E))); + | System.Windows.Forms.Keys.E))); this.externalChooseBtn.Size = new System.Drawing.Size(277, 24); this.externalChooseBtn.Text = "choose app"; this.externalChooseBtn.Click += new System.EventHandler(this.externalButton_Click); @@ -485,18 +746,6 @@ private void InitializeComponent() this.infoButton.Size = new System.Drawing.Size(24, 25); this.infoButton.Click += new System.EventHandler(this.infoButton_Click); // - // toolStripSeparator4 - // - this.toolStripSeparator4.AutoSize = false; - this.toolStripSeparator4.BackColor = System.Drawing.SystemColors.ControlLight; - this.toolStripSeparator4.DarkMode = false; - this.toolStripSeparator4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.toolStripSeparator4.InsideMenu = false; - this.toolStripSeparator4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.toolStripSeparator4.Name = "toolStripSeparator4"; - this.toolStripSeparator4.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.toolStripSeparator4.Size = new System.Drawing.Size(1, 24); - // // prevButton // this.prevButton.AutoSize = false; @@ -535,18 +784,6 @@ private void InitializeComponent() this.nextButton.EnabledChanged += new System.EventHandler(this.nextButton_EnabledChanged); this.nextButton.VisibleChanged += new System.EventHandler(this.nextButton_VisibleChanged); // - // toolStripSeparator1 - // - this.toolStripSeparator1.AutoSize = false; - this.toolStripSeparator1.BackColor = System.Drawing.SystemColors.ControlLight; - this.toolStripSeparator1.DarkMode = false; - this.toolStripSeparator1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.toolStripSeparator1.InsideMenu = false; - this.toolStripSeparator1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.toolStripSeparator1.Size = new System.Drawing.Size(1, 24); - // // autoZoomButton // this.autoZoomButton.AutoSize = false; @@ -564,35 +801,17 @@ private void InitializeComponent() // zoomOutButton // this.zoomOutButton.AutoSize = false; - this.zoomOutButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.zoomOutButton.Enabled = false; - this.zoomOutButton.Image = ((System.Drawing.Image)(resources.GetObject("zoomOutButton.Image"))); - this.zoomOutButton.ImageTransparentColor = System.Drawing.Color.Magenta; - this.zoomOutButton.Margin = new System.Windows.Forms.Padding(0); - this.zoomOutButton.Name = "zoomOutButton"; - this.zoomOutButton.Size = new System.Drawing.Size(24, 25); - this.zoomOutButton.Click += new System.EventHandler(this.zoomOutButton_Click); - this.zoomOutButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.zoomOutButton_MouseDown); - this.zoomOutButton.MouseLeave += new System.EventHandler(this.zoomOutButton_MouseLeave); - this.zoomOutButton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.zoomOutButton_MouseUp); - // - // zoomTextBox - // - this.zoomTextBox.BackColor = System.Drawing.Color.White; - this.zoomTextBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.zoomTextBox.Enabled = false; - this.zoomTextBox.Font = new System.Drawing.Font("Segoe UI", 9.75F); - this.zoomTextBox.Margin = new System.Windows.Forms.Padding(7, -1, 7, -1); - this.zoomTextBox.MaxLength = 12; - this.zoomTextBox.Name = "zoomTextBox"; - this.zoomTextBox.Size = new System.Drawing.Size(44, 24); - this.zoomTextBox.Text = "Auto"; - this.zoomTextBox.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.zoomTextBox.ToolTipText = "Zoom"; - this.zoomTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.zoomTextBox_KeyPress); - this.zoomTextBox.MouseEnter += new System.EventHandler(this.zoomTextBox_MouseEnter); - this.zoomTextBox.MouseLeave += new System.EventHandler(this.zoomTextBox_MouseLeave); - this.zoomTextBox.TextChanged += new System.EventHandler(this.zoomComboBox_TextChanged); + this.zoomOutButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.zoomOutButton.Enabled = false; + this.zoomOutButton.Image = ((System.Drawing.Image)(resources.GetObject("zoomOutButton.Image"))); + this.zoomOutButton.ImageTransparentColor = System.Drawing.Color.Magenta; + this.zoomOutButton.Margin = new System.Windows.Forms.Padding(0); + this.zoomOutButton.Name = "zoomOutButton"; + this.zoomOutButton.Size = new System.Drawing.Size(24, 25); + this.zoomOutButton.Click += new System.EventHandler(this.zoomOutButton_Click); + this.zoomOutButton.MouseDown += new System.Windows.Forms.MouseEventHandler(this.zoomOutButton_MouseDown); + this.zoomOutButton.MouseLeave += new System.EventHandler(this.zoomOutButton_MouseLeave); + this.zoomOutButton.MouseUp += new System.Windows.Forms.MouseEventHandler(this.zoomOutButton_MouseUp); // // zoomInButton // @@ -621,18 +840,6 @@ private void InitializeComponent() this.zoom100Btn.Size = new System.Drawing.Size(24, 25); this.zoom100Btn.Click += new System.EventHandler(this.zoom100Btn_Click); // - // toolStripSeparator2 - // - this.toolStripSeparator2.AutoSize = false; - this.toolStripSeparator2.BackColor = System.Drawing.SystemColors.ControlLight; - this.toolStripSeparator2.DarkMode = false; - this.toolStripSeparator2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.toolStripSeparator2.InsideMenu = false; - this.toolStripSeparator2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.toolStripSeparator2.Name = "toolStripSeparator2"; - this.toolStripSeparator2.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.toolStripSeparator2.Size = new System.Drawing.Size(1, 24); - // // selectionBtn // this.selectionBtn.AutoSize = false; @@ -650,15 +857,15 @@ private void InitializeComponent() this.editButton.AutoSize = false; this.editButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.editButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.flipHorizontalButton, - this.flipVerticalButton, - this.qlibToolsep4, - this.rotateRightButton, - this.rotateLeftButton, - this.rotate180Button, - this.customAngleBtn, - this.toolStripSeparator7, - this.cropBtn}); + this.flipHorizontalButton, + this.flipVerticalButton, + this.qlibToolsep4, + this.rotateRightButton, + this.rotateLeftButton, + this.rotate180Button, + this.customAngleBtn, + this.toolStripSeparator7, + this.cropBtn}); this.editButton.ForeColor = System.Drawing.Color.Black; this.editButton.Image = global::quick_picture_viewer.Properties.Resources.black_edit; this.editButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; @@ -687,7 +894,7 @@ private void InitializeComponent() this.flipVerticalButton.Image = ((System.Drawing.Image)(resources.GetObject("flipVerticalButton.Image"))); this.flipVerticalButton.Name = "flipVerticalButton"; this.flipVerticalButton.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.H))); + | System.Windows.Forms.Keys.H))); this.flipVerticalButton.Size = new System.Drawing.Size(243, 24); this.flipVerticalButton.Text = "flip vertical"; this.flipVerticalButton.Click += new System.EventHandler(this.flipVerticalButton_Click); @@ -724,7 +931,7 @@ private void InitializeComponent() this.rotateLeftButton.Image = ((System.Drawing.Image)(resources.GetObject("rotateLeftButton.Image"))); this.rotateLeftButton.Name = "rotateLeftButton"; this.rotateLeftButton.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.G))); + | System.Windows.Forms.Keys.G))); this.rotateLeftButton.Size = new System.Drawing.Size(243, 24); this.rotateLeftButton.Text = "rotate left"; this.rotateLeftButton.Click += new System.EventHandler(this.rotateLeftButton_Click); @@ -749,7 +956,7 @@ private void InitializeComponent() this.customAngleBtn.Image = global::quick_picture_viewer.Properties.Resources.black_angle; this.customAngleBtn.Name = "customAngleBtn"; this.customAngleBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.J))); + | System.Windows.Forms.Keys.J))); this.customAngleBtn.Size = new System.Drawing.Size(243, 24); this.customAngleBtn.Text = "custom angle"; this.customAngleBtn.Visible = false; @@ -773,11 +980,45 @@ private void InitializeComponent() this.cropBtn.Image = global::quick_picture_viewer.Properties.Resources.black_crop; this.cropBtn.Name = "cropBtn"; this.cropBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.X))); + | System.Windows.Forms.Keys.X))); this.cropBtn.Size = new System.Drawing.Size(243, 24); this.cropBtn.Text = "crop"; this.cropBtn.Click += new System.EventHandler(this.cropBtn_Click); // + // filteringModeBtn + // + this.filteringModeBtn.AutoSize = false; + this.filteringModeBtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.filteringModeBtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bilinearBtn, + this.nearestNeighborBtn}); + this.filteringModeBtn.Image = global::quick_picture_viewer.Properties.Resources.black_filtering; + this.filteringModeBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; + this.filteringModeBtn.ImageTransparentColor = System.Drawing.Color.Magenta; + this.filteringModeBtn.Margin = new System.Windows.Forms.Padding(0); + this.filteringModeBtn.Name = "filteringModeBtn"; + this.filteringModeBtn.Size = new System.Drawing.Size(30, 25); + // + // bilinearBtn + // + this.bilinearBtn.BackColor = System.Drawing.SystemColors.ControlLight; + this.bilinearBtn.ForeColor = System.Drawing.Color.Black; + this.bilinearBtn.Image = global::quick_picture_viewer.Properties.Resources.black_bilinear; + this.bilinearBtn.Name = "bilinearBtn"; + this.bilinearBtn.Size = new System.Drawing.Size(186, 24); + this.bilinearBtn.Text = "Bilinear"; + this.bilinearBtn.Click += new System.EventHandler(this.bilinearBtn_Click); + // + // nearestNeighborBtn + // + this.nearestNeighborBtn.BackColor = System.Drawing.SystemColors.ControlLight; + this.nearestNeighborBtn.ForeColor = System.Drawing.Color.Black; + this.nearestNeighborBtn.Image = global::quick_picture_viewer.Properties.Resources.black_nearest_neighbor; + this.nearestNeighborBtn.Name = "nearestNeighborBtn"; + this.nearestNeighborBtn.Size = new System.Drawing.Size(186, 24); + this.nearestNeighborBtn.Text = "Nearest Neighbor"; + this.nearestNeighborBtn.Click += new System.EventHandler(this.nearestNeighborBtn_Click); + // // effectsBtn // this.effectsBtn.AutoSize = false; @@ -804,18 +1045,6 @@ private void InitializeComponent() this.toolsBtn.Visible = false; this.toolsBtn.DropDownOpening += new System.EventHandler(this.effectsBtn_DropDownOpening); // - // toolStripSeparator3 - // - this.toolStripSeparator3.AutoSize = false; - this.toolStripSeparator3.BackColor = System.Drawing.SystemColors.ControlLight; - this.toolStripSeparator3.DarkMode = false; - this.toolStripSeparator3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.toolStripSeparator3.InsideMenu = false; - this.toolStripSeparator3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.toolStripSeparator3.Name = "toolStripSeparator3"; - this.toolStripSeparator3.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.toolStripSeparator3.Size = new System.Drawing.Size(1, 24); - // // checkboardButton // this.checkboardButton.AutoSize = false; @@ -850,37 +1079,25 @@ private void InitializeComponent() this.miniViewButton.Size = new System.Drawing.Size(24, 25); this.miniViewButton.Click += new System.EventHandler(this.miniViewButton_Click); // - // qlibToolsep1 - // - this.qlibToolsep1.AutoSize = false; - this.qlibToolsep1.BackColor = System.Drawing.SystemColors.ControlLight; - this.qlibToolsep1.DarkMode = false; - this.qlibToolsep1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.qlibToolsep1.InsideMenu = false; - this.qlibToolsep1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); - this.qlibToolsep1.Name = "qlibToolsep1"; - this.qlibToolsep1.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.qlibToolsep1.Size = new System.Drawing.Size(1, 24); - // // moreButton // this.moreButton.AutoSize = false; this.moreButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.moreButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.reloadButton, - this.deleteBtn, - this.permDeleteBtn, - this.printButton, - this.toolStripSeparator9, - this.backColorBtn, - this.onTopButton, - this.framelessBtn, - this.newWindowButton, - this.qlibToolsep2, - this.pluginManBtn, - this.toolStripSeparator10, - this.settingsButton, - this.aboutBtn}); + this.reloadButton, + this.deleteBtn, + this.permDeleteBtn, + this.printButton, + this.toolStripSeparator9, + this.backColorBtn, + this.onTopButton, + this.framelessBtn, + this.newWindowButton, + this.qlibToolsep2, + this.pluginManBtn, + this.toolStripSeparator10, + this.settingsButton, + this.aboutBtn}); this.moreButton.Image = ((System.Drawing.Image)(resources.GetObject("moreButton.Image"))); this.moreButton.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.moreButton.ImageTransparentColor = System.Drawing.Color.Magenta; @@ -952,9 +1169,9 @@ private void InitializeComponent() // this.backColorBtn.BackColor = System.Drawing.SystemColors.ControlLight; this.backColorBtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.backCustomBtn, - this.qlibMenuSeparator1, - this.backClearBtn}); + this.backCustomBtn, + this.qlibMenuSeparator1, + this.backClearBtn}); this.backColorBtn.ForeColor = System.Drawing.Color.Black; this.backColorBtn.Image = global::quick_picture_viewer.Properties.Resources.black_palette; this.backColorBtn.Name = "backColorBtn"; @@ -1097,31 +1314,33 @@ private void InitializeComponent() this.framelessCloseBtn.Visible = false; this.framelessCloseBtn.Click += new System.EventHandler(this.framelessCloseBtn_Click); // - // rmbMenu + // pictureBox // - this.rmbMenu.BackColor = System.Drawing.SystemColors.ControlLight; - this.rmbMenu.DarkMode = false; - this.rmbMenu.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204))); - this.rmbMenu.ForeColor = System.Drawing.Color.Black; - this.rmbMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.showMenuItem, - this.qlibToolsep5, - this.wallpaperBtn, - this.qlibToolsep3, - this.copyBtn, - this.pasteBtn, - this.selectAllBtn}); - this.rmbMenu.Name = "rmbMenu"; - this.rmbMenu.Size = new System.Drawing.Size(288, 152); - this.rmbMenu.Opening += new System.ComponentModel.CancelEventHandler(this.rmbMenu_Opening); + this.pictureBox.BackColor = System.Drawing.Color.Transparent; + this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.pictureBox.ImeMode = System.Windows.Forms.ImeMode.NoControl; + this.pictureBox.InitialImage = null; + this.pictureBox.Location = new System.Drawing.Point(0, 0); + this.pictureBox.Margin = new System.Windows.Forms.Padding(0); + this.pictureBox.Name = "pictureBox"; + this.pictureBox.Size = new System.Drawing.Size(684, 385); + this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pictureBox.TabIndex = 0; + this.pictureBox.TabStop = false; + this.pictureBox.DoubleClick += new System.EventHandler(this.picturePanel_DoubleClick); + this.pictureBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseClick); + this.pictureBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseDown); + this.pictureBox.MouseEnter += new System.EventHandler(this.picturePanel_MouseEnter); + this.pictureBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseMove); + this.pictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseUp); // // showMenuItem // this.showMenuItem.BackColor = System.Drawing.SystemColors.ControlLight; this.showMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.showNavArrowsBtn, - this.showToolbarBtn, - this.showStatusbarBtn}); + this.showNavArrowsBtn, + this.showToolbarBtn, + this.showStatusbarBtn}); this.showMenuItem.Font = new System.Drawing.Font("Segoe UI", 10F); this.showMenuItem.ForeColor = System.Drawing.Color.Black; this.showMenuItem.Image = global::quick_picture_viewer.Properties.Resources.black_show; @@ -1169,18 +1388,6 @@ private void InitializeComponent() this.showStatusbarBtn.Text = "show status bar"; this.showStatusbarBtn.Click += new System.EventHandler(this.showStatusBarBtn_Click); // - // qlibToolsep5 - // - this.qlibToolsep5.AutoSize = false; - this.qlibToolsep5.BackColor = System.Drawing.SystemColors.ControlLight; - this.qlibToolsep5.DarkMode = false; - this.qlibToolsep5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.qlibToolsep5.InsideMenu = true; - this.qlibToolsep5.Margin = new System.Windows.Forms.Padding(4); - this.qlibToolsep5.Name = "qlibToolsep5"; - this.qlibToolsep5.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.qlibToolsep5.Size = new System.Drawing.Size(284, 6); - // // wallpaperBtn // this.wallpaperBtn.BackColor = System.Drawing.SystemColors.ControlLight; @@ -1194,24 +1401,12 @@ private void InitializeComponent() this.wallpaperBtn.Text = "set as desktop background"; this.wallpaperBtn.Click += new System.EventHandler(this.wallpaperBtn_Click); // - // qlibToolsep3 - // - this.qlibToolsep3.AutoSize = false; - this.qlibToolsep3.BackColor = System.Drawing.SystemColors.ControlLight; - this.qlibToolsep3.DarkMode = false; - this.qlibToolsep3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(100)))), ((int)(((byte)(100))))); - this.qlibToolsep3.InsideMenu = true; - this.qlibToolsep3.Margin = new System.Windows.Forms.Padding(4); - this.qlibToolsep3.Name = "qlibToolsep3"; - this.qlibToolsep3.RightToLeft = System.Windows.Forms.RightToLeft.No; - this.qlibToolsep3.Size = new System.Drawing.Size(284, 6); - // // copyBtn // this.copyBtn.BackColor = System.Drawing.SystemColors.ControlLight; this.copyBtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.copyImageBtn, - this.copyFileBtn}); + this.copyImageBtn, + this.copyFileBtn}); this.copyBtn.ForeColor = System.Drawing.Color.Black; this.copyBtn.Image = global::quick_picture_viewer.Properties.Resources.black_copy; this.copyBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; @@ -1240,7 +1435,7 @@ private void InitializeComponent() this.copyFileBtn.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None; this.copyFileBtn.Name = "copyFileBtn"; this.copyFileBtn.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) - | System.Windows.Forms.Keys.C))); + | System.Windows.Forms.Keys.C))); this.copyFileBtn.Size = new System.Drawing.Size(215, 24); this.copyFileBtn.Text = "copy file"; this.copyFileBtn.Click += new System.EventHandler(this.copyFileBtn_Click_1); @@ -1271,163 +1466,6 @@ private void InitializeComponent() this.selectAllBtn.Text = "select all"; this.selectAllBtn.Click += new System.EventHandler(this.selectAllBtn_Click); // - // navNextBtn - // - this.navNextBtn.Anchor = System.Windows.Forms.AnchorStyles.Right; - this.navNextBtn.BackColor = System.Drawing.Color.Black; - this.navNextBtn.FlatAppearance.BorderSize = 0; - this.navNextBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(67))))); - this.navNextBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); - this.navNextBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.navNextBtn.Font = new System.Drawing.Font("Segoe UI", 9.75F); - this.navNextBtn.ForeColor = System.Drawing.SystemColors.ControlText; - this.navNextBtn.Image = global::quick_picture_viewer.Properties.Resources.white_next; - this.navNextBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.navNextBtn.Location = new System.Drawing.Point(625, 193); - this.navNextBtn.Margin = new System.Windows.Forms.Padding(27); - this.navNextBtn.Name = "navNextBtn"; - this.navNextBtn.Size = new System.Drawing.Size(32, 64); - this.navNextBtn.TabIndex = 8; - this.navNextBtn.TabStop = false; - this.navNextBtn.UseVisualStyleBackColor = false; - this.navNextBtn.Visible = false; - this.navNextBtn.Click += new System.EventHandler(this.navNextBtn_Click); - // - // navPrevBtn - // - this.navPrevBtn.Anchor = System.Windows.Forms.AnchorStyles.Left; - this.navPrevBtn.BackColor = System.Drawing.Color.Black; - this.navPrevBtn.FlatAppearance.BorderSize = 0; - this.navPrevBtn.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(67))))); - this.navPrevBtn.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); - this.navPrevBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.navPrevBtn.Font = new System.Drawing.Font("Segoe UI", 9.75F); - this.navPrevBtn.ForeColor = System.Drawing.SystemColors.ControlText; - this.navPrevBtn.Image = global::quick_picture_viewer.Properties.Resources.white_prev; - this.navPrevBtn.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.navPrevBtn.Location = new System.Drawing.Point(27, 193); - this.navPrevBtn.Margin = new System.Windows.Forms.Padding(27); - this.navPrevBtn.Name = "navPrevBtn"; - this.navPrevBtn.Size = new System.Drawing.Size(32, 64); - this.navPrevBtn.TabIndex = 7; - this.navPrevBtn.TabStop = false; - this.navPrevBtn.UseVisualStyleBackColor = false; - this.navPrevBtn.Visible = false; - this.navPrevBtn.Click += new System.EventHandler(this.navPrevBtn_Click); - // - // typeOpsButton - // - this.typeOpsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); - this.typeOpsButton.BackColor = System.Drawing.Color.Black; - this.typeOpsButton.FlatAppearance.BorderSize = 0; - this.typeOpsButton.FlatAppearance.MouseDownBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(67)))), ((int)(((byte)(67)))), ((int)(((byte)(67))))); - this.typeOpsButton.FlatAppearance.MouseOverBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56))))); - this.typeOpsButton.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - this.typeOpsButton.Font = new System.Drawing.Font("Segoe UI", 10F); - this.typeOpsButton.ForeColor = System.Drawing.Color.White; - this.typeOpsButton.Image = global::quick_picture_viewer.Properties.Resources.white_options; - this.typeOpsButton.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; - this.typeOpsButton.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.typeOpsButton.Location = new System.Drawing.Point(537, 358); - this.typeOpsButton.Margin = new System.Windows.Forms.Padding(27); - this.typeOpsButton.Name = "typeOpsButton"; - this.typeOpsButton.Size = new System.Drawing.Size(120, 32); - this.typeOpsButton.TabIndex = 0; - this.typeOpsButton.TabStop = false; - this.typeOpsButton.Text = " type options"; - this.typeOpsButton.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; - this.typeOpsButton.UseVisualStyleBackColor = false; - this.typeOpsButton.Visible = false; - this.typeOpsButton.Click += new System.EventHandler(this.typeOpsButton_Click); - // - // suggestionIcon - // - this.suggestionIcon.BackColor = System.Drawing.Color.Black; - this.suggestionIcon.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.suggestionIcon.Location = new System.Drawing.Point(27, 59); - this.suggestionIcon.Margin = new System.Windows.Forms.Padding(27, 27, 0, 0); - this.suggestionIcon.Name = "suggestionIcon"; - this.suggestionIcon.Size = new System.Drawing.Size(26, 26); - this.suggestionIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage; - this.suggestionIcon.TabIndex = 6; - this.suggestionIcon.TabStop = false; - this.suggestionIcon.Visible = false; - // - // suggestionLabel - // - this.suggestionLabel.AutoSize = true; - this.suggestionLabel.BackColor = System.Drawing.Color.Black; - this.suggestionLabel.Font = new System.Drawing.Font("Segoe UI", 10F); - this.suggestionLabel.ForeColor = System.Drawing.Color.White; - this.suggestionLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.suggestionLabel.Location = new System.Drawing.Point(53, 59); - this.suggestionLabel.Margin = new System.Windows.Forms.Padding(0, 27, 0, 0); - this.suggestionLabel.Name = "suggestionLabel"; - this.suggestionLabel.Padding = new System.Windows.Forms.Padding(0, 3, 3, 4); - this.suggestionLabel.Size = new System.Drawing.Size(79, 26); - this.suggestionLabel.TabIndex = 3; - this.suggestionLabel.Text = "suggestion"; - this.suggestionLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.suggestionLabel.Visible = false; - // - // picturePanel - // - this.picturePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.picturePanel.AutoScroll = true; - this.picturePanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.picturePanel.BackColor = System.Drawing.Color.Transparent; - this.picturePanel.Controls.Add(this.pleaseOpenLabel); - this.picturePanel.Controls.Add(this.pictureBox); - this.picturePanel.Location = new System.Drawing.Point(0, 32); - this.picturePanel.Margin = new System.Windows.Forms.Padding(0); - this.picturePanel.Name = "picturePanel"; - this.picturePanel.Size = new System.Drawing.Size(684, 385); - this.picturePanel.TabIndex = 2; - this.picturePanel.SizeChanged += new System.EventHandler(this.picturePanel_SizeChanged); - this.picturePanel.DoubleClick += new System.EventHandler(this.picturePanel_DoubleClick); - this.picturePanel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseClick); - this.picturePanel.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseDown); - this.picturePanel.MouseEnter += new System.EventHandler(this.picturePanel_MouseEnter); - this.picturePanel.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseMove); - this.picturePanel.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseUp); - // - // pleaseOpenLabel - // - this.pleaseOpenLabel.Dock = System.Windows.Forms.DockStyle.Fill; - this.pleaseOpenLabel.Enabled = false; - this.pleaseOpenLabel.Font = new System.Drawing.Font("Segoe UI", 10F); - this.pleaseOpenLabel.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.pleaseOpenLabel.Location = new System.Drawing.Point(0, 0); - this.pleaseOpenLabel.Margin = new System.Windows.Forms.Padding(0); - this.pleaseOpenLabel.Name = "pleaseOpenLabel"; - this.pleaseOpenLabel.Size = new System.Drawing.Size(684, 385); - this.pleaseOpenLabel.TabIndex = 5; - this.pleaseOpenLabel.Text = "please open image"; - this.pleaseOpenLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.pleaseOpenLabel.DoubleClick += new System.EventHandler(this.picturePanel_DoubleClick); - // - // pictureBox - // - this.pictureBox.BackColor = System.Drawing.Color.Transparent; - this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBox.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.pictureBox.InitialImage = null; - this.pictureBox.Location = new System.Drawing.Point(0, 0); - this.pictureBox.Margin = new System.Windows.Forms.Padding(0); - this.pictureBox.Name = "pictureBox"; - this.pictureBox.Size = new System.Drawing.Size(684, 385); - this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pictureBox.TabIndex = 0; - this.pictureBox.TabStop = false; - this.pictureBox.DoubleClick += new System.EventHandler(this.picturePanel_DoubleClick); - this.pictureBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseClick); - this.pictureBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseDown); - this.pictureBox.MouseEnter += new System.EventHandler(this.picturePanel_MouseEnter); - this.pictureBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseMove); - this.pictureBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.picturePanel_MouseUp); - // // MainForm // this.AllowDrop = true; @@ -1459,8 +1497,8 @@ private void InitializeComponent() this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); this.rmbMenu.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.suggestionIcon)).EndInit(); this.picturePanel.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.suggestionIcon)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -1469,7 +1507,7 @@ private void InitializeComponent() #endregion - private System.Windows.Forms.PictureBox pictureBox; + private QuickPictureBox pictureBox; private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.IO.FileSystemWatcher fileSystemWatcher1; private QuickLibrary.QlibToolbar toolStrip1; @@ -1567,5 +1605,8 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripDropDownButton saveMenuBtn; private System.Windows.Forms.ToolStripMenuItem saveBtn; private System.Windows.Forms.ToolStripMenuItem saveAsBtn; + private System.Windows.Forms.ToolStripDropDownButton filteringModeBtn; + private System.Windows.Forms.ToolStripMenuItem bilinearBtn; + private System.Windows.Forms.ToolStripMenuItem nearestNeighborBtn; } } \ No newline at end of file diff --git a/quick-picture-viewer/forms/MainForm.cs b/quick-picture-viewer/forms/MainForm.cs index 76793e2..1f43b82 100644 --- a/quick-picture-viewer/forms/MainForm.cs +++ b/quick-picture-viewer/forms/MainForm.cs @@ -4,6 +4,7 @@ using System.ComponentModel; using System.Diagnostics; using System.Drawing; +using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Globalization; using System.IO; @@ -51,6 +52,8 @@ public MainForm(string openPath, bool darkMode) InitializeComponent(); + SetFilteringMode(InterpolationMode.Bilinear); + zoomInTimer.Elapsed += new ElapsedEventHandler(zoomInTimer_Event); zoomInTimer.Interval = 100; @@ -238,6 +241,9 @@ private void InitLanguage() directoryLabel.ToolTipText = LangMan.Get("show-file-explorer") + " | Ctrl+Shift+L"; effectsBtn.Text = LangMan.Get("effects"); + filteringModeBtn.Text = LangMan.Get("filtering"); + bilinearBtn.Text = LangMan.Get("bilinear"); + nearestNeighborBtn.Text = LangMan.Get("nearest-neighbor"); toolsBtn.Text = LangMan.Get("tools"); pluginManBtn.Text = LangMan.Get("plugin-manager") + " ..."; @@ -600,7 +606,7 @@ private void setZoomFactor(int newZoomFactor) pictureBox.Invoke((MethodInvoker)(() => { pictureBox.Size = newSize; - MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); + pictureBox.UpdatePictureBoxLocation(picturePanel); })); } @@ -695,12 +701,12 @@ public void setCheckboardBackground(bool b, bool saveToDisk) picturePanel.BackColor = Color.Transparent; Properties.Settings.Default.BackColor = ""; Properties.Settings.Default.Save(); - MainHelper.ApplyCheckerboardBackground(pictureBox, true, darkMode); + pictureBox.ApplyCheckerboardBackground(true, darkMode); } } else { - MainHelper.ApplyCheckerboardBackground(pictureBox, false); + pictureBox.ApplyCheckerboardBackground(false); } if (saveToDisk) @@ -974,7 +980,7 @@ private void setFullscreen(bool b) } picturePanel.BackColor = Color.Black; - MainHelper.ApplyCheckerboardBackground(pictureBox, false, darkMode); + pictureBox.ApplyCheckerboardBackground(false, darkMode); typeOpsButton.Left = ClientRectangle.Width + 27; pleaseOpenLabel.ForeColor = Color.White; @@ -1003,7 +1009,7 @@ private void setFullscreen(bool b) if (checkboardBackground) { picturePanel.BackColor = Color.Transparent; - MainHelper.ApplyCheckerboardBackground(pictureBox, true, darkMode); + pictureBox.ApplyCheckerboardBackground(true, darkMode); } else { @@ -1465,6 +1471,10 @@ private void SetDarkMode(bool dark) hasChangesLabel.Image = Properties.Resources.white_erase; effectsBtn.Image = Properties.Resources.white_effects; + filteringModeBtn.Image = Properties.Resources.white_filtering; + bilinearBtn.Image = Properties.Resources.white_bilinear; + nearestNeighborBtn.Image = Properties.Resources.white_nearest_neighbor; + toolsBtn.Image = Properties.Resources.white_tools; pluginManBtn.Image = Properties.Resources.white_plugin; @@ -1878,7 +1888,7 @@ private void backCustomBtn_Click(object sender, EventArgs e) private void MainForm_ResizeEnd(object sender, EventArgs e) { - if (!autoZoom) MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); + if (!autoZoom) pictureBox.UpdatePictureBoxLocation(picturePanel); } private void zoomTextBox_MouseEnter(object sender, EventArgs e) @@ -2017,14 +2027,14 @@ private void statusStrip1_VisibleChanged(object sender, EventArgs e) { showStatusbarBtn.Checked = statusStrip1.Visible; UpdatePicturePanelHeight(); - MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); + pictureBox.UpdatePictureBoxLocation(picturePanel); } private void toolStrip1_VisibleChanged(object sender, EventArgs e) { showToolbarBtn.Checked = toolStrip1.Visible; UpdatePicturePanelHeight(); - MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); + pictureBox.UpdatePictureBoxLocation(picturePanel); } private void showStatusBarBtn_Click(object sender, EventArgs e) @@ -2179,7 +2189,7 @@ public void cropBtn_Click(object sender, EventArgs e) pictureBox.Image = originalImage; setImageChanged(true); UpdateSizeLabel(); - MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); + pictureBox.UpdatePictureBoxLocation(picturePanel); selectionBtn.Checked = false; } @@ -2189,6 +2199,24 @@ public void cropBtn_Click(object sender, EventArgs e) } } + public void bilinearBtn_Click(object sender, EventArgs e) + { + SetFilteringMode(InterpolationMode.Bilinear); + } + + public void nearestNeighborBtn_Click(object sender, EventArgs e) + { + SetFilteringMode(InterpolationMode.NearestNeighbor); + } + + private void SetFilteringMode(InterpolationMode mode) + { + pictureBox.SetInterpolationMode(mode); + + bilinearBtn.Checked = mode == InterpolationMode.Bilinear; + nearestNeighborBtn.Checked = mode == InterpolationMode.NearestNeighbor; + } + private Rectangle GetSelectionRect() { double scale = (double)originalImage.Width / (double)pictureBox.Width; diff --git a/quick-picture-viewer/forms/MainForm.resx b/quick-picture-viewer/forms/MainForm.resx index 043a293..04ea59a 100644 --- a/quick-picture-viewer/forms/MainForm.resx +++ b/quick-picture-viewer/forms/MainForm.resx @@ -130,7 +130,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAO5JREFUOE/N0j1qAlEYheEPiYJgq5B0UQT3YKULsNQuixAxVUSxdAsWNoFoYmGb + vAAADrwBlbxySQAAAO5JREFUOE/N0j1qAlEYheEPiYJgq5B0UQT3YKULsNQuixAxVUSxdAsWNoFoYmGb 1h3YmFjZBxHSpUre84k4OOOgjeTAA3MuzJ25P3aNPGKDKdIauCQdfKCEF7zj7EkGWCDrzSyBEebIaCAu +vISt94OucEYr95ORC//ou4tnCK2u8dwnrDCA75QQTB3+ETL21H2a855MytDk9S8md1jjaa3o7Sh3dYX gqlCk+iP9GddROYbhd1jKA1oT06+rLxhCB1VMDoFnUbPW0xSmGGCpAbIfs2RGxYV3TDdtGfkoT3p46Jo @@ -140,7 +140,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAGZJREFUOE/VjzEKgDAQBO9bKtio//+FmvgI3REECRa5KwIOTJFiJ5y14vwwRC9X + vAAADrwBlbxySQAAAGZJREFUOE/VjzEKgDAQBO9bKtio//+FmvgI3REECRa5KwIOTJFiJ5y14vwwRC9X GQpMcpOddAcY75IxuALlGKoDs2TM7W7ajt83jTJLbq/mCfBzksP9ckBgkaExEDgkkRAESn+B2QXamyDY CyfAWwAAAABJRU5ErkJggg== @@ -148,7 +148,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAALVJREFUOE/V0r8OwVAUgPE7+rt6EBGC6ILRw5hsJJ7EK5DgEcTWxCLETAxWEgPf + vAAADrwBlbxySQAAALVJREFUOE/V0r8OwVAUgPE7+rt6EBGC6ILRw5hsJJ7EK5DgEcTWxCLETAxWEgPf 6bGd9LaVGHzJLz0d2t721v26AiY44oYDxsgjsSK2WKGNyue4xgZyc29TzHU0LSAr8XZCVUdTDfJa3u4o 6Wgq46FjfDvUdTQ1sNcxvhGWOprkQyZ+gz5ekF2QleQgT061Cx1cMcAQIZ5I9R/0cIHseea6kItb0VnG 5OIzmtHZF80Q6Pg/OfcGzhogaYnUQccAAAAASUVORK5CYII= @@ -157,7 +157,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAANpJREFUOE/F08EKAUEAh/E9kAPClfIeijwN8TZKilxR4gWEB6EIyUU5cxDff3a3 + vAAADrwBlbxySQAAANpJREFUOE/F08EKAUEAh/E9kAPClfIeijwN8TZKilxR4gWEB6EIyUU5cxDff3a3 1TQ4yVe/ZqY0zc4u7xdVMcUZl2CcoIKPxdHDCjUUkAvGOtboIAZnfcyQNCu/RzCqFBbompWVjr1F2qyi XjdQGexRNquXxtAx7ewNVBMjfxp1gp7VzrVBEUd/GnWDLtFOG4TCErj606h3J3DlPMG7O3DlvAPd6gb2 W7DTW9ihZFZWbcyhH7nKYomWWTkKv0S9Zz1OHkpjAwd8/BLD9FENoaPeg3GAr/+Ff+R5T5lgLGc/X8aO @@ -167,7 +167,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAOZJREFUOE/F08+qAVEAx/EpVzaEnai7sOAZ1I2nId5GKbFHySOg+x63bv6EjbK2 + vAAADrwBlbxySQAAAOZJREFUOE/F08+qAVEAx/EpVzaEnai7sOAZ1I2nId5GKbFHySOg+x63bv6EjbK2 IL6/Y6ZmxplrFup+69PMGdNp5pzhvKuqe1QNjLHCCUfMUEdke1TQxxZNFJBHCS38QL9/4KkbzvhGRhfc dN0rjQUGZhRKN8oOZV1w80+gstjgy4xiFJ5AdTB5nL7ONsEn9KSBLkg8TgN5r+afKAWtV6ADtNpxsj7B FNqqOFnXQKv6C/8W2tIurFEzo1A9zKGbbOWwRNeMLCUxhPZZr1OE0rENfaGRX6I/77+gR726xxH+/C/8 @@ -261,7 +261,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAHNJREFUOE/NzzEOQEAURdGJhiUplBorsAzLU2gVeq2ClXCF1wzDjEi4yUk0/8F8 + vAAADrwBlbxySQAAAHNJREFUOE/NzzEOQEAURdGJhiUplBorsAzLU2gVeq2ClXCF1wzDjEi4yUk0/8F8 UYp6ewwrR4t555196D3gOhRnd4dyyPdQ3q9Ah7O3nXGmoR4lIthdDqgMDUZUiKG8BpSGJqxDCYIGlH5t wKMBpS/6RcYsknw8utUbuVkAAAAASUVORK5CYII= @@ -269,7 +269,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAIhJREFUOE/NktEJhDAQRAOWpaB1iFiqlqFnM3fzjILEzel+CA48dhWZmQTDk6q2 + vAAADrwBlbxySQAAAIhJREFUOE/NktEJhDAQRAOWpaB1iFiqlqFnM3fzjILEzel+CA48dhWZmQTDk6q2 WW7TrTGZLjXiG9d18uwSqUcDVwvOvIijAdy+C9JakRrcalGLSRQiNYDLuxhEF1fT4G8L0mdBOrIMINuC 9D6uq3IGZgvSP2JPRzkDOLUg3foQWe9d/8WrFcIP3xE8L2HmKDkAAAAASUVORK5CYII= @@ -277,7 +277,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wgAADsIBFShKgAAAAMRJREFUOE/N0j8OAUEUgPFt/IsotETiFDoicReRKITCMVxEFAqVaisJInECSpVC + vAAADrwBlbxySQAAAMRJREFUOE/N0j8OAUEUgPFt/IsotETiFDoicReRKITCMVxEFAqVaisJInECSpVC FDq+N2+mWJmdbLbhS37xhmSzYyb6q9r2s4AhYtxwxwEjFJHaBR2csMUAdauLJeS3Jry9rYVZ+ZvgjLJZ feUecEVLvkhJ3mSqY75kO/Kf5K6Kp47JHqjpGCz1ATv0dQwmW9jrmEzOeaNjsDXGOiaTSyLnPDcrfzPI MZbMylMDR6zQQwVy5pkukstdZdnny8p0lX9RFH0APGwkDDvDBD0AAAAASUVORK5CYII= @@ -286,7 +286,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAALVJREFUOE/N0jsKwkAYReE0PsDKVtei6xGsxN4VaaO7UBFsfC3CJgqCgp5jUqgz + vAAADrwBlbxySQAAALVJREFUOE/N0jsKwkAYReE0PsDKVtei6xGsxN4VaaO7UBFsfC3CJgqCgp5jUqgz JJa58MEkc4eE5E8qmQaGWOKSW2OEJgrTxRYL9NDK9TGHe3aiqWODyfsqnjHs2A0ywCxbFmYKu0FW8LXL YsdukBtKPxJp45wtv3PH809XBNkjVo45IIgfJkXswCfnwjkJUsMRD8QOyj07dqPp4ASf8nvYe+7ZKYxD 4ivu4J+Ra0fZMa9UkuQFGxtJRcKBXbcAAAAASUVORK5CYII= @@ -310,7 +310,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAHRJREFUOE/NkdEKgCAMRf2Gon456Gf6vIoe6s61cAPdXgIPHLyyOUFTl9yOLq2m + vAAADrwBlbxySQAAAHRJREFUOE/NkdEKgCAMRf2Gon456Gf6vIoe6s61cAPdXgIPHLyyOUFTl9yOLq2m /wascIfUEJF6F/hxwoljiBkeHBmaSmzvGkHOZNQmSHUA5ZZCmfMbDBx1wSC1Eao3oF+4oL3FInXqVb9Q 4g1wkVtqdkVKD1tyPrQ4GpemAAAAAElFTkSuQmCC @@ -318,7 +318,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAO5JREFUOE/N0j1qAlEYheEPiYJgq5B0UQT3YKULsNQuixAxVUSxdAsWNoFoYmGb + vAAADrwBlbxySQAAAO5JREFUOE/N0j1qAlEYheEPiYJgq5B0UQT3YKULsNQuixAxVUSxdAsWNoFoYmGb 1h3YmFjZBxHSpUre84k4OOOgjeTAA3MuzJ25P3aNPGKDKdIauCQdfKCEF7zj7EkGWCDrzSyBEebIaCAu +vISt94OucEYr95ORC//ou4tnCK2u8dwnrDCA75QQTB3+ETL21H2a855MytDk9S8md1jjaa3o7Sh3dYX gqlCk+iP9GddROYbhd1jKA1oT06+rLxhCB1VMDoFnUbPW0xSmGGCpAbIfs2RGxYV3TDdtGfkoT3p46Jo @@ -328,7 +328,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAGFJREFUOE9joDXgg9JkAT8g/gylSQbOQPwKiP8D8Wson2jgC8QgTZZADDIARIP4 + vAAADrwBlbxySQAAAGFJREFUOE9joDXgg9JkAT8g/gylSQbOQPwKiP8D8Wson2jgC8QgTZZADDIARIP4 IHGCQBGIQYodwDyIASDgCMQgcZA8QYCsCGYACBClGR0gG0AWGAYG0B+AnEwIDyrAwAAA9usapRF2XZYA AAAASUVORK5CYII= @@ -336,7 +336,7 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO - wwAADsMBx2+oZAAAAF1JREFUOE9jGDSgE4i/A/F/IjFIbQcQw8FPIOaFMIkC/ED8A8KEAJCpMJoYDAIw + vAAADrwBlbxySQAAAF1JREFUOE9jGDSgE4i/A/F/IjFIbQcQw8FPIOaFMIkC/ED8A8KEAJCpMJoYDAIw GgywCuIAowbQwwBiMAjAaDAAJSQ+CJMogJGQuoH4DxCj24QL/wZilKQ8UICBAQC3Yk3h8YvbWgAAAABJ RU5ErkJggg== diff --git a/quick-picture-viewer/forms/MiniViewForm.Designer.cs b/quick-picture-viewer/forms/MiniViewForm.Designer.cs index 095a8c7..abf5c41 100644 --- a/quick-picture-viewer/forms/MiniViewForm.Designer.cs +++ b/quick-picture-viewer/forms/MiniViewForm.Designer.cs @@ -42,7 +42,7 @@ private void InitializeComponent() this.resizeBtn = new QuickLibrary.QlibTitlebarButton(); this.opacityBtn = new QuickLibrary.QlibTitlebarButton(); this.picturePanel = new quick_picture_viewer.CustomPanel(); - this.pictureBox = new System.Windows.Forms.PictureBox(); + this.pictureBox = new QuickPictureBox(); this.zoom100Btn = new QuickLibrary.QlibTitlebarButton(); this.contextMenuStrip1.SuspendLayout(); this.picturePanel.SuspendLayout(); @@ -317,7 +317,7 @@ private void InitializeComponent() #endregion - private System.Windows.Forms.PictureBox pictureBox; + private QuickPictureBox pictureBox; private System.Windows.Forms.Label zoomLabel; private CustomPanel picturePanel; private System.Windows.Forms.ToolTip infoTooltip; diff --git a/quick-picture-viewer/forms/MiniViewForm.cs b/quick-picture-viewer/forms/MiniViewForm.cs index a4c85c0..19f5512 100644 --- a/quick-picture-viewer/forms/MiniViewForm.cs +++ b/quick-picture-viewer/forms/MiniViewForm.cs @@ -95,7 +95,7 @@ private void setZoomFactor(int newZoomFactor) pictureBox.Size = new Size(newWidth, newHeight); - MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); + pictureBox.UpdatePictureBoxLocation(picturePanel); } private void ZoomToFit() @@ -157,7 +157,7 @@ private void setCheckboardBackground(bool b) checkboardBackground = b; checkboardBtn.Checked = b; pictureBox.BackColor = checkboardBackground ? ThemeMan.DarkBackColor : Color.Black; - MainHelper.ApplyCheckerboardBackground(pictureBox, b, true); + pictureBox.ApplyCheckerboardBackground(b, true); } private void MiniViewForm_KeyDown(object sender, KeyEventArgs e) @@ -276,7 +276,7 @@ private void picturePanel_MouseMove(object sender, MouseEventArgs e) private void MiniViewForm_ResizeEnd(object sender, EventArgs e) { - if (!autoZoom) MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); + if (!autoZoom) pictureBox.UpdatePictureBoxLocation(picturePanel); zoomLabel.ForeColor = Width > 240 ? Color.White : Color.Black; } diff --git a/quick-picture-viewer/helpers/MainHelper.cs b/quick-picture-viewer/helpers/MainHelper.cs deleted file mode 100644 index 8ba02a6..0000000 --- a/quick-picture-viewer/helpers/MainHelper.cs +++ /dev/null @@ -1,50 +0,0 @@ -using QuickLibrary; -using System.Drawing; -using System.Windows.Forms; - -namespace quick_picture_viewer -{ - public static class MainHelper - { - public static void ApplyCheckerboardBackground(PictureBox pictureBox, bool apply, bool darkMode = false) - { - if (!apply) - { - if (pictureBox.BackgroundImage != null) pictureBox.BackgroundImage.Dispose(); - pictureBox.BackgroundImage = null; - return; - } - Color col = darkMode ? Color.FromArgb(76, 76, 76) : Color.FromArgb(191, 191, 191); - Bitmap bmp = new Bitmap(16, 16); - using (SolidBrush brush = new SolidBrush(col)) - using (Graphics G = Graphics.FromImage(bmp)) - { - G.FillRectangle(brush, 0, 0, 8, 8); - G.FillRectangle(brush, 8, 8, 8, 8); - } - pictureBox.BackgroundImage = bmp; - pictureBox.BackgroundImageLayout = ImageLayout.Tile; - } - - public static void UpdatePictureBoxLocation(Panel picturePanel, PictureBox pictureBox) - { - int x, y; - - if (pictureBox.Width < picturePanel.Width) x = (int)((double)(picturePanel.Width - pictureBox.Width) / (double)2); - else x = -picturePanel.HorizontalScroll.Value; - - if (pictureBox.Height < picturePanel.Height) y = (int)((double)(picturePanel.Height - pictureBox.Height) / (double)2); - else y = -picturePanel.VerticalScroll.Value; - - pictureBox.Location = new Point(x, y); - - if (picturePanel != null && pictureBox != null) - { - if (pictureBox.Width > picturePanel.Width && pictureBox.Height > picturePanel.Height) NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_BOTH, true); - else if (pictureBox.Width > picturePanel.Width) NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_HORZ, true); - else if (pictureBox.Height > picturePanel.Height) NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_VERT, true); - else NativeMan.ShowScrollBar(picturePanel.Handle, NativeMan.ScrollBarDirection.SB_BOTH, false); - } - } - } -} diff --git a/quick-picture-viewer/languages/lang_cn.resx b/quick-picture-viewer/languages/lang_cn.resx index e2c78f0..72c1b83 100644 --- a/quick-picture-viewer/languages/lang_cn.resx +++ b/quick-picture-viewer/languages/lang_cn.resx @@ -358,6 +358,18 @@ 填充 Wallpaper + + 过滤 + Menu + + + 双线性 + Menu + + + 最近邻 + Menu + 适应 Wallpaper diff --git a/quick-picture-viewer/languages/lang_de.resx b/quick-picture-viewer/languages/lang_de.resx index 75648ab..b297098 100644 --- a/quick-picture-viewer/languages/lang_de.resx +++ b/quick-picture-viewer/languages/lang_de.resx @@ -356,6 +356,18 @@ Ausfüllen Wallpaper + + + Filterung + Menu + + + Bilinear + Menu + + + Nächster Nachbar + Menu Passend diff --git a/quick-picture-viewer/languages/lang_en.resx b/quick-picture-viewer/languages/lang_en.resx index 7e8ea81..33a1554 100644 --- a/quick-picture-viewer/languages/lang_en.resx +++ b/quick-picture-viewer/languages/lang_en.resx @@ -357,6 +357,18 @@ Fill Wallpaper + + Filtering + Menu + + + Bilinear + Menu + + + Nearest Neighbor + Menu + Fit Wallpaper diff --git a/quick-picture-viewer/languages/lang_es.resx b/quick-picture-viewer/languages/lang_es.resx index d0a43dc..bd5b5b3 100644 --- a/quick-picture-viewer/languages/lang_es.resx +++ b/quick-picture-viewer/languages/lang_es.resx @@ -357,6 +357,18 @@ Rellenar Wallpaper + + Filtrado + Menu + + + Bilineal + Menu + + + Vecino más cercano + Menu + Ajustar Wallpaper diff --git a/quick-picture-viewer/languages/lang_fr.Designer.cs b/quick-picture-viewer/languages/lang_fr.Designer.cs index 7bbe8e3..d0c766a 100644 --- a/quick-picture-viewer/languages/lang_fr.Designer.cs +++ b/quick-picture-viewer/languages/lang_fr.Designer.cs @@ -19,7 +19,7 @@ namespace quick_picture_viewer.languages { // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] public class lang_fr { @@ -600,6 +600,15 @@ public static string fill { } } + /// + /// Looks up a localized string similar to Filtrage. + /// + public static string filtering { + get { + return ResourceManager.GetString("filtering", resourceCulture); + } + } + /// /// Looks up a localized string similar to Ajuster. /// diff --git a/quick-picture-viewer/languages/lang_fr.resx b/quick-picture-viewer/languages/lang_fr.resx index d32b2d8..d0d23eb 100644 --- a/quick-picture-viewer/languages/lang_fr.resx +++ b/quick-picture-viewer/languages/lang_fr.resx @@ -357,6 +357,18 @@ Remplir Wallpaper + + Filtrage + Menu + + + Bilinéaire + Menu + + + Plus proche voisin + Menu + Ajuster Wallpaper diff --git a/quick-picture-viewer/languages/lang_hr.resx b/quick-picture-viewer/languages/lang_hr.resx index 83cd745..55fe2b5 100644 --- a/quick-picture-viewer/languages/lang_hr.resx +++ b/quick-picture-viewer/languages/lang_hr.resx @@ -357,6 +357,18 @@ Ispuni Wallpaper + + Filtriranje + Menu + + + Bilinearno + Menu + + + Najbliži susjed + Menu + Prilagodi veličinu Wallpaper diff --git a/quick-picture-viewer/languages/lang_hu.resx b/quick-picture-viewer/languages/lang_hu.resx index fab92f5..285ba6c 100644 --- a/quick-picture-viewer/languages/lang_hu.resx +++ b/quick-picture-viewer/languages/lang_hu.resx @@ -357,6 +357,18 @@ Kitöltés Wallpaper + + Szűrés + Menu + + + Bilineáris + Menu + + + Legközelebbi szomszéd + Menu + Illesztés Wallpaper diff --git a/quick-picture-viewer/languages/lang_ru.resx b/quick-picture-viewer/languages/lang_ru.resx index fd17dad..f7cca92 100644 --- a/quick-picture-viewer/languages/lang_ru.resx +++ b/quick-picture-viewer/languages/lang_ru.resx @@ -357,6 +357,18 @@ Заполнить Wallpaper + + Фильтрация + Menu + + + Билинейная + Menu + + + Ближайший сосед + Menu + Подогнать Wallpaper diff --git a/quick-picture-viewer/languages/lang_tr.resx b/quick-picture-viewer/languages/lang_tr.resx index 983acd8..5154f3e 100644 --- a/quick-picture-viewer/languages/lang_tr.resx +++ b/quick-picture-viewer/languages/lang_tr.resx @@ -357,6 +357,18 @@ Doldur Wallpaper + + Filtreleme + Menu + + + Bilinear + Menu + + + En Yakın Komşu + Menu + Sığdır Wallpaper diff --git a/quick-picture-viewer/quick-picture-viewer.csproj b/quick-picture-viewer/quick-picture-viewer.csproj index 0b3a782..07d248a 100644 --- a/quick-picture-viewer/quick-picture-viewer.csproj +++ b/quick-picture-viewer/quick-picture-viewer.csproj @@ -149,6 +149,9 @@ + + Component + True True @@ -166,9 +169,10 @@ - - + + Form + InfoForm.cs @@ -208,7 +212,9 @@ True lang_ru.resx - + + Form + MiniViewForm.cs @@ -223,34 +229,48 @@ SelectionForm.cs - + + Form + PluginManForm.cs - + + Form + SettingsForm.cs - + + Form + SvgOpsForm.cs - + + Form + PrintForm.cs - + + Form + EditSelForm.cs - + + Form + WallpaperForm.cs - + + Form + AboutForm.cs @@ -463,6 +483,12 @@ + + + + + + diff --git a/quick-picture-viewer/resources/imgs/dark/black-bilinear.png b/quick-picture-viewer/resources/imgs/dark/black-bilinear.png new file mode 100644 index 0000000..55e4a2f Binary files /dev/null and b/quick-picture-viewer/resources/imgs/dark/black-bilinear.png differ diff --git a/quick-picture-viewer/resources/imgs/dark/black-filtering.png b/quick-picture-viewer/resources/imgs/dark/black-filtering.png new file mode 100644 index 0000000..337484c Binary files /dev/null and b/quick-picture-viewer/resources/imgs/dark/black-filtering.png differ diff --git a/quick-picture-viewer/resources/imgs/dark/black-nearest-neighbor.png b/quick-picture-viewer/resources/imgs/dark/black-nearest-neighbor.png new file mode 100644 index 0000000..1a122ed Binary files /dev/null and b/quick-picture-viewer/resources/imgs/dark/black-nearest-neighbor.png differ diff --git a/quick-picture-viewer/resources/imgs/light/white-bilinear.png b/quick-picture-viewer/resources/imgs/light/white-bilinear.png new file mode 100644 index 0000000..8e1c570 Binary files /dev/null and b/quick-picture-viewer/resources/imgs/light/white-bilinear.png differ diff --git a/quick-picture-viewer/resources/imgs/light/white-filtering.png b/quick-picture-viewer/resources/imgs/light/white-filtering.png new file mode 100644 index 0000000..0e403df Binary files /dev/null and b/quick-picture-viewer/resources/imgs/light/white-filtering.png differ diff --git a/quick-picture-viewer/resources/imgs/light/white-nearest-neighbor.png b/quick-picture-viewer/resources/imgs/light/white-nearest-neighbor.png new file mode 100644 index 0000000..2f515c0 Binary files /dev/null and b/quick-picture-viewer/resources/imgs/light/white-nearest-neighbor.png differ