From bc0cab54e0632247b212d3eee09a4588c2f4c15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Concei=C3=A7=C3=A3o?= Date: Wed, 15 Apr 2020 05:02:44 +0100 Subject: [PATCH] v0.2.1 --- CHANGELOG.md | 10 + PrusaSL1Reader/FileFormat.cs | 19 ++ PrusaSL1Reader/PrusaSL1Reader.csproj | 6 +- PrusaSL1Viewer/FrmMain.Designer.cs | 305 +++++++++++------- PrusaSL1Viewer/FrmMain.cs | 251 +++++++++++--- PrusaSL1Viewer/FrmMain.resx | 3 + PrusaSL1Viewer/Images/Back-16x16.png | Bin 0 -> 186 bytes PrusaSL1Viewer/Images/Error-128x128.png | Bin 0 -> 1953 bytes PrusaSL1Viewer/Images/File-Close-16x16.png | Bin 0 -> 355 bytes PrusaSL1Viewer/Images/Next-16x16.png | Bin 0 -> 198 bytes PrusaSL1Viewer/Images/Save-16x16.png | Bin 0 -> 425 bytes PrusaSL1Viewer/Properties/AssemblyInfo.cs | 4 +- .../Properties/Resources.Designer.cs | 50 +++ PrusaSL1Viewer/Properties/Resources.resx | 51 +-- PrusaSL1Viewer/PrusaSL1Viewer.csproj | 5 + 15 files changed, 529 insertions(+), 175 deletions(-) create mode 100644 PrusaSL1Viewer/Images/Back-16x16.png create mode 100644 PrusaSL1Viewer/Images/Error-128x128.png create mode 100644 PrusaSL1Viewer/Images/File-Close-16x16.png create mode 100644 PrusaSL1Viewer/Images/Next-16x16.png create mode 100644 PrusaSL1Viewer/Images/Save-16x16.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 24a314e..33b89d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Changelog +## 15/04/2020 - v0.2.1 - Beta + +* (Add) Allow open other file formats as well on viewer +* (Add) All thumbnails can now be seen and saved +* (Add) Rotate layer image +* (Add) Close file +* (Change) more abstraction +* (Change) from PNG to BMP compression to speed up bitmap coversion +* (Change) Faster layer preview + ## 12/04/2020 - v0.2 - Beta * Add cbddlp file format diff --git a/PrusaSL1Reader/FileFormat.cs b/PrusaSL1Reader/FileFormat.cs index b7016ac..84ef661 100644 --- a/PrusaSL1Reader/FileFormat.cs +++ b/PrusaSL1Reader/FileFormat.cs @@ -57,6 +57,25 @@ namespace PrusaSL1Reader /// public abstract byte ThumbnailsCount { get; } + /// + /// Gets the number of created thumbnails + /// + public byte CreatedThumbnailsCount { + get + { + if (ReferenceEquals(Thumbnails, null)) return 0; + byte count = 0; + + foreach (var thumbnail in Thumbnails) + { + if (ReferenceEquals(thumbnail, null)) continue; + count++; + } + + return count; + } + } + /// /// Gets the thumbnails for this /// diff --git a/PrusaSL1Reader/PrusaSL1Reader.csproj b/PrusaSL1Reader/PrusaSL1Reader.csproj index 8fa7e56..b84accb 100644 --- a/PrusaSL1Reader/PrusaSL1Reader.csproj +++ b/PrusaSL1Reader/PrusaSL1Reader.csproj @@ -7,9 +7,9 @@ https://github.com/sn4k3/PrusaSL1Viewer https://github.com/sn4k3/PrusaSL1Viewer - 0.2.0.0 - 0.2.0.0 - 0.2 + 0.2.1.0 + 0.2.1.0 + 0.2.1 diff --git a/PrusaSL1Viewer/FrmMain.Designer.cs b/PrusaSL1Viewer/FrmMain.Designer.cs index 9e8369b..6c8bf1d 100644 --- a/PrusaSL1Viewer/FrmMain.Designer.cs +++ b/PrusaSL1Viewer/FrmMain.Designer.cs @@ -31,30 +31,36 @@ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain)); this.menu = new System.Windows.Forms.MenuStrip(); this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.menuFileOpen = new System.Windows.Forms.ToolStripMenuItem(); - this.menuFileExit = new System.Windows.Forms.ToolStripMenuItem(); this.menuEdit = new System.Windows.Forms.ToolStripMenuItem(); - this.menuEditExtract = new System.Windows.Forms.ToolStripMenuItem(); - this.menuEditConvert = new System.Windows.Forms.ToolStripMenuItem(); this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.menuViewRotateImage = new System.Windows.Forms.ToolStripMenuItem(); this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.menuAboutWebsite = new System.Windows.Forms.ToolStripMenuItem(); - this.menuAboutDonate = new System.Windows.Forms.ToolStripMenuItem(); - this.menuAboutAbout = new System.Windows.Forms.ToolStripMenuItem(); this.statusBar = new System.Windows.Forms.StatusStrip(); this.sbLayers = new System.Windows.Forms.VScrollBar(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.lbLayers = new System.Windows.Forms.Label(); this.scLeft = new System.Windows.Forms.SplitContainer(); - this.pbThumbnail = new System.Windows.Forms.PictureBox(); + this.tsThumbnails = new System.Windows.Forms.ToolStrip(); + this.tsThumbnailsCount = new System.Windows.Forms.ToolStripLabel(); this.lvProperties = new System.Windows.Forms.ListView(); this.lvChKey = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.lvChValue = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); this.scCenter = new System.Windows.Forms.SplitContainer(); - this.pbLayer = new System.Windows.Forms.PictureBox(); this.pbLayers = new System.Windows.Forms.ProgressBar(); + this.pbThumbnail = new System.Windows.Forms.PictureBox(); + this.tsThumbnailsPrevious = new System.Windows.Forms.ToolStripButton(); + this.tsThumbnailsNext = new System.Windows.Forms.ToolStripButton(); + this.tsThumbnailsExport = new System.Windows.Forms.ToolStripButton(); + this.pbLayer = new System.Windows.Forms.PictureBox(); + this.menuOpenFile = new System.Windows.Forms.ToolStripMenuItem(); + this.menuCloseFile = new System.Windows.Forms.ToolStripMenuItem(); + this.menuFileExit = new System.Windows.Forms.ToolStripMenuItem(); + this.menuEditExtract = new System.Windows.Forms.ToolStripMenuItem(); + this.menuEditConvert = new System.Windows.Forms.ToolStripMenuItem(); + this.menuViewRotateImage = new System.Windows.Forms.ToolStripMenuItem(); + this.menuAboutWebsite = new System.Windows.Forms.ToolStripMenuItem(); + this.menuAboutDonate = new System.Windows.Forms.ToolStripMenuItem(); + this.menuAboutAbout = new System.Windows.Forms.ToolStripMenuItem(); this.menu.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -65,11 +71,12 @@ this.scLeft.Panel1.SuspendLayout(); this.scLeft.Panel2.SuspendLayout(); this.scLeft.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pbThumbnail)).BeginInit(); + this.tsThumbnails.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.scCenter)).BeginInit(); this.scCenter.Panel1.SuspendLayout(); this.scCenter.Panel2.SuspendLayout(); this.scCenter.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pbThumbnail)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLayer)).BeginInit(); this.SuspendLayout(); // @@ -89,30 +96,13 @@ // fileToolStripMenuItem // this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.menuFileOpen, + this.menuOpenFile, + this.menuCloseFile, this.menuFileExit}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.fileToolStripMenuItem.Text = "&File"; // - // menuFileOpen - // - this.menuFileOpen.Image = global::PrusaSL1Viewer.Properties.Resources.Open_16x16; - this.menuFileOpen.Name = "menuFileOpen"; - this.menuFileOpen.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); - this.menuFileOpen.Size = new System.Drawing.Size(146, 22); - this.menuFileOpen.Text = "&Open"; - this.menuFileOpen.Click += new System.EventHandler(this.MenuItemClicked); - // - // menuFileExit - // - this.menuFileExit.Image = global::PrusaSL1Viewer.Properties.Resources.Exit_16x16; - this.menuFileExit.Name = "menuFileExit"; - this.menuFileExit.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); - this.menuFileExit.Size = new System.Drawing.Size(146, 22); - this.menuFileExit.Text = "&Exit"; - this.menuFileExit.Click += new System.EventHandler(this.MenuItemClicked); - // // menuEdit // this.menuEdit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -123,25 +113,6 @@ this.menuEdit.Size = new System.Drawing.Size(39, 20); this.menuEdit.Text = "&Edit"; // - // menuEditExtract - // - this.menuEditExtract.Enabled = false; - this.menuEditExtract.Image = global::PrusaSL1Viewer.Properties.Resources.Extract_object_16x16; - this.menuEditExtract.Name = "menuEditExtract"; - this.menuEditExtract.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt) - | System.Windows.Forms.Keys.E))); - this.menuEditExtract.Size = new System.Drawing.Size(173, 22); - this.menuEditExtract.Text = "&Extract"; - this.menuEditExtract.Click += new System.EventHandler(this.MenuItemClicked); - // - // menuEditConvert - // - this.menuEditConvert.Enabled = false; - this.menuEditConvert.Image = global::PrusaSL1Viewer.Properties.Resources.Convert_16x16; - this.menuEditConvert.Name = "menuEditConvert"; - this.menuEditConvert.Size = new System.Drawing.Size(173, 22); - this.menuEditConvert.Text = "&Convert To"; - // // viewToolStripMenuItem // this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -150,17 +121,6 @@ this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); this.viewToolStripMenuItem.Text = "&View"; // - // menuViewRotateImage - // - this.menuViewRotateImage.Checked = true; - this.menuViewRotateImage.CheckOnClick = true; - this.menuViewRotateImage.CheckState = System.Windows.Forms.CheckState.Checked; - this.menuViewRotateImage.Image = global::PrusaSL1Viewer.Properties.Resources.Rotate_16x16; - this.menuViewRotateImage.Name = "menuViewRotateImage"; - this.menuViewRotateImage.Size = new System.Drawing.Size(164, 22); - this.menuViewRotateImage.Text = "&Rotate Image 90º"; - this.menuViewRotateImage.ToolTipText = "Auto rotate layer preview image at 90º (This can slow down the layer preview)"; - // // helpToolStripMenuItem // this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -171,33 +131,6 @@ this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20); this.helpToolStripMenuItem.Text = "&Help"; // - // menuAboutWebsite - // - this.menuAboutWebsite.Image = global::PrusaSL1Viewer.Properties.Resources.Global_Network_icon_16x16; - this.menuAboutWebsite.Name = "menuAboutWebsite"; - this.menuAboutWebsite.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); - this.menuAboutWebsite.Size = new System.Drawing.Size(161, 22); - this.menuAboutWebsite.Text = "&Website"; - this.menuAboutWebsite.Click += new System.EventHandler(this.MenuItemClicked); - // - // menuAboutDonate - // - this.menuAboutDonate.Image = global::PrusaSL1Viewer.Properties.Resources.Donate_16x16; - this.menuAboutDonate.Name = "menuAboutDonate"; - this.menuAboutDonate.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D))); - this.menuAboutDonate.Size = new System.Drawing.Size(161, 22); - this.menuAboutDonate.Text = "&Donate"; - this.menuAboutDonate.Click += new System.EventHandler(this.MenuItemClicked); - // - // menuAboutAbout - // - this.menuAboutAbout.Image = global::PrusaSL1Viewer.Properties.Resources.Button_Info_16x16; - this.menuAboutAbout.Name = "menuAboutAbout"; - this.menuAboutAbout.ShortcutKeys = System.Windows.Forms.Keys.F1; - this.menuAboutAbout.Size = new System.Drawing.Size(161, 22); - this.menuAboutAbout.Text = "&About"; - this.menuAboutAbout.Click += new System.EventHandler(this.MenuItemClicked); - // // statusBar // this.statusBar.Location = new System.Drawing.Point(0, 761); @@ -278,25 +211,36 @@ // scLeft.Panel1 // this.scLeft.Panel1.Controls.Add(this.pbThumbnail); - this.scLeft.Panel1MinSize = 400; + this.scLeft.Panel1.Controls.Add(this.tsThumbnails); + this.scLeft.Panel1MinSize = 425; // // scLeft.Panel2 // this.scLeft.Panel2.Controls.Add(this.lvProperties); this.scLeft.Size = new System.Drawing.Size(394, 731); - this.scLeft.SplitterDistance = 400; + this.scLeft.SplitterDistance = 425; this.scLeft.TabIndex = 3; // - // pbThumbnail + // tsThumbnails // - this.pbThumbnail.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.pbThumbnail.Dock = System.Windows.Forms.DockStyle.Fill; - this.pbThumbnail.Location = new System.Drawing.Point(0, 0); - this.pbThumbnail.Name = "pbThumbnail"; - this.pbThumbnail.Size = new System.Drawing.Size(394, 400); - this.pbThumbnail.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; - this.pbThumbnail.TabIndex = 4; - this.pbThumbnail.TabStop = false; + this.tsThumbnails.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.tsThumbnails.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsThumbnailsPrevious, + this.tsThumbnailsCount, + this.tsThumbnailsNext, + this.tsThumbnailsExport}); + this.tsThumbnails.Location = new System.Drawing.Point(0, 0); + this.tsThumbnails.Name = "tsThumbnails"; + this.tsThumbnails.Size = new System.Drawing.Size(394, 25); + this.tsThumbnails.TabIndex = 5; + this.tsThumbnails.Text = "tsThumbnails"; + // + // tsThumbnailsCount + // + this.tsThumbnailsCount.Enabled = false; + this.tsThumbnailsCount.Name = "tsThumbnailsCount"; + this.tsThumbnailsCount.Size = new System.Drawing.Size(24, 22); + this.tsThumbnailsCount.Text = "0/0"; // // lvProperties // @@ -309,7 +253,7 @@ this.lvProperties.HideSelection = false; this.lvProperties.Location = new System.Drawing.Point(0, 0); this.lvProperties.Name = "lvProperties"; - this.lvProperties.Size = new System.Drawing.Size(394, 327); + this.lvProperties.Size = new System.Drawing.Size(394, 302); this.lvProperties.TabIndex = 0; this.lvProperties.UseCompatibleStateImageBehavior = false; this.lvProperties.View = System.Windows.Forms.View.Details; @@ -345,6 +289,63 @@ this.scCenter.SplitterDistance = 702; this.scCenter.TabIndex = 4; // + // pbLayers + // + this.pbLayers.Dock = System.Windows.Forms.DockStyle.Fill; + this.pbLayers.Location = new System.Drawing.Point(0, 0); + this.pbLayers.Name = "pbLayers"; + this.pbLayers.Size = new System.Drawing.Size(1125, 25); + this.pbLayers.Step = 1; + this.pbLayers.TabIndex = 6; + // + // pbThumbnail + // + this.pbThumbnail.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.pbThumbnail.Dock = System.Windows.Forms.DockStyle.Fill; + this.pbThumbnail.Location = new System.Drawing.Point(0, 25); + this.pbThumbnail.Name = "pbThumbnail"; + this.pbThumbnail.Size = new System.Drawing.Size(394, 400); + this.pbThumbnail.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; + this.pbThumbnail.TabIndex = 4; + this.pbThumbnail.TabStop = false; + // + // tsThumbnailsPrevious + // + this.tsThumbnailsPrevious.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.tsThumbnailsPrevious.Enabled = false; + this.tsThumbnailsPrevious.Image = global::PrusaSL1Viewer.Properties.Resources.Back_16x16; + this.tsThumbnailsPrevious.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsThumbnailsPrevious.Name = "tsThumbnailsPrevious"; + this.tsThumbnailsPrevious.Size = new System.Drawing.Size(23, 22); + this.tsThumbnailsPrevious.Text = "toolStripButton1"; + this.tsThumbnailsPrevious.ToolTipText = "Show previous thumbnail"; + this.tsThumbnailsPrevious.Click += new System.EventHandler(this.ItemClicked); + // + // tsThumbnailsNext + // + this.tsThumbnailsNext.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.tsThumbnailsNext.Enabled = false; + this.tsThumbnailsNext.Image = global::PrusaSL1Viewer.Properties.Resources.Next_16x16; + this.tsThumbnailsNext.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsThumbnailsNext.Name = "tsThumbnailsNext"; + this.tsThumbnailsNext.Size = new System.Drawing.Size(23, 22); + this.tsThumbnailsNext.Text = "toolStripButton2"; + this.tsThumbnailsNext.ToolTipText = "Show next thumbnail"; + this.tsThumbnailsNext.Click += new System.EventHandler(this.ItemClicked); + // + // tsThumbnailsExport + // + this.tsThumbnailsExport.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.tsThumbnailsExport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.tsThumbnailsExport.Enabled = false; + this.tsThumbnailsExport.Image = global::PrusaSL1Viewer.Properties.Resources.Save_16x16; + this.tsThumbnailsExport.ImageTransparentColor = System.Drawing.Color.Magenta; + this.tsThumbnailsExport.Name = "tsThumbnailsExport"; + this.tsThumbnailsExport.Size = new System.Drawing.Size(23, 22); + this.tsThumbnailsExport.Text = "toolStripButton3"; + this.tsThumbnailsExport.ToolTipText = "Save thumbnail to file"; + this.tsThumbnailsExport.Click += new System.EventHandler(this.ItemClicked); + // // pbLayer // this.pbLayer.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; @@ -356,14 +357,93 @@ this.pbLayer.TabIndex = 5; this.pbLayer.TabStop = false; // - // pbLayers + // menuOpenFile // - this.pbLayers.Dock = System.Windows.Forms.DockStyle.Fill; - this.pbLayers.Location = new System.Drawing.Point(0, 0); - this.pbLayers.Name = "pbLayers"; - this.pbLayers.Size = new System.Drawing.Size(1125, 25); - this.pbLayers.Step = 1; - this.pbLayers.TabIndex = 6; + this.menuOpenFile.Image = global::PrusaSL1Viewer.Properties.Resources.Open_16x16; + this.menuOpenFile.Name = "menuOpenFile"; + this.menuOpenFile.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O))); + this.menuOpenFile.Size = new System.Drawing.Size(169, 22); + this.menuOpenFile.Text = "&Open File"; + this.menuOpenFile.Click += new System.EventHandler(this.ItemClicked); + // + // menuCloseFile + // + this.menuCloseFile.Enabled = false; + this.menuCloseFile.Image = global::PrusaSL1Viewer.Properties.Resources.File_Close_16x16; + this.menuCloseFile.Name = "menuCloseFile"; + this.menuCloseFile.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W))); + this.menuCloseFile.Size = new System.Drawing.Size(169, 22); + this.menuCloseFile.Text = "&Close File"; + this.menuCloseFile.Click += new System.EventHandler(this.ItemClicked); + // + // menuFileExit + // + this.menuFileExit.Image = global::PrusaSL1Viewer.Properties.Resources.Exit_16x16; + this.menuFileExit.Name = "menuFileExit"; + this.menuFileExit.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Alt | System.Windows.Forms.Keys.F4))); + this.menuFileExit.Size = new System.Drawing.Size(169, 22); + this.menuFileExit.Text = "&Exit"; + this.menuFileExit.Click += new System.EventHandler(this.ItemClicked); + // + // menuEditExtract + // + this.menuEditExtract.Enabled = false; + this.menuEditExtract.Image = global::PrusaSL1Viewer.Properties.Resources.Extract_object_16x16; + this.menuEditExtract.Name = "menuEditExtract"; + this.menuEditExtract.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Alt) + | System.Windows.Forms.Keys.E))); + this.menuEditExtract.Size = new System.Drawing.Size(173, 22); + this.menuEditExtract.Text = "&Extract"; + this.menuEditExtract.Click += new System.EventHandler(this.ItemClicked); + // + // menuEditConvert + // + this.menuEditConvert.Enabled = false; + this.menuEditConvert.Image = global::PrusaSL1Viewer.Properties.Resources.Convert_16x16; + this.menuEditConvert.Name = "menuEditConvert"; + this.menuEditConvert.Size = new System.Drawing.Size(173, 22); + this.menuEditConvert.Text = "&Convert To"; + // + // menuViewRotateImage + // + this.menuViewRotateImage.Checked = true; + this.menuViewRotateImage.CheckOnClick = true; + this.menuViewRotateImage.CheckState = System.Windows.Forms.CheckState.Checked; + this.menuViewRotateImage.Image = global::PrusaSL1Viewer.Properties.Resources.Rotate_16x16; + this.menuViewRotateImage.Name = "menuViewRotateImage"; + this.menuViewRotateImage.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.R))); + this.menuViewRotateImage.Size = new System.Drawing.Size(205, 22); + this.menuViewRotateImage.Text = "&Rotate Image 90º"; + this.menuViewRotateImage.ToolTipText = "Auto rotate layer preview image at 90º (This can slow down the layer preview)"; + this.menuViewRotateImage.Click += new System.EventHandler(this.ItemClicked); + // + // menuAboutWebsite + // + this.menuAboutWebsite.Image = global::PrusaSL1Viewer.Properties.Resources.Global_Network_icon_16x16; + this.menuAboutWebsite.Name = "menuAboutWebsite"; + this.menuAboutWebsite.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) + | System.Windows.Forms.Keys.W))); + this.menuAboutWebsite.Size = new System.Drawing.Size(193, 22); + this.menuAboutWebsite.Text = "&Website"; + this.menuAboutWebsite.Click += new System.EventHandler(this.ItemClicked); + // + // menuAboutDonate + // + this.menuAboutDonate.Image = global::PrusaSL1Viewer.Properties.Resources.Donate_16x16; + this.menuAboutDonate.Name = "menuAboutDonate"; + this.menuAboutDonate.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D))); + this.menuAboutDonate.Size = new System.Drawing.Size(193, 22); + this.menuAboutDonate.Text = "&Donate"; + this.menuAboutDonate.Click += new System.EventHandler(this.ItemClicked); + // + // menuAboutAbout + // + this.menuAboutAbout.Image = global::PrusaSL1Viewer.Properties.Resources.Button_Info_16x16; + this.menuAboutAbout.Name = "menuAboutAbout"; + this.menuAboutAbout.ShortcutKeys = System.Windows.Forms.Keys.F1; + this.menuAboutAbout.Size = new System.Drawing.Size(193, 22); + this.menuAboutAbout.Text = "&About"; + this.menuAboutAbout.Click += new System.EventHandler(this.ItemClicked); // // FrmMain // @@ -387,14 +467,17 @@ ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.scLeft.Panel1.ResumeLayout(false); + this.scLeft.Panel1.PerformLayout(); this.scLeft.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.scLeft)).EndInit(); this.scLeft.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.pbThumbnail)).EndInit(); + this.tsThumbnails.ResumeLayout(false); + this.tsThumbnails.PerformLayout(); this.scCenter.Panel1.ResumeLayout(false); this.scCenter.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.scCenter)).EndInit(); this.scCenter.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.pbThumbnail)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pbLayer)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -405,7 +488,7 @@ private System.Windows.Forms.MenuStrip menu; private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem menuFileOpen; + private System.Windows.Forms.ToolStripMenuItem menuOpenFile; private System.Windows.Forms.ToolStripMenuItem menuFileExit; private System.Windows.Forms.StatusStrip statusBar; private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem; @@ -429,6 +512,12 @@ private System.Windows.Forms.ToolStripMenuItem menuEditConvert; private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem menuViewRotateImage; + private System.Windows.Forms.ToolStrip tsThumbnails; + private System.Windows.Forms.ToolStripLabel tsThumbnailsCount; + private System.Windows.Forms.ToolStripButton tsThumbnailsPrevious; + private System.Windows.Forms.ToolStripButton tsThumbnailsNext; + private System.Windows.Forms.ToolStripButton tsThumbnailsExport; + private System.Windows.Forms.ToolStripMenuItem menuCloseFile; } } diff --git a/PrusaSL1Viewer/FrmMain.cs b/PrusaSL1Viewer/FrmMain.cs index 8e772dd..fe77215 100644 --- a/PrusaSL1Viewer/FrmMain.cs +++ b/PrusaSL1Viewer/FrmMain.cs @@ -7,23 +7,28 @@ */ using System; using System.Diagnostics; -using System.Drawing; using System.IO; -using System.IO.Compression; using System.Reflection; using System.Windows.Forms; using PrusaSL1Reader; +using SixLabors.ImageSharp; using SixLabors.ImageSharp.Processing; namespace PrusaSL1Viewer { public partial class FrmMain : Form { + public static FileFormat SlicerFile + { + get => Program.SlicerFile; + set => Program.SlicerFile = value; + } + #region Constructors public FrmMain() { InitializeComponent(); - Text = $"{FrmAbout.AssemblyTitle} Version: {FrmAbout.AssemblyVersion}"; + Clear(); DragEnter += (s, e) => { if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy; }; DragDrop += (s, e) => { ProcessFile((string[])e.Data.GetData(DataFormats.FileDrop)); }; @@ -34,14 +39,14 @@ namespace PrusaSL1Viewer #endregion #region Events - private void sbLayers_ValueChanged(object sender, EventArgs e) + + private void ItemClicked(object sender, EventArgs e) { - ShowLayer((uint)(sbLayers.Maximum - sbLayers.Value)); - } - - private void MenuItemClicked(object sender, EventArgs e) - { - if (ReferenceEquals(sender, menuFileOpen)) + /******************* + * Main Menu * + ******************/ + // File + if (ReferenceEquals(sender, menuOpenFile)) { using (OpenFileDialog openFile = new OpenFileDialog()) { @@ -64,12 +69,19 @@ namespace PrusaSL1Viewer return; } + if (ReferenceEquals(sender, menuCloseFile)) + { + Clear(); + return; + } + if (ReferenceEquals(sender, menuFileExit)) { Application.Exit(); return; } + // Edit if (ReferenceEquals(sender, menuEditExtract)) { using (FolderBrowserDialog folder = new FolderBrowserDialog()) @@ -78,7 +90,7 @@ namespace PrusaSL1Viewer { try { - Program.SlicerFile.Extract(folder.SelectedPath); + SlicerFile.Extract(folder.SelectedPath); if (MessageBox.Show( $"Extraction was successful, browser folder to see it contents.\n{folder.SelectedPath}\nPress 'Yes' if you want open the target folder, otherwise select 'No' to continue.", "Extraction completed", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) @@ -97,6 +109,13 @@ namespace PrusaSL1Viewer return; } + if (ReferenceEquals(sender, menuViewRotateImage)) + { + sbLayers_ValueChanged(sbLayers, null); + return; + } + + // About if (ReferenceEquals(sender, menuAboutAbout)) { Program.FrmAbout.ShowDialog(); @@ -115,6 +134,91 @@ namespace PrusaSL1Viewer Process.Start(About.Donate); return; } + + /************************ + * Thumbnail Menu * + ***********************/ + if (ReferenceEquals(sender, tsThumbnailsPrevious)) + { + byte i = (byte)tsThumbnailsCount.Tag; + if (i == 0) + { + // This should never happen! + tsThumbnailsPrevious.Enabled = false; + return; + } + + tsThumbnailsCount.Tag = --i; + + if (i == 0) + { + tsThumbnailsPrevious.Enabled = false; + } + + pbThumbnail.Image = SlicerFile.Thumbnails[i]?.ToBitmap(); + + tsThumbnailsCount.Text = $"{i+1}/{SlicerFile.CreatedThumbnailsCount}"; + tsThumbnailsNext.Enabled = true; + return; + } + + if (ReferenceEquals(sender, tsThumbnailsNext)) + { + byte i = byte.Parse(tsThumbnailsCount.Tag.ToString()); + if (i >= SlicerFile.CreatedThumbnailsCount-1) + { + // This should never happen! + tsThumbnailsNext.Enabled = false; + return; + } + + tsThumbnailsCount.Tag = ++i; + + if (i >= SlicerFile.CreatedThumbnailsCount-1) + { + tsThumbnailsNext.Enabled = false; + } + + pbThumbnail.Image = SlicerFile.Thumbnails[i]?.ToBitmap(); + + tsThumbnailsCount.Text = $"{i+1}/{SlicerFile.CreatedThumbnailsCount}"; + tsThumbnailsPrevious.Enabled = true; + return; + } + + if (ReferenceEquals(sender, tsThumbnailsExport)) + { + using (SaveFileDialog dialog = new SaveFileDialog()) + { + byte i = byte.Parse(tsThumbnailsCount.Tag.ToString()); + if(ReferenceEquals(SlicerFile.Thumbnails[i], null)) + { + return; // This should never happen! + } + + dialog.Filter = "Image Files|.*png"; + dialog.AddExtension = true; + dialog.FileName = $"{Path.GetFileNameWithoutExtension(SlicerFile.FileFullPath)}_thumbnail{i+1}.png"; + + if (dialog.ShowDialog() == DialogResult.OK) + { + using (var stream = dialog.OpenFile()) + { + SlicerFile.Thumbnails[i].SaveAsPng(stream); + stream.Close(); + } + } + + return; + + } + } + } + + private void sbLayers_ValueChanged(object sender, EventArgs e) + { + if (ReferenceEquals(SlicerFile, null)) return; + ShowLayer((uint)(sbLayers.Maximum - sbLayers.Value)); } private void ConvertToItemOnClick(object sender, EventArgs e) @@ -123,7 +227,7 @@ namespace PrusaSL1Viewer FileFormat fileFormat = (FileFormat)menuItem.Tag; using (SaveFileDialog dialog = new SaveFileDialog()) { - dialog.FileName = Path.GetFileNameWithoutExtension(Program.SlicerFile.FileFullPath); + dialog.FileName = Path.GetFileNameWithoutExtension(SlicerFile.FileFullPath); //using (FileFormat instance = (FileFormat)Activator.CreateInstance(type)) //using (CbddlpFile file = new CbddlpFile()) @@ -134,7 +238,7 @@ namespace PrusaSL1Viewer if (dialog.ShowDialog() == DialogResult.OK) { - Program.SlicerFile.Convert(fileFormat, dialog.FileName); + SlicerFile.Convert(fileFormat, dialog.FileName); } } @@ -142,6 +246,51 @@ namespace PrusaSL1Viewer #endregion #region Methods + + /// + /// Closes file and clear UI + /// + void Clear() + { + Text = $"{FrmAbout.AssemblyTitle} Version: {FrmAbout.AssemblyVersion}"; + SlicerFile?.Dispose(); + SlicerFile = null; + + // GUI CLEAN + pbThumbnail.Image = null; + pbLayer.Image = null; + pbThumbnail.Image = null; + lbLayers.Text = "Layers"; + lvProperties.BeginUpdate(); + lvProperties.Items.Clear(); + lvProperties.Groups.Clear(); + lvProperties.EndUpdate(); + pbLayers.Value = 0; + sbLayers.Value = 0; + + statusBar.Items.Clear(); + menuEditConvert.DropDownItems.Clear(); + + foreach (ToolStripItem item in menuEdit.DropDownItems) + { + item.Enabled = false; + } + + foreach (ToolStripItem item in tsThumbnails.Items) + { + item.Enabled = false; + } + + menuCloseFile.Enabled = + sbLayers.Enabled = + pbLayers.Enabled = + menuEdit.Enabled = + false; + + tsThumbnailsCount.Text = "0/0"; + tsThumbnailsCount.Tag = null; + } + void ProcessFile(string[] files) { if (ReferenceEquals(files, null)) return; @@ -162,16 +311,15 @@ namespace PrusaSL1Viewer } void ProcessFile(string fileName) - { - Program.SlicerFile?.Dispose(); - Program.SlicerFile = FileFormat.FindByExtension(fileName, true, true); - if (ReferenceEquals(Program.SlicerFile, null)) return; - Program.SlicerFile.Decode(fileName); + { + Clear(); + SlicerFile = FileFormat.FindByExtension(fileName, true, true); + if (ReferenceEquals(SlicerFile, null)) return; + SlicerFile.Decode(fileName); - menuEditConvert.DropDownItems.Clear(); foreach (var fileFormat in FileFormat.AvaliableFormats) { - if (fileFormat.GetType() == Program.SlicerFile.GetType()) continue; + if (fileFormat.GetType() == SlicerFile.GetType()) continue; ToolStripMenuItem menuItem = new ToolStripMenuItem(fileFormat.GetType().Name.Replace("File", string.Empty)) { Tag = fileFormat, @@ -181,25 +329,42 @@ namespace PrusaSL1Viewer menuEditConvert.DropDownItems.Add(menuItem); } - pbThumbnail.Image = Program.SlicerFile.Thumbnails[0]?.ToBitmap(); + if (SlicerFile.CreatedThumbnailsCount > 0) + { + tsThumbnailsCount.Tag = 0; + tsThumbnailsCount.Text = $"1/{SlicerFile.CreatedThumbnailsCount}"; + pbThumbnail.Image = SlicerFile.Thumbnails[0]?.ToBitmap(); + + for (var i = 1; i < tsThumbnails.Items.Count; i++) + { + tsThumbnails.Items[i].Enabled = true; + } + } + + + foreach (ToolStripItem item in menuEdit.DropDownItems) + { + item.Enabled = true; + } + + + menuCloseFile.Enabled = + sbLayers.Enabled = + pbLayers.Enabled = + menuEdit.Enabled = + true; + //ShowLayer(0); sbLayers.SmallChange = 1; sbLayers.Minimum = 0; - sbLayers.Maximum = (int)Program.SlicerFile.LayerCount-1; + sbLayers.Maximum = (int)SlicerFile.LayerCount-1; sbLayers.Value = sbLayers.Maximum; - sbLayers.Enabled = - menuEdit.Enabled = - menuEditExtract.Enabled = - menuEditConvert.Enabled = true; lvProperties.BeginUpdate(); - lvProperties.Items.Clear(); - lvProperties.Groups.Clear(); - - foreach (object config in Program.SlicerFile.Configs) + foreach (object config in SlicerFile.Configs) { ListViewGroup group = new ListViewGroup(config.GetType().Name); lvProperties.Groups.Add(group); @@ -213,16 +378,14 @@ namespace PrusaSL1Viewer } lvProperties.EndUpdate(); - statusBar.Items.Clear(); - - AddStatusBarItem(nameof(Program.SlicerFile.LayerHeight), Program.SlicerFile.LayerHeight, "mm"); - AddStatusBarItem(nameof(Program.SlicerFile.InitialExposureTime), Program.SlicerFile.InitialExposureTime, "s"); - AddStatusBarItem(nameof(Program.SlicerFile.LayerExposureTime), Program.SlicerFile.LayerExposureTime, "s"); - AddStatusBarItem(nameof(Program.SlicerFile.PrintTime), Math.Round(Program.SlicerFile.PrintTime / 3600, 2), "h"); - AddStatusBarItem(nameof(Program.SlicerFile.UsedMaterial), Math.Round(Program.SlicerFile.UsedMaterial, 2), "ml"); - AddStatusBarItem(nameof(Program.SlicerFile.MaterialCost), Program.SlicerFile.MaterialCost, "€"); - AddStatusBarItem(nameof(Program.SlicerFile.MaterialName), Program.SlicerFile.MaterialName); - AddStatusBarItem(nameof(Program.SlicerFile.MachineName), Program.SlicerFile.MachineName); + AddStatusBarItem(nameof(SlicerFile.LayerHeight), SlicerFile.LayerHeight, "mm"); + AddStatusBarItem(nameof(SlicerFile.InitialExposureTime), SlicerFile.InitialExposureTime, "s"); + AddStatusBarItem(nameof(SlicerFile.LayerExposureTime), SlicerFile.LayerExposureTime, "s"); + AddStatusBarItem(nameof(SlicerFile.PrintTime), Math.Round(SlicerFile.PrintTime / 3600, 2), "h"); + AddStatusBarItem(nameof(SlicerFile.UsedMaterial), Math.Round(SlicerFile.UsedMaterial, 2), "ml"); + AddStatusBarItem(nameof(SlicerFile.MaterialCost), SlicerFile.MaterialCost, "€"); + AddStatusBarItem(nameof(SlicerFile.MaterialName), SlicerFile.MaterialName); + AddStatusBarItem(nameof(SlicerFile.MachineName), SlicerFile.MachineName); Text = $"{FrmAbout.AssemblyTitle} Version: {FrmAbout.AssemblyVersion} File: {Path.GetFileName(fileName)}"; } @@ -231,10 +394,10 @@ namespace PrusaSL1Viewer { //if(!ReferenceEquals(pbLayer.Image, null)) // pbLayer.Image.Dispose(); SLOW! LET GC DO IT - //pbLayer.Image = Image.FromStream(Program.SlicerFile.LayerImages[layerNum].Open()); + //pbLayer.Image = Image.FromStream(SlicerFile.LayerImages[layerNum].Open()); //pbLayer.Image.RotateFlip(RotateFlipType.Rotate90FlipNone); //Stopwatch watch = Stopwatch.StartNew(); - var image = Program.SlicerFile.GetLayerImage(layerNum); + var image = SlicerFile.GetLayerImage(layerNum); //Debug.Write(watch.ElapsedMilliseconds.ToString()); if (menuViewRotateImage.Checked) { @@ -251,10 +414,10 @@ namespace PrusaSL1Viewer //pbLayer.Image = layer.ToBitmap(image.Width, image.Height); - byte percent = (byte)((layerNum + 1) * 100 / Program.SlicerFile.LayerCount); + byte percent = (byte)((layerNum + 1) * 100 / SlicerFile.LayerCount); - lbLayers.Text = $"{Program.SlicerFile.TotalHeight}mm\n{layerNum+1} / {Program.SlicerFile.LayerCount}\n{Program.SlicerFile.GetHeightFromLayer((uint)layerNum+1)}mm\n{percent}%"; + lbLayers.Text = $"{SlicerFile.TotalHeight}mm\n{layerNum+1} / {SlicerFile.LayerCount}\n{SlicerFile.GetHeightFromLayer((uint)layerNum+1)}mm\n{percent}%"; pbLayers.Value = percent; } diff --git a/PrusaSL1Viewer/FrmMain.resx b/PrusaSL1Viewer/FrmMain.resx index ddce2ec..2bb9532 100644 --- a/PrusaSL1Viewer/FrmMain.resx +++ b/PrusaSL1Viewer/FrmMain.resx @@ -123,6 +123,9 @@ 132, 17 + + 233, 17 + diff --git a/PrusaSL1Viewer/Images/Back-16x16.png b/PrusaSL1Viewer/Images/Back-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..1968f0d01b25faa36b2a3a41c2fe66ff5f44cdf6 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jh-%!Ar-fhQx*sq2u;vtdK6d0 z!_ax2;gJc`w1lZH*L+S)m6-HmmZJkx_db4yKf-qza%L4a`a8(59kG@?d4Y%dcf$?I zGzVpY>k}79viLD(5XQf&0H^?`0*(qW6#x~mRKQUIO9g}qa4H~FfKmaW0!#&j3czz-hdrOYmgSLV zM$+#+{gan>E8Cyt`7|^39V$h0Cq03REL8x7Qw2~sRRD!kssKJ4MmzgAH;gyZ6H84= z0{CDU55qVOqgnYs{V=*=yd1_q(i2WWDFXOp7_YH@;pgEj?*0Z_o#5933ozxNJf{E%H>n5zJO z#<+BI(hcJq=>y{?M*)z>cai>fi_G>4aumSt7@yfOpqS!Q=>y~>Hvw=&{ac)nkt@ha z0NjD!8d(K|ISJrLj9a}apsnKXqz{;bTmm5 zw$QQwV(j;a(!pq+z^VW^Q@vc6Oc`4hfQ0Sa!oi>|v?zctFxK~Jgz5-?m7c^NEDAu< z_HEI_m@Tv>fbWNKmY&20G`}CDC*g}F0nmOw1%A@DZws=86cC!o6Ic>}Cfm0~2P3x7 ziU1_{`$K7AAWvXL02*!I77hk%p#=e?DD#TN3ChdIv?5Xm{mnS128wKraeAPKzF~Bt~6xc#70*F=S#dUoDMwnX<1?6KJ1Q4^# ztHtrVEM^Hh9k*znKw1E?yL(PJo{o)Kg)D9hr3DbX%W0C?$(cR;4 zJlf_;O5H-Nt4LA+DayP!b^~L+b!@^x$QDWoAZ2$C#TQ4Ou`wLL5+Yqi5(1#WkCy%> z(eJegcLFJ!P7oQvllD=GDUg zBvRn|PI|&u^oUeG7E1scUgA9G4F7;i+v-I`=_-mL01dWpi9HP&()$)mM6rc21d#IE zJ$rEQcLEwL;1cXzMce|=V*8fZv%RXxz07IAXbZUopv5{JJzmYn;lNlv#wh^JFL9n| z;CJ_EvVcplm5*@>K%4DbqJ^Iol*$77(u2tsatT0d&@{*A&e8ZWiY3lq$P;h~K&$Or z;*9N+rg0Bo2^L$(Apk8&6Ccjl7J$Y*fHi2Ihswu}3c$*8IpLF7vGO>ZIMh{iQ~;Xo z(h{_6ZV9%5{$TbRhXc0ohyW}tmAP|5VEI_608)4NRBqEFu&XFk0M?$9C2&T7EesKW zm2dZyMo?E#hyXMvN=j#U`Pg0oSlJ}G1>GrhqTb?vM{s``By8&|TZ5ve@?~u$%o{qsLWjbS(hO*}g4E1f+c5 zgb;0i(@L1z#h*Cgk}bRzK#q6+HDrYzu$?BQ8-XHb%NBTx9+y>M5`g6`-;jfUeL3Fg zJwSA^Ta2qjBR#=H(DA;R1dxO8uk7P-UtkhI?#qAWIsGtROajo}4_}GH9SI;uuUqls zo&-=*09biSTUUUxxvw!m+1yP6u-x!b3FEPWWDYvJf9;<{V0pw5tRPpD1h0t{_ zAjed2WtsOW;dwf^J__>ZNrC86MNkRZuo79!hOQNbQa=2Qd`h88r^9$XpVdQbHHMH7 z=y}mzMqL$bKzF;l42tVk3t{%YAcEXN-7nA$`Frp3x71$`uPCDmpm3@H3a1L7aH;?b nrwX8OssIY73ZQVR01D?n2Z4YsD2l3#00000NkvXXu0mjfo*;b^ literal 0 HcmV?d00001 diff --git a/PrusaSL1Viewer/Images/File-Close-16x16.png b/PrusaSL1Viewer/Images/File-Close-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..91440923bea9c0e875a8e0ba029beb773fb69dd9 GIT binary patch literal 355 zcmV-p0i6DcP)O5ASm@U!1(m2R?Ae-SfM<_ntQrkrehZfk=MV1qyhT4y6rOct-_aZP(_o zjs|A%(kY;cd7OIJayYZ&2Q1*}w}5YZ!ucNoT6Ik0Ei_=<0{YN{0qmh18sJwINi237 zu!FJx1gxSL+ua7l>oSbHcril*^xF?HW#^yR!e(f|CHk=>ZYpmuf?`O3zIILA$m<{- zTeFV&Xh^`UxG5dPku~f6I_hhYEk?y(-L@JMw-27h4V5-O;shTWu!3E?q3Jd2=F*Wa zVFL&Drg>yB8E@Y-GU7(ouWNBTcG-dwxYa*^`xex?OYUV8p)3FZ002ovPDHLkV1k2l Bnd$%l literal 0 HcmV?d00001 diff --git a/PrusaSL1Viewer/Images/Next-16x16.png b/PrusaSL1Viewer/Images/Next-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..15348a5878ab02d6276d0d546b47eb8b7ddc9876 GIT binary patch literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`y`ClooR8_RsfV;!E;fK9tBggd~nGOX9ACpBHZsrW) vKl;6mHQ5rb`mA9*>Tsvs*LWk_16GE6f7JxvPdk_fbQpuDtDnm{r-UW|soX^I literal 0 HcmV?d00001 diff --git a/PrusaSL1Viewer/Images/Save-16x16.png b/PrusaSL1Viewer/Images/Save-16x16.png new file mode 100644 index 0000000000000000000000000000000000000000..c3f3d127bb4463d0eb020b2c6e68884ae68616ce GIT binary patch literal 425 zcmV;a0apHrP)*%*<>&JUn51e0&wZe*J2>bLUPckcO*a)YsQP z%E-uQ_3z)mZ9oIOkqyw+)?UNP$}0Zl%ak+$?@~^`(o4l z>C>mpZ{NOsq^qmD6_`G}uo?g~U0XmvAOV{JA3uIv@aom8t9T6n#ybNW8yi;V|Ni|O zjPV*ED=X^-Ov0zg$A}0+1U2}|4OiWB!Qc`je&=8oZ#DIT5%_m;Gco7ExJgLyj TWn9|g00000NkvXXu0mjfpIf(Z literal 0 HcmV?d00001 diff --git a/PrusaSL1Viewer/Properties/AssemblyInfo.cs b/PrusaSL1Viewer/Properties/AssemblyInfo.cs index 4d42de3..0f199a6 100644 --- a/PrusaSL1Viewer/Properties/AssemblyInfo.cs +++ b/PrusaSL1Viewer/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.2.0.0")] -[assembly: AssemblyFileVersion("0.2.0.0")] +[assembly: AssemblyVersion("0.2.1.0")] +[assembly: AssemblyFileVersion("0.2.1.0")] diff --git a/PrusaSL1Viewer/Properties/Resources.Designer.cs b/PrusaSL1Viewer/Properties/Resources.Designer.cs index 9759f43..2353726 100644 --- a/PrusaSL1Viewer/Properties/Resources.Designer.cs +++ b/PrusaSL1Viewer/Properties/Resources.Designer.cs @@ -60,6 +60,16 @@ namespace PrusaSL1Viewer.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Back_16x16 { + get { + object obj = ResourceManager.GetObject("Back-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -90,6 +100,16 @@ namespace PrusaSL1Viewer.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Error_128x128 { + get { + object obj = ResourceManager.GetObject("Error-128x128", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -110,6 +130,16 @@ namespace PrusaSL1Viewer.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap File_Close_16x16 { + get { + object obj = ResourceManager.GetObject("File-Close-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -130,6 +160,16 @@ namespace PrusaSL1Viewer.Properties { } } + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Next_16x16 { + get { + object obj = ResourceManager.GetObject("Next-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// @@ -159,5 +199,15 @@ namespace PrusaSL1Viewer.Properties { return ((System.Drawing.Bitmap)(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap Save_16x16 { + get { + object obj = ResourceManager.GetObject("Save-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/PrusaSL1Viewer/Properties/Resources.resx b/PrusaSL1Viewer/Properties/Resources.resx index 78fd50c..8277020 100644 --- a/PrusaSL1Viewer/Properties/Resources.resx +++ b/PrusaSL1Viewer/Properties/Resources.resx @@ -118,34 +118,49 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Images\Donate-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Images\Open-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Images\layers-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\PrusaSL1Viewer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Images\Convert-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Images\Button-Info-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Images\Exit-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Images\Donate-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Images\Global-Network-icon-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - - ..\Images\Extract-object-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Images\Rotate-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Images\Global-Network-icon-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\Back-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\Save-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\Exit-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\Convert-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\PrusaSL1Viewer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\File-Close-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\Extract-object-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\Next-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Images\Error-128x128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/PrusaSL1Viewer/PrusaSL1Viewer.csproj b/PrusaSL1Viewer/PrusaSL1Viewer.csproj index 1e53891..cc2142c 100644 --- a/PrusaSL1Viewer/PrusaSL1Viewer.csproj +++ b/PrusaSL1Viewer/PrusaSL1Viewer.csproj @@ -211,6 +211,11 @@ + + + + +