Skip to content

Commit 383ae21

Browse files
committed
Aggiungere i file di progetto.
1 parent c28858b commit 383ae21

25 files changed

Lines changed: 1412 additions & 0 deletions

XamlPathDataParser.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26730.12
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XamlPathDataParser", "XamlPathDataParser\XamlPathDataParser.csproj", "{9AC73EE0-F990-4DE8-9554-30208167F41E}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{9AC73EE0-F990-4DE8-9554-30208167F41E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{9AC73EE0-F990-4DE8-9554-30208167F41E}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{9AC73EE0-F990-4DE8-9554-30208167F41E}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{9AC73EE0-F990-4DE8-9554-30208167F41E}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {0FA5CF32-3F48-48C0-AA6F-376A944F4888}
24+
EndGlobalSection
25+
EndGlobal

XamlPathDataParser/App.config

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
5+
</startup>
6+
</configuration>

XamlPathDataParser/App.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Application x:Class="XamlPathDataParser.App"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="clr-namespace:XamlPathDataParser"
5+
StartupUri="MainWindow.xaml">
6+
<Application.Resources>
7+
8+
</Application.Resources>
9+
</Application>

XamlPathDataParser/App.xaml.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Configuration;
4+
using System.Data;
5+
using System.Linq;
6+
using System.Threading.Tasks;
7+
using System.Windows;
8+
9+
namespace XamlPathDataParser
10+
{
11+
/// <summary>
12+
/// Logica di interazione per App.xaml
13+
/// </summary>
14+
public partial class App : Application
15+
{
16+
}
17+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Collections.ObjectModel;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
using XamlPathDataParser.DataContext.PathDataItems;
8+
9+
namespace XamlPathDataParser.DataContext
10+
{
11+
public class PathDataDataContext
12+
{
13+
public ObservableCollection<IPathDataItem> PathDataItems { get; set; }
14+
15+
}
16+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace XamlPathDataParser.DataContext.PathDataItems
8+
{
9+
public interface IPathDataItem
10+
{
11+
}
12+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace XamlPathDataParser.DataContext.PathDataItems
8+
{
9+
public class PathDataItemClose :IPathDataItem
10+
{
11+
}
12+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
8+
namespace XamlPathDataParser.DataContext.PathDataItems
9+
{
10+
public class PathDataItemCubicBezierCurve : IPathDataItem
11+
{
12+
13+
public Point ControlPoint1 { get; set; }
14+
public Point ControlPoint2 { get; set; }
15+
public Point EndPoint { get; set; }
16+
17+
public PathDataItemCubicBezierCurve()
18+
{ }
19+
20+
public PathDataItemCubicBezierCurve(string Data)
21+
{
22+
int index = 1;
23+
24+
ControlPoint1 = Parser.PathDataParser.ReadPoint(Data, index, out index).Value;
25+
26+
ControlPoint2 = Parser.PathDataParser.ReadPoint(Data, index, out index).Value;
27+
28+
EndPoint = Parser.PathDataParser.ReadPoint(Data, index, out index).Value;
29+
30+
}
31+
32+
}
33+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
8+
namespace XamlPathDataParser.DataContext.PathDataItems
9+
{
10+
public class PathDataItemEllipticalArc : IPathDataItem
11+
{
12+
13+
public Size size { get; set; }
14+
15+
/// <summary>
16+
/// The rotation of the ellipse, in degrees.
17+
/// </summary>
18+
public double rotationAngle { get; set; }
19+
20+
/// <summary>
21+
/// Set to 1 if the angle of the arc should be 180 degrees or greater; otherwise, set to 0.
22+
/// </summary>
23+
public bool isLargeArc { get; set; }
24+
25+
/// <summary>
26+
/// Set to 1 if the arc is drawn in a positive-angle direction; otherwise, set to 0.
27+
/// </summary>
28+
public int sweepDirection { get; set; }
29+
30+
/// <summary>
31+
/// The point to which the arc is drawn.
32+
/// </summary>
33+
public Point EndPoint { get; set; }
34+
35+
36+
public PathDataItemEllipticalArc()
37+
{ }
38+
39+
public PathDataItemEllipticalArc(string Data)
40+
{
41+
42+
int index = 1;
43+
44+
size = Parser.PathDataParser.ReadSize(Data, index, out index).Value;
45+
46+
rotationAngle = Parser.PathDataParser.ReadDouble(Data, index, out index).Value;
47+
48+
isLargeArc = Parser.PathDataParser.ReadInt(Data, index, out index) == 1;
49+
50+
sweepDirection = Parser.PathDataParser.ReadInt(Data, index, out index).Value;
51+
52+
EndPoint = Parser.PathDataParser.ReadPoint(Data, index, out index).Value;
53+
54+
}
55+
56+
}
57+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Windows;
7+
8+
namespace XamlPathDataParser.DataContext.PathDataItems
9+
{
10+
public class PathDataItemHorizontalLine : IPathDataItem
11+
{
12+
13+
public double X { get; set; }
14+
15+
public PathDataItemHorizontalLine()
16+
{ }
17+
18+
public PathDataItemHorizontalLine(string Data)
19+
{
20+
21+
int index = 1;
22+
Point? p = null;
23+
24+
X = Parser.PathDataParser.ReadDouble(Data, index, out index).Value;
25+
26+
}
27+
28+
}
29+
}

0 commit comments

Comments
 (0)