Add GraphViewModel functions realization
This commit is contained in:
@@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Documents;
|
||||
|
||||
namespace StructureHelperCommon.Models.Functions
|
||||
{
|
||||
@@ -14,28 +15,29 @@ namespace StructureHelperCommon.Models.Functions
|
||||
public FunctionType Type { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get ; set; }
|
||||
public string Formula { get; set; }
|
||||
|
||||
public Guid Id => throw new NotImplementedException();
|
||||
|
||||
public bool Check()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public double GetByX(double xValue)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class CopyOfFormulaFunction : IOneVariableFunction
|
||||
{
|
||||
public bool IsUser { get; set; }
|
||||
public FunctionType Type { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public bool Check()
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var formulaFunction = new FormulaFunction();
|
||||
|
||||
//Здесь будет стратегия
|
||||
formulaFunction.Type = Type;
|
||||
formulaFunction.Name = Name;
|
||||
formulaFunction.Description = Description;
|
||||
formulaFunction.Formula = Formula;
|
||||
formulaFunction.IsUser = true;
|
||||
|
||||
return formulaFunction;
|
||||
}
|
||||
|
||||
public double GetByX(double xValue)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
14
StructureHelperCommon/Models/Functions/GraphPoint.cs
Normal file
14
StructureHelperCommon/Models/Functions/GraphPoint.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace StructureHelperCommon.Models.Functions
|
||||
{
|
||||
public class GraphPoint
|
||||
{
|
||||
public double X { get; set; }
|
||||
public double Y { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
using StructureHelperCommon.Infrastructures.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
@@ -14,28 +15,29 @@ namespace StructureHelperCommon.Models.Functions
|
||||
public FunctionType Type { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public List<GraphPoint> Table { get; set; }
|
||||
|
||||
public Guid Id => throw new NotImplementedException();
|
||||
|
||||
public bool Check()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public double GetByX(double xValue)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public class CopyOfTableFunction : IOneVariableFunction
|
||||
{
|
||||
public bool IsUser { get; set; }
|
||||
public FunctionType Type { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
||||
public bool Check()
|
||||
public object Clone()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
var tableFunction = new TableFunction();
|
||||
|
||||
//Здесь будет стратегия
|
||||
tableFunction.Type = Type;
|
||||
tableFunction.Name = Name;
|
||||
tableFunction.Description = Description;
|
||||
tableFunction.Table = Table;
|
||||
tableFunction.IsUser = true;
|
||||
|
||||
return tableFunction;
|
||||
}
|
||||
|
||||
public double GetByX(double xValue)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
Reference in New Issue
Block a user