diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-04-15 07:02:44 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2020-04-15 07:02:44 +0300 |
commit | bc0cab54e0632247b212d3eee09a4588c2f4c15c (patch) | |
tree | efe3e2d71628fbefff4b43fa02b70c017b724363 | |
parent | 29d532649408e2b1de3ff0508fa4395ca49a2a5b (diff) |
v0.2.1v0.2.1
-rw-r--r-- | CHANGELOG.md | 10 | ||||
-rw-r--r-- | PrusaSL1Reader/FileFormat.cs | 19 | ||||
-rw-r--r-- | PrusaSL1Reader/PrusaSL1Reader.csproj | 6 | ||||
-rw-r--r-- | PrusaSL1Viewer/FrmMain.Designer.cs | 305 | ||||
-rw-r--r-- | PrusaSL1Viewer/FrmMain.cs | 251 | ||||
-rw-r--r-- | PrusaSL1Viewer/FrmMain.resx | 3 | ||||
-rw-r--r-- | PrusaSL1Viewer/Images/Back-16x16.png | bin | 0 -> 186 bytes | |||
-rw-r--r-- | PrusaSL1Viewer/Images/Error-128x128.png | bin | 0 -> 1953 bytes | |||
-rw-r--r-- | PrusaSL1Viewer/Images/File-Close-16x16.png | bin | 0 -> 355 bytes | |||
-rw-r--r-- | PrusaSL1Viewer/Images/Next-16x16.png | bin | 0 -> 198 bytes | |||
-rw-r--r-- | PrusaSL1Viewer/Images/Save-16x16.png | bin | 0 -> 425 bytes | |||
-rw-r--r-- | PrusaSL1Viewer/Properties/AssemblyInfo.cs | 4 | ||||
-rw-r--r-- | PrusaSL1Viewer/Properties/Resources.Designer.cs | 50 | ||||
-rw-r--r-- | PrusaSL1Viewer/Properties/Resources.resx | 39 | ||||
-rw-r--r-- | PrusaSL1Viewer/PrusaSL1Viewer.csproj | 5 |
15 files changed, 523 insertions, 169 deletions
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 @@ -58,6 +58,25 @@ namespace PrusaSL1Reader public abstract byte ThumbnailsCount { get; } /// <summary> + /// Gets the number of created thumbnails + /// </summary> + 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; + } + } + + /// <summary> /// Gets the thumbnails for this <see cref="FileFormat"/> /// </summary> public abstract Image<Rgba32>[] Thumbnails { get; set; } 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 @@ <PackageProjectUrl>https://github.com/sn4k3/PrusaSL1Viewer</PackageProjectUrl> <PackageIcon></PackageIcon> <RepositoryUrl>https://github.com/sn4k3/PrusaSL1Viewer</RepositoryUrl> - <AssemblyVersion>0.2.0.0</AssemblyVersion> - <FileVersion>0.2.0.0</FileVersion> - <Version>0.2</Version> + <AssemblyVersion>0.2.1.0</AssemblyVersion> + <FileVersion>0.2.1.0</FileVersion> + <Version>0.2.1</Version> </PropertyGroup> <ItemGroup> 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 + + /// <summary> + /// Closes file and clear UI + /// </summary> + 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 @@ <metadata name="statusBar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>132, 17</value> </metadata> + <metadata name="tsThumbnails.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>233, 17</value> + </metadata> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> diff --git a/PrusaSL1Viewer/Images/Back-16x16.png b/PrusaSL1Viewer/Images/Back-16x16.png Binary files differnew file mode 100644 index 0000000..1968f0d --- /dev/null +++ b/PrusaSL1Viewer/Images/Back-16x16.png diff --git a/PrusaSL1Viewer/Images/Error-128x128.png b/PrusaSL1Viewer/Images/Error-128x128.png Binary files differnew file mode 100644 index 0000000..b26a92b --- /dev/null +++ b/PrusaSL1Viewer/Images/Error-128x128.png diff --git a/PrusaSL1Viewer/Images/File-Close-16x16.png b/PrusaSL1Viewer/Images/File-Close-16x16.png Binary files differnew file mode 100644 index 0000000..9144092 --- /dev/null +++ b/PrusaSL1Viewer/Images/File-Close-16x16.png diff --git a/PrusaSL1Viewer/Images/Next-16x16.png b/PrusaSL1Viewer/Images/Next-16x16.png Binary files differnew file mode 100644 index 0000000..15348a5 --- /dev/null +++ b/PrusaSL1Viewer/Images/Next-16x16.png diff --git a/PrusaSL1Viewer/Images/Save-16x16.png b/PrusaSL1Viewer/Images/Save-16x16.png Binary files differnew file mode 100644 index 0000000..c3f3d12 --- /dev/null +++ b/PrusaSL1Viewer/Images/Save-16x16.png 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 @@ -63,6 +63,16 @@ namespace PrusaSL1Viewer.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap Back_16x16 { + get { + object obj = ResourceManager.GetObject("Back-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap Button_Info_16x16 { get { object obj = ResourceManager.GetObject("Button-Info-16x16", resourceCulture); @@ -93,6 +103,16 @@ namespace PrusaSL1Viewer.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap Error_128x128 { + get { + object obj = ResourceManager.GetObject("Error-128x128", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap Exit_16x16 { get { object obj = ResourceManager.GetObject("Exit-16x16", resourceCulture); @@ -113,6 +133,16 @@ namespace PrusaSL1Viewer.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap File_Close_16x16 { + get { + object obj = ResourceManager.GetObject("File-Close-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap Global_Network_icon_16x16 { get { object obj = ResourceManager.GetObject("Global-Network-icon-16x16", resourceCulture); @@ -133,6 +163,16 @@ namespace PrusaSL1Viewer.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap Next_16x16 { + get { + object obj = ResourceManager.GetObject("Next-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap Open_16x16 { get { object obj = ResourceManager.GetObject("Open-16x16", resourceCulture); @@ -159,5 +199,15 @@ namespace PrusaSL1Viewer.Properties { return ((System.Drawing.Bitmap)(obj)); } } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> + 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 @@ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="Donate-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Donate-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Open-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\Open-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="layers-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\layers-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="PrusaSL1Viewer" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\PrusaSL1Viewer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> - <data name="Convert-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\Convert-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="Button-Info-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\Button-Info-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Rotate-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Rotate-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Global-Network-icon-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Global-Network-icon-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Back-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Back-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Save-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Save-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="Exit-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\Exit-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Donate-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\Donate-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Convert-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Convert-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Global-Network-icon-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\Global-Network-icon-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="PrusaSL1Viewer" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\PrusaSL1Viewer.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="File-Close-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\File-Close-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="Extract-object-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\Extract-object-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Rotate-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\Rotate-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="Next-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Next-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="Error-128x128" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Error-128x128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> </root>
\ 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 @@ <None Include="Images\Convert-16x16.png" /> <None Include="Images\layers-16x16.png" /> <None Include="Images\Rotate-16x16.png" /> + <None Include="Images\Back-16x16.png" /> + <None Include="Images\Next-16x16.png" /> + <None Include="Images\Save-16x16.png" /> + <None Include="Images\File-Close-16x16.png" /> + <None Include="Images\Error-128x128.png" /> <Content Include="PrusaSL1Viewer.ico" /> </ItemGroup> <ItemGroup> |