momenteel geen errors, begonnen nieuwe items toe te voegen op ui

This commit is contained in:
BuildTools
2020-07-26 20:28:32 +02:00
parent 2cea96e863
commit b2ad2d4611
22 changed files with 312 additions and 34 deletions

View File

@@ -7,7 +7,7 @@
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">
<Grid>
<Canvas x:Name="someCanvas" RenderTransformOrigin="0.5,0.5" Margin="315,128,249,128">
<Canvas x:Name="someCanvas" RenderTransformOrigin="0.5,0.5" Margin="436,114,128,113">
<Canvas.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleY="2" ScaleX="2"/>
@@ -17,6 +17,10 @@
</TransformGroup>
</Canvas.RenderTransform>
</Canvas>
<ListBox Margin="10,94,568,93"/>
<Button x:Name="LoadFile" Content="LoadFile" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="27" Width="65"/>
<Slider HorizontalAlignment="Left" Margin="10,406,0,0" VerticalAlignment="Top" Width="120" Maximum="100" SmallChange="1"/>
<Label Content="Epsilon (0.001 - 0.1%)" HorizontalAlignment="Left" Margin="8,375,0,0" VerticalAlignment="Top"/>
</Grid>
</Window>

View File

@@ -5,6 +5,7 @@ using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -18,6 +19,10 @@ using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Globals;
using Brush = System.Windows.Media.Brush;
using Brushes = System.Windows.Media.Brushes;
using Point = System.Windows.Point;
namespace opdracht2
{
@@ -32,6 +37,9 @@ namespace opdracht2
List<Polygon> buffer;
public MainWindow()
{
//todo logica toevoegen als object
//todo datalaag toevoegen als object en passen naar logica
f = new List<Polygon>();
el = new List<Ellipse>();
buffer = new List<Polygon>();
@@ -84,6 +92,28 @@ namespace opdracht2
}
}
private Polygon makePolygon(PolygonPunten polygonPunten)
{
PointCollection punten = new PointCollection();
foreach (Punt p in polygonPunten.Punten)
{
punten.Add(p.ToPoint());
}
Polygon polygon = new Polygon();
polygon.Points = punten;
polygon.StrokeThickness = 1;
// deze code zorgt ervoor dat de driehoeken duidelijker zijn op de afbeelding door de kleur willekeurig te selecteren
Random random = new Random();
Type brushType = typeof(Brushes);
PropertyInfo[] properties = brushType.GetProperties();
int randomIndex = random.Next(properties.Length);
Brush willekeurigeBrush = (Brush) properties[randomIndex].GetValue(null, null);
polygon.Fill = willekeurigeBrush;
polygon.Stroke = willekeurigeBrush;
return polygon;
}
//zoom https://stackoverflow.com/a/44593026
private void Button_Click(object sender, RoutedEventArgs e)

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "70D66715C0FFCAB3A710CE2C4D05885847B9E526"
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "68E7240A4F498547AC7EFB2C2D5F594143259E09"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@@ -49,6 +49,14 @@ namespace opdracht2 {
#line default
#line hidden
#line 21 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button LoadFile;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
@@ -82,6 +90,9 @@ namespace opdracht2 {
case 1:
this.someCanvas = ((System.Windows.Controls.Canvas)(target));
return;
case 2:
this.LoadFile = ((System.Windows.Controls.Button)(target));
return;
}
this._contentLoaded = true;
}

View File

@@ -1,4 +1,4 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "70D66715C0FFCAB3A710CE2C4D05885847B9E526"
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "68E7240A4F498547AC7EFB2C2D5F594143259E09"
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
@@ -49,6 +49,14 @@ namespace opdracht2 {
#line default
#line hidden
#line 21 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.Button LoadFile;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
@@ -82,6 +90,9 @@ namespace opdracht2 {
case 1:
this.someCanvas = ((System.Windows.Controls.Canvas)(target));
return;
case 2:
this.LoadFile = ((System.Windows.Controls.Button)(target));
return;
}
this._contentLoaded = true;
}

View File

@@ -13,7 +13,7 @@ C:\Users\Beppe\source\repos\opdracht2\opdracht2\App.xaml
11151548125
4-1295637703
195549397899
1981362301543
MainWindow.xaml;
True

View File

