Color picker done
This commit is contained in:
@@ -30,7 +30,14 @@ namespace StructureHelperCommon.Models.Functions.Decorator
|
||||
{
|
||||
return y;
|
||||
}
|
||||
return 0;
|
||||
else if (y <= downBound)
|
||||
{
|
||||
return downBound;
|
||||
}
|
||||
else
|
||||
{
|
||||
return upBound;
|
||||
}
|
||||
}
|
||||
public override GraphSettings GetGraphSettings()
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Documents;
|
||||
using StructureHelperCommon.Services;
|
||||
using LiveCharts.Wpf;
|
||||
using StructureHelperCommon.Services.ColorServices;
|
||||
|
||||
namespace StructureHelperCommon.Models.Functions
|
||||
{
|
||||
@@ -36,6 +37,7 @@ namespace StructureHelperCommon.Models.Functions
|
||||
|
||||
public FormulaFunction(bool isUser = false)
|
||||
{
|
||||
Color = ColorProcessor.GetRandomColor();
|
||||
Type = FunctionType.FormulaFunction;
|
||||
if (isUser)
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using StructureHelperCommon.Services;
|
||||
using StructureHelperCommon.Services.ColorServices;
|
||||
|
||||
namespace StructureHelperCommon.Models.Functions
|
||||
{
|
||||
@@ -36,6 +37,7 @@ namespace StructureHelperCommon.Models.Functions
|
||||
|
||||
public TableFunction(bool isUser = false)
|
||||
{
|
||||
Color = ColorProcessor.GetRandomColor();
|
||||
Type = FunctionType.TableFunction;
|
||||
if (isUser)
|
||||
{
|
||||
@@ -48,7 +50,6 @@ namespace StructureHelperCommon.Models.Functions
|
||||
Group = GROUP_TYPE_1;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Check()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
@@ -40,8 +40,8 @@ namespace StructureHelperCommon.Services
|
||||
_chartValues.Add(Math.Round(point.Y, 2));
|
||||
}
|
||||
_lineSeries.Values = _chartValues;
|
||||
_lineSeries.Stroke = Brushes.Blue; //Заменить на поле Color
|
||||
_lineSeries.Fill = Brushes.Transparent; //Заменить на поле Color
|
||||
_lineSeries.Stroke = new SolidColorBrush(_strokeColor);
|
||||
_lineSeries.Fill = Brushes.Transparent;
|
||||
_seriesCollection.Add(_lineSeries);
|
||||
return _seriesCollection;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user