Refactoring WIP

This commit is contained in:
Nikolai Smirnov
2022-07-08 11:38:25 +05:00
parent fc4f1f1db3
commit 2c4df04c5c
43 changed files with 832 additions and 833 deletions

View File

@@ -0,0 +1,30 @@
using System;
using System.Windows.Media;
using StructureHelper.Infrastructure.Enums;
using StructureHelper.Windows.MainWindow;
namespace StructureHelper.Infrastructure.UI.DataContexts
{
public class Ellipse : PrimitiveBase
{
private double square;
public double Square
{
get => square;
set
{
square = value;
PrimitiveWidth = Math.Round(Math.Sqrt(4 * value / Math.PI), 2);
OnPropertyChanged(nameof(PrimitiveWidth));
OnPropertyChanged();
}
}
public Ellipse(double square, double ellipseX, double ellipseY, MainViewModel mainViewModel) : base(PrimitiveType.Ellipse, ellipseX, ellipseY, mainViewModel)
{
Square = square;
ShowedX = 0;
ShowedY = 0;
}
}
}