@@ -4,6 +4,60 @@
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\opdracht2\\opdracht2.csproj": {}
},
"projects": {
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
"projectName": "Datalaag",
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj",
"frameworks": {
"net472": {
"projectReferences": {
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj"
}
}
}
}
},
"frameworks": {
"net472": {}
}
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj",
"projectName": "Globals",
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj"
},
"frameworks": {
"net472": {}
}
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
"projectName": "Logica",
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj",
"frameworks": {
"net472": {
"projectReferences": {
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj"
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj"
}
}
}
}
},
"frameworks": {
"net472": {}
}
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\opdracht2\\opdracht2.csproj": {
"version": "1.0.0",
"restore": {
@@ -26,7 +80,17 @@
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
"projectReferences": {
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj"
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj"
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj"
}
}
}
},
"warningProperties": {

View File

@@ -7,7 +7,7 @@
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\Beppe\.nuget\packages\</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.6.0</NuGetToolVersion>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">5.5.0</NuGetToolVersion>
</PropertyGroup>
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>

View File

@@ -1448,6 +1448,40 @@
"runtime": {
"lib/netstandard1.3/System.Xml.XmlDocument.dll": {}
}
},
"Datalaag/1.0.0": {
"type": "project",
"dependencies": {
"Globals": "1.0.0"
},
"compile": {
"bin/placeholder/Datalaag.dll": {}
},
"runtime": {
"bin/placeholder/Datalaag.dll": {}
}
},
"Globals/1.0.0": {
"type": "project",
"compile": {
"bin/placeholder/Globals.dll": {}
},
"runtime": {
"bin/placeholder/Globals.dll": {}
}
},
"Logica/1.0.0": {
"type": "project",
"dependencies": {
"Datalaag": "1.0.0",
"Globals": "1.0.0"
},
"compile": {
"bin/placeholder/Logica.dll": {}
},
"runtime": {
"bin/placeholder/Logica.dll": {}
}
}
}
},
@@ -5338,11 +5372,29 @@
"system.xml.xmldocument.4.3.0.nupkg.sha512",
"system.xml.xmldocument.nuspec"
]
},
"Datalaag/1.0.0": {
"type": "project",
"path": "../Datalaag/Datalaag.csproj",
"msbuildProject": "../Datalaag/Datalaag.csproj"
},
"Globals/1.0.0": {
"type": "project",
"path": "../Globals/Globals.csproj",
"msbuildProject": "../Globals/Globals.csproj"
},
"Logica/1.0.0": {
"type": "project",
"path": "../Logica/Logica.csproj",
"msbuildProject": "../Logica/Logica.csproj"
}
},
"projectFileDependencyGroups": {
".NETCoreApp,Version=v3.1": [
"Datalaag >= 1.0.0",
"GeoJSON.Net >= 1.2.19",
"Globals >= 1.0.0",
"Logica >= 1.0.0",
"System.Drawing.Common >= 4.7.0"
]
},
@@ -5371,7 +5423,17 @@
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
"projectReferences": {
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj"
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj"
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj"
}
}
}
},
"warningProperties": {

View File

@@ -1,6 +1,6 @@
{
"version": 2,
"dgSpecHash": "004Za2WhRXMEOU9Vs9RvspLpxPR0PMz9MFv2oy1y1VjRaQ7utidJwPCE8do7YCIt6avrMQpX4x9fh1RCVVj3UQ==",
"dgSpecHash": "p426YNxR+un7rXUpsV3S3g0htKyuFPUxB5pYHNl1fsHxje10LlIJDBLjupJb2IZCMEZ+Cv3TXWBEUMbbMYO5hA==",
"success": true,
"projectFilePath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\opdracht2\\opdracht2.csproj",
"expectedPackageFiles": [

View File

@@ -15,7 +15,17 @@
},
"frameworks": {
"netcoreapp3.1": {
"projectReferences": {}
"projectReferences": {
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Datalaag\\Datalaag.csproj"
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Globals\\Globals.csproj"
},
"C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj": {
"projectPath": "C:\\Users\\Beppe\\source\\repos\\opdracht2\\Logica\\Logica.csproj"
}
}
}
},
"warningProperties": {

View File

@@ -11,4 +11,10 @@
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Datalaag\Datalaag.csproj" />
<ProjectReference Include="..\Globals\Globals.csproj" />
<ProjectReference Include="..\Logica\Logica.csproj" />
</ItemGroup>
</Project>