Files
UVtools/UVtools.WPF/MainWindow.Log.cs
T
Tiago Conceição 6d6be66ced v2.9.2
- (Upgrade) AvaloniaUI from 0.10 to 0.10.2
- (Remove) Unused assemblies
- **Issues**
  - Improve the performance when loading big lists of issues into the DataGrid
  - Auto refresh issues on the vertical highlight tracker once cath a modification on the Issues list
- **Layer preview - Difference:**
   - Layer difference will now only check the pixels inside the union of previous, current and next layer bounding rectangle, increasing the performance and speed
   - Previous and next layer pixels if both exists was not showing with the configured color and using the next layer color instead
   - Respect Anti-Aliasing pixels and fade colors accordingly
   - Unlock the possiblity of using the layer difference on first and last layer
   - Add a option to show similar pixels instead of the difference
   - Change previous default color from (255, 0, 255) to (81, 131, 82) for better depth preception
   - Change next default color from (0, 255, 255) to (81, 249, 252) for better depth preception
   - Change previous & next default color from (255, 0, 0) to (246, 240, 216) for better depth preception
- **(Fix) Pixel editor:**
   - Modification was append instead of prepend on the list
   - Modification was not updating the index number on the list
- (Fix) PrusaSlicer printer: Bene4 Mono screen, bed and height size
2021-04-30 18:20:58 +01:00

44 lines
1.2 KiB
C#

/*
* 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.Collections.ObjectModel;
using System.Diagnostics;
using UVtools.WPF.Structures;
namespace UVtools.WPF
{
public partial class MainWindow
{
public RangeObservableCollection<LogItem> Logs { get; } = new();
private bool _isVerbose;
public bool IsVerbose
{
get => _isVerbose;
set => RaiseAndSetIfChanged(ref _isVerbose, value);
}
public void AddLog(LogItem log)
{
log.Index = Logs.Count;
Logs.Insert(0, log);
}
public void AddLog(string description, double elapsedTime = 0) =>
AddLog(new LogItem(Logs.Count, description, elapsedTime));
public void AddLogVerbose(string description, double elapsedTime = 0)
{
Debug.WriteLine($"{description} ({elapsedTime}s)");
if (!_isVerbose) return;
AddLog(description, elapsedTime);
}
}
}