diff options
41 files changed, 1957 insertions, 49 deletions
@@ -3,6 +3,10 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +# Inventor +CAD/OldVersions/ +.lockfile + # User-specific files *.rsuser *.suo diff --git a/CHANGELOG.md b/CHANGELOG.md index 85ae86c..49a4e5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ * (Improvement) GUI is now scalable * (Fix) Some bug found and fixed during convertion +## 14/10/2020 - v0.8.5.0 + +* (Add) Tool - Calculator: Convert millimeters to pixels +* (Add) Tool - Calculator: Find the optimal "Ligth-Off Delay" +* (Add) Internal abstraction of display size to all file formats +* (Add) Default demo file that loads on startup when no file is specified (this can be disable/enabled on settings) + ## 13/10/2020 - v0.8.4.3 * (Add) Tool - Layer repair: Allow remove islands recursively (#74) diff --git a/UVtools.CAD/OldVersions/UVtools_demo_file.0002.ipt b/UVtools.CAD/OldVersions/UVtools_demo_file.0002.ipt Binary files differnew file mode 100644 index 0000000..2535f03 --- /dev/null +++ b/UVtools.CAD/OldVersions/UVtools_demo_file.0002.ipt diff --git a/UVtools.CAD/UVtools_demo_file.3mf b/UVtools.CAD/UVtools_demo_file.3mf Binary files differnew file mode 100644 index 0000000..498f4d4 --- /dev/null +++ b/UVtools.CAD/UVtools_demo_file.3mf diff --git a/UVtools.CAD/UVtools_demo_file.ipt b/UVtools.CAD/UVtools_demo_file.ipt Binary files differnew file mode 100644 index 0000000..fe27820 --- /dev/null +++ b/UVtools.CAD/UVtools_demo_file.ipt diff --git a/UVtools.CAD/UVtools_demo_file.sl1 b/UVtools.CAD/UVtools_demo_file.sl1 Binary files differnew file mode 100644 index 0000000..233a187 --- /dev/null +++ b/UVtools.CAD/UVtools_demo_file.sl1 diff --git a/UVtools.CAD/UVtools_demo_file.stl b/UVtools.CAD/UVtools_demo_file.stl Binary files differnew file mode 100644 index 0000000..46ea587 --- /dev/null +++ b/UVtools.CAD/UVtools_demo_file.stl diff --git a/UVtools.Core/About.cs b/UVtools.Core/About.cs index 423aae4..3821fdb 100644 --- a/UVtools.Core/About.cs +++ b/UVtools.Core/About.cs @@ -15,5 +15,7 @@ namespace UVtools.Core public static string Company = "PTRTECH"; public static string Website = "https://github.com/sn4k3/UVtools"; public static string Donate = "https://paypal.me/SkillTournament"; + + public static string DemoFile = "UVtools_demo_file.sl1"; } } diff --git a/UVtools.Core/FileFormats/CWSFile.cs b/UVtools.Core/FileFormats/CWSFile.cs index d55e6cc..77828ca 100644 --- a/UVtools.Core/FileFormats/CWSFile.cs +++ b/UVtools.Core/FileFormats/CWSFile.cs @@ -164,6 +164,17 @@ namespace UVtools.Core.FileFormats set => OutputSettings.YResolution = SliceSettings.Yres = (ushort) value; } + public override float DisplayWidth + { + get => OutputSettings.PlatformXSize; + set => OutputSettings.PlatformXSize = value; + } + public override float DisplayHeight + { + get => OutputSettings.PlatformYSize; + set => OutputSettings.PlatformYSize = value; + } + public override byte AntiAliasing => (byte) OutputSettings.AntiAliasingValue; public override float LayerHeight @@ -579,7 +590,7 @@ namespace UVtools.Core.FileFormats } } // delay = max(extra['wait'], 500) + int(((int(lift)/(extra['lift_feed']/60)) + (int(lift)/(extra['lift_retract']/60)))*1000) - uint extraDelay = (uint)(((LiftHeight / (LiftSpeed / 60f)) + (LiftHeight / (RetractSpeed / 60f))) * 1000); + uint extraDelay = (uint)(OperationCalculator.LightOffDelayC.Calculate(LiftHeight, LiftHeight, RetractSpeed) * 1000); if (layerIndex < BottomLayerCount) { extraDelay = (uint)Math.Max(extraDelay + 10000, layer.ExposureTime * 1000); diff --git a/UVtools.Core/FileFormats/ChituboxFile.cs b/UVtools.Core/FileFormats/ChituboxFile.cs index 05362b4..2a931b8 100644 --- a/UVtools.Core/FileFormats/ChituboxFile.cs +++ b/UVtools.Core/FileFormats/ChituboxFile.cs @@ -1008,6 +1008,17 @@ namespace UVtools.Core.FileFormats set => HeaderSettings.ResolutionY = value; } + public override float DisplayWidth + { + get => HeaderSettings.BedSizeX; + set => HeaderSettings.BedSizeX = value; + } + public override float DisplayHeight + { + get => HeaderSettings.BedSizeY; + set => HeaderSettings.BedSizeY = value; + } + public override byte AntiAliasing => (byte) (IsCbtFile ? SlicerInfoSettings.AntiAliasLevel : HeaderSettings.AntiAliasLevel); public override float LayerHeight diff --git a/UVtools.Core/FileFormats/ChituboxZipFile.cs b/UVtools.Core/FileFormats/ChituboxZipFile.cs index 4397735..ff9aace 100644 --- a/UVtools.Core/FileFormats/ChituboxZipFile.cs +++ b/UVtools.Core/FileFormats/ChituboxZipFile.cs @@ -14,6 +14,7 @@ using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; +using System.Numerics; using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -138,6 +139,17 @@ namespace UVtools.Core.FileFormats set => HeaderSettings.ResolutionY = value; } + public override float DisplayWidth + { + get => HeaderSettings.MachineX; + set => HeaderSettings.MachineX = value; + } + public override float DisplayHeight + { + get => HeaderSettings.MachineY; + set => HeaderSettings.MachineX = value; + } + public override byte AntiAliasing => HeaderSettings.AntiAliasing; public override float LayerHeight diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs index 2c7780c..d3359d2 100644 --- a/UVtools.Core/FileFormats/FileFormat.cs +++ b/UVtools.Core/FileFormats/FileFormat.cs @@ -12,6 +12,7 @@ using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; +using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using Emgu.CV; @@ -349,11 +350,32 @@ namespace UVtools.Core.FileFormats set => _haveModifiedLayers = value; } // => LayerManager.IsModified; - public Size Resolution => new Size((int) ResolutionX, (int) ResolutionY); - + public Size Resolution + { + get => new Size((int)ResolutionX, (int)ResolutionY); + set + { + ResolutionX = (uint) value.Width; + ResolutionY = (uint) value.Height; + } + } + public abstract uint ResolutionX { get; set; } public abstract uint ResolutionY { get; set; } + + public SizeF Display + { + get => new SizeF(DisplayWidth, DisplayHeight); + set + { + DisplayWidth = value.Width; + DisplayHeight = value.Height; + } + } + + public abstract float DisplayWidth { get; set; } + public abstract float DisplayHeight { get; set; } public bool HaveAntiAliasing => AntiAliasing > 1; public abstract byte AntiAliasing { get; } diff --git a/UVtools.Core/FileFormats/IFileFormat.cs b/UVtools.Core/FileFormats/IFileFormat.cs index c3a5885..f2ff326 100644 --- a/UVtools.Core/FileFormats/IFileFormat.cs +++ b/UVtools.Core/FileFormats/IFileFormat.cs @@ -95,6 +95,21 @@ namespace UVtools.Core.FileFormats /// </summary> uint ResolutionY { get; set; } + /// <summary> + /// Gets the size of display in millimeters + /// </summary> + SizeF Display { get; set; } + + /// <summary> + /// Gets or sets the display width in millimeters + /// </summary> + float DisplayWidth { get; set; } + + /// <summary> + /// Gets or sets the display height in millimeters + /// </summary> + float DisplayHeight { get; set; } + bool HaveAntiAliasing { get; } /// <summary> diff --git a/UVtools.Core/FileFormats/ImageFile.cs b/UVtools.Core/FileFormats/ImageFile.cs index 3238cb7..2f2777b 100644 --- a/UVtools.Core/FileFormats/ImageFile.cs +++ b/UVtools.Core/FileFormats/ImageFile.cs @@ -37,6 +37,17 @@ namespace UVtools.Core.FileFormats set => throw new NotImplementedException(); } + public override float DisplayWidth + { + get => ResolutionX; + set => ResolutionX = (uint) value; + } + public override float DisplayHeight + { + get => ResolutionY; + set => ResolutionY = (uint)value; + } + public override byte AntiAliasing { get; } = 1; public override float LayerHeight { get; set; } = 0; public override float PrintTime { get; } = 0; diff --git a/UVtools.Core/FileFormats/LGSFile.cs b/UVtools.Core/FileFormats/LGSFile.cs index 1d9a059..6847cdf 100644 --- a/UVtools.Core/FileFormats/LGSFile.cs +++ b/UVtools.Core/FileFormats/LGSFile.cs @@ -42,8 +42,8 @@ namespace UVtools.Core.FileFormats [FieldOrder(3)] public uint Uint_10 { get; set; } = 30; // 0x10: 30 ? [FieldOrder(4)] public uint Uint_14 { get; set; } = 0; // 0x14: 0 ? [FieldOrder(5)] public uint Uint_18 { get; set; } = 34; // 0x18: 34 ? - [FieldOrder(6)] public float PixelPerMmY { get; set; } - [FieldOrder(7)] public float PixelPerMmX { get; set; } + [FieldOrder(6)] public float PixelPerMmX { get; set; } + [FieldOrder(7)] public float PixelPerMmY { get; set; } [FieldOrder(8)] public float ResolutionX { get; set; } [FieldOrder(9)] public float ResolutionY { get; set; } [FieldOrder(10)] public float LayerHeight { get; set; } @@ -246,6 +246,18 @@ namespace UVtools.Core.FileFormats set => HeaderSettings.ResolutionY = value; } + public override float DisplayWidth + { + get => ResolutionX / HeaderSettings.PixelPerMmX; + set { } + } + + public override float DisplayHeight + { + get => ResolutionY / HeaderSettings.PixelPerMmY; + set { } + } + public override byte AntiAliasing => 4; public override float LayerHeight diff --git a/UVtools.Core/FileFormats/MakerbaseFile.cs b/UVtools.Core/FileFormats/MakerbaseFile.cs index 3a6cd65..a74d1ed 100644 --- a/UVtools.Core/FileFormats/MakerbaseFile.cs +++ b/UVtools.Core/FileFormats/MakerbaseFile.cs @@ -100,6 +100,9 @@ namespace UVtools.Core.FileFormats set => temp = 0; } + public override float DisplayWidth { get; set; } + public override float DisplayHeight { get; set; } + public override byte AntiAliasing => 1; public override float LayerHeight diff --git a/UVtools.Core/FileFormats/PHZFile.cs b/UVtools.Core/FileFormats/PHZFile.cs index 0eaab9c..54bb5f9 100644 --- a/UVtools.Core/FileFormats/PHZFile.cs +++ b/UVtools.Core/FileFormats/PHZFile.cs @@ -724,6 +724,19 @@ namespace UVtools.Core.FileFormats set => HeaderSettings.ResolutionY = value; } + public override float DisplayWidth + { + get => HeaderSettings.BedSizeX; + set => HeaderSettings.BedSizeX = value; + } + + + public override float DisplayHeight + { + get => HeaderSettings.BedSizeY; + set => HeaderSettings.BedSizeY = value; + } + public override byte AntiAliasing => (byte) HeaderSettings.AntiAliasLevelInfo; public override float LayerHeight diff --git a/UVtools.Core/FileFormats/PWSFile.cs b/UVtools.Core/FileFormats/PWSFile.cs index a05dc98..c66ad07 100644 --- a/UVtools.Core/FileFormats/PWSFile.cs +++ b/UVtools.Core/FileFormats/PWSFile.cs @@ -815,6 +815,17 @@ namespace UVtools.Core.FileFormats set => HeaderSettings.ResolutionY = value; } + public override float DisplayWidth + { + get => 0; + set { } + } + public override float DisplayHeight + { + get => 0; + set { } + } + public override byte AntiAliasing => (byte) HeaderSettings.AntiAliasing; public override float LayerHeight diff --git a/UVtools.Core/FileFormats/SL1File.cs b/UVtools.Core/FileFormats/SL1File.cs index a7f32fc..a568252 100644 --- a/UVtools.Core/FileFormats/SL1File.cs +++ b/UVtools.Core/FileFormats/SL1File.cs @@ -327,6 +327,17 @@ namespace UVtools.Core.FileFormats set => PrinterSettings.DisplayPixelsY = value; } + public override float DisplayWidth + { + get => PrinterSettings.DisplayWidth; + set => PrinterSettings.DisplayWidth = value; + } + public override float DisplayHeight + { + get => PrinterSettings.DisplayHeight; + set => PrinterSettings.DisplayHeight = value; + } + public override byte AntiAliasing => (byte) (PrinterSettings.GammaCorrection > 0 ? LookupCustomValue(Keyword_AntiAliasing, 4) : 1); public override float LayerHeight diff --git a/UVtools.Core/FileFormats/UVJFile.cs b/UVtools.Core/FileFormats/UVJFile.cs index 79d232b..9071ec3 100644 --- a/UVtools.Core/FileFormats/UVJFile.cs +++ b/UVtools.Core/FileFormats/UVJFile.cs @@ -168,6 +168,17 @@ namespace UVtools.Core.FileFormats set => JsonSettings.Properties.Size.Y = (ushort) value; } + public override float DisplayWidth + { + get => JsonSettings.Properties.Size.Millimeter.X; + set => JsonSettings.Properties.Size.Millimeter.X = value; + } + public override float DisplayHeight + { + get => JsonSettings.Properties.Size.Millimeter.Y; + set => JsonSettings.Properties.Size.Millimeter.Y = value; + } + public override byte AntiAliasing => JsonSettings.Properties.AntiAliasLevel; public override float LayerHeight diff --git a/UVtools.Core/FileFormats/ZCodexFile.cs b/UVtools.Core/FileFormats/ZCodexFile.cs index 40d230d..6612d4c 100644 --- a/UVtools.Core/FileFormats/ZCodexFile.cs +++ b/UVtools.Core/FileFormats/ZCodexFile.cs @@ -179,6 +179,17 @@ namespace UVtools.Core.FileFormats set => throw new NotImplementedException(); } + public override float DisplayWidth + { + get => 74.67f; + set {} + } + public override float DisplayHeight + { + get => 132.88f; + set { } + } + public override byte AntiAliasing => UserSettings.AntiAliasing; public override float LayerHeight diff --git a/UVtools.Core/Operations/OperationCalculator.cs b/UVtools.Core/Operations/OperationCalculator.cs new file mode 100644 index 0000000..2e85d33 --- /dev/null +++ b/UVtools.Core/Operations/OperationCalculator.cs @@ -0,0 +1,272 @@ +/* + * GNU AFFERO GENERAL PUBLIC LICENSE + * Version 3, 19 November 2007 + * Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + * Everyone is permitted to copy and distribute verbatim copies + * of this license document, but changing it is not allowed. + */ + +using System; +using System.Drawing; +using UVtools.Core.Objects; + +namespace UVtools.Core.Operations +{ + public class OperationCalculator : Operation + { + public override string Title => "Calculator"; + public override string Description => null; + + public override string ConfirmationText => null; + + public override string ProgressTitle => null; + + public override string ProgressAction => null; + + public override Enumerations.LayerRangeSelection LayerRangeSelection => Enumerations.LayerRangeSelection.None; + public override bool CanROI => false; + + public MillimetersToPixels CalcMillimetersToPixels { get; set; } + public LightOffDelayC CalcLightOffDelay { get; set; } + + public OperationCalculator() + { + } + + public abstract class Calculation : BindableBase + { + public abstract string Description { get; } + public abstract string Formula { get; } + } + + public sealed class MillimetersToPixels : Calculation + { + private uint _resolutionX; + private uint _resolutionY; + private decimal _displayWidth; + private decimal _displayHeight; + private decimal _millimeters = 1; + + public override string Description => "Converts from Millimeters to Pixels"; + public override string Formula => "Pixels = Resolution / Display * Millimeters"; + + public MillimetersToPixels(Size resolution, SizeF display, decimal millimeters = 1) + { + _resolutionX = (uint) resolution.Width; + _resolutionY = (uint) resolution.Height; + + _displayWidth = (decimal) display.Width; + _displayHeight = (decimal) display.Height; + + _millimeters = millimeters; + } + + public uint ResolutionX + { + get => _resolutionX; + set + { + if(!RaiseAndSetIfChanged(ref _resolutionX, value)) return; + RaisePropertyChanged(nameof(PixelsPerMillimeterX)); + RaisePropertyChanged(nameof(PixelsX)); + } + } + + public uint ResolutionY + { + get => _resolutionY; + set + { + if(!RaiseAndSetIfChanged(ref _resolutionY, value)) return; + RaisePropertyChanged(nameof(PixelsPerMillimeterY)); + RaisePropertyChanged(nameof(PixelsY)); + } + } + + public decimal DisplayWidth + { + get => _displayWidth; + set + { + if(!RaiseAndSetIfChanged(ref _displayWidth, value)) return; + RaisePropertyChanged(nameof(PixelsPerMillimeterX)); + RaisePropertyChanged(nameof(PixelsX)); + } + } + + public decimal DisplayHeight + { + get => _displayHeight; + set + { + if(!RaiseAndSetIfChanged(ref _displayHeight, value)) return; + RaisePropertyChanged(nameof(PixelsPerMillimeterY)); + RaisePropertyChanged(nameof(PixelsY)); + } + } + + public decimal Millimeters + { + get => _millimeters; + set + { + if(!RaiseAndSetIfChanged(ref _millimeters, value)) return; + RaisePropertyChanged(nameof(PixelsX)); + RaisePropertyChanged(nameof(PixelsY)); + } + } + + public decimal PixelsPerMillimeterX => DisplayWidth > 0 ? Math.Round(ResolutionX / DisplayWidth, 3) : 0; + public decimal PixelsPerMillimeterY => DisplayHeight > 0 ? Math.Round(ResolutionY / DisplayHeight, 3) : 0; + + public decimal PixelsX => PixelsPerMillimeterX * Millimeters; + public decimal PixelsY => PixelsPerMillimeterY * Millimeters; + + + } + + public sealed class LightOffDelayC : Calculation + { + private decimal _liftHeight; + private decimal _bottomLiftHeight; + private decimal _liftSpeed; + private decimal _bottomLiftSpeed; + private decimal _retractSpeed; + private decimal _bottomRetractSpeed; + private decimal _waitTime = 2.5m; + private decimal _bottomWaitTime = 3m; + + public override string Description => + "Calculates the required light-off delay (Moving time from the build plate + additional time for resin to stabilize) given The lifting height, speed and retract to wait x seconds before cure a new layer.\n" + + "Light-off delay is crucial for gaining higher-resolution and sharper prints.\n" + + "When the build plate retracts, it is important to allow enough time for the resin to stabilize before the UV lights turn on. This would ideally be around 2-3s."; + + public override string Formula => "Light-off delay = Lifting height / (Lifting speed / 60) + Lifting height / (Retract speed / 60) + Desired wait seconds"; + + public decimal LiftHeight + { + get => _liftHeight; + set + { + if(!RaiseAndSetIfChanged(ref _liftHeight, value)) return; + RaisePropertyChanged(nameof(LightOffDelay)); + } + } + + public decimal BottomLiftHeight + { + get => _bottomLiftHeight; + set + { + if(!RaiseAndSetIfChanged(ref _bottomLiftHeight, value)) return; + RaisePropertyChanged(nameof(BottomLightOffDelay)); + } + } + + public decimal LiftSpeed + { + get => _liftSpeed; + set + { + if(!RaiseAndSetIfChanged(ref _liftSpeed, value)) return; + RaisePropertyChanged(nameof(LightOffDelay)); + } + } + + public decimal BottomLiftSpeed + { + get => _bottomLiftSpeed; + set + { + if(!RaiseAndSetIfChanged(ref _bottomLiftSpeed, value)) return; + RaisePropertyChanged(nameof(BottomLightOffDelay)); + } + } + + public decimal RetractSpeed + { + get => _retractSpeed; + set + { + if(!RaiseAndSetIfChanged(ref _retractSpeed, value)) return; + RaisePropertyChanged(nameof(LightOffDelay)); + } + } + + public decimal BottomRetractSpeed + { + get => _bottomRetractSpeed; + set + { + if (!RaiseAndSetIfChanged(ref _bottomRetractSpeed, value)) return; + RaisePropertyChanged(nameof(BottomLightOffDelay)); + } + } + + public decimal WaitTime + { + get => _waitTime; + set + { + if(!RaiseAndSetIfChanged(ref _waitTime, value)) return; + RaisePropertyChanged(nameof(LightOffDelay)); + } + } + + public decimal BottomWaitTime + { + get => _bottomWaitTime; + set + { + if (!RaiseAndSetIfChanged(ref _bottomWaitTime, value)) return; + RaisePropertyChanged(nameof(BottomLightOffDelay)); + } + } + + public decimal LightOffDelay => Calculate(_liftHeight, _liftSpeed, _retractSpeed, _waitTime); + + public decimal BottomLightOffDelay => Calculate(_bottomLiftHeight, _bottomLiftSpeed, _bottomRetractSpeed, _bottomWaitTime); + + public LightOffDelayC() + { + } + + public LightOffDelayC(decimal liftHeight, decimal bottomLiftHeight, decimal liftSpeed, decimal bottomLiftSpeed, decimal retractSpeed, decimal bottomRetractSpeed, decimal waitTime = 2.5m, decimal bottomWaitTime = 3m) + { + _liftHeight = liftHeight; + _bottomLiftHeight = bottomLiftHeight; + _liftSpeed = liftSpeed; + _bottomLiftSpeed = bottomLiftSpeed; + _retractSpeed = retractSpeed; + _bottomRetractSpeed = bottomRetractSpeed; + _waitTime = waitTime; + _bottomWaitTime = bottomWaitTime; + } + + public static decimal Calculate(decimal liftHeight, decimal liftSpeed, decimal retract, decimal waitTime = 0) + { + try + { + return Math.Round(liftHeight / (liftSpeed / 60m) + liftHeight / (retract / 60m) + waitTime, 2); + } + catch (Exception) + { + return 0; + } + } + + public static float Calculate(float liftHeight, float liftSpeed, float retract, float waitTime = 0) + { + try + { + return (float) Math.Round(liftHeight / (liftSpeed / 60f) + liftHeight / (retract / 60f) + waitTime, 2); + } + catch (Exception) + { + return 0; + } + + } + } + } +} diff --git a/UVtools.Core/UVtools.Core.csproj b/UVtools.Core/UVtools.Core.csproj index a24e981..8209e09 100644 --- a/UVtools.Core/UVtools.Core.csproj +++ b/UVtools.Core/UVtools.Core.csproj @@ -10,12 +10,12 @@ <RepositoryUrl>https://github.com/sn4k3/UVtools</RepositoryUrl> <PackageProjectUrl>https://github.com/sn4k3/UVtools</PackageProjectUrl> <Description>MSLA/DLP, file analysis, repair, conversion and manipulation</Description> - <Version>0.8.4.4</Version> + <Version>0.8.5.0</Version> <Copyright>Copyright © 2020 PTRTECH</Copyright> <PackageIcon>UVtools.png</PackageIcon> <Platforms>AnyCPU;x64</Platforms> - <AssemblyVersion>0.8.4.4</AssemblyVersion> - <FileVersion>0.8.4.4</FileVersion> + <AssemblyVersion>0.8.5.0</AssemblyVersion> + <FileVersion>0.8.5.0</FileVersion> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'"> diff --git a/UVtools.GUI/App.config b/UVtools.GUI/App.config index cc2e5e9..f1647bc 100644 --- a/UVtools.GUI/App.config +++ b/UVtools.GUI/App.config @@ -271,6 +271,9 @@ <setting name="LayerRepairRemoveIslandsRecursiveIterations" serializeAs="String"> <value>4</value> </setting> + <setting name="LoadDemoFileOnStartup" serializeAs="String"> + <value>True</value> + </setting> </UVtools.GUI.Properties.Settings> </userSettings> </configuration> diff --git a/UVtools.GUI/Controls/Tools/CtrlToolCalculator.Designer.cs b/UVtools.GUI/Controls/Tools/CtrlToolCalculator.Designer.cs new file mode 100644 index 0000000..b648f02 --- /dev/null +++ b/UVtools.GUI/Controls/Tools/CtrlToolCalculator.Designer.cs @@ -0,0 +1,1064 @@ +namespace UVtools.GUI.Controls.Tools +{ + partial class CtrlToolCalculator + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.tabControl = new System.Windows.Forms.TabControl(); + this.tpMillimetersToPixels = new System.Windows.Forms.TabPage(); + this.panel2 = new System.Windows.Forms.Panel(); + this.nmMMtoPXResolutionX = new System.Windows.Forms.NumericUpDown(); + this.label1 = new System.Windows.Forms.Label(); + this.cbRoundResults = new System.Windows.Forms.CheckBox(); + this.nmMMtoPXResolutionY = new System.Windows.Forms.NumericUpDown(); + this.tbMMtoPXResultPixelsPerMillimeterY = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.tbMMtoPXResultPixelsY = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label19 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.nmMMtoPXDisplayWidth = new System.Windows.Forms.NumericUpDown(); + this.tbMMtoPXResultPixelsPerMillimeterX = new System.Windows.Forms.TextBox(); + this.label17 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.nmMMtoPXDisplayHeight = new System.Windows.Forms.NumericUpDown(); + this.label9 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.tbMMtoPXResultPixelsX = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.nmMMtoPXInputMillimeters = new System.Windows.Forms.NumericUpDown(); + this.label8 = new System.Windows.Forms.Label(); + this.panel1 = new System.Windows.Forms.Panel(); + this.lbMMtoPixelsDescription = new System.Windows.Forms.Label(); + this.tpLightOffDelay = new System.Windows.Forms.TabPage(); + this.panel4 = new System.Windows.Forms.Panel(); + this.lbLightOffDelayCurrentBottomValue = new System.Windows.Forms.Label(); + this.lbLightOffDelayCurrentValue = new System.Windows.Forms.Label(); + this.btnLightOffDelaySetBottomParameter = new System.Windows.Forms.Button(); + this.btnLightOffDelaySetParameter = new System.Windows.Forms.Button(); + this.nmLightOffDelayLiftHeight = new System.Windows.Forms.NumericUpDown(); + this.label37 = new System.Windows.Forms.Label(); + this.label20 = new System.Windows.Forms.Label(); + this.label38 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.tbLightOffDelayBottom = new System.Windows.Forms.TextBox(); + this.label22 = new System.Windows.Forms.Label(); + this.label35 = new System.Windows.Forms.Label(); + this.label21 = new System.Windows.Forms.Label(); + this.label36 = new System.Windows.Forms.Label(); + this.nmLightOffDelayLiftSpeed = new System.Windows.Forms.NumericUpDown(); + this.tbLightOffDelay = new System.Windows.Forms.TextBox(); + this.label24 = new System.Windows.Forms.Label(); + this.nmLightOffDelayBottomRetract = new System.Windows.Forms.NumericUpDown(); + this.label23 = new System.Windows.Forms.Label(); + this.label33 = new System.Windows.Forms.Label(); + this.nmLightOffDelayBottomLiftHeight = new System.Windows.Forms.NumericUpDown(); + this.label34 = new System.Windows.Forms.Label(); + this.label26 = new System.Windows.Forms.Label(); + this.nmLightOffDelayWaitTime = new System.Windows.Forms.NumericUpDown(); + this.label25 = new System.Windows.Forms.Label(); + this.label31 = new System.Windows.Forms.Label(); + this.nmLightOffDelayBottomLiftSpeed = new System.Windows.Forms.NumericUpDown(); + this.label32 = new System.Windows.Forms.Label(); + this.label28 = new System.Windows.Forms.Label(); + this.nmLightOffDelayBottomWaitTime = new System.Windows.Forms.NumericUpDown(); + this.label27 = new System.Windows.Forms.Label(); + this.label29 = new System.Windows.Forms.Label(); + this.nmLightOffDelayRetract = new System.Windows.Forms.NumericUpDown(); + this.label30 = new System.Windows.Forms.Label(); + this.panel3 = new System.Windows.Forms.Panel(); + this.lbLightOffDelayDescription = new System.Windows.Forms.Label(); + this.tabControl.SuspendLayout(); + this.tpMillimetersToPixels.SuspendLayout(); + this.panel2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXResolutionX)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXResolutionY)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXDisplayWidth)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXDisplayHeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXInputMillimeters)).BeginInit(); + this.panel1.SuspendLayout(); + this.tpLightOffDelay.SuspendLayout(); + this.panel4.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayLiftHeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayLiftSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomRetract)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomLiftHeight)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayWaitTime)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomLiftSpeed)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomWaitTime)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayRetract)).BeginInit(); + this.panel3.SuspendLayout(); + this.SuspendLayout(); + // + // tabControl + // + this.tabControl.Controls.Add(this.tpMillimetersToPixels); + this.tabControl.Controls.Add(this.tpLightOffDelay); + this.tabControl.Dock = System.Windows.Forms.DockStyle.Top; + this.tabControl.Location = new System.Drawing.Point(0, 0); + this.tabControl.Name = "tabControl"; + this.tabControl.SelectedIndex = 0; + this.tabControl.Size = new System.Drawing.Size(686, 555); + this.tabControl.TabIndex = 0; + // + // tpMillimetersToPixels + // + this.tpMillimetersToPixels.BackColor = System.Drawing.Color.White; + this.tpMillimetersToPixels.Controls.Add(this.panel2); + this.tpMillimetersToPixels.Controls.Add(this.panel1); + this.tpMillimetersToPixels.Location = new System.Drawing.Point(4, 29); + this.tpMillimetersToPixels.Name = "tpMillimetersToPixels"; + this.tpMillimetersToPixels.Padding = new System.Windows.Forms.Padding(3); + this.tpMillimetersToPixels.Size = new System.Drawing.Size(678, 522); + this.tpMillimetersToPixels.TabIndex = 0; + this.tpMillimetersToPixels.Text = "Millimeters to Pixels"; + // + // panel2 + // + this.panel2.Controls.Add(this.nmMMtoPXResolutionX); + this.panel2.Controls.Add(this.label1); + this.panel2.Controls.Add(this.cbRoundResults); + this.panel2.Controls.Add(this.nmMMtoPXResolutionY); + this.panel2.Controls.Add(this.tbMMtoPXResultPixelsPerMillimeterY); + this.panel2.Controls.Add(this.label3); + this.panel2.Controls.Add(this.tbMMtoPXResultPixelsY); + this.panel2.Controls.Add(this.label5); + this.panel2.Controls.Add(this.label10); + this.panel2.Controls.Add(this.label2); + this.panel2.Controls.Add(this.label11); + this.panel2.Controls.Add(this.label19); + this.panel2.Controls.Add(this.label14); + this.panel2.Controls.Add(this.nmMMtoPXDisplayWidth); + this.panel2.Controls.Add(this.tbMMtoPXResultPixelsPerMillimeterX); + this.panel2.Controls.Add(this.label17); + this.panel2.Controls.Add(this.label12); + this.panel2.Controls.Add(this.nmMMtoPXDisplayHeight); + this.panel2.Controls.Add(this.label9); + this.panel2.Controls.Add(this.label18); + this.panel2.Controls.Add(this.label15); + this.panel2.Controls.Add(this.label4); + this.panel2.Controls.Add(this.label16); + this.panel2.Controls.Add(this.label6); + this.panel2.Controls.Add(this.tbMMtoPXResultPixelsX); + this.panel2.Controls.Add(this.label7); + this.panel2.Controls.Add(this.nmMMtoPXInputMillimeters); + this.panel2.Controls.Add(this.label8); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(3, 45); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(672, 474); + this.panel2.TabIndex = 35; + // + // nmMMtoPXResolutionX + // + this.nmMMtoPXResolutionX.Location = new System.Drawing.Point(131, 11); + this.nmMMtoPXResolutionX.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmMMtoPXResolutionX.Name = "nmMMtoPXResolutionX"; + this.nmMMtoPXResolutionX.Size = new System.Drawing.Size(85, 26); + this.nmMMtoPXResolutionX.TabIndex = 2; + this.nmMMtoPXResolutionX.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(23, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(104, 20); + this.label1.TabIndex = 0; + this.label1.Text = "Resolution X:"; + // + // cbRoundResults + // + this.cbRoundResults.AutoSize = true; + this.cbRoundResults.Location = new System.Drawing.Point(365, 105); + this.cbRoundResults.Name = "cbRoundResults"; + this.cbRoundResults.Size = new System.Drawing.Size(127, 24); + this.cbRoundResults.TabIndex = 33; + this.cbRoundResults.Text = "Round results"; + this.cbRoundResults.UseVisualStyleBackColor = true; + this.cbRoundResults.Visible = false; + this.cbRoundResults.CheckedChanged += new System.EventHandler(this.EventValueChanged); + // + // nmMMtoPXResolutionY + // + this.nmMMtoPXResolutionY.Location = new System.Drawing.Point(131, 43); + this.nmMMtoPXResolutionY.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmMMtoPXResolutionY.Name = "nmMMtoPXResolutionY"; + this.nmMMtoPXResolutionY.Size = new System.Drawing.Size(85, 26); + this.nmMMtoPXResolutionY.TabIndex = 4; + this.nmMMtoPXResolutionY.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // tbMMtoPXResultPixelsPerMillimeterY + // + this.tbMMtoPXResultPixelsPerMillimeterY.Location = new System.Drawing.Point(171, 168); + this.tbMMtoPXResultPixelsPerMillimeterY.Name = "tbMMtoPXResultPixelsPerMillimeterY"; + this.tbMMtoPXResultPixelsPerMillimeterY.ReadOnly = true; + this.tbMMtoPXResultPixelsPerMillimeterY.Size = new System.Drawing.Size(115, 26); + this.tbMMtoPXResultPixelsPerMillimeterY.TabIndex = 32; + // + // label3 + // + this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(404, 14); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(105, 20); + this.label3.TabIndex = 7; + this.label3.Text = "Display width:"; + // + // tbMMtoPXResultPixelsY + // + this.tbMMtoPXResultPixelsY.Location = new System.Drawing.Point(171, 232); + this.tbMMtoPXResultPixelsY.Name = "tbMMtoPXResultPixelsY"; + this.tbMMtoPXResultPixelsY.ReadOnly = true; + this.tbMMtoPXResultPixelsY.Size = new System.Drawing.Size(115, 26); + this.tbMMtoPXResultPixelsY.TabIndex = 26; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(23, 46); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(104, 20); + this.label5.TabIndex = 8; + this.label5.Text = "Resolution Y:"; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label10.Location = new System.Drawing.Point(93, 203); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(76, 20); + this.label10.TabIndex = 19; + this.label10.Text = "X pixels:"; + // + // label2 + // + this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(397, 46); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(112, 20); + this.label2.TabIndex = 9; + this.label2.Text = "Display height:"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(289, 107); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(35, 20); + this.label11.TabIndex = 20; + this.label11.Text = "mm"; + // + // label19 + // + this.label19.AutoSize = true; + this.label19.Location = new System.Drawing.Point(5, 139); + this.label19.Name = "label19"; + this.label19.Size = new System.Drawing.Size(164, 20); + this.label19.TabIndex = 27; + this.label19.Text = "X pixels per millimeter:"; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label14.Location = new System.Drawing.Point(289, 235); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(27, 20); + this.label14.TabIndex = 25; + this.label14.Text = "px"; + // + // nmMMtoPXDisplayWidth + // + this.nmMMtoPXDisplayWidth.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.nmMMtoPXDisplayWidth.DecimalPlaces = 2; + this.nmMMtoPXDisplayWidth.Location = new System.Drawing.Point(511, 11); + this.nmMMtoPXDisplayWidth.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmMMtoPXDisplayWidth.Name = "nmMMtoPXDisplayWidth"; + this.nmMMtoPXDisplayWidth.Size = new System.Drawing.Size(115, 26); + this.nmMMtoPXDisplayWidth.TabIndex = 10; + this.nmMMtoPXDisplayWidth.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // tbMMtoPXResultPixelsPerMillimeterX + // + this.tbMMtoPXResultPixelsPerMillimeterX.Location = new System.Drawing.Point(171, 136); + this.tbMMtoPXResultPixelsPerMillimeterX.Name = "tbMMtoPXResultPixelsPerMillimeterX"; + this.tbMMtoPXResultPixelsPerMillimeterX.ReadOnly = true; + this.tbMMtoPXResultPixelsPerMillimeterX.Size = new System.Drawing.Size(115, 26); + this.tbMMtoPXResultPixelsPerMillimeterX.TabIndex = 29; + // + // label17 + // + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(5, 171); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(164, 20); + this.label17.TabIndex = 30; + this.label17.Text = "Y pixels per millimeter:"; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label12.Location = new System.Drawing.Point(289, 203); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(27, 20); + this.label12.TabIndex = 21; + this.label12.Text = "px"; + // + // nmMMtoPXDisplayHeight + // + this.nmMMtoPXDisplayHeight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.nmMMtoPXDisplayHeight.DecimalPlaces = 2; + this.nmMMtoPXDisplayHeight.Location = new System.Drawing.Point(511, 43); + this.nmMMtoPXDisplayHeight.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmMMtoPXDisplayHeight.Name = "nmMMtoPXDisplayHeight"; + this.nmMMtoPXDisplayHeight.Size = new System.Drawing.Size(115, 26); + this.nmMMtoPXDisplayHeight.TabIndex = 11; + this.nmMMtoPXDisplayHeight.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(47, 107); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(122, 20); + this.label9.TabIndex = 17; + this.label9.Text = "Input millimiters:"; + // + // label18 + // + this.label18.AutoSize = true; + this.label18.Location = new System.Drawing.Point(289, 139); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(64, 20); + this.label18.TabIndex = 28; + this.label18.Text = "ppmmX"; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label15.Location = new System.Drawing.Point(93, 235); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(76, 20); + this.label15.TabIndex = 24; + this.label15.Text = "Y pixels:"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(219, 14); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(25, 20); + this.label4.TabIndex = 12; + this.label4.Text = "px"; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Location = new System.Drawing.Point(289, 171); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(64, 20); + this.label16.TabIndex = 31; + this.label16.Text = "ppmmY"; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(219, 46); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(25, 20); + this.label6.TabIndex = 13; + this.label6.Text = "px"; + // + // tbMMtoPXResultPixelsX + // + this.tbMMtoPXResultPixelsX.Location = new System.Drawing.Point(171, 200); + this.tbMMtoPXResultPixelsX.Name = "tbMMtoPXResultPixelsX"; + this.tbMMtoPXResultPixelsX.ReadOnly = true; + this.tbMMtoPXResultPixelsX.Size = new System.Drawing.Size(115, 26); + this.tbMMtoPXResultPixelsX.TabIndex = 23; + // + // label7 + // + this.label7.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(629, 46); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(35, 20); + this.label7.TabIndex = 14; + this.label7.Text = "mm"; + // + // nmMMtoPXInputMillimeters + // + this.nmMMtoPXInputMillimeters.DecimalPlaces = 2; + this.nmMMtoPXInputMillimeters.Location = new System.Drawing.Point(171, 104); + this.nmMMtoPXInputMillimeters.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmMMtoPXInputMillimeters.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.nmMMtoPXInputMillimeters.Name = "nmMMtoPXInputMillimeters"; + this.nmMMtoPXInputMillimeters.Size = new System.Drawing.Size(115, 26); + this.nmMMtoPXInputMillimeters.TabIndex = 16; + this.nmMMtoPXInputMillimeters.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.nmMMtoPXInputMillimeters.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label8 + // + this.label8.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(629, 14); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(35, 20); + this.label8.TabIndex = 15; + this.label8.Text = "mm"; + // + // panel1 + // + this.panel1.AutoSize = true; + this.panel1.BackColor = System.Drawing.SystemColors.Control; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.lbMMtoPixelsDescription); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(3, 3); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(672, 42); + this.panel1.TabIndex = 34; + // + // lbMMtoPixelsDescription + // + this.lbMMtoPixelsDescription.AutoSize = true; + this.lbMMtoPixelsDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbMMtoPixelsDescription.Location = new System.Drawing.Point(0, 0); + this.lbMMtoPixelsDescription.Name = "lbMMtoPixelsDescription"; + this.lbMMtoPixelsDescription.Padding = new System.Windows.Forms.Padding(10); + this.lbMMtoPixelsDescription.Size = new System.Drawing.Size(109, 40); + this.lbMMtoPixelsDescription.TabIndex = 35; + this.lbMMtoPixelsDescription.Text = "Description"; + this.lbMMtoPixelsDescription.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // tpLightOffDelay + // + this.tpLightOffDelay.Controls.Add(this.panel4); + this.tpLightOffDelay.Controls.Add(this.panel3); + this.tpLightOffDelay.Location = new System.Drawing.Point(4, 29); + this.tpLightOffDelay.Name = "tpLightOffDelay"; + this.tpLightOffDelay.Padding = new System.Windows.Forms.Padding(3); + this.tpLightOffDelay.Size = new System.Drawing.Size(678, 522); + this.tpLightOffDelay.TabIndex = 1; + this.tpLightOffDelay.Text = "Light-off delay"; + this.tpLightOffDelay.UseVisualStyleBackColor = true; + // + // panel4 + // + this.panel4.Controls.Add(this.lbLightOffDelayCurrentBottomValue); + this.panel4.Controls.Add(this.lbLightOffDelayCurrentValue); + this.panel4.Controls.Add(this.btnLightOffDelaySetBottomParameter); + this.panel4.Controls.Add(this.btnLightOffDelaySetParameter); + this.panel4.Controls.Add(this.nmLightOffDelayLiftHeight); + this.panel4.Controls.Add(this.label37); + this.panel4.Controls.Add(this.label20); + this.panel4.Controls.Add(this.label38); + this.panel4.Controls.Add(this.label13); + this.panel4.Controls.Add(this.tbLightOffDelayBottom); + this.panel4.Controls.Add(this.label22); + this.panel4.Controls.Add(this.label35); + this.panel4.Controls.Add(this.label21); + this.panel4.Controls.Add(this.label36); + this.panel4.Controls.Add(this.nmLightOffDelayLiftSpeed); + this.panel4.Controls.Add(this.tbLightOffDelay); + this.panel4.Controls.Add(this.label24); + this.panel4.Controls.Add(this.nmLightOffDelayBottomRetract); + this.panel4.Controls.Add(this.label23); + this.panel4.Controls.Add(this.label33); + this.panel4.Controls.Add(this.nmLightOffDelayBottomLiftHeight); + this.panel4.Controls.Add(this.label34); + this.panel4.Controls.Add(this.label26); + this.panel4.Controls.Add(this.nmLightOffDelayWaitTime); + this.panel4.Controls.Add(this.label25); + this.panel4.Controls.Add(this.label31); + this.panel4.Controls.Add(this.nmLightOffDelayBottomLiftSpeed); + this.panel4.Controls.Add(this.label32); + this.panel4.Controls.Add(this.label28); + this.panel4.Controls.Add(this.nmLightOffDelayBottomWaitTime); + this.panel4.Controls.Add(this.label27); + this.panel4.Controls.Add(this.label29); + this.panel4.Controls.Add(this.nmLightOffDelayRetract); + this.panel4.Controls.Add(this.label30); + this.panel4.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel4.Location = new System.Drawing.Point(3, 45); + this.panel4.Name = "panel4"; + this.panel4.Size = new System.Drawing.Size(672, 474); + this.panel4.TabIndex = 66; + // + // lbLightOffDelayCurrentBottomValue + // + this.lbLightOffDelayCurrentBottomValue.AutoSize = true; + this.lbLightOffDelayCurrentBottomValue.Location = new System.Drawing.Point(327, 206); + this.lbLightOffDelayCurrentBottomValue.Name = "lbLightOffDelayCurrentBottomValue"; + this.lbLightOffDelayCurrentBottomValue.Size = new System.Drawing.Size(120, 20); + this.lbLightOffDelayCurrentBottomValue.TabIndex = 69; + this.lbLightOffDelayCurrentBottomValue.Text = "Current value: 0"; + // + // lbLightOffDelayCurrentValue + // + this.lbLightOffDelayCurrentValue.AutoSize = true; + this.lbLightOffDelayCurrentValue.Location = new System.Drawing.Point(15, 206); + this.lbLightOffDelayCurrentValue.Name = "lbLightOffDelayCurrentValue"; + this.lbLightOffDelayCurrentValue.Size = new System.Drawing.Size(120, 20); + this.lbLightOffDelayCurrentValue.TabIndex = 68; + this.lbLightOffDelayCurrentValue.Text = "Current value: 0"; + // + // btnLightOffDelaySetBottomParameter + // + this.btnLightOffDelaySetBottomParameter.Location = new System.Drawing.Point(331, 170); + this.btnLightOffDelaySetBottomParameter.Name = "btnLightOffDelaySetBottomParameter"; + this.btnLightOffDelaySetBottomParameter.Size = new System.Drawing.Size(267, 33); + this.btnLightOffDelaySetBottomParameter.TabIndex = 67; + this.btnLightOffDelaySetBottomParameter.Text = "Set this parameters on file"; + this.btnLightOffDelaySetBottomParameter.UseVisualStyleBackColor = true; + this.btnLightOffDelaySetBottomParameter.Click += new System.EventHandler(this.EventClick); + // + // btnLightOffDelaySetParameter + // + this.btnLightOffDelaySetParameter.Location = new System.Drawing.Point(19, 170); + this.btnLightOffDelaySetParameter.Name = "btnLightOffDelaySetParameter"; + this.btnLightOffDelaySetParameter.Size = new System.Drawing.Size(209, 33); + this.btnLightOffDelaySetParameter.TabIndex = 66; + this.btnLightOffDelaySetParameter.Text = "Set this parameters on file"; + this.btnLightOffDelaySetParameter.UseVisualStyleBackColor = true; + this.btnLightOffDelaySetParameter.Click += new System.EventHandler(this.EventClick); + // + // nmLightOffDelayLiftHeight + // + this.nmLightOffDelayLiftHeight.DecimalPlaces = 2; + this.nmLightOffDelayLiftHeight.Location = new System.Drawing.Point(143, 11); + this.nmLightOffDelayLiftHeight.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayLiftHeight.Name = "nmLightOffDelayLiftHeight"; + this.nmLightOffDelayLiftHeight.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayLiftHeight.TabIndex = 37; + this.nmLightOffDelayLiftHeight.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label37 + // + this.label37.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label37.AutoSize = true; + this.label37.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label37.Location = new System.Drawing.Point(327, 141); + this.label37.Name = "label37"; + this.label37.Size = new System.Drawing.Size(181, 20); + this.label37.TabIndex = 63; + this.label37.Text = "Bottom light-off delay"; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Location = new System.Drawing.Point(231, 14); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(35, 20); + this.label20.TabIndex = 38; + this.label20.Text = "mm"; + // + // label38 + // + this.label38.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label38.AutoSize = true; + this.label38.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label38.Location = new System.Drawing.Point(600, 141); + this.label38.Name = "label38"; + this.label38.Size = new System.Drawing.Size(18, 20); + this.label38.TabIndex = 64; + this.label38.Text = "s"; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(56, 14); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(83, 20); + this.label13.TabIndex = 36; + this.label13.Text = "Lift height:"; + // + // tbLightOffDelayBottom + // + this.tbLightOffDelayBottom.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.tbLightOffDelayBottom.Location = new System.Drawing.Point(512, 138); + this.tbLightOffDelayBottom.Name = "tbLightOffDelayBottom"; + this.tbLightOffDelayBottom.ReadOnly = true; + this.tbLightOffDelayBottom.Size = new System.Drawing.Size(85, 26); + this.tbLightOffDelayBottom.TabIndex = 65; + // + // label22 + // + this.label22.AutoSize = true; + this.label22.Location = new System.Drawing.Point(231, 46); + this.label22.Name = "label22"; + this.label22.Size = new System.Drawing.Size(64, 20); + this.label22.TabIndex = 41; + this.label22.Text = "mm/min"; + // + // label35 + // + this.label35.AutoSize = true; + this.label35.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label35.Location = new System.Drawing.Point(15, 141); + this.label35.Name = "label35"; + this.label35.Size = new System.Drawing.Size(124, 20); + this.label35.TabIndex = 60; + this.label35.Text = "Light-off delay"; + // + // label21 + // + this.label21.AutoSize = true; + this.label21.Location = new System.Drawing.Point(56, 46); + this.label21.Name = "label21"; + this.label21.Size = new System.Drawing.Size(83, 20); + this.label21.TabIndex = 39; + this.label21.Text = "Lift speed:"; + // + // label36 + // + this.label36.AutoSize = true; + this.label36.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.label36.Location = new System.Drawing.Point(231, 141); + this.label36.Name = "label36"; + this.label36.Size = new System.Drawing.Size(18, 20); + this.label36.TabIndex = 61; + this.label36.Text = "s"; + // + // nmLightOffDelayLiftSpeed + // + this.nmLightOffDelayLiftSpeed.DecimalPlaces = 2; + this.nmLightOffDelayLiftSpeed.Location = new System.Drawing.Point(143, 43); + this.nmLightOffDelayLiftSpeed.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayLiftSpeed.Name = "nmLightOffDelayLiftSpeed"; + this.nmLightOffDelayLiftSpeed.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayLiftSpeed.TabIndex = 40; + this.nmLightOffDelayLiftSpeed.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // tbLightOffDelay + // + this.tbLightOffDelay.Location = new System.Drawing.Point(143, 138); + this.tbLightOffDelay.Name = "tbLightOffDelay"; + this.tbLightOffDelay.ReadOnly = true; + this.tbLightOffDelay.Size = new System.Drawing.Size(85, 26); + this.tbLightOffDelay.TabIndex = 62; + // + // label24 + // + this.label24.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label24.AutoSize = true; + this.label24.Location = new System.Drawing.Point(600, 13); + this.label24.Name = "label24"; + this.label24.Size = new System.Drawing.Size(35, 20); + this.label24.TabIndex = 44; + this.label24.Text = "mm"; + // + // nmLightOffDelayBottomRetract + // + this.nmLightOffDelayBottomRetract.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.nmLightOffDelayBottomRetract.DecimalPlaces = 2; + this.nmLightOffDelayBottomRetract.Location = new System.Drawing.Point(512, 74); + this.nmLightOffDelayBottomRetract.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayBottomRetract.Name = "nmLightOffDelayBottomRetract"; + this.nmLightOffDelayBottomRetract.ReadOnly = true; + this.nmLightOffDelayBottomRetract.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayBottomRetract.TabIndex = 58; + this.nmLightOffDelayBottomRetract.Visible = false; + this.nmLightOffDelayBottomRetract.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label23 + // + this.label23.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label23.AutoSize = true; + this.label23.Location = new System.Drawing.Point(375, 13); + this.label23.Name = "label23"; + this.label23.Size = new System.Drawing.Size(133, 20); + this.label23.TabIndex = 42; + this.label23.Text = "Bottom lift height:"; + // + // label33 + // + this.label33.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label33.AutoSize = true; + this.label33.Location = new System.Drawing.Point(345, 77); + this.label33.Name = "label33"; + this.label33.Size = new System.Drawing.Size(163, 20); + this.label33.TabIndex = 57; + this.label33.Text = "Bottom retract speed:"; + this.label33.Visible = false; + // + // nmLightOffDelayBottomLiftHeight + // + this.nmLightOffDelayBottomLiftHeight.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.nmLightOffDelayBottomLiftHeight.DecimalPlaces = 2; + this.nmLightOffDelayBottomLiftHeight.Location = new System.Drawing.Point(512, 10); + this.nmLightOffDelayBottomLiftHeight.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayBottomLiftHeight.Name = "nmLightOffDelayBottomLiftHeight"; + this.nmLightOffDelayBottomLiftHeight.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayBottomLiftHeight.TabIndex = 43; + this.nmLightOffDelayBottomLiftHeight.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label34 + // + this.label34.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label34.AutoSize = true; + this.label34.Location = new System.Drawing.Point(600, 77); + this.label34.Name = "label34"; + this.label34.Size = new System.Drawing.Size(64, 20); + this.label34.TabIndex = 59; + this.label34.Text = "mm/min"; + this.label34.Visible = false; + // + // label26 + // + this.label26.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label26.AutoSize = true; + this.label26.Location = new System.Drawing.Point(600, 45); + this.label26.Name = "label26"; + this.label26.Size = new System.Drawing.Size(64, 20); + this.label26.TabIndex = 47; + this.label26.Text = "mm/min"; + // + // nmLightOffDelayWaitTime + // + this.nmLightOffDelayWaitTime.DecimalPlaces = 2; + this.nmLightOffDelayWaitTime.Location = new System.Drawing.Point(143, 106); + this.nmLightOffDelayWaitTime.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayWaitTime.Name = "nmLightOffDelayWaitTime"; + this.nmLightOffDelayWaitTime.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayWaitTime.TabIndex = 55; + this.nmLightOffDelayWaitTime.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label25 + // + this.label25.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label25.AutoSize = true; + this.label25.Location = new System.Drawing.Point(375, 45); + this.label25.Name = "label25"; + this.label25.Size = new System.Drawing.Size(133, 20); + this.label25.TabIndex = 45; + this.label25.Text = "Bottom lift speed:"; + // + // label31 + // + this.label31.AutoSize = true; + this.label31.Location = new System.Drawing.Point(5, 108); + this.label31.Name = "label31"; + this.label31.Size = new System.Drawing.Size(134, 20); + this.label31.TabIndex = 54; + this.label31.Text = "Desired wait time:"; + // + // nmLightOffDelayBottomLiftSpeed + // + this.nmLightOffDelayBottomLiftSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.nmLightOffDelayBottomLiftSpeed.DecimalPlaces = 2; + this.nmLightOffDelayBottomLiftSpeed.Location = new System.Drawing.Point(512, 42); + this.nmLightOffDelayBottomLiftSpeed.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayBottomLiftSpeed.Name = "nmLightOffDelayBottomLiftSpeed"; + this.nmLightOffDelayBottomLiftSpeed.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayBottomLiftSpeed.TabIndex = 46; + this.nmLightOffDelayBottomLiftSpeed.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label32 + // + this.label32.AutoSize = true; + this.label32.Location = new System.Drawing.Point(231, 109); + this.label32.Name = "label32"; + this.label32.Size = new System.Drawing.Size(17, 20); + this.label32.TabIndex = 56; + this.label32.Text = "s"; + // + // label28 + // + this.label28.AutoSize = true; + this.label28.Location = new System.Drawing.Point(231, 78); + this.label28.Name = "label28"; + this.label28.Size = new System.Drawing.Size(64, 20); + this.label28.TabIndex = 50; + this.label28.Text = "mm/min"; + // + // nmLightOffDelayBottomWaitTime + // + this.nmLightOffDelayBottomWaitTime.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.nmLightOffDelayBottomWaitTime.DecimalPlaces = 2; + this.nmLightOffDelayBottomWaitTime.Location = new System.Drawing.Point(512, 106); + this.nmLightOffDelayBottomWaitTime.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayBottomWaitTime.Name = "nmLightOffDelayBottomWaitTime"; + this.nmLightOffDelayBottomWaitTime.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayBottomWaitTime.TabIndex = 52; + this.nmLightOffDelayBottomWaitTime.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label27 + // + this.label27.AutoSize = true; + this.label27.Location = new System.Drawing.Point(25, 78); + this.label27.Name = "label27"; + this.label27.Size = new System.Drawing.Size(114, 20); + this.label27.TabIndex = 48; + this.label27.Text = "Retract speed:"; + // + // label29 + // + this.label29.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label29.AutoSize = true; + this.label29.Location = new System.Drawing.Point(321, 109); + this.label29.Name = "label29"; + this.label29.Size = new System.Drawing.Size(187, 20); + this.label29.TabIndex = 51; + this.label29.Text = "Bottom desired wait time:"; + // + // nmLightOffDelayRetract + // + this.nmLightOffDelayRetract.DecimalPlaces = 2; + this.nmLightOffDelayRetract.Location = new System.Drawing.Point(143, 75); + this.nmLightOffDelayRetract.Maximum = new decimal(new int[] { + 100000, + 0, + 0, + 0}); + this.nmLightOffDelayRetract.Name = "nmLightOffDelayRetract"; + this.nmLightOffDelayRetract.Size = new System.Drawing.Size(85, 26); + this.nmLightOffDelayRetract.TabIndex = 49; + this.nmLightOffDelayRetract.ValueChanged += new System.EventHandler(this.EventValueChanged); + // + // label30 + // + this.label30.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.label30.AutoSize = true; + this.label30.Location = new System.Drawing.Point(600, 109); + this.label30.Name = "label30"; + this.label30.Size = new System.Drawing.Size(17, 20); + this.label30.TabIndex = 53; + this.label30.Text = "s"; + // + // panel3 + // + this.panel3.AutoSize = true; + this.panel3.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; + this.panel3.BackColor = System.Drawing.SystemColors.Control; + this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel3.Controls.Add(this.lbLightOffDelayDescription); + this.panel3.Dock = System.Windows.Forms.DockStyle.Top; + this.panel3.Location = new System.Drawing.Point(3, 3); + this.panel3.Name = "panel3"; + this.panel3.Size = new System.Drawing.Size(672, 42); + this.panel3.TabIndex = 35; + // + // lbLightOffDelayDescription + // + this.lbLightOffDelayDescription.AutoSize = true; + this.lbLightOffDelayDescription.Dock = System.Windows.Forms.DockStyle.Fill; + this.lbLightOffDelayDescription.Location = new System.Drawing.Point(0, 0); + this.lbLightOffDelayDescription.Name = "lbLightOffDelayDescription"; + this.lbLightOffDelayDescription.Padding = new System.Windows.Forms.Padding(10); + this.lbLightOffDelayDescription.Size = new System.Drawing.Size(109, 40); + this.lbLightOffDelayDescription.TabIndex = 35; + this.lbLightOffDelayDescription.Text = "Description"; + this.lbLightOffDelayDescription.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // CtrlToolCalculator + // + this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ButtonOkEnabled = false; + this.Controls.Add(this.tabControl); + this.Description = ""; + this.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.LayerRangeVisible = false; + this.Name = "CtrlToolCalculator"; + this.Size = new System.Drawing.Size(686, 555); + this.tabControl.ResumeLayout(false); + this.tpMillimetersToPixels.ResumeLayout(false); + this.tpMillimetersToPixels.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXResolutionX)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXResolutionY)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXDisplayWidth)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXDisplayHeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmMMtoPXInputMillimeters)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.tpLightOffDelay.ResumeLayout(false); + this.tpLightOffDelay.PerformLayout(); + this.panel4.ResumeLayout(false); + this.panel4.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayLiftHeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayLiftSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomRetract)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomLiftHeight)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayWaitTime)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomLiftSpeed)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayBottomWaitTime)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nmLightOffDelayRetract)).EndInit(); + this.panel3.ResumeLayout(false); + this.panel3.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabControl tabControl; + private System.Windows.Forms.TabPage tpMillimetersToPixels; + private System.Windows.Forms.TabPage tpLightOffDelay; + private System.Windows.Forms.NumericUpDown nmMMtoPXResolutionY; + private System.Windows.Forms.NumericUpDown nmMMtoPXResolutionX; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.NumericUpDown nmMMtoPXDisplayHeight; + private System.Windows.Forms.NumericUpDown nmMMtoPXDisplayWidth; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.NumericUpDown nmMMtoPXInputMillimeters; + private System.Windows.Forms.TextBox tbMMtoPXResultPixelsX; + private System.Windows.Forms.TextBox tbMMtoPXResultPixelsY; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.TextBox tbMMtoPXResultPixelsPerMillimeterY; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label17; + private System.Windows.Forms.TextBox tbMMtoPXResultPixelsPerMillimeterX; + private System.Windows.Forms.Label label18; + private System.Windows.Forms.Label label19; + private System.Windows.Forms.CheckBox cbRoundResults; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label lbMMtoPixelsDescription; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Panel panel3; + private System.Windows.Forms.Label lbLightOffDelayDescription; + private System.Windows.Forms.NumericUpDown nmLightOffDelayLiftHeight; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label20; + private System.Windows.Forms.NumericUpDown nmLightOffDelayLiftSpeed; + private System.Windows.Forms.Label label21; + private System.Windows.Forms.Label label22; + private System.Windows.Forms.NumericUpDown nmLightOffDelayBottomLiftHeight; + private System.Windows.Forms.Label label23; + private System.Windows.Forms.Label label24; + private System.Windows.Forms.NumericUpDown nmLightOffDelayBottomLiftSpeed; + private System.Windows.Forms.Label label25; + private System.Windows.Forms.Label label26; + private System.Windows.Forms.NumericUpDown nmLightOffDelayRetract; + private System.Windows.Forms.Label label27; + private System.Windows.Forms.Label label28; + private System.Windows.Forms.NumericUpDown nmLightOffDelayBottomWaitTime; + private System.Windows.Forms.Label label29; + private System.Windows.Forms.Label label30; + private System.Windows.Forms.NumericUpDown nmLightOffDelayWaitTime; + private System.Windows.Forms.Label label31; + private System.Windows.Forms.Label label32; + private System.Windows.Forms.NumericUpDown nmLightOffDelayBottomRetract; + private System.Windows.Forms.Label label33; + private System.Windows.Forms.Label label34; + private System.Windows.Forms.Label label35; + private System.Windows.Forms.Label label36; + private System.Windows.Forms.TextBox tbLightOffDelay; + private System.Windows.Forms.Label label37; + private System.Windows.Forms.Label label38; + private System.Windows.Forms.TextBox tbLightOffDelayBottom; + private System.Windows.Forms.Panel panel4; + private System.Windows.Forms.Button btnLightOffDelaySetBottomParameter; + private System.Windows.Forms.Button btnLightOffDelaySetParameter; + private System.Windows.Forms.Label lbLightOffDelayCurrentValue; + private System.Windows.Forms.Label lbLightOffDelayCurrentBottomValue; + } +} diff --git a/UVtools.GUI/Controls/Tools/CtrlToolCalculator.cs b/UVtools.GUI/Controls/Tools/CtrlToolCalculator.cs new file mode 100644 index 0000000..5b9f050 --- /dev/null +++ b/UVtools.GUI/Controls/Tools/CtrlToolCalculator.cs @@ -0,0 +1,201 @@ +/* + * GNU AFFERO GENERAL PUBLIC LICENSE + * Version 3, 19 November 2007 + * Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> + * Everyone is permitted to copy and distribute verbatim copies + * of this license document, but changing it is not allowed. + */ + +using System; +using System.Drawing; +using System.Globalization; +using UVtools.Core; +using UVtools.Core.FileFormats; +using UVtools.Core.Operations; + +namespace UVtools.GUI.Controls.Tools +{ + public partial class CtrlToolCalculator : CtrlToolWindowContent + { + public OperationCalculator Operation { get; } + + public CtrlToolCalculator() + { + InitializeComponent(); + Operation = new OperationCalculator + { + CalcMillimetersToPixels = new OperationCalculator.MillimetersToPixels(Program.SlicerFile.Resolution, Program.SlicerFile.Display), + CalcLightOffDelay = new OperationCalculator.LightOffDelayC( + (decimal) Program.SlicerFile.LiftHeight, (decimal) Program.SlicerFile.BottomLiftHeight, + (decimal) Program.SlicerFile.LiftSpeed, (decimal) Program.SlicerFile.BottomLiftSpeed, + (decimal) Program.SlicerFile.RetractSpeed, (decimal)Program.SlicerFile.RetractSpeed) + }; + SetOperation(Operation); + + tpMillimetersToPixels.Tag = Operation.CalcMillimetersToPixels; + tpLightOffDelay.Tag = Operation.CalcMillimetersToPixels; + + lbMMtoPixelsDescription.Text = Operation.CalcMillimetersToPixels.Description; + lbMMtoPixelsDescription.Text += $"\n\nFormula: {Operation.CalcMillimetersToPixels.Formula}"; + lbMMtoPixelsDescription.MaximumSize = new Size(Width - 20, 0); + + lbLightOffDelayDescription.Text = Operation.CalcLightOffDelay.Description; + lbLightOffDelayDescription.Text += $"\n\nFormula: {Operation.CalcLightOffDelay.Formula}"; + lbLightOffDelayDescription.MaximumSize = new Size(Width - 20, 0); + + + nmMMtoPXResolutionX.Value = Program.SlicerFile.ResolutionX; + nmMMtoPXResolutionY.Value = Program.SlicerFile.ResolutionY; + nmMMtoPXDisplayWidth.Value = (decimal) Program.SlicerFile.DisplayWidth; + nmMMtoPXDisplayHeight.Value = (decimal) Program.SlicerFile.DisplayHeight; + nmMMtoPXInputMillimeters.Value = Operation.CalcMillimetersToPixels.Millimeters; + Operation.CalcMillimetersToPixels.PropertyChanged += (sender, e) => + { + if(e.PropertyName == nameof(Operation.CalcMillimetersToPixels.PixelsX) + || e.PropertyName == nameof(Operation.CalcMillimetersToPixels.PixelsY)) + CalculateMillimetersToPixels(); + }; + + nmLightOffDelayLiftHeight.Value = (decimal) Program.SlicerFile.LiftHeight; + nmLightOffDelayBottomLiftHeight.Value = (decimal) Program.SlicerFile.BottomLiftHeight; + nmLightOffDelayLiftSpeed.Value = (decimal) Program.SlicerFile.LiftSpeed; + nmLightOffDelayBottomLiftSpeed.Value = (decimal) Program.SlicerFile.BottomLiftSpeed; + nmLightOffDelayBottomRetract.Value = nmLightOffDelayRetract.Value = (decimal) Program.SlicerFile.RetractSpeed; + nmLightOffDelayWaitTime.Value = Operation.CalcLightOffDelay.WaitTime; + nmLightOffDelayBottomWaitTime.Value = Operation.CalcLightOffDelay.BottomWaitTime; + + lbLightOffDelayCurrentValue.Text = $"Current value: {Program.SlicerFile.LayerOffTime}"; + lbLightOffDelayCurrentBottomValue.Text = $"Current value: {Program.SlicerFile.BottomLayerOffTime}"; + Operation.CalcLightOffDelay.PropertyChanged += (sender, e) => + { + if (e.PropertyName == nameof(Operation.CalcLightOffDelay.LightOffDelay) + || e.PropertyName == nameof(Operation.CalcLightOffDelay.BottomLightOffDelay)) + CalculateLightOffDelay(); + }; + + CalculateMillimetersToPixels(); + CalculateLightOffDelay(); + + } + + private void CalculateMillimetersToPixels() + { + tbMMtoPXResultPixelsPerMillimeterX.Text = Operation.CalcMillimetersToPixels.PixelsPerMillimeterX.ToString(CultureInfo.InvariantCulture); + tbMMtoPXResultPixelsPerMillimeterY.Text = Operation.CalcMillimetersToPixels.PixelsPerMillimeterY.ToString(CultureInfo.InvariantCulture); + tbMMtoPXResultPixelsX.Text = Operation.CalcMillimetersToPixels.PixelsX.ToString(CultureInfo.InvariantCulture); + tbMMtoPXResultPixelsY.Text = Operation.CalcMillimetersToPixels.PixelsY.ToString(CultureInfo.InvariantCulture); + } + + private void CalculateLightOffDelay() + { + tbLightOffDelay.Text = Operation.CalcLightOffDelay.LightOffDelay.ToString(CultureInfo.InvariantCulture); + tbLightOffDelayBottom.Text = Operation.CalcLightOffDelay.BottomLightOffDelay.ToString(CultureInfo.InvariantCulture); + } + + private void EventValueChanged(object sender, EventArgs e) + { + // Millimeters to pixels + if (ReferenceEquals(sender, nmMMtoPXResolutionX)) + { + Operation.CalcMillimetersToPixels.ResolutionX = (uint) nmMMtoPXResolutionX.Value; + return; + } + if (ReferenceEquals(sender, nmMMtoPXResolutionY)) + { + Operation.CalcMillimetersToPixels.ResolutionY = (uint)nmMMtoPXResolutionY.Value; + return; + } + + if (ReferenceEquals(sender, nmMMtoPXDisplayWidth)) + { + Operation.CalcMillimetersToPixels.DisplayWidth = nmMMtoPXDisplayWidth.Value; + return; + } + + if (ReferenceEquals(sender, nmMMtoPXDisplayHeight)) + { + Operation.CalcMillimetersToPixels.DisplayHeight = nmMMtoPXDisplayHeight.Value; + return; + } + + if (ReferenceEquals(sender, nmMMtoPXInputMillimeters)) + { + Operation.CalcMillimetersToPixels.Millimeters = nmMMtoPXInputMillimeters.Value; + return; + } + + // Light-Off Delay + if (ReferenceEquals(sender, nmLightOffDelayLiftHeight)) + { + Operation.CalcLightOffDelay.LiftHeight = nmLightOffDelayLiftHeight.Value; + return; + } + + if (ReferenceEquals(sender, nmLightOffDelayBottomLiftHeight)) + { + Operation.CalcLightOffDelay.BottomLiftHeight = nmLightOffDelayBottomLiftHeight.Value; + return; + } + + if (ReferenceEquals(sender, nmLightOffDelayLiftSpeed)) + { + Operation.CalcLightOffDelay.LiftSpeed = nmLightOffDelayLiftSpeed.Value; + return; + } + + if (ReferenceEquals(sender, nmLightOffDelayBottomLiftSpeed)) + { + Operation.CalcLightOffDelay.BottomLiftSpeed = nmLightOffDelayBottomLiftSpeed.Value; + return; + } + + if (ReferenceEquals(sender, nmLightOffDelayRetract)) + { + nmLightOffDelayBottomRetract.Value = Operation.CalcLightOffDelay.RetractSpeed = nmLightOffDelayRetract.Value; + return; + } + + if (ReferenceEquals(sender, nmLightOffDelayBottomRetract)) + { + Operation.CalcLightOffDelay.BottomRetractSpeed = nmLightOffDelayBottomRetract.Value; + return; + } + + if (ReferenceEquals(sender, nmLightOffDelayWaitTime)) + { + Operation.CalcLightOffDelay.WaitTime = nmLightOffDelayWaitTime.Value; + return; + } + + if (ReferenceEquals(sender, nmLightOffDelayBottomWaitTime)) + { + Operation.CalcLightOffDelay.BottomWaitTime = nmLightOffDelayBottomWaitTime.Value; + return; + } + } + + private void EventClick(object sender, EventArgs e) + { + if (ReferenceEquals(sender, btnLightOffDelaySetParameter)) + { + Program.SlicerFile.LiftHeight = (float) Operation.CalcLightOffDelay.LiftHeight; + Program.SlicerFile.LiftSpeed = (float) Operation.CalcLightOffDelay.LiftSpeed; + Program.SlicerFile.RetractSpeed = (float) Operation.CalcLightOffDelay.RetractSpeed; + Program.SlicerFile.LayerOffTime = (float) Operation.CalcLightOffDelay.LightOffDelay; + Program.FrmMain.CanSave = true; + lbLightOffDelayCurrentValue.Text = $"Current value: {Program.SlicerFile.LayerOffTime}"; + return; + } + + if (ReferenceEquals(sender, btnLightOffDelaySetBottomParameter)) + { + Program.SlicerFile.BottomLiftHeight = (float)Operation.CalcLightOffDelay.BottomLiftHeight; + Program.SlicerFile.BottomLiftSpeed = (float)Operation.CalcLightOffDelay.BottomLiftSpeed; + Program.SlicerFile.BottomLayerOffTime = (float)Operation.CalcLightOffDelay.BottomLightOffDelay; + Program.FrmMain.CanSave = true; + lbLightOffDelayCurrentBottomValue.Text = $"Current value: {Program.SlicerFile.BottomLayerOffTime}"; + return; + } + } + } +} diff --git a/UVtools.GUI/Controls/Tools/CtrlToolCalculator.resx b/UVtools.GUI/Controls/Tools/CtrlToolCalculator.resx new file mode 100644 index 0000000..8766f29 --- /dev/null +++ b/UVtools.GUI/Controls/Tools/CtrlToolCalculator.resx @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> +</root>
\ No newline at end of file diff --git a/UVtools.GUI/Forms/FrmSettings.Designer.cs b/UVtools.GUI/Forms/FrmSettings.Designer.cs index 21e6fb1..b07e988 100644 --- a/UVtools.GUI/Forms/FrmSettings.Designer.cs +++ b/UVtools.GUI/Forms/FrmSettings.Designer.cs @@ -187,6 +187,7 @@ this.cbLayerRepairLayersIslands = new System.Windows.Forms.CheckBox(); this.pnActions = new System.Windows.Forms.Panel(); this.toolTip = new System.Windows.Forms.ToolTip(this.components); + this.cbLoadDemoFileOnStartup = new System.Windows.Forms.CheckBox(); this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nmResinTrapBinaryThreshold)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nmResinTrapMaximumPixelBrightnessToDrain)).BeginInit(); @@ -782,7 +783,7 @@ this.groupBox5.Controls.Add(this.label27); this.groupBox5.Controls.Add(this.tbFileSaveNamePreffix); this.groupBox5.Dock = System.Windows.Forms.DockStyle.Top; - this.groupBox5.Location = new System.Drawing.Point(3, 93); + this.groupBox5.Location = new System.Drawing.Point(3, 123); this.groupBox5.Name = "groupBox5"; this.groupBox5.Size = new System.Drawing.Size(655, 276); this.groupBox5.TabIndex = 54; @@ -1020,12 +1021,13 @@ // // groupBox4 // + this.groupBox4.Controls.Add(this.cbLoadDemoFileOnStartup); this.groupBox4.Controls.Add(this.cbStartMaximized); this.groupBox4.Controls.Add(this.cbCheckForUpdatesOnStartup); this.groupBox4.Dock = System.Windows.Forms.DockStyle.Top; this.groupBox4.Location = new System.Drawing.Point(3, 3); this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(655, 90); + this.groupBox4.Size = new System.Drawing.Size(655, 120); this.groupBox4.TabIndex = 15; this.groupBox4.TabStop = false; this.groupBox4.Text = "Startup"; @@ -2332,6 +2334,16 @@ this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; this.toolTip.ToolTipTitle = "Information"; // + // cbLoadDemoFileOnStartup + // + this.cbLoadDemoFileOnStartup.AutoSize = true; + this.cbLoadDemoFileOnStartup.Location = new System.Drawing.Point(6, 79); + this.cbLoadDemoFileOnStartup.Name = "cbLoadDemoFileOnStartup"; + this.cbLoadDemoFileOnStartup.Size = new System.Drawing.Size(361, 22); + this.cbLoadDemoFileOnStartup.TabIndex = 8; + this.cbLoadDemoFileOnStartup.Text = "Loads a demo file on startup if no file was specified"; + this.cbLoadDemoFileOnStartup.UseVisualStyleBackColor = true; + // // FrmSettings // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F); @@ -2561,5 +2573,6 @@ private System.Windows.Forms.CheckBox cbOverhangIndependentFromIslands; private System.Windows.Forms.NumericUpDown nmOverhangErodeIterations; private System.Windows.Forms.Label label48; + private System.Windows.Forms.CheckBox cbLoadDemoFileOnStartup; } } diff --git a/UVtools.GUI/Forms/FrmSettings.cs b/UVtools.GUI/Forms/FrmSettings.cs index dba9b4d..248996f 100644 --- a/UVtools.GUI/Forms/FrmSettings.cs +++ b/UVtools.GUI/Forms/FrmSettings.cs @@ -38,8 +38,9 @@ namespace UVtools.GUI.Forms try { // General - cbCheckForUpdatesOnStartup.Checked = Settings.Default.CheckForUpdatesOnStartup; cbStartMaximized.Checked = Settings.Default.StartMaximized; + cbCheckForUpdatesOnStartup.Checked = Settings.Default.CheckForUpdatesOnStartup; + cbLoadDemoFileOnStartup.Checked = Settings.Default.LoadDemoFileOnStartup; cbDefaultOpenFileExtension.SelectedIndex = Settings.Default.DefaultOpenFileExtension; tbFileOpenDefaultDirectory.Text = Settings.Default.FileOpenDefaultDirectory; tbFileSaveDefaultDirectory.Text = Settings.Default.FileSaveDefaultDirectory; @@ -235,8 +236,9 @@ namespace UVtools.GUI.Forms if (ReferenceEquals(sender, btnSave)) { // General - Settings.Default.CheckForUpdatesOnStartup = cbCheckForUpdatesOnStartup.Checked; Settings.Default.StartMaximized = cbStartMaximized.Checked; + Settings.Default.CheckForUpdatesOnStartup = cbCheckForUpdatesOnStartup.Checked; + Settings.Default.LoadDemoFileOnStartup = cbLoadDemoFileOnStartup.Checked; Settings.Default.DefaultOpenFileExtension = (byte) cbDefaultOpenFileExtension.SelectedIndex; Settings.Default.FileOpenDefaultDirectory = tbFileOpenDefaultDirectory.Text; Settings.Default.FileSaveDefaultDirectory = tbFileSaveDefaultDirectory.Text; diff --git a/UVtools.GUI/Forms/FrmToolWindow.cs b/UVtools.GUI/Forms/FrmToolWindow.cs index 823c375..8cc5617 100644 --- a/UVtools.GUI/Forms/FrmToolWindow.cs +++ b/UVtools.GUI/Forms/FrmToolWindow.cs @@ -184,6 +184,11 @@ namespace UVtools.GUI.Forms btnOk.Enabled = content.ButtonOkEnabled; //content.AutoSize = true; + if (string.IsNullOrEmpty(content.ButtonOkText)) + { + btnOk.Visible = false; + } + if (!content.CanROI) { pnROI.Visible = false; diff --git a/UVtools.GUI/FrmMain.cs b/UVtools.GUI/FrmMain.cs index e6240de..dba1c02 100644 --- a/UVtools.GUI/FrmMain.cs +++ b/UVtools.GUI/FrmMain.cs @@ -63,6 +63,7 @@ namespace UVtools.GUI new OperationMenuItem(new OperationPattern(), Resources.pattern_16x16), new OperationMenuItem(new OperationLayerReHeight(), Resources.ladder_16x16), new OperationMenuItem(new OperationChangeResolution(), Resources.resize_16x16), + new OperationMenuItem(new OperationCalculator(), Resources.calculator_16x16), }; public static readonly OperationMenuItem[] LayerActions = { @@ -135,6 +136,12 @@ namespace UVtools.GUI // Track last open tab for when PixelEditor tab is removed. public TabPage ControlLeftLastTab { get; set; } + public bool CanSave + { + get => menuFileSave.Enabled; + set => menuFileSave.Enabled = value; + } + public uint SavesCount { get; set; } private bool SupressLayerZoomEvent { get; set; } @@ -329,6 +336,11 @@ namespace UVtools.GUI base.OnShown(e); AddLog("UVtools Start"); ProcessFile(Program.Args); + + if (SlicerFile is null && Settings.Default.LoadDemoFileOnStartup) + { + ProcessFile(About.DemoFile); + } } protected override void OnKeyPress(KeyPressEventArgs e) @@ -824,7 +836,7 @@ namespace UVtools.GUI SlicerFile.SetThumbnail(i, fileOpen.FileName); pbThumbnail.Image = SlicerFile.Thumbnails[i].ToBitmap(); SlicerFile.RequireFullEncode = true; - menuFileSave.Enabled = true; + CanSave = true; } } @@ -1169,7 +1181,7 @@ namespace UVtools.GUI //ShowLayer(); // It will call latter so its a extra call UpdateIssuesInfo(); - menuFileSave.Enabled = true; + CanSave = true; return; } @@ -1872,6 +1884,7 @@ namespace UVtools.GUI void ProcessFile(string fileName, uint actualLayer = 0) { + if (!File.Exists(fileName)) return; Clear(); var fileNameOnly = Path.GetFileName(fileName); @@ -2106,7 +2119,7 @@ namespace UVtools.GUI if (task.Result) { SavesCount++; - menuFileSave.Enabled = false; + CanSave = false; UpdateTitle(); } @@ -3547,7 +3560,7 @@ namespace UVtools.GUI pbLayer.Invalidate(); //pbLayer.Update(); //pbLayer.Refresh(); - //menuFileSave.Enabled = menuFileSaveAs.Enabled = true; + //CanSavemenuFileSaveAs.Enabled = true; //sw.Stop(); //Debug.WriteLine(sw.ElapsedMilliseconds); } @@ -4011,7 +4024,7 @@ namespace UVtools.GUI RefreshPixelHistory(); ShowLayer(); - menuFileSave.Enabled = true; + CanSave = true; } private void UpdateIslandsOverhangs(List<uint> whiteListLayers) @@ -4209,7 +4222,7 @@ namespace UVtools.GUI SlicerFile.SetValuesFromPrintParametersModifiers(); RefreshInfo(); - menuFileSave.Enabled = true; + CanSave = true; return false; case OperationRepairLayers operation: @@ -4349,7 +4362,7 @@ namespace UVtools.GUI UpdateLayerLimits(); RefreshInfo(); - menuFileSave.Enabled = true; + CanSave = true; switch (baseOperation) { diff --git a/UVtools.GUI/FrmMain.resx b/UVtools.GUI/FrmMain.resx index 9e23cb7..61870d1 100644 --- a/UVtools.GUI/FrmMain.resx +++ b/UVtools.GUI/FrmMain.resx @@ -174,7 +174,7 @@ AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0 ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABk - FAAAAk1TRnQBSQFMAgEBBgEAASgBDAEoAQwBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA + FAAAAk1TRnQBSQFMAgEBBgEAATABDAEwAQwBEAEAARABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAFA AwABIAMAAQEBAAEgBgABIC4AAxgBIgMwAUsDMAFMAzIBUDMAAQEDJAE2AysBQqwAAyIBMQNWAbkDXQHi AwAB/wMAAf8BKgEtASgB/gNTAawDTQGVAwABARgAAwkBDAMzAVIDUAGdA1cB6AMAAf4DKwH8Ay8BSqQA AyEBMANZAewBKwEuASkB+gNRAfcDUgH0A1MB8QNIAfYDQQH5AwAB/wNPAZsDAAEBCAADFQEdAz8BbgNV diff --git a/UVtools.GUI/Images/calculator-16x16.png b/UVtools.GUI/Images/calculator-16x16.png Binary files differnew file mode 100644 index 0000000..b944f66 --- /dev/null +++ b/UVtools.GUI/Images/calculator-16x16.png diff --git a/UVtools.GUI/Properties/AssemblyInfo.cs b/UVtools.GUI/Properties/AssemblyInfo.cs index 9708a4b..291967b 100644 --- a/UVtools.GUI/Properties/AssemblyInfo.cs +++ b/UVtools.GUI/Properties/AssemblyInfo.cs @@ -35,5 +35,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.8.4.4")] -[assembly: AssemblyFileVersion("0.8.4.4")] +[assembly: AssemblyVersion("0.8.5.0")] +[assembly: AssemblyFileVersion("0.8.5.0")] diff --git a/UVtools.GUI/Properties/Resources.Designer.cs b/UVtools.GUI/Properties/Resources.Designer.cs index bd91085..1ba37fb 100644 --- a/UVtools.GUI/Properties/Resources.Designer.cs +++ b/UVtools.GUI/Properties/Resources.Designer.cs @@ -173,6 +173,16 @@ namespace UVtools.GUI.Properties { /// <summary> /// Looks up a localized resource of type System.Drawing.Bitmap. /// </summary> + internal static System.Drawing.Bitmap calculator_16x16 { + get { + object obj = ResourceManager.GetObject("calculator-16x16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// <summary> + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// </summary> internal static System.Drawing.Bitmap Cancel_24x24 { get { object obj = ResourceManager.GetObject("Cancel-24x24", resourceCulture); diff --git a/UVtools.GUI/Properties/Resources.resx b/UVtools.GUI/Properties/Resources.resx index 82e40fa..9213fdb 100644 --- a/UVtools.GUI/Properties/Resources.resx +++ b/UVtools.GUI/Properties/Resources.resx @@ -133,21 +133,12 @@ <data name="island-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\island-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="ladder-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\ladder-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> - <data name="filter-filled-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\filter-filled-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="layers-alt-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\layers-alt-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="mask-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\mask-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="move-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\move-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -208,12 +199,18 @@ <data name="mutation_dilation" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\gui\mutation_dilation.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="square-root-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\square-root-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="File-Refresh-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\File-Refresh-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="SaveAs-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\SaveAs-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="pixel-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\pixel-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="mutation_tophat" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\gui\mutation_tophat.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -253,6 +250,9 @@ <data name="checkbox-marked-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\checkbox-marked-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="burn-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\burn-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="minus_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\minus_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -265,12 +265,12 @@ <data name="trash-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\trash-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="accept-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\accept-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> - </data> <data name="file-image-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\file-image-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="Geometry-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\Geometry-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="refresh-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\refresh-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> @@ -292,11 +292,17 @@ <data name="bowling-ball-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\bowling-ball-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> + <data name="file-import-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\file-import-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> <data name="square-solid-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\square-solid-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="burn-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\burn-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="chessboard-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\chessboard-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> + <data name="filter-filled-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\filter-filled-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="arrow-down-double-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\arrow-down-double-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -307,14 +313,11 @@ <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="plus-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\plus-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="file-import-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\file-import-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="plus-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\plus-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="pixel_edit" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Resources\pixel_edit.cur;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> @@ -346,8 +349,8 @@ <data name="expand-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\expand-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="Geometry-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\Geometry-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="accept-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\accept-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> <data name="copy_16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\copy_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -367,11 +370,11 @@ <data name="eye-24x24" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\eye-24x24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="pixel-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\pixel-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="ladder-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\ladder-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="chessboard-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\chessboard-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <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="object-group-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\object-group-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> @@ -379,7 +382,7 @@ <data name="expand-alt-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> <value>..\Images\expand-alt-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> </data> - <data name="square-root-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> - <value>..\Images\square-root-16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + <data name="calculator-16x16" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Images\calculator-16x16.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/UVtools.GUI/Properties/Settings.Designer.cs b/UVtools.GUI/Properties/Settings.Designer.cs index 1f91fc8..1bf8ad9 100644 --- a/UVtools.GUI/Properties/Settings.Designer.cs +++ b/UVtools.GUI/Properties/Settings.Designer.cs @@ -982,5 +982,17 @@ namespace UVtools.GUI.Properties { this["LayerRepairRemoveIslandsRecursiveIterations"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool LoadDemoFileOnStartup { + get { + return ((bool)(this["LoadDemoFileOnStartup"])); + } + set { + this["LoadDemoFileOnStartup"] = value; + } + } } } diff --git a/UVtools.GUI/Properties/Settings.settings b/UVtools.GUI/Properties/Settings.settings index e25f334..a82670c 100644 --- a/UVtools.GUI/Properties/Settings.settings +++ b/UVtools.GUI/Properties/Settings.settings @@ -242,5 +242,8 @@ <Setting Name="LayerRepairRemoveIslandsRecursiveIterations" Type="System.Int16" Scope="User"> <Value Profile="(Default)">4</Value> </Setting> + <Setting Name="LoadDemoFileOnStartup" Type="System.Boolean" Scope="User"> + <Value Profile="(Default)">True</Value> + </Setting> </Settings> </SettingsFile>
\ No newline at end of file diff --git a/UVtools.GUI/UVtools.GUI.csproj b/UVtools.GUI/UVtools.GUI.csproj index e7a52b8..b098433 100644 --- a/UVtools.GUI/UVtools.GUI.csproj +++ b/UVtools.GUI/UVtools.GUI.csproj @@ -192,6 +192,12 @@ <Compile Include="Controls\Tools\CtrlToolEditEditParameters.Designer.cs"> <DependentUpon>CtrlToolEditEditParameters.cs</DependentUpon> </Compile> + <Compile Include="Controls\Tools\CtrlToolCalculator.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="Controls\Tools\CtrlToolCalculator.Designer.cs"> + <DependentUpon>CtrlToolCalculator.cs</DependentUpon> + </Compile> <Compile Include="Controls\Tools\CtrlToolRepairLayers.cs"> <SubType>UserControl</SubType> </Compile> @@ -368,6 +374,9 @@ <EmbeddedResource Include="Controls\Tools\CtrlToolEditEditParameters.resx"> <DependentUpon>CtrlToolEditEditParameters.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="Controls\Tools\CtrlToolCalculator.resx"> + <DependentUpon>CtrlToolCalculator.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="Controls\Tools\CtrlToolRepairLayers.resx"> <DependentUpon>CtrlToolRepairLayers.cs</DependentUpon> </EmbeddedResource> @@ -463,6 +472,10 @@ <None Include="..\README.md"> <Link>README.md</Link> </None> + <None Include="..\UVtools.CAD\UVtools_demo_file.sl1"> + <Link>UVtools_demo_file.sl1</Link> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </None> <None Include="packages.config" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> @@ -522,6 +535,7 @@ <None Include="Images\sync-16x16.png" /> <None Include="Images\object-group-16x16.png" /> <None Include="Images\square-root-16x16.png" /> + <None Include="Images\calculator-16x16.png" /> <Content Include="Resources\pixel_edit.cur" /> <Content Include="UVtools.ico" /> <None Include="UVtools.png" /> diff --git a/UVtools.InstallerMM/UVtools.InstallerMM.wxs b/UVtools.InstallerMM/UVtools.InstallerMM.wxs index feb0c5d..80e8abf 100644 --- a/UVtools.InstallerMM/UVtools.InstallerMM.wxs +++ b/UVtools.InstallerMM/UVtools.InstallerMM.wxs @@ -104,6 +104,9 @@ <Component Id="owc0C1077539E2B54F2460D2C0993613EFB" Guid="fc6ae2db-2865-9eb4-5753-4f2f941fdf16"> <File Id="owf0C1077539E2B54F2460D2C0993613EFB" Source="$(var.SourceDir)\UVtools.pdb" KeyPath="yes" /> </Component> + <Component Id="owc1FE1E0B70F7D880A2FB9AFA8E0E36EF5" Guid="545300b7-5398-2ce2-788f-02287a83e8a7"> + <File Id="owf1FE1E0B70F7D880A2FB9AFA8E0E36EF5" Source="$(var.SourceDir)\UVtools_demo_file.sl1" KeyPath="yes" /> + </Component> <Component Id="owcE56A1A43062CD54830A538D93042A2F9" Guid="97edfcac-9e9e-3019-6b8f-d6377d7dc1a1"> <File Id="owfE56A1A43062CD54830A538D93042A2F9" Source="$(var.SourceDir)\UVtoolsCmd.deps.json" KeyPath="yes" /> </Component> diff --git a/UVtools.WPF/Assets/Icons/calculator-16x16.png b/UVtools.WPF/Assets/Icons/calculator-16x16.png Binary files differnew file mode 100644 index 0000000..b944f66 --- /dev/null +++ b/UVtools.WPF/Assets/Icons/calculator-16x16.png |