mirror of
https://github.com/riegera2412/UVtools.git
synced 2026-07-08 17:42:31 +02:00
Add verbose log and advanced options for Morph
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.MinimumSize = new System.Drawing.Size(540, 0);
|
||||
this.Name = "CtrlToolWindowContent";
|
||||
|
||||
+5
-4
@@ -39,13 +39,13 @@
|
||||
//
|
||||
// ctrlKernel
|
||||
//
|
||||
this.ctrlKernel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ctrlKernel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ctrlKernel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ctrlKernel.Location = new System.Drawing.Point(3, 80);
|
||||
this.ctrlKernel.Location = new System.Drawing.Point(3, 78);
|
||||
this.ctrlKernel.Name = "ctrlKernel";
|
||||
this.ctrlKernel.Size = new System.Drawing.Size(585, 217);
|
||||
this.ctrlKernel.TabIndex = 22;
|
||||
this.ctrlKernel.Visible = false;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
@@ -100,6 +100,7 @@
|
||||
// CtrlToolBlur
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoSize = true;
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.cbBlurOperation);
|
||||
this.Controls.Add(this.nmSize);
|
||||
@@ -107,7 +108,7 @@
|
||||
this.Controls.Add(this.ctrlKernel);
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Name = "CtrlToolBlur";
|
||||
this.Size = new System.Drawing.Size(596, 309);
|
||||
this.Size = new System.Drawing.Size(591, 298);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmSize)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace UVtools.GUI.Controls.Tools
|
||||
private void cbBlurOperation_SelectedIndexChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
UpdateOperation();
|
||||
ctrlKernel.Enabled = Operation.BlurOperation == OperationBlur.BlurAlgorithm.Filter2D;
|
||||
ctrlKernel.Visible = ctrlKernel.Enabled = Operation.BlurOperation == OperationBlur.BlurAlgorithm.Filter2D;
|
||||
nmSize.Enabled = Operation.BlurOperation != OperationBlur.BlurAlgorithm.Pyramid && Operation.BlurOperation != OperationBlur.BlurAlgorithm.Filter2D;
|
||||
}
|
||||
}
|
||||
|
||||
+7
-5
@@ -43,13 +43,13 @@
|
||||
//
|
||||
// ctrlKernel
|
||||
//
|
||||
this.ctrlKernel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ctrlKernel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
this.ctrlKernel.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.ctrlKernel.Location = new System.Drawing.Point(3, 87);
|
||||
this.ctrlKernel.Name = "ctrlKernel";
|
||||
this.ctrlKernel.Size = new System.Drawing.Size(585, 217);
|
||||
this.ctrlKernel.Size = new System.Drawing.Size(580, 217);
|
||||
this.ctrlKernel.TabIndex = 22;
|
||||
this.ctrlKernel.Visible = false;
|
||||
//
|
||||
// cbIterationsFade
|
||||
//
|
||||
@@ -139,9 +139,10 @@
|
||||
this.label1.TabIndex = 24;
|
||||
this.label1.Text = "Operation:";
|
||||
//
|
||||
// CtrlToolMorphModel
|
||||
// CtrlToolMorph
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
|
||||
this.AutoSize = true;
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.cbMorphOperation);
|
||||
this.Controls.Add(this.ctrlKernel);
|
||||
@@ -150,9 +151,10 @@
|
||||
this.Controls.Add(this.lbIterationsStop);
|
||||
this.Controls.Add(this.nmIterationsStart);
|
||||
this.Controls.Add(this.lbIterationsStart);
|
||||
this.ExtraCheckboxVisible = true;
|
||||
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.Name = "CtrlToolMorph";
|
||||
this.Size = new System.Drawing.Size(596, 307);
|
||||
this.Size = new System.Drawing.Size(591, 307);
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIterationsEnd)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.nmIterationsStart)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using Emgu.CV.CvEnum;
|
||||
using UVtools.Core.Objects;
|
||||
using UVtools.Core.Operations;
|
||||
@@ -42,6 +43,15 @@ namespace UVtools.GUI.Controls.Tools
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void ExtraActionCall(object sender)
|
||||
{
|
||||
if (sender is CheckBox checkbox)
|
||||
{
|
||||
ctrlKernel.Visible = checkbox.Checked;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private void EventCheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (ReferenceEquals(sender, cbIterationsFade))
|
||||
|
||||
Generated
+23
-1
@@ -236,6 +236,8 @@ namespace UVtools.GUI
|
||||
this.tsLog = new System.Windows.Forms.ToolStrip();
|
||||
this.btnLogClear = new System.Windows.Forms.ToolStripButton();
|
||||
this.lbLogOperations = new System.Windows.Forms.ToolStripLabel();
|
||||
this.toolStripSeparator26 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.btnLogVerbose = new System.Windows.Forms.ToolStripButton();
|
||||
this.imageList16x16 = new System.Windows.Forms.ImageList(this.components);
|
||||
this.tlRight = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btnPreviousLayer = new System.Windows.Forms.Button();
|
||||
@@ -2568,7 +2570,9 @@ namespace UVtools.GUI
|
||||
this.tsLog.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
|
||||
this.tsLog.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.btnLogClear,
|
||||
this.lbLogOperations});
|
||||
this.lbLogOperations,
|
||||
this.toolStripSeparator26,
|
||||
this.btnLogVerbose});
|
||||
this.tsLog.Location = new System.Drawing.Point(3, 3);
|
||||
this.tsLog.Name = "tsLog";
|
||||
this.tsLog.Size = new System.Drawing.Size(380, 25);
|
||||
@@ -2592,6 +2596,22 @@ namespace UVtools.GUI
|
||||
this.lbLogOperations.Size = new System.Drawing.Size(77, 22);
|
||||
this.lbLogOperations.Text = "Operations: 0";
|
||||
//
|
||||
// toolStripSeparator26
|
||||
//
|
||||
this.toolStripSeparator26.Name = "toolStripSeparator26";
|
||||
this.toolStripSeparator26.Size = new System.Drawing.Size(6, 25);
|
||||
//
|
||||
// btnLogVerbose
|
||||
//
|
||||
this.btnLogVerbose.CheckOnClick = true;
|
||||
this.btnLogVerbose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.btnLogVerbose.Image = ((System.Drawing.Image)(resources.GetObject("btnLogVerbose.Image")));
|
||||
this.btnLogVerbose.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.btnLogVerbose.Name = "btnLogVerbose";
|
||||
this.btnLogVerbose.Size = new System.Drawing.Size(52, 22);
|
||||
this.btnLogVerbose.Text = "Verbose";
|
||||
this.btnLogVerbose.ToolTipText = "Shows extra information usefull to debug problems";
|
||||
//
|
||||
// imageList16x16
|
||||
//
|
||||
this.imageList16x16.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList16x16.ImageStream")));
|
||||
@@ -3140,6 +3160,8 @@ namespace UVtools.GUI
|
||||
private System.Windows.Forms.ToolStripMenuItem tsIssuesDetectTouchingBounds;
|
||||
private System.Windows.Forms.PictureBox pbTrackerIssues;
|
||||
private System.Windows.Forms.ToolStripSplitButton btnLayerImageActions;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator26;
|
||||
private System.Windows.Forms.ToolStripButton btnLogVerbose;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-4
@@ -123,6 +123,8 @@ namespace UVtools.GUI
|
||||
|
||||
private bool SupressLayerZoomEvent { get; set; }
|
||||
|
||||
public bool IsLogVerbose => btnLogVerbose.Checked;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
@@ -1218,7 +1220,7 @@ namespace UVtools.GUI
|
||||
UpdateIslands(whiteListLayers);
|
||||
}
|
||||
|
||||
ShowLayer();
|
||||
//ShowLayer(); // It will call latter so its a extra call
|
||||
UpdateIssuesInfo();
|
||||
menuFileSave.Enabled =
|
||||
menuFileSaveAs.Enabled = true;
|
||||
@@ -1511,14 +1513,13 @@ namespace UVtools.GUI
|
||||
//MessageBox.Show("Convertion was unsuccessful! Maybe not implemented...", "Convertion unsuccessful", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void pbLayer_Zoomed(object sender, Cyotek.Windows.Forms.ImageBoxZoomEventArgs e)
|
||||
{
|
||||
if (SupressLayerZoomEvent) return;
|
||||
Debug.WriteLine($"{DateTime.Now.Ticks}: Zoomed");
|
||||
AddLogVerbose($"Zoomed from {e.OldZoom} to {e.NewZoom}");
|
||||
// Update zoom level display in the toolstrip
|
||||
if (e.NewZoom == LockedZoomLevel)
|
||||
{
|
||||
@@ -2221,7 +2222,7 @@ namespace UVtools.GUI
|
||||
if (IsChangingLayer) return;
|
||||
IsChangingLayer = true;
|
||||
|
||||
Debug.WriteLine($"Show Layer: {layerNum}");
|
||||
AddLogVerbose($"Show Layer: {layerNum}");
|
||||
|
||||
ActualLayer = layerNum;
|
||||
btnLastLayer.Enabled = btnNextLayer.Enabled = layerNum < SlicerFile.LayerCount - 1;
|
||||
@@ -3668,6 +3669,13 @@ namespace UVtools.GUI
|
||||
lbLogOperations.Text = $"Operations: {count}";
|
||||
}
|
||||
|
||||
public void AddLogVerbose(string description, decimal elapsedTime = 0)
|
||||
{
|
||||
if (!IsLogVerbose) return;
|
||||
AddLog(description, elapsedTime);
|
||||
Debug.WriteLine(description);
|
||||
}
|
||||
|
||||
public void EditLastLogElapsedTime(decimal elapsedTime = 0)
|
||||
{
|
||||
if (lvLog.GetModelObject(lvLog.GetItemCount() - 1) is LogItem log) log.ElapsedTime = elapsedTime;
|
||||
|
||||
@@ -150,6 +150,22 @@
|
||||
<metadata name="tsLog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>1587, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnLogVerbose.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="imageList16x16.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>811, 17</value>
|
||||
</metadata>
|
||||
@@ -158,7 +174,7 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
|
||||
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
|
||||
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABk
|
||||
FAAAAk1TRnQBSQFMAgEBBgEAAYABCgGAAQoBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
FAAAAk1TRnQBSQFMAgEBBgEAAZABCgGQAQoBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA
|
||||
AwABIAMAAQEBAAEgBgABIC4AAxgBIgMwAUsDMAFMAzIBUDMAAQEDJAE2AysBQqwAAyIBMQNWAbkDXQHi
|
||||
AwAB/wMAAf8BKgEtASgB/gNTAawDTQGVAwABARgAAwkBDAMzAVIDUAGdA1cB6AMAAf4DKwH8Ay8BSqQA
|
||||
AyEBMANZAewBKwEuASkB+gNRAfcDUgH0A1MB8QNIAfYDQQH5AwAB/wNPAZsDAAEBCAADFQEdAz8BbgNV
|
||||
@@ -266,7 +282,6 @@
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>122</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>
|
||||
AAABAAYAAAAAAAEAIAAWYQAAZgAAAICAAAABACAAKAgBAHxhAABAQAAAAQAgAChCAACkaQEAMDAAAAEA
|
||||
|
||||
Reference in New Issue
Block a user