fixes & version bump
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace Pilz.UI;
|
||||
namespace Pilz.UI;
|
||||
|
||||
public static class Extensions
|
||||
{
|
||||
public static Image? ToIcon(this Image image)
|
||||
public static Icon? ToIcon(this Image image)
|
||||
{
|
||||
if (image is Bitmap bmp)
|
||||
return Icon.FromHandle(bmp.GetHicon());
|
||||
|
||||
@@ -30,7 +30,7 @@ public class PaintingControl : UserControl, IPaintingObjectContainer
|
||||
private new string Text { get; set; }
|
||||
|
||||
public PointF Offset { get; set; } = PointF.Empty;
|
||||
public PaintingObjectList PaintingObjects { get; private set; } = new PaintingObjectList(this);
|
||||
public PaintingObjectList PaintingObjects { get; private set; }
|
||||
public bool VisibleForMouseEvents { get; set; } = true;
|
||||
public bool AutoAreaSelection { get; set; } = true;
|
||||
public bool AutoSingleSelection { get; set; } = true;
|
||||
@@ -147,6 +147,7 @@ public class PaintingControl : UserControl, IPaintingObjectContainer
|
||||
|
||||
public PaintingControl()
|
||||
{
|
||||
PaintingObjects = new(this);
|
||||
PaintingObjectResizing.CheckEnabled += PaintingObjectResizing_CheckEnabled;
|
||||
DoubleBuffered = true;
|
||||
KeyDown += CheckKeyDown;
|
||||
|
||||
@@ -64,8 +64,8 @@ public class PaintingObject : ICloneable, IPaintingObjectContainer
|
||||
[JsonProperty]
|
||||
private bool _AutoAlignToGrid = false;
|
||||
public bool MouseTransparency { get; set; } = false;
|
||||
public PaintingObjectLayering Layering { get; private set; } = new PaintingObjectLayering(this);
|
||||
public PaintingObjectList PaintingObjects { get; private set; } = new PaintingObjectList(_Parent) { EnableRaisingEvents = false };
|
||||
public PaintingObjectLayering Layering { get; private set; }
|
||||
public PaintingObjectList PaintingObjects { get; private set; }
|
||||
[JsonIgnore]
|
||||
public ulong ErrorsAtDrawing { get; private set; } = 0UL;
|
||||
|
||||
@@ -105,9 +105,11 @@ public class PaintingObject : ICloneable, IPaintingObjectContainer
|
||||
|
||||
public PaintingObject()
|
||||
{
|
||||
Layering = new(this);
|
||||
PaintingObjects = new PaintingObjectList(_Parent) { EnableRaisingEvents = false };
|
||||
}
|
||||
|
||||
public PaintingObject(PaintingObjectType @type)
|
||||
public PaintingObject(PaintingObjectType @type) : this()
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
@@ -737,7 +739,7 @@ public class PaintingObjectList : List<PaintingObject>
|
||||
internal PaintingControl MyParent { get; private set; }
|
||||
internal bool EnableRaisingEvents { get; set; } = true;
|
||||
[JsonIgnore]
|
||||
public PaintingObjectListLayering Layering { get; private set; } = new PaintingObjectListLayering(this);
|
||||
public PaintingObjectListLayering Layering { get; private set; }
|
||||
|
||||
public PaintingObjectList() : this(null)
|
||||
{
|
||||
@@ -745,6 +747,7 @@ public class PaintingObjectList : List<PaintingObject>
|
||||
|
||||
public PaintingObjectList(PaintingControl parent)
|
||||
{
|
||||
Layering = new(this);
|
||||
MyParent = parent;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Version>2.0.0</Version>
|
||||
<Version>2.1.0</Version>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
|
||||
Reference in New Issue
Block a user