Skip to content

Commit cabc655

Browse files
committed
add models 2️⃣
1 parent 02eaa8c commit cabc655

File tree

3 files changed

+46
-1
lines changed

3 files changed

+46
-1
lines changed

GraphPlot/GraphPlot/GraphPlot.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@
9090
<Compile Include="Global.asax.cs">
9191
<DependentUpon>Global.asax</DependentUpon>
9292
</Compile>
93+
<Compile Include="Models\GraphsCreators.cs" />
94+
<Compile Include="Models\Point.cs" />
9395
<Compile Include="Properties\AssemblyInfo.cs" />
9496
</ItemGroup>
9597
<ItemGroup>
@@ -103,7 +105,6 @@
103105
</ItemGroup>
104106
<ItemGroup>
105107
<Folder Include="App_Data\" />
106-
<Folder Include="Models\" />
107108
</ItemGroup>
108109
<PropertyGroup>
109110
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
6+
namespace GraphPlot.Models
7+
{
8+
public class GraphsCreator
9+
{
10+
private List<Point> xyList;
11+
12+
13+
public List<Point> GetXY()
14+
{
15+
xyList = new List<Point>();
16+
17+
for (int i = 0; i < 70; i++)
18+
{
19+
var x = i / 5.0;
20+
var y = Math.Sin(x);
21+
xyList.Add(new Point() { X = x, Y = y });
22+
}
23+
24+
25+
return xyList;
26+
}
27+
28+
29+
30+
}

GraphPlot/GraphPlot/Models/Point.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Web;
5+
6+
namespace GraphPlot.Models
7+
{
8+
public class Point
9+
{
10+
public double X { get; set; }
11+
public double Y { get; set; }
12+
13+
}
14+
}

0 commit comments

Comments
 (0)