Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
6116ed729f |
63
.gitattributes
vendored
@ -1,63 +0,0 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
98
Map.xml
@ -1,98 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<Map>
|
||||
<Size>10</Size>
|
||||
<Objects>
|
||||
<Object>
|
||||
<Type>Road</Type>
|
||||
<Position>
|
||||
<X>5</X>
|
||||
<Y>5</Y>
|
||||
</Position>
|
||||
</Object>
|
||||
<Object>
|
||||
<Type>House</Type>
|
||||
<Position>
|
||||
<X>2</X>
|
||||
<Y>3</Y>
|
||||
</Position>
|
||||
<TrashCans>
|
||||
<TrashCan>
|
||||
<GarbageType>Glass</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
<Volume>10</Volume>
|
||||
</TrashCan>
|
||||
<TrashCan>
|
||||
<GarbageType>PlasticMetal</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
<Volume>10</Volume>
|
||||
</TrashCan>
|
||||
<TrashCan>
|
||||
<GarbageType>Paper</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
<Volume>10</Volume>
|
||||
</TrashCan>
|
||||
<TrashCan>
|
||||
<GarbageType>Organic</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
<Volume>10</Volume>
|
||||
</TrashCan>
|
||||
</TrashCans>
|
||||
</Object>
|
||||
<Object>
|
||||
<Type>Dump</Type>
|
||||
<Position>
|
||||
<X>7</X>
|
||||
<Y>7</Y>
|
||||
</Position>
|
||||
<Garbage>
|
||||
<GarbageType>Glass</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
</Garbage>
|
||||
<Volume>500</Volume>
|
||||
</Object>
|
||||
<Object>
|
||||
<Type>Dump</Type>
|
||||
<Position>
|
||||
<X>8</X>
|
||||
<Y>8</Y>
|
||||
</Position>
|
||||
<Garbage>
|
||||
<GarbageType>Paper</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
</Garbage>
|
||||
<Volume>500</Volume>
|
||||
</Object>
|
||||
<Object>
|
||||
<Type>Dump</Type>
|
||||
<Position>
|
||||
<X>7</X>
|
||||
<Y>8</Y>
|
||||
</Position>
|
||||
<Garbage>
|
||||
<GarbageType>PlasticMetal</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
</Garbage>
|
||||
<Volume>500</Volume>
|
||||
</Object>
|
||||
<Object>
|
||||
<Type>Dump</Type>
|
||||
<Position>
|
||||
<X>8</X>
|
||||
<Y>7</Y>
|
||||
</Position>
|
||||
<Garbage>
|
||||
<GarbageType>Organic</GarbageType>
|
||||
<Density>10</Density>
|
||||
<ProcessingTimePerUnit>1</ProcessingTimePerUnit>
|
||||
</Garbage>
|
||||
<Volume>500</Volume>
|
||||
</Object>
|
||||
</Objects>
|
||||
</Map>
|
19
Raport kroków przeszukiwania drogi.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Mapa 1 (najprostsza)
|
||||
## BFS 10039 kroków
|
||||
## DFS 222 kroki
|
||||
## Best first 94 kroki
|
||||
|
||||
# Mapa 2
|
||||
BFS nie daje rady
|
||||
## DFS 540 kroków
|
||||
## Best First 106 kroków
|
||||
|
||||
# Mapa 3
|
||||
BFS nie daje rady
|
||||
## DFS 751 kroków
|
||||
## Best First 152 kroki
|
||||
|
||||
# Mapa 4
|
||||
BFS nie daje rady
|
||||
## DFS 3468 kroków
|
||||
## Best First 783 kroki
|
@ -1,299 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<DirectedGraph DataVirtualized="True" Layout="Sugiyama" ZoomLevel="-1" xmlns="http://schemas.microsoft.com/vs/2009/dgml">
|
||||
<Nodes>
|
||||
<Node Id="(@1 Namespace=CzokoŚmieciarka.WPF.Properties)" Category="CodeSchema_Namespace" Bounds="25.145,-159.5001,229.333333333333,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="CzokoŚmieciarka.WPF.Properties" UseManualLocation="True" />
|
||||
<Node Id="(@1 Namespace=XamlGeneratedNamespace)" Category="CodeSchema_Namespace" Bounds="25.145,-214.5001,200.463333333333,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="XamlGeneratedNamespace" UseManualLocation="True" />
|
||||
<Node Id="(@3)" Bounds="37,-84.5,240.496666666667,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="NotFetched" ErrorLevel="Error" FilePath="$(f2e11fee-c5ac-47d2-ba9c-819909b6dff7.OutputPath)" Group="Collapsed" Label="CzokoŚmieciarka.DataModels.dll" UseManualLocation="True" />
|
||||
<Node Id="(@4)" Bounds="37,-29.4999,323.01,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="NotFetched" ErrorLevel="Error" FilePath="$(a3d5da96-69d7-463f-b1ee-6fc70716e3b2.OutputPath)" Group="Collapsed" Label="CzokoŚmieciarka.DataModels.GeneralModels.dll" UseManualLocation="True" />
|
||||
<Node Id="@2" Bounds="37,-252.000183333306,205.623333333333,25" CodeSchemaProperty_StrongName="CzokoŚmieciarka.WPF, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" DelayedChildNodesState="Fetched" DelayedCrossGroupLinksState="Fetched" ErrorLevel="Error" FetchedChildrenCount="4" FilePath="$(VsSolution)\Interface\CzokoŚmieciarka.WPF\bin\Debug\CzokoŚmieciarka.WPF.exe" Group="Collapsed" Label="CzokoŚmieciarka.WPF.exe" UseManualLocation="True" />
|
||||
<Node Id="@5" Category="CodeSchema_Namespace" Bounds="46.02,-324.5001,172.963333333333,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="CzokoŚmieciarka.WPF" UseManualLocation="True" />
|
||||
<Node Id="@6" Category="CodeSchema_Namespace" Bounds="25.145,-269.5001,214.713333333333,25" DelayedChildNodesState="NotFetched" DelayedCrossGroupLinksState="Fetched" Group="Collapsed" Label="CzokoŚmieciarka.WPF.Models" UseManualLocation="True" />
|
||||
</Nodes>
|
||||
<Links>
|
||||
<Link Source="@2" Target="(@1 Namespace=CzokoŚmieciarka.WPF.Properties)" Category="Contains" FetchingParent="@2" />
|
||||
<Link Source="@2" Target="(@1 Namespace=XamlGeneratedNamespace)" Category="Contains" FetchingParent="@2" />
|
||||
<Link Source="@2" Target="@5" Category="Contains" FetchingParent="@2" />
|
||||
<Link Source="@2" Target="@6" Category="Contains" FetchingParent="@2" />
|
||||
<Link Source="@5" Target="@6" Category="CodeSchema_Calls" Bounds="132.501663208008,-299.500091552734,0,21" IsSourceVirtualized="True" IsTargetVirtualized="True" Weight="1" />
|
||||
</Links>
|
||||
<Categories>
|
||||
<Category Id="CodeSchema_Calls" Label="Calls" CanBeDataDriven="True" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Called By" OutgoingActionLabel="Calls" />
|
||||
<Category Id="CodeSchema_Namespace" Label="Namespace" CanBeDataDriven="True" DefaultAction="Node:Both:CodeSchema_Type" Icon="CodeSchema_Namespace" NavigationActionLabel="Namespaces" />
|
||||
<Category Id="Contains" Label="Contains" Description="Whether the source of the link contains the target object" CanBeDataDriven="False" CanLinkedNodesBeDataDriven="True" IncomingActionLabel="Contained By" IsContainment="True" OutgoingActionLabel="Contains" />
|
||||
</Categories>
|
||||
<Properties>
|
||||
<Property Id="Bounds" DataType="System.Windows.Rect" />
|
||||
<Property Id="CanBeDataDriven" Label="CanBeDataDriven" Description="CanBeDataDriven" DataType="System.Boolean" />
|
||||
<Property Id="CanLinkedNodesBeDataDriven" Label="CanLinkedNodesBeDataDriven" Description="CanLinkedNodesBeDataDriven" DataType="System.Boolean" />
|
||||
<Property Id="CodeSchemaProperty_StrongName" Label="StrongName" Description="StrongName" DataType="System.String" />
|
||||
<Property Id="DataVirtualized" Label="Data Virtualized" Description="If true, the graph can contain nodes and links that represent data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
|
||||
<Property Id="DefaultAction" Label="DefaultAction" Description="DefaultAction" DataType="System.String" />
|
||||
<Property Id="DelayedChildNodesState" Label="Delayed Child Nodes State" Description="Unspecified if the delayed child nodes state is not specified. NotFetched if the group contains child nodes that are not fetched into the graph yet. Fetched if the group has all its delayed child nodes already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
|
||||
<Property Id="DelayedCrossGroupLinksState" Label="Delayed Cross-Group Links State" Description="Unspecified if the delayed cross-group links state is not specified. NotFetched if delayed cross-group links on this node are not fetched into the graph yet. Fetched if all delayed cross-group links have already fetched." DataType="Microsoft.VisualStudio.GraphModel.DelayedDataState" />
|
||||
<Property Id="ErrorLevel" Label="Error Level" Description="Used to associate an error level with a node or link in the graph" Group="Analysis" DataType="Microsoft.VisualStudio.Progression.ErrorLevel" />
|
||||
<Property Id="Expression" DataType="System.String" />
|
||||
<Property Id="FetchedChildrenCount" DataType="System.Int32" />
|
||||
<Property Id="FetchingParent" DataType="Microsoft.VisualStudio.GraphModel.GraphNodeId" />
|
||||
<Property Id="FilePath" Label="File Path" Description="File Path" DataType="System.String" />
|
||||
<Property Id="Group" Label="Group" Description="Display the node as a group" DataType="Microsoft.VisualStudio.GraphModel.GraphGroupStyle" />
|
||||
<Property Id="GroupLabel" DataType="System.String" />
|
||||
<Property Id="Icon" Label="Icon" Description="Icon" DataType="System.String" />
|
||||
<Property Id="IncomingActionLabel" Label="IncomingActionLabel" Description="IncomingActionLabel" DataType="System.String" />
|
||||
<Property Id="IsContainment" DataType="System.Boolean" />
|
||||
<Property Id="IsEnabled" DataType="System.Boolean" />
|
||||
<Property Id="IsSourceVirtualized" Label="Link Source Virtualized" Description="If true, the link source end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
|
||||
<Property Id="IsTargetVirtualized" Label="Link Target Virtualized" Description="If true, the link target end contains data for virtualized nodes/links (i.e. not actually created in the graph)." DataType="System.Boolean" />
|
||||
<Property Id="Label" Label="Label" Description="Displayable label of an Annotatable object" DataType="System.String" />
|
||||
<Property Id="Layout" DataType="System.String" />
|
||||
<Property Id="NavigationActionLabel" Label="NavigationActionLabel" Description="NavigationActionLabel" DataType="System.String" />
|
||||
<Property Id="OutgoingActionLabel" Label="OutgoingActionLabel" Description="OutgoingActionLabel" DataType="System.String" />
|
||||
<Property Id="TargetType" DataType="System.Type" />
|
||||
<Property Id="UseManualLocation" DataType="System.Boolean" />
|
||||
<Property Id="Value" DataType="System.String" />
|
||||
<Property Id="ValueLabel" DataType="System.String" />
|
||||
<Property Id="Visibility" Label="Visibility" Description="Defines whether a node in the graph is visible or not" DataType="System.Windows.Visibility" />
|
||||
<Property Id="Weight" Label="Weight" Description="Weight" DataType="System.Double" />
|
||||
<Property Id="ZoomLevel" DataType="System.String" />
|
||||
</Properties>
|
||||
<QualifiedNames>
|
||||
<Name Id="Assembly" Label="Assembly" ValueType="Uri" />
|
||||
<Name Id="Namespace" Label="Namespace" ValueType="System.String" />
|
||||
</QualifiedNames>
|
||||
<IdentifierAliases>
|
||||
<Alias n="1" Uri="Assembly=$(VsSolutionUri)/Interface/CzokoŚmieciarka.WPF/bin/Debug/CzokoŚmieciarka.WPF.exe" />
|
||||
<Alias n="2" Id="(@1)" />
|
||||
<Alias n="3" Uri="Assembly=$(f2e11fee-c5ac-47d2-ba9c-819909b6dff7.OutputPathUri)" />
|
||||
<Alias n="4" Uri="Assembly=$(a3d5da96-69d7-463f-b1ee-6fc70716e3b2.OutputPathUri)" />
|
||||
<Alias n="5" Id="(@1 Namespace=CzokoŚmieciarka.WPF)" />
|
||||
<Alias n="6" Id="(@1 Namespace=CzokoŚmieciarka.WPF.Models)" />
|
||||
</IdentifierAliases>
|
||||
<Styles>
|
||||
<Style TargetType="Node" GroupLabel="Error" ValueLabel="Error Level">
|
||||
<Condition Expression="HasValue('ErrorLevel')" />
|
||||
<Setter Property="Icon" Value="Node.Error" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Results" ValueLabel="True">
|
||||
<Condition Expression="HasCategory('QueryResult')" />
|
||||
<Setter Property="Background" Value="#FFBCFFBE" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Test Project" ValueLabel="Test Project">
|
||||
<Condition Expression="HasCategory('CodeMap_TestProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_TestProject" />
|
||||
<Setter Property="Background" Value="#FF307A69" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Web Project" ValueLabel="Web Project">
|
||||
<Condition Expression="HasCategory('CodeMap_WebProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_WebProject" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Windows Store Project" ValueLabel="Windows Store Project">
|
||||
<Condition Expression="HasCategory('CodeMap_WindowsStoreProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_WindowsStoreProject" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Phone Project" ValueLabel="Phone Project">
|
||||
<Condition Expression="HasCategory('CodeMap_PhoneProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_PhoneProject" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Portable Library" ValueLabel="Portable Library">
|
||||
<Condition Expression="HasCategory('CodeMap_PortableLibraryProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_PortableLibraryProject" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="WPF Project" ValueLabel="WPF Project">
|
||||
<Condition Expression="HasCategory('CodeMap_WpfProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_WpfProject" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="VSIX Project" ValueLabel="VSIX Project">
|
||||
<Condition Expression="HasCategory('CodeMap_VsixProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_VsixProject" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Modeling Project" ValueLabel="Modeling Project">
|
||||
<Condition Expression="HasCategory('CodeMap_ModelingProject')" />
|
||||
<Setter Property="Icon" Value="CodeMap_ModelingProject" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Assembly" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Assembly')" />
|
||||
<Setter Property="Background" Value="#FF094167" />
|
||||
<Setter Property="Stroke" Value="#FF094167" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Assembly" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Namespace" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Namespace')" />
|
||||
<Setter Property="Background" Value="#FF0E619A" />
|
||||
<Setter Property="Stroke" Value="#FF0E619A" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Namespace" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Interface" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Interface')" />
|
||||
<Setter Property="Background" Value="#FF1382CE" />
|
||||
<Setter Property="Stroke" Value="#FF1382CE" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Interface" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Struct" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Struct')" />
|
||||
<Setter Property="Background" Value="#FF1382CE" />
|
||||
<Setter Property="Stroke" Value="#FF1382CE" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Struct" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Enumeration" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Enum')" />
|
||||
<Setter Property="Background" Value="#FF1382CE" />
|
||||
<Setter Property="Stroke" Value="#FF1382CE" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Enum" />
|
||||
<Setter Property="LayoutSettings" Value="List" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Delegate" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Delegate')" />
|
||||
<Setter Property="Background" Value="#FF1382CE" />
|
||||
<Setter Property="Stroke" Value="#FF1382CE" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Delegate" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Class" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Type')" />
|
||||
<Setter Property="Background" Value="#FF0E70C0" />
|
||||
<Setter Property="Stroke" Value="#FF0E70C0" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Class" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Property" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Property')" />
|
||||
<Setter Property="Background" Value="#FFE0E0E0" />
|
||||
<Setter Property="Stroke" Value="#FFE0E0E0" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Property" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Method" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Method') Or HasCategory('CodeSchema_CallStackUnresolvedMethod')" />
|
||||
<Setter Property="Background" Value="#FFE0E0E0" />
|
||||
<Setter Property="Stroke" Value="#FFE0E0E0" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Method" />
|
||||
<Setter Property="LayoutSettings" Value="List" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Event" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Event')" />
|
||||
<Setter Property="Background" Value="#FFE0E0E0" />
|
||||
<Setter Property="Stroke" Value="#FFE0E0E0" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Event" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Field" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Field')" />
|
||||
<Setter Property="Background" Value="#FFE0E0E0" />
|
||||
<Setter Property="Stroke" Value="#FFE0E0E0" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Field" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Out Parameter" ValueLabel="Has category">
|
||||
<Condition Expression="CodeSchemaProperty_IsOut = 'True'" />
|
||||
<Setter Property="Icon" Value="CodeSchema_OutParameter" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Parameter" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_Parameter')" />
|
||||
<Setter Property="Icon" Value="CodeSchema_Parameter" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Local Variable" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('CodeSchema_LocalExpression')" />
|
||||
<Setter Property="Icon" Value="CodeSchema_LocalExpression" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Externals" ValueLabel="Has category">
|
||||
<Condition Expression="HasCategory('Externals')" />
|
||||
<Setter Property="Background" Value="#FF424242" />
|
||||
<Setter Property="Stroke" Value="#FF424242" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True">
|
||||
<Condition Expression="HasCategory('InheritsFrom')" />
|
||||
<Setter Property="Stroke" Value="#FF00A600" />
|
||||
<Setter Property="StrokeDashArray" Value="2 0" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Implements" ValueLabel="True">
|
||||
<Condition Expression="HasCategory('Implements')" />
|
||||
<Setter Property="Stroke" Value="#8000A600" />
|
||||
<Setter Property="StrokeDashArray" Value="2 2" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Calls" ValueLabel="True">
|
||||
<Condition Expression="HasCategory('CodeSchema_Calls')" />
|
||||
<Setter Property="Stroke" Value="#FFFF00FF" />
|
||||
<Setter Property="StrokeDashArray" Value="2 0" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Function Pointer" ValueLabel="True">
|
||||
<Condition Expression="HasCategory('CodeSchema_FunctionPointer')" />
|
||||
<Setter Property="Stroke" Value="#FFFF00FF" />
|
||||
<Setter Property="StrokeDashArray" Value="2 2" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Field Read" ValueLabel="True">
|
||||
<Condition Expression="HasCategory('CodeSchema_FieldRead')" />
|
||||
<Setter Property="Stroke" Value="#FF00AEEF" />
|
||||
<Setter Property="StrokeDashArray" Value="2 2" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Field Write" ValueLabel="True">
|
||||
<Condition Expression="HasCategory('CodeSchema_FieldWrite')" />
|
||||
<Setter Property="Stroke" Value="#FF00AEEF" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
<Setter Property="IsHidden" Value="false" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Inherits From" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="HasCategory('InheritsFrom') And Target.HasCategory('CodeSchema_Class')" />
|
||||
<Setter Property="TargetDecorator" Value="OpenArrow" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Implements" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="HasCategory('Implements') And Target.HasCategory('CodeSchema_Interface')" />
|
||||
<Setter Property="TargetDecorator" Value="OpenArrow" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Comment Link" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="Source.HasCategory('Comment')" />
|
||||
<Setter Property="Stroke" Value="#FFE5C365" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Cursor Location Changed" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="IsCursorLocation" />
|
||||
<Setter Property="IndicatorWest" Value="WestIndicator" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Disabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="DisabledBreakpointCount" />
|
||||
<Setter Property="IndicatorWest" Value="WestIndicator" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Enabled Breakpoint Location Changed" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="EnabledBreakpointCount" />
|
||||
<Setter Property="IndicatorWest" Value="WestIndicator" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Instruction Pointer Location Changed" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="IsInstructionPointerLocation" />
|
||||
<Setter Property="IndicatorWest" Value="WestIndicator" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Current Callstack Changed" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="IsCurrentCallstackFrame" />
|
||||
<Setter Property="IndicatorWest" Value="WestIndicator" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Return" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="HasCategory('CodeSchema_ReturnTypeLink')" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="References" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="HasCategory('References')" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Uses Attribute" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="HasCategory('CodeSchema_AttributeUse')" />
|
||||
</Style>
|
||||
<Style TargetType="Node" GroupLabel="Solution Folder" ValueLabel="True" Visibility="Hidden">
|
||||
<Condition Expression="HasCategory('CodeMap_SolutionFolder')" />
|
||||
<Setter Property="Background" Value="#FFDEBA83" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="Project Reference" ValueLabel="Project Reference">
|
||||
<Condition Expression="HasCategory('CodeMap_ProjectReference')" />
|
||||
<Setter Property="Stroke" Value="#9A9A9A" />
|
||||
<Setter Property="StrokeDashArray" Value="2 2" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
</Style>
|
||||
<Style TargetType="Link" GroupLabel="External Reference" ValueLabel="External Reference">
|
||||
<Condition Expression="HasCategory('CodeMap_ExternalReference')" />
|
||||
<Setter Property="Stroke" Value="#9A9A9A" />
|
||||
<Setter Property="StrokeDashArray" Value="2 2" />
|
||||
<Setter Property="DrawArrow" Value="true" />
|
||||
</Style>
|
||||
</Styles>
|
||||
<Paths>
|
||||
<Path Id="a3d5da96-69d7-463f-b1ee-6fc70716e3b2.OutputPath" Value="C:\Users\s434678\Source\Repos\Czoko_Smieciarka\Trunk\Components\CzokoŚmieciarka.DataModels.GeneralModels\bin\Debug\CzokoŚmieciarka.DataModels.GeneralModels.dll" />
|
||||
<Path Id="a3d5da96-69d7-463f-b1ee-6fc70716e3b2.OutputPathUri" Value="file:///C:/Users/s434678/Source/Repos/Czoko_Smieciarka/Trunk/Components/CzokoŚmieciarka.DataModels.GeneralModels/bin/Debug/CzokoŚmieciarka.DataModels.GeneralModels.dll" />
|
||||
<Path Id="f2e11fee-c5ac-47d2-ba9c-819909b6dff7.OutputPath" Value="C:\Users\s434678\Source\Repos\Czoko_Smieciarka\Trunk\Components\CzokoŚmieciarka.DataModels\bin\Debug\CzokoŚmieciarka.DataModels.dll" />
|
||||
<Path Id="f2e11fee-c5ac-47d2-ba9c-819909b6dff7.OutputPathUri" Value="file:///C:/Users/s434678/Source/Repos/Czoko_Smieciarka/Trunk/Components/CzokoŚmieciarka.DataModels/bin/Debug/CzokoŚmieciarka.DataModels.dll" />
|
||||
<Path Id="VsSolution" Value="C:\Users\s434678\Source\Repos\Czoko_Smieciarka\Trunk" />
|
||||
<Path Id="VsSolutionUri" Value="file:///C:/Users/s434678/Source/Repos/Czoko_Smieciarka/Trunk" />
|
||||
</Paths>
|
||||
</DirectedGraph>
|
@ -1,58 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{10E77BBE-55E1-483D-A456-0E94EAC9B24A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CzokoŚmieciarka.AI_Naive</RootNamespace>
|
||||
<AssemblyName>CzokoŚmieciarka.AI_Naive</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DFS.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\CzokoŚmieciarka.DataModels.GeneralModels\CzokoŚmieciarka.DataModels.GeneralModels.csproj">
|
||||
<Project>{a3d5da96-69d7-463f-b1ee-6fc70716e3b2}</Project>
|
||||
<Name>CzokoŚmieciarka.DataModels.GeneralModels</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\CzokoŚmieciarka.DataModels\CzokoŚmieciarka.DataModels.csproj">
|
||||
<Project>{f2e11fee-c5ac-47d2-ba9c-819909b6dff7}</Project>
|
||||
<Name>CzokoŚmieciarka.DataModels</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("CzokoŚmieciarka.AI_Naive")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CzokoŚmieciarka.AI_Naive")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("10e77bbe-55e1-483d-a456-0e94eac9b24a")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -0,0 +1,13 @@
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models
|
||||
{
|
||||
public class Dump : ADump
|
||||
{
|
||||
public Dump(ITypeOfGarbage typeOfGarbage, int maxVolume, Coords localization) : base(typeOfGarbage, maxVolume, localization)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models
|
||||
{
|
||||
public class Garbage : AGarbage
|
||||
{
|
||||
public Garbage(ITypeOfGarbage typeOfGarbage, int weight) : base(typeOfGarbage, weight)
|
||||
{
|
||||
}
|
||||
|
||||
protected override AGarbage Add(AGarbage garbageToAdd)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
|
||||
}
|
||||
|
||||
protected override AGarbage Subtract(AGarbage garbageToSubtract)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using System.Collections.Generic;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models
|
||||
{
|
||||
public class GarbageCollector : AGarbageCollector
|
||||
{
|
||||
public GarbageCollector(Coords startPosition, IEnumerable<AGarbageCollectorContainer> trashContainers) : base(startPosition, trashContainers)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models
|
||||
{
|
||||
public class GarbageCollectorContainer : AGarbageCollectorContainer
|
||||
{
|
||||
public GarbageCollectorContainer(ITypeOfGarbage typeOfGarbage, int maxVolume) : base(typeOfGarbage, maxVolume)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -6,20 +6,18 @@ using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
using CzokoŚmieciarka.MonoGame.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame.Models
|
||||
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models
|
||||
{
|
||||
class WPFHouse : IGarbageLocalization, IWPFObject
|
||||
public class GarbageLocalization : IGarbageLocalization
|
||||
{
|
||||
public Coords Coords { get; set; }
|
||||
public IEnumerable<ATrashCan> TrashCans { get; set; }
|
||||
|
||||
|
||||
public WPFHouse(Coords coords, IEnumerable<ATrashCan> trashCans)
|
||||
public GarbageLocalization(Coords coords, IEnumerable<ATrashCan> trashCans)
|
||||
{
|
||||
TrashCans = trashCans;
|
||||
Coords = coords;
|
||||
this.Coords = coords;
|
||||
this.TrashCans = trashCans;
|
||||
}
|
||||
|
||||
public Coords Coords { get; }
|
||||
public IEnumerable<ATrashCan> TrashCans { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models
|
||||
{
|
||||
public class TrashCan : ATrashCan
|
||||
{
|
||||
public TrashCan(ITypeOfGarbage typeOfGarbage, int maxVolume) : base(typeOfGarbage, maxVolume)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models
|
||||
{
|
||||
public class TypeOfGarbage : ITypeOfGarbage
|
||||
{
|
||||
public TypeOfGarbage(string garbageType, int density, int processingTimePerUnit = 0)
|
||||
{
|
||||
this.GarbageType = garbageType;
|
||||
this.Density = density;
|
||||
this.ProcessingTimePerUnit = processingTimePerUnit;
|
||||
}
|
||||
|
||||
public string GarbageType { get; }
|
||||
public int ProcessingTimePerUnit { get; }
|
||||
public int Density { get; }
|
||||
}
|
||||
}
|
@ -1,53 +1,68 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CzokoŚmieciarka.DataModels</RootNamespace>
|
||||
<AssemblyName>CzokoŚmieciarka.DataModels</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Enums\" />
|
||||
<Folder Include="Interfaces\" />
|
||||
<Folder Include="Models\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CzokoŚmieciarka.DataModels</RootNamespace>
|
||||
<AssemblyName>CzokoŚmieciarka.DataModels</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Exceptions.cs" />
|
||||
<Compile Include="Enums\Directions.cs" />
|
||||
<Compile Include="Interfaces\GarbageCollector\AGarbageCollector.cs" />
|
||||
<Compile Include="Interfaces\GarbageCollector\IGarbageCollector.cs" />
|
||||
<Compile Include="Interfaces\Garbage\AGarbage.cs" />
|
||||
<Compile Include="Interfaces\Garbage\IGarbage.cs" />
|
||||
<Compile Include="Interfaces\TrashCans\ADump.cs" />
|
||||
<Compile Include="Interfaces\IGarbageLocalization.cs" />
|
||||
<Compile Include="Interfaces\ITypeOfGarbage.cs" />
|
||||
<Compile Include="Interfaces\RoutePlanningEngine\IRoutePlanningEngine.cs" />
|
||||
<Compile Include="Interfaces\TrashCans\AGarbageCollectorContainer.cs" />
|
||||
<Compile Include="Interfaces\TrashCans\ATrashCan.cs" />
|
||||
<Compile Include="Interfaces\IStep.cs" />
|
||||
<Compile Include="Models\Coords.cs" />
|
||||
<Compile Include="Models\Map.cs" />
|
||||
<Compile Include="Models\Steps\CollectStep.cs" />
|
||||
<Compile Include="Models\Steps\MoveStep.cs" />
|
||||
<Compile Include="Models\Steps\SpillStep.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -1,4 +1,4 @@
|
||||
namespace CzokoŚmieciarka.MonoGameView.DataModels.Enums
|
||||
namespace CzokoŚmieciarka.DataModels.Enums
|
||||
{
|
||||
public enum Direction
|
||||
{
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGameView.DataModels.Exceptions
|
||||
namespace CzokoŚmieciarka.DataModels
|
||||
{
|
||||
public class WrongPositionException : Exception
|
||||
{
|
||||
@ -26,20 +26,4 @@ namespace CzokoŚmieciarka.MonoGameView.DataModels.Exceptions
|
||||
}
|
||||
}
|
||||
|
||||
public class OutOfGridException : Exception
|
||||
{
|
||||
public OutOfGridException()
|
||||
{
|
||||
}
|
||||
public OutOfGridException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
public OutOfGridException(string message, Exception inner)
|
||||
: base(message, inner)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -4,11 +4,11 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.Garbage
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||
{
|
||||
public abstract class AGarbage : IGarbage
|
||||
{
|
||||
protected AGarbage(ITypeOfGarbage typeOfGarbage, double weight)
|
||||
protected AGarbage(ITypeOfGarbage typeOfGarbage, int weight)
|
||||
{
|
||||
this.TypeOfGarbage = typeOfGarbage;
|
||||
this.Weight = weight;
|
||||
@ -16,11 +16,11 @@ namespace CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.Garbage
|
||||
|
||||
public ITypeOfGarbage TypeOfGarbage { get; }
|
||||
|
||||
public virtual double Weight { get; set; }
|
||||
public virtual int Weight { get; set; }
|
||||
|
||||
public virtual double Volume
|
||||
public virtual int Volume
|
||||
{
|
||||
get { return (double) this.Weight / TypeOfGarbage.Density; }
|
||||
get { return this.Weight / TypeOfGarbage.Density; }
|
||||
}
|
||||
|
||||
protected abstract AGarbage Add(AGarbage garbageToAdd);
|
||||
@ -40,9 +40,9 @@ namespace CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.Garbage
|
||||
|
||||
#endregion
|
||||
|
||||
public virtual object Clone()
|
||||
public object Clone()
|
||||
{
|
||||
return new NotImplementedException("xD");
|
||||
return this.MemberwiseClone();
|
||||
}
|
||||
}
|
||||
}
|
@ -4,14 +4,14 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGameView.DataModels.Interfaces.Garbage
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||
{
|
||||
public interface IGarbage : ICloneable
|
||||
{
|
||||
ITypeOfGarbage TypeOfGarbage { get; }
|
||||
|
||||
double Weight { get; }
|
||||
int Weight { get; }
|
||||
|
||||
double Volume { get; }
|
||||
int Volume { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector
|
||||
{
|
||||
public abstract class AGarbageCollector : IGarbageCollector
|
||||
{
|
||||
public AGarbageCollector(Coords startPosition, IEnumerable<AGarbageCollectorContainer> trashContainers)
|
||||
{
|
||||
this.Position = startPosition;
|
||||
this.TrashContainers = trashContainers;
|
||||
}
|
||||
public Coords Position { get; }
|
||||
|
||||
public Coords MoveUp()
|
||||
{
|
||||
return new Coords(Position.X,Position.Y+1);
|
||||
}
|
||||
|
||||
public Coords MoveDown()
|
||||
{
|
||||
return new Coords(Position.X, Position.Y - 1);
|
||||
}
|
||||
|
||||
public Coords MoveLeft()
|
||||
{
|
||||
return new Coords(Position.X-1, Position.Y);
|
||||
}
|
||||
|
||||
public Coords MoveRight()
|
||||
{
|
||||
return new Coords(Position.X+1, Position.Y);
|
||||
}
|
||||
|
||||
public IEnumerable<AGarbageCollectorContainer> TrashContainers { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||
{
|
||||
public interface IGarbageCollector
|
||||
{
|
||||
Coords Position { get; }
|
||||
Coords MoveUp();
|
||||
Coords MoveDown();
|
||||
Coords MoveLeft();
|
||||
Coords MoveRight();
|
||||
|
||||
IEnumerable<AGarbageCollectorContainer> TrashContainers { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||
{
|
||||
public interface IGarbageLocalization
|
||||
{
|
||||
Coords Coords { get; }
|
||||
|
||||
IEnumerable<ATrashCan> TrashCans { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||
{
|
||||
public interface IStep
|
||||
{
|
||||
void Invoke();
|
||||
}
|
||||
}
|
@ -3,13 +3,12 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.MonoGameView.DataModels.Enums;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGameView.DataModels.Interfaces
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||
{
|
||||
public interface ITypeOfGarbage : ICloneable
|
||||
public interface ITypeOfGarbage
|
||||
{
|
||||
GarbageType GarbageType { get; }
|
||||
string GarbageType { get; }
|
||||
|
||||
int ProcessingTimePerUnit { get; }
|
||||
|
@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces.Road
|
||||
{
|
||||
public interface IRoad
|
||||
{
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces.Road
|
||||
{
|
||||
public interface IRoad2
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces.RoutePlanningEngine
|
||||
{
|
||||
public interface IRoutePlanningEngine
|
||||
{
|
||||
IEnumerable<IStep> CalculateStep();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces.TrashCans
|
||||
{
|
||||
public abstract class ADump : ATrashCan
|
||||
{
|
||||
protected ADump(ITypeOfGarbage typeOfGarbage, int maxVolume, Coords localization) : base(typeOfGarbage, maxVolume)
|
||||
{
|
||||
this.Localization = localization;
|
||||
}
|
||||
|
||||
public Coords Localization { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces.TrashCans
|
||||
{
|
||||
public abstract class AGarbageCollectorContainer : ATrashCan
|
||||
{
|
||||
protected AGarbageCollectorContainer(ITypeOfGarbage typeOfGarbage, int maxVolume) : base(typeOfGarbage, maxVolume)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
using System;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Interfaces.TrashCans
|
||||
{
|
||||
public abstract class ATrashCan
|
||||
{
|
||||
protected ATrashCan(ITypeOfGarbage typeOfGarbage, int maxVolume)
|
||||
{
|
||||
this.MaxVolume = maxVolume;
|
||||
this.TypeOfGarbage = typeOfGarbage;
|
||||
}
|
||||
|
||||
public ITypeOfGarbage TypeOfGarbage { get; }
|
||||
|
||||
public int MaxVolume { get;}
|
||||
|
||||
public AGarbage Garbage { get; private set; }
|
||||
|
||||
public int FillPercent
|
||||
{
|
||||
get { return Garbage.Volume / this.MaxVolume; }
|
||||
}
|
||||
|
||||
public virtual bool AddGarbage(IGarbage garbage)
|
||||
{
|
||||
if (this.TypeOfGarbage != garbage.TypeOfGarbage)
|
||||
throw new Exception("You cannot add up different type garbage!");
|
||||
|
||||
var newGarbage = this.Garbage + Garbage;
|
||||
if (newGarbage.Volume > this.MaxVolume)
|
||||
return false;
|
||||
|
||||
this.Garbage = newGarbage;
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual AGarbage TakeGarbage()
|
||||
{
|
||||
var result = (AGarbage)this.Garbage.Clone();
|
||||
this.Garbage.Weight = 0;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
30
Trunk/Components/CzokoŚmieciarka.DataModels/Models/Coords.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Models
|
||||
{
|
||||
public class Coords
|
||||
{
|
||||
public Coords(int x,int y)
|
||||
{
|
||||
this.X = x;
|
||||
this.Y = y;
|
||||
}
|
||||
|
||||
public int X { get; set; }
|
||||
public int Y { get; set; }
|
||||
|
||||
public static bool operator == (Coords a, Coords b)
|
||||
{
|
||||
return a.X == b.X && a.Y == b.Y;
|
||||
}
|
||||
|
||||
public static bool operator !=(Coords a, Coords b)
|
||||
{
|
||||
return !(a == b);
|
||||
}
|
||||
}
|
||||
}
|
@ -4,10 +4,10 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.MonoGameView.DataModels.Interfaces;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Windows.Shapes;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGameView.DataModels.Models
|
||||
namespace CzokoŚmieciarka.DataModels.Models
|
||||
{
|
||||
public class Map
|
||||
{
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Models.Steps
|
||||
{
|
||||
public class CollectStep : IStep
|
||||
{
|
||||
public CollectStep(IGarbageCollector garbageCollector, IGarbageLocalization garbageLocalization, ITypeOfGarbage typeOfGarbage)
|
||||
{
|
||||
this._garbageCollector = garbageCollector;
|
||||
this._garbageLocalization = garbageLocalization;
|
||||
this._typeOfGarbage = typeOfGarbage;
|
||||
}
|
||||
|
||||
private IGarbageCollector _garbageCollector;
|
||||
private ITypeOfGarbage _typeOfGarbage;
|
||||
private IGarbageLocalization _garbageLocalization;
|
||||
|
||||
public void Invoke()
|
||||
{
|
||||
if(_garbageCollector.Position != _garbageLocalization.Coords)
|
||||
throw new WrongPositionException("Śmieciarka nie jest w miejscu oderbania śmieci");
|
||||
|
||||
var trashCans = _garbageLocalization.TrashCans.Where(t => t.TypeOfGarbage == _typeOfGarbage);
|
||||
var garbage = trashCans.Select(t => t.TakeGarbage()).Aggregate((a,b)=>a+b);
|
||||
|
||||
if (_garbageCollector.TrashContainers.All(c => c.TypeOfGarbage != _typeOfGarbage))
|
||||
throw new TrashContainerNotFound($"Nie znaleziono kontenera na {_typeOfGarbage.GarbageType}.");
|
||||
|
||||
_garbageCollector.TrashContainers.First(t => t.TypeOfGarbage == _typeOfGarbage).AddGarbage(garbage);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Enums;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Models.Steps
|
||||
{
|
||||
public class MoveStep : IStep
|
||||
{
|
||||
public MoveStep(Direction direction, IGarbageCollector garbageCollector)
|
||||
{
|
||||
this._garbageCollector = garbageCollector;
|
||||
this._direction = direction;
|
||||
}
|
||||
|
||||
private Direction _direction;
|
||||
private IGarbageCollector _garbageCollector;
|
||||
|
||||
public void Invoke()
|
||||
{
|
||||
switch (_direction)
|
||||
{
|
||||
case Direction.Up: _garbageCollector.MoveUp(); break;
|
||||
case Direction.Down: _garbageCollector.MoveDown(); break;
|
||||
case Direction.Left: _garbageCollector.MoveLeft(); break;
|
||||
case Direction.Right: _garbageCollector.MoveRight(); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
|
||||
namespace CzokoŚmieciarka.DataModels.Models.Steps
|
||||
{
|
||||
public class SpillStep : IStep
|
||||
{
|
||||
public SpillStep(IGarbageCollector garbageCollector, ADump dump, ITypeOfGarbage typeOfGarbage)
|
||||
{
|
||||
this._garbageCollector = garbageCollector;
|
||||
this._dump = dump;
|
||||
this._typeOfGarbage = typeOfGarbage;
|
||||
}
|
||||
|
||||
private IGarbageCollector _garbageCollector;
|
||||
private ADump _dump;
|
||||
private ITypeOfGarbage _typeOfGarbage;
|
||||
|
||||
public void Invoke()
|
||||
{
|
||||
if(_garbageCollector.Position != _dump.Localization)
|
||||
throw new WrongPositionException("Śmieciarka nie na terenie podanego wyspiska");
|
||||
|
||||
if(_dump.TypeOfGarbage != _typeOfGarbage)
|
||||
throw new TrashContainerNotFound($"Wysypisko nie przyjmuje smieci typu {_typeOfGarbage.GarbageType}");
|
||||
|
||||
if(_garbageCollector.TrashContainers.All(c => c.TypeOfGarbage != _typeOfGarbage))
|
||||
throw new TrashContainerNotFound($"Smieciarka nie ma pojemnika na {_typeOfGarbage.GarbageType}!");
|
||||
|
||||
var garbage = _garbageCollector.TrashContainers.Where(t => t.TypeOfGarbage == _typeOfGarbage)
|
||||
.Select(t => t.TakeGarbage())
|
||||
.Aggregate((a, b) => a + b);
|
||||
|
||||
_dump.AddGarbage(garbage);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
<Application x:Class="CzokoŚmieciarka.UserInterface.WPF.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:CzokoŚmieciarka.UserInterface.WPF"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace CzokoŚmieciarka.UserInterface.WPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
||||
/// </summary>
|
||||
public partial class App : Application
|
||||
{
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
<Window x:Class="CzokoŚmieciarka.UserInterface.WPF.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CzokoŚmieciarka.UserInterface.WPF"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow">
|
||||
<Border Background="#444" Padding="10">
|
||||
<Grid x:Name="GridBoard"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
@ -1,69 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace CzokoŚmieciarka.UserInterface.WPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
this._rows = 10;
|
||||
this._columns = 15;
|
||||
|
||||
GenerateGridBoard();
|
||||
PopulateGridBoard();
|
||||
}
|
||||
|
||||
private int _rows;
|
||||
private int _columns;
|
||||
|
||||
private void GenerateGridBoard()
|
||||
{
|
||||
for (int row = 0; row < _rows; row++)
|
||||
{
|
||||
GridBoard.RowDefinitions.Add(new RowDefinition(){Height = new GridLength(70)});
|
||||
}
|
||||
for (int column = 0; column < _columns; column++)
|
||||
{
|
||||
GridBoard.ColumnDefinitions.Add(new ColumnDefinition(){ Width = new GridLength(70) });
|
||||
}
|
||||
}
|
||||
|
||||
private void PopulateGridBoard()
|
||||
{
|
||||
var random = new Random();
|
||||
|
||||
for (int row = 0; row < _rows; row++)
|
||||
{
|
||||
for (int column = 0; column < _columns; column++)
|
||||
{
|
||||
byte red = (byte)random.Next(0, 255);
|
||||
byte green = (byte)random.Next(0, 255);
|
||||
byte blue = (byte)random.Next(0, 255);
|
||||
var content = new StackPanel() { Background = new SolidColorBrush(Color.FromRgb(red, green, blue)) };
|
||||
|
||||
Grid.SetRow(content,row);
|
||||
Grid.SetColumn(content,column);
|
||||
|
||||
GridBoard.Children.Add(content);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("CzokoŚmieciarka.UserInterface.WPF")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CzokoŚmieciarka.UserInterface.WPF")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,71 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CzokoŚmieciarka.UserInterface.WPF.Properties
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CzokoŚmieciarka.UserInterface.WPF.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CzokoŚmieciarka.UserInterface.WPF.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,38 +1,37 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.136
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGameView", "MonoGameView\MonoGameView.csproj", "{EBE9431C-9B66-4300-B288-7A0F7B899415}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|ARM = Release|ARM
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|Any CPU.ActiveCfg = Debug|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|Any CPU.Build.0 = Debug|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|ARM.ActiveCfg = Debug|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x64.ActiveCfg = Debug|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x86.Build.0 = Debug|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|Any CPU.ActiveCfg = Release|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|ARM.ActiveCfg = Release|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x64.ActiveCfg = Release|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x86.ActiveCfg = Release|x86
|
||||
{EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {AAED00C0-3CC4-470C-8623-232E844D6FF2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.136
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.DataModels", "Components\CzokoŚmieciarka.DataModels\CzokoŚmieciarka.DataModels.csproj", "{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.DataModels.GeneralModels", "Components\CzokoŚmieciarka.DataModels.GeneralModels\CzokoŚmieciarka.DataModels.GeneralModels.csproj", "{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.WPF", "Interface\CzokoŚmieciarka.WPF\CzokoŚmieciarka.WPF.csproj", "{06937DFB-242D-46BD-9A4B-486D156B62A9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {AAED00C0-3CC4-470C-8623-232E844D6FF2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
@ -1,3 +0,0 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=Czoko_015Amieciarka_002EWPFv2_002EAnnotations/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/CodeAnnotations/NamespacesWithAnnotations/=Czoko_015Amieciarka_002EWPF_002EAnnotations/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
@ -1,25 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.28307.572
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MapEditor", "MapEditor\MapEditor.csproj", "{B04C4A92-1376-4D98-ADC1-A3799DEECF0F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B04C4A92-1376-4D98-ADC1-A3799DEECF0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B04C4A92-1376-4D98-ADC1-A3799DEECF0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B04C4A92-1376-4D98-ADC1-A3799DEECF0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B04C4A92-1376-4D98-ADC1-A3799DEECF0F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {FD2A72E0-B6AB-4E11-AB7E-A40AF69F3E36}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="imageFilePath" value="C:\Users\micjan11\Projekty\Czoko_Smieciarka\Trunk\MonoGameView\map3.bmp"/>
|
||||
<add key="outputFilePath" value="C:\Users\micjan11\Projekty\Czoko_Smieciarka\Trunk\MonoGameView\bin\Windows\x86\Debug\map3.xml"/>
|
||||
</appSettings>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
@ -1,16 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MapEditor
|
||||
{
|
||||
public static class Config
|
||||
{
|
||||
public static string ImageFilePath => ConfigurationManager.AppSettings["imageFilePath"];
|
||||
|
||||
public static string OutputFilePath => ConfigurationManager.AppSettings["outputFilePath"];
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MapEditor.Models;
|
||||
|
||||
namespace MapEditor.Helpers
|
||||
{
|
||||
public static class ColorToFieldTypeConverter
|
||||
{
|
||||
public static FieldType ConvertToFieldType(Color color)
|
||||
{
|
||||
if (color == Color.FromArgb(0, 255, 0))
|
||||
return FieldType.Grass;
|
||||
|
||||
if (color == Color.FromArgb(0, 0, 0))
|
||||
return FieldType.Road;
|
||||
|
||||
if (color == Color.FromArgb(255, 0, 0))
|
||||
return FieldType.House;
|
||||
|
||||
if (color == Color.FromArgb(255,255,0))
|
||||
return FieldType.Dump;
|
||||
|
||||
throw new NotImplementedException($"Conversion form {color.ToKnownColor()} has not been implemented.");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -1,59 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{B04C4A92-1376-4D98-ADC1-A3799DEECF0F}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>MapEditor</RootNamespace>
|
||||
<AssemblyName>MapEditor</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="Helpers\ColorToFieldTypeConverter.cs" />
|
||||
<Compile Include="Models\Enums.cs" />
|
||||
<Compile Include="Models\FieldInfo.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
@ -1,36 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MapEditor.Models
|
||||
{
|
||||
public enum FieldType
|
||||
{
|
||||
Grass = 0,
|
||||
Road = 1,
|
||||
House = 2,
|
||||
Dump = 3
|
||||
}
|
||||
|
||||
public static class EnumExtensions
|
||||
{
|
||||
public static string ToFriendlyString(this FieldType fieldType)
|
||||
{
|
||||
if (fieldType == FieldType.Grass)
|
||||
return "Grass";
|
||||
|
||||
if (fieldType == FieldType.Road)
|
||||
return "Road";
|
||||
|
||||
if (fieldType == FieldType.House)
|
||||
return "House";
|
||||
|
||||
if (fieldType == FieldType.Dump)
|
||||
return "Dump";
|
||||
|
||||
throw new NotImplementedException($"String conversion for enum with value '{fieldType.ToString()}' has not been implemented.");
|
||||
}
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MapEditor.Models
|
||||
{
|
||||
public class FieldInfo
|
||||
{
|
||||
public FieldInfo(int x, int y, FieldType fieldType)
|
||||
{
|
||||
X = x;
|
||||
Y = y;
|
||||
FieldType = fieldType;
|
||||
}
|
||||
|
||||
public int X { get; }
|
||||
public int Y { get; }
|
||||
public FieldType FieldType { get; }
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using MapEditor.Helpers;
|
||||
using MapEditor.Models;
|
||||
|
||||
namespace MapEditor
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var bitmap = (Bitmap)Bitmap.FromFile(Config.ImageFilePath);
|
||||
var fieldInfos = GetFieldInfos(bitmap);
|
||||
|
||||
if(GenerateXML(fieldInfos))
|
||||
Console.WriteLine("Done.");
|
||||
else
|
||||
Console.WriteLine("Something gone wrong.");
|
||||
|
||||
Console.ReadKey();
|
||||
}
|
||||
|
||||
private static IEnumerable<FieldInfo> GetFieldInfos(Bitmap bitmap)
|
||||
{
|
||||
var width = bitmap.Width;
|
||||
var height = bitmap.Height;
|
||||
|
||||
for (int x = 0; x < width; x++)
|
||||
{
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
var color = bitmap.GetPixel(x, y);
|
||||
var fieldType = ColorToFieldTypeConverter.ConvertToFieldType(color);
|
||||
|
||||
yield return new FieldInfo(x,y,fieldType);
|
||||
}
|
||||
}
|
||||
}
|
||||
private static bool GenerateXML(IEnumerable<FieldInfo> fieldInfos)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var xmlWriter = XmlWriter.Create(Config.OutputFilePath))
|
||||
{
|
||||
xmlWriter.WriteStartElement("Map");
|
||||
|
||||
xmlWriter.WriteElementString("Size",Math.Sqrt(fieldInfos.Count()).ToString());
|
||||
|
||||
xmlWriter.WriteStartElement("Objects");
|
||||
foreach (var fieldInfo in fieldInfos)
|
||||
{
|
||||
xmlWriter.WriteStartElement("Object");
|
||||
|
||||
xmlWriter.WriteElementString("Type",fieldInfo.FieldType.ToFriendlyString());
|
||||
|
||||
xmlWriter.WriteStartElement("Position");
|
||||
xmlWriter.WriteElementString("X",fieldInfo.X.ToString());
|
||||
xmlWriter.WriteElementString("Y",fieldInfo.Y.ToString());
|
||||
xmlWriter.WriteEndElement();
|
||||
|
||||
xmlWriter.WriteEndElement();
|
||||
}
|
||||
xmlWriter.WriteEndElement();
|
||||
|
||||
xmlWriter.WriteEndElement();
|
||||
xmlWriter.Flush();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("MapEditor")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("MapEditor")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("b04c4a92-1376-4d98-adc1-a3799deecf0f")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,118 +0,0 @@
|
||||
|
||||
#----------------------------- Global Properties ----------------------------#
|
||||
|
||||
/outputDir:bin/$(Platform)
|
||||
/intermediateDir:obj/$(Platform)
|
||||
/platform:Windows
|
||||
/config:
|
||||
/profile:Reach
|
||||
/compress:False
|
||||
|
||||
#-------------------------------- References --------------------------------#
|
||||
|
||||
|
||||
#---------------------------------- Content ---------------------------------#
|
||||
|
||||
#begin Font.spritefont
|
||||
/importer:FontDescriptionImporter
|
||||
/processor:FontDescriptionProcessor
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:TextureFormat=Compressed
|
||||
/build:Font.spritefont
|
||||
|
||||
#begin Images/Dumps/glass.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/Dumps/glass.png
|
||||
|
||||
#begin Images/Dumps/organic.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/Dumps/organic.png
|
||||
|
||||
#begin Images/Dumps/paper.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/Dumps/paper.png
|
||||
|
||||
#begin Images/Dumps/plasticmetal.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/Dumps/plasticmetal.png
|
||||
|
||||
#begin Images/garbageCollector.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/garbageCollector.png
|
||||
|
||||
#begin Images/house.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/house.png
|
||||
|
||||
#begin Images/intersection.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/intersection.png
|
||||
|
||||
#begin Images/intersectionRED.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Images/intersectionRED.png
|
||||
|
@ -1,60 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file contains an xml description of a font, and will be read by the XNA
|
||||
Framework Content Pipeline. Follow the comments to customize the appearance
|
||||
of the font in your game, and to change the characters which are available to draw
|
||||
with.
|
||||
-->
|
||||
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
|
||||
<Asset Type="Graphics:FontDescription">
|
||||
|
||||
<!--
|
||||
Modify this string to change the font that will be imported.
|
||||
-->
|
||||
<FontName>Arial</FontName>
|
||||
|
||||
<!--
|
||||
Size is a float value, measured in points. Modify this value to change
|
||||
the size of the font.
|
||||
-->
|
||||
<Size>12</Size>
|
||||
|
||||
<!--
|
||||
Spacing is a float value, measured in pixels. Modify this value to change
|
||||
the amount of spacing in between characters.
|
||||
-->
|
||||
<Spacing>0</Spacing>
|
||||
|
||||
<!--
|
||||
UseKerning controls the layout of the font. If this value is true, kerning information
|
||||
will be used when placing characters.
|
||||
-->
|
||||
<UseKerning>true</UseKerning>
|
||||
|
||||
<!--
|
||||
Style controls the style of the font. Valid entries are "Regular", "Bold", "Italic",
|
||||
and "Bold, Italic", and are case sensitive.
|
||||
-->
|
||||
<Style>Regular</Style>
|
||||
|
||||
<!--
|
||||
If you uncomment this line, the default character will be substituted if you draw
|
||||
or measure text that contains characters which were not included in the font.
|
||||
-->
|
||||
<!-- <DefaultCharacter>*</DefaultCharacter> -->
|
||||
|
||||
<!--
|
||||
CharacterRegions control what letters are available in the font. Every
|
||||
character from Start to End will be built and made available for drawing. The
|
||||
default range is from 32, (ASCII space), to 126, ('~'), covering the basic Latin
|
||||
character set. The characters are ordered according to the Unicode standard.
|
||||
See the documentation for more information.
|
||||
-->
|
||||
<CharacterRegions>
|
||||
<CharacterRegion>
|
||||
<Start> </Start>
|
||||
<End>~</End>
|
||||
</CharacterRegion>
|
||||
</CharacterRegions>
|
||||
</Asset>
|
||||
</XnaContent>
|
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.0 KiB |
@ -1,91 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{3A27CBFB-44DF-4B1D-B776-770FCA3DF905}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>CzokoŚmieciarka.MonoGame</RootNamespace>
|
||||
<AssemblyName>CzokoŚmieciarka.MonoGame</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MonoGamePlatform>Windows</MonoGamePlatform>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\$(MonoGamePlatform)\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<DefineConstants>TRACE;WINDOWS</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Game1.cs" />
|
||||
<Compile Include="Interfaces\IWPFObject.cs" />
|
||||
<Compile Include="Models\Dump.cs" />
|
||||
<Compile Include="Models\GarbageCollector.cs" />
|
||||
<Compile Include="Models\House.cs" />
|
||||
<Compile Include="Models\Road.cs" />
|
||||
<Compile Include="Models\Road2.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>$(MonoGameInstallDirectory)\MonoGame\v3.0\Assemblies\Windows\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Icon.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<MonoGameContentReference Include="Content\Content.mgcb" />
|
||||
<None Include="app.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Components\CzokoŚmieciarka.AI_Naive\CzokoŚmieciarka.AI_Naive.csproj">
|
||||
<Project>{10e77bbe-55e1-483d-a456-0e94eac9b24a}</Project>
|
||||
<Name>CzokoŚmieciarka.AI_Naive</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Components\CzokoŚmieciarka.DataModels.GeneralModels\CzokoŚmieciarka.DataModels.GeneralModels.csproj">
|
||||
<Project>{a3d5da96-69d7-463f-b1ee-6fc70716e3b2}</Project>
|
||||
<Name>CzokoŚmieciarka.DataModels.GeneralModels</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\Components\CzokoŚmieciarka.DataModels\CzokoŚmieciarka.DataModels.csproj">
|
||||
<Project>{f2e11fee-c5ac-47d2-ba9c-819909b6dff7}</Project>
|
||||
<Name>CzokoŚmieciarka.DataModels</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\MonoGame\v3.0\MonoGame.Content.Builder.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
@ -1,94 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using CzokoŚmieciarka.MonoGame.Interfaces;
|
||||
using CzokoŚmieciarka.MonoGame.Models;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
using Microsoft.Xna.Framework.Input;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame
|
||||
{
|
||||
/// <summary>
|
||||
/// This is the main type for your game.
|
||||
/// </summary>
|
||||
public class Game1 : Game
|
||||
{
|
||||
GraphicsDeviceManager graphics;
|
||||
SpriteBatch spriteBatch;
|
||||
private Texture2D road;
|
||||
private IWPFObject[,] Objects = new IWPFObject[9, 9];
|
||||
private IEnumerable<AGarbageCollectorContainer> GarbageCollectorContainers;
|
||||
private WPFGarbageCollector garbageCollector;
|
||||
|
||||
public Game1()
|
||||
{
|
||||
graphics = new GraphicsDeviceManager(this);
|
||||
Content.RootDirectory = "Content";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the game to perform any initialization it needs to before starting to run.
|
||||
/// This is where it can query for any required services and load any non-graphic
|
||||
/// related content. Calling base.Initialize will enumerate through any components
|
||||
/// and initialize them as well.
|
||||
/// </summary>
|
||||
protected override void Initialize()
|
||||
{
|
||||
// TODO: Add your initialization logic here
|
||||
|
||||
base.Initialize();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// LoadContent will be called once per game and is the place to load
|
||||
/// all of your content.
|
||||
/// </summary>
|
||||
protected override void LoadContent()
|
||||
{
|
||||
// Create a new SpriteBatch, which can be used to draw textures.
|
||||
spriteBatch = new SpriteBatch(GraphicsDevice);
|
||||
road = Content.Load<Texture2D>("Images/intersection");
|
||||
// TODO: use this.Content to load your game content here
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UnloadContent will be called once per game and is the place to unload
|
||||
/// game-specific content.
|
||||
/// </summary>
|
||||
protected override void UnloadContent()
|
||||
{
|
||||
// TODO: Unload any non ContentManager content here
|
||||
Content.Unload();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows the game to run logic such as updating the world,
|
||||
/// checking for collisions, gathering input, and playing audio.
|
||||
/// </summary>
|
||||
/// <param name="gameTime">Provides a snapshot of timing values.</param>
|
||||
protected override void Update(GameTime gameTime)
|
||||
{
|
||||
if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
|
||||
Exit();
|
||||
|
||||
// TODO: Add your update logic here
|
||||
|
||||
base.Update(gameTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This is called when the game should draw itself.
|
||||
/// </summary>
|
||||
/// <param name="gameTime">Provides a snapshot of timing values.</param>
|
||||
protected override void Draw(GameTime gameTime)
|
||||
{
|
||||
GraphicsDevice.Clear(Color.CornflowerBlue);
|
||||
|
||||
// TODO: Add your drawing code here
|
||||
|
||||
spriteBatch.Begin();
|
||||
spriteBatch.Draw(road, new Rectangle(0,0,40,40),Color.White);
|
||||
spriteBatch.End();
|
||||
base.Draw(gameTime);
|
||||
}
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 144 KiB |
@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame.Interfaces
|
||||
{
|
||||
public interface IWPFObject
|
||||
{
|
||||
Coords Coords { get; set; }
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Enums;
|
||||
using CzokoŚmieciarka.DataModels.GeneralModels.Models;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
using CzokoŚmieciarka.MonoGame.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame.Models
|
||||
{
|
||||
class WPFDump : ADump, IWPFObject
|
||||
{
|
||||
public string ImagePath { get; set; }
|
||||
|
||||
public WPFDump(ITypeOfGarbage typeofGarbage, int maxVolume, Coords localization) : base ( typeofGarbage, maxVolume, localization)
|
||||
{
|
||||
switch (typeofGarbage.GarbageType)
|
||||
{
|
||||
case GarbageType.Glass:
|
||||
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\glass.png";
|
||||
break;
|
||||
case GarbageType.PlasticMetal:
|
||||
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\plasticmetal.png";
|
||||
break;
|
||||
case GarbageType.Organic:
|
||||
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\organic.png";
|
||||
break;
|
||||
case GarbageType.Paper:
|
||||
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\paper.png";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
using CzokoŚmieciarka.MonoGame.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame.Models
|
||||
{
|
||||
class WPFGarbageCollector : AGarbageCollector, IWPFObject, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
|
||||
public WPFGarbageCollector(Coords startPosition, IEnumerable<AGarbageCollectorContainer> trashContainers, int columns, int rows) : base(startPosition, trashContainers, columns, rows)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
[NotifyPropertyChangedInvocator]
|
||||
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Mime;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
using CzokoŚmieciarka.MonoGame.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame.Models
|
||||
{
|
||||
class Road : IWPFObject
|
||||
{
|
||||
public MediaTypeNames.Image Image
|
||||
{
|
||||
get
|
||||
{
|
||||
return new MediaTypeNames.Image
|
||||
{
|
||||
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png")),
|
||||
Width = 100,
|
||||
Height = 100
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public Road()
|
||||
{
|
||||
//Image = new Image()
|
||||
//{
|
||||
// Source =
|
||||
// new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png"))
|
||||
//};
|
||||
}
|
||||
|
||||
public Coords Coords { get; set; }
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
using CzokoŚmieciarka.MonoGame.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame.Models
|
||||
{
|
||||
class Road2 : IWPFObject
|
||||
{
|
||||
public string ImagePath { get; set; }
|
||||
public Coords Coords { get; set; }
|
||||
|
||||
public Road2()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace CzokoŚmieciarka.MonoGame
|
||||
{
|
||||
#if WINDOWS || LINUX
|
||||
/// <summary>
|
||||
/// The main class.
|
||||
/// </summary>
|
||||
public static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
using (var game = new Game1())
|
||||
game.Run();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("CzokoŚmieciarka.MonoGame")]
|
||||
[assembly: AssemblyProduct("CzokoŚmieciarka.MonoGame")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3cdbdf0b-e65f-481e-83b9-45c21a07b884")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="CzokoŚmieciarka.MonoGame"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- A list of the Windows versions that this application has been tested on and is
|
||||
is designed to work with. Uncomment the appropriate elements and Windows will
|
||||
automatically selected the most compatible environment. -->
|
||||
|
||||
<!-- Windows Vista -->
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
|
||||
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
|
||||
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
|
||||
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
|
||||
|
||||
<!-- Windows 10 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
</assembly>
|
@ -1,7 +1,7 @@
|
||||
<Application x:Class="CzokoŚmieciarka.WPFv2.App"
|
||||
<Application x:Class="CzokoŚmieciarka.WPF.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:CzokoŚmieciarka.WPFv2"
|
||||
xmlns:local="clr-namespace:CzokoŚmieciarka.WPF"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
@ -6,7 +6,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2
|
||||
namespace CzokoŚmieciarka.WPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for App.xaml
|
@ -4,10 +4,10 @@
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{C510F713-91EC-465F-AD99-5BA051072E90}</ProjectGuid>
|
||||
<ProjectGuid>{06937DFB-242D-46BD-9A4B-486D156B62A9}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>CzokoŚmieciarka.UserInterface.WPF</RootNamespace>
|
||||
<AssemblyName>CzokoŚmieciarka.UserInterface.WPF</AssemblyName>
|
||||
<RootNamespace>CzokoŚmieciarka.WPF</RootNamespace>
|
||||
<AssemblyName>CzokoŚmieciarka.WPF</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
@ -69,6 +69,8 @@
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Models\Board.cs" />
|
||||
<Compile Include="Models\Tile.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
BIN
Trunk/Interface/CzokoŚmieciarka.WPF/Images/dirt.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
24
Trunk/Interface/CzokoŚmieciarka.WPF/MainWindow.xaml
Normal file
@ -0,0 +1,24 @@
|
||||
<Window x:Class="CzokoŚmieciarka.WPF.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CzokoŚmieciarka.WPF"
|
||||
xmlns:models="clr-namespace:CzokoŚmieciarka.WPF.Models"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="800" Width="800">
|
||||
<ItemsControl ItemsSource="{Binding Tiles}">
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type models:Tile}">
|
||||
<Grid Background="{Binding Background}">
|
||||
<TextBlock Text="{Binding Data}"></TextBlock>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<UniformGrid Rows="{Binding Rows}" Columns="{Binding Columns}"></UniformGrid>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
</Window>
|
@ -5,6 +5,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
@ -12,8 +13,9 @@ using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using CzokoŚmieciarka.WPF.Models;
|
||||
|
||||
namespace CzokoŚmierciarka.WPF2._0
|
||||
namespace CzokoŚmieciarka.WPF
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
@ -23,14 +25,9 @@ namespace CzokoŚmierciarka.WPF2._0
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
for(int i = 0; i < 10; i++)
|
||||
{
|
||||
ColumnDefinition column = new ColumnDefinition();
|
||||
RowDefinition row = new RowDefinition();
|
||||
Board.ColumnDefinitions.Add(column);
|
||||
Board.RowDefinitions.Add(row);
|
||||
}
|
||||
Board.Set
|
||||
|
||||
this.DataContext = new Board(10, 10);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
53
Trunk/Interface/CzokoŚmieciarka.WPF/Models/Board.cs
Normal file
@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace CzokoŚmieciarka.WPF.Models
|
||||
{
|
||||
public class Board
|
||||
{
|
||||
int _rows;
|
||||
int _columns;
|
||||
List<Tile> _tiles = new List<Tile>();
|
||||
|
||||
public Board(int rows, int columns)
|
||||
{
|
||||
_rows = rows;
|
||||
_columns = columns;
|
||||
ImageBrush imgBrush = new ImageBrush(new BitmapImage(new Uri(@"F:\Projects\In-progress\CzokoSmieciarka\Trunk\CzokoŚmieciarka.WPF\Images\dirt.jpg")));
|
||||
for (int r = 0; r < rows; r++)
|
||||
{
|
||||
for (int c = 0; c < columns; c++)
|
||||
{
|
||||
_tiles.Add(new Tile()
|
||||
{
|
||||
Data = string.Format("Dirt {0}", r * 10 + c),
|
||||
Background = imgBrush
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int Rows
|
||||
{
|
||||
get { return _rows; }
|
||||
set { _rows = value; }
|
||||
}
|
||||
|
||||
public int Columns
|
||||
{
|
||||
get { return _columns; }
|
||||
set { _columns = value; }
|
||||
}
|
||||
|
||||
public List<Tile> Tiles
|
||||
{
|
||||
get { return _tiles; }
|
||||
set { _tiles = value; }
|
||||
}
|
||||
}
|
||||
}
|
15
Trunk/Interface/CzokoŚmieciarka.WPF/Models/Tile.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CzokoŚmieciarka.WPF.Models
|
||||
{
|
||||
public class Tile
|
||||
{
|
||||
public string Data { get; set; }
|
||||
public ImageBrush Background { get; set; }
|
||||
}
|
||||
}
|
@ -7,11 +7,11 @@ using System.Windows;
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("CzokoŚmieciarka.WPFv2")]
|
||||
[assembly: AssemblyTitle("CzokoŚmieciarka.WPF")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("CzokoŚmieciarka.WPFv2")]
|
||||
[assembly: AssemblyProduct("CzokoŚmieciarka.WPF")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2.Properties
|
||||
namespace CzokoŚmieciarka.WPF.Properties
|
||||
{
|
||||
|
||||
|
||||
@ -44,7 +44,7 @@ namespace CzokoŚmieciarka.WPFv2.Properties
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CzokoŚmieciarka.WPFv2.Properties.Resources", typeof(Resources).Assembly);
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CzokoŚmieciarka.WPF.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
@ -8,7 +8,7 @@
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2.Properties
|
||||
namespace CzokoŚmieciarka.WPF.Properties
|
||||
{
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
|
||||
</startup>
|
||||
</configuration>
|
@ -1,107 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{2BADDDA9-A77C-4FB2-9F28-4DAE712E8947}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>CzokoŚmieciarka.WPFv2</RootNamespace>
|
||||
<AssemblyName>CzokoŚmieciarka.WPFv2</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Interfaces\IWPFObject.cs" />
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Models\Dump.cs" />
|
||||
<Compile Include="Models\GarbageCollector.cs" />
|
||||
<Compile Include="Models\House.cs" />
|
||||
<Compile Include="Models\ImageContainer.cs" />
|
||||
<Compile Include="Models\Road.cs" />
|
||||
<Compile Include="Models\Road2.cs" />
|
||||
<Compile Include="Properties\Annotations.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.0 KiB |
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2.Interfaces
|
||||
{
|
||||
public interface IWPFObject
|
||||
{
|
||||
Image Image { get; }
|
||||
Coords Coords { get; set; }
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<Window x:Class="CzokoŚmieciarka.WPFv2.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CzokoŚmieciarka.WPFv2"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="800" Width="800"
|
||||
KeyDown="MainWindow_OnKeyDown">
|
||||
<Grid Margin="0">
|
||||
<Canvas Name="Board" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Top"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
@ -1,137 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using CzokoŚmieciarka.DataModels.Enums;
|
||||
using CzokoŚmieciarka.DataModels.GeneralModels.Models;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
using CzokoŚmieciarka.WPFv2.Interfaces;
|
||||
using CzokoŚmieciarka.WPFv2.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for MainWindow.xaml
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public static int Columns = 9;
|
||||
public static int Rows = 9;
|
||||
IWPFObject[,] Objects = new IWPFObject[Columns,Rows];
|
||||
private IEnumerable<AGarbageCollectorContainer> GarbageCollectorContainers;
|
||||
private WPFGarbageCollector garbageCollector;
|
||||
public MainWindow()
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
BoardInitialize();
|
||||
}
|
||||
|
||||
private void MainWindow_OnKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
||||
if (e.Key == Key.Space)
|
||||
{
|
||||
garbageCollector.MoveLeft();
|
||||
//routePlanningEngine.PerformStep();
|
||||
}
|
||||
|
||||
Board.Children.Clear();
|
||||
Canvas.SetLeft(garbageCollector.Image, garbageCollector.Coords.X * 100);
|
||||
Canvas.SetTop(garbageCollector.Image, garbageCollector.Coords.Y * 100);
|
||||
Board.Children.Add(garbageCollector.Image);
|
||||
for (int y=0;y<Rows;y++)
|
||||
{
|
||||
for (int x = 0; x < Columns; x++)
|
||||
{
|
||||
var item = Objects[x, y];
|
||||
Canvas.SetLeft(Objects[x, y].Image, x * 100);
|
||||
Canvas.SetTop(Objects[x, y].Image, y * 100);
|
||||
Board.Children.Add(item.Image);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void BoardInitialize()
|
||||
{
|
||||
for (int y = 0; y < Rows; y++)
|
||||
{
|
||||
for (int x = 0; x < Columns; x++)
|
||||
{
|
||||
Road road = new Road();
|
||||
Objects[x, y] = road;
|
||||
Canvas.SetLeft(Objects[x, y].Image, x * 100);
|
||||
Canvas.SetTop(Objects[x, y].Image, y * 100);
|
||||
Board.Children.Add(Objects[x, y].Image);
|
||||
}
|
||||
|
||||
}
|
||||
//Objects[2,7] = new WPFDump(new TypeOfGarbage(GarbageType.Glass,1,1), 10000,new Coords(2,7));
|
||||
//Grid.SetColumn(Objects[2, 7].Image, 2);
|
||||
//Grid.SetRow(Objects[2, 7].Image, 7);
|
||||
//Board.Children.Add(Objects[2, 7].Image);
|
||||
//Objects[3,7] = new WPFDump(new TypeOfGarbage(GarbageType.Organic,1,1),10000, new Coords(3,7));
|
||||
//Grid.SetColumn(Objects[3, 7].Image, 3);
|
||||
//Grid.SetRow(Objects[3, 7].Image, 7);
|
||||
//Board.Children.Add(Objects[3, 7].Image);
|
||||
//Objects[2,8] = new WPFDump(new TypeOfGarbage(GarbageType.Paper,1,1), 10000, new Coords(2,8));
|
||||
//Grid.SetColumn(Objects[2, 8].Image, 2);
|
||||
//Grid.SetRow(Objects[2, 8].Image, 8);
|
||||
//Board.Children.Add(Objects[2, 8].Image);
|
||||
//Objects[3,8] = new WPFDump(new TypeOfGarbage(GarbageType.PlasticMetal, 1,1), 10000, new Coords(3,8));
|
||||
//Grid.SetColumn(Objects[3, 8].Image, 3);
|
||||
//Grid.SetRow(Objects[3, 8].Image, 8);
|
||||
//Board.Children.Add(Objects[3, 8].Image);
|
||||
|
||||
|
||||
GarbageCollectorContainers = new List<AGarbageCollectorContainer>()
|
||||
{
|
||||
new GarbageCollectorContainer(new TypeOfGarbage(GarbageType.Glass,1,1), 500),
|
||||
new GarbageCollectorContainer(new TypeOfGarbage(GarbageType.Organic,1,1), 500),
|
||||
new GarbageCollectorContainer(new TypeOfGarbage(GarbageType.PlasticMetal, 1,1),500),
|
||||
new GarbageCollectorContainer(new TypeOfGarbage(GarbageType.Paper, 1,1), 500)
|
||||
};
|
||||
garbageCollector = new WPFGarbageCollector(new Coords(2, 1), GarbageCollectorContainers, Columns, Rows);
|
||||
Canvas.SetLeft(garbageCollector.Image, garbageCollector.Coords.X * 100);
|
||||
Canvas.SetTop(garbageCollector.Image, garbageCollector.Coords.Y * 100);
|
||||
Board.Children.Add(garbageCollector.Image);
|
||||
//CollectorInfo.ItemsSource = garbageCollector;
|
||||
//CollectorInfo.Items.Add(garbageCollector);
|
||||
//CollectorInfo.Columns.Add(new DataGridTextColumn {Header="X", Binding = new Binding("Coords.X")});
|
||||
//CollectorInfo.Columns.Add(new DataGridTextColumn { Header = "Y", Binding = new Binding("Coords.Y") });
|
||||
IEnumerable<TrashCan> trashCans = new List<TrashCan>()
|
||||
{
|
||||
new TrashCan(new TypeOfGarbage(GarbageType.Glass,1,1), 500, new Garbage(new TypeOfGarbage(GarbageType.Glass,1,1), 100)),
|
||||
new TrashCan(new TypeOfGarbage(GarbageType.Organic,1,1), 500, new Garbage(new TypeOfGarbage(GarbageType.Organic,1,1), 100)),
|
||||
new TrashCan(new TypeOfGarbage(GarbageType.Paper,1,1), 500, new Garbage(new TypeOfGarbage(GarbageType.Paper,1,1), 100)),
|
||||
new TrashCan(new TypeOfGarbage(GarbageType.PlasticMetal,1,1), 500, new Garbage(new TypeOfGarbage(GarbageType.PlasticMetal,1,1), 100))
|
||||
};
|
||||
|
||||
WPFHouse house = new WPFHouse(new Coords(1, 3), trashCans);
|
||||
Objects[1, 3] = house;
|
||||
Canvas.SetLeft(Objects[1, 3].Image, 1 * 100);
|
||||
Canvas.SetTop(Objects[1, 3].Image, 3 * 100);
|
||||
Board.Children.Add(Objects[1, 3].Image);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|