Compare commits

...

93 Commits

Author SHA1 Message Date
ryuga4
281f31aec9 init 2019-06-11 23:17:44 +02:00
ryuga4
f6e30ed848 dane 2019-06-08 14:12:15 +02:00
ryuga4
b66d57b27d zapis stanow 2019-05-22 00:11:35 +02:00
ryuga4
627a9c7fc0 mapy 1-4 2019-05-14 23:05:37 +02:00
ryuga4
1215d9549e lepszy best first jeszcze 2019-05-14 21:42:05 +02:00
ryuga4
80902cc628 lepszy best first jeszcze 2019-05-14 21:14:55 +02:00
ryuga4
f1293b88eb to dla cb dulak 2019-05-14 20:35:37 +02:00
ryuga4
11c1c934fc best first 2019-05-14 19:55:00 +02:00
ryuga4
ef2ef838a2 Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame 2019-05-14 17:39:04 +02:00
ryuga4
132aff1d83 nie wiem co 2019-05-14 17:39:00 +02:00
Michał Dulski
d2ccf63523 Wyświetlanie pasków zapełnienia śmieciarki i wysypisk 2019-05-14 14:12:04 +02:00
ryuga4
c3b0d5f609 poprawiony bfs 2019-05-13 18:27:49 +02:00
ryuga4
3c7c3bbba5 lepszy dfs 2019-05-13 18:15:48 +02:00
ryuga4
5997093c03 empty house naprawione 2019-05-13 17:57:32 +02:00
ryuga4
b9771b34b6 Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame 2019-05-13 17:34:25 +02:00
Michał Dulski
5f49fa8367 Aktualizacja mapy testowej 2019-05-13 19:27:24 +02:00
Michał Dulski
091b11445e Wyświetlanie ilości śmieci w śmieciarce 2019-05-13 19:22:46 +02:00
ryuga4
e7e3658c97 szybciej 2019-05-13 17:34:23 +02:00
Michał Dulski
1aa5affaf3 Wyświetlanie pasków śmieci przy domkach 2019-05-13 17:19:02 +02:00
ryuga4
a70153a4d3 naprawione smieci 2019-05-13 14:12:28 +02:00
ryuga4
e861f1fa7b Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame 2019-05-13 13:40:55 +02:00
Michał Dulski
42180bf440 wyświetlanie zawartości śmietników w domach 2019-05-13 15:19:24 +02:00
ryuga4
4aa62c1f78 nie wiem co 2019-05-13 13:40:52 +02:00
Michał Dulski
9669431c3a Poziom zapełnienia niektórych śmietników z domów nie dodaje się do displayera 2019-05-12 13:49:19 +02:00
Michał Dulski
0d840d4a77 zalążek wyświetlania info o domkach 2019-05-11 16:03:29 +02:00
Michał Dulski
b192473972 Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame 2019-05-11 15:14:46 +02:00
Michał Dulski
8d1f79e662 s 2019-05-11 15:14:40 +02:00
ryuga4
6f81261072 c5 2019-05-06 12:04:38 +02:00
ryuga4
68c3b811c0 c5 2019-05-05 17:54:12 +02:00
ryuga4
e96126a917 bfs 2019-05-04 15:56:55 +02:00
ryuga4
1afa3fdb70 bfs 2019-05-04 15:53:04 +02:00
Michał Dulski
2b996b21ee Zmiana tekstur 2019-04-23 16:38:50 +02:00
ryuga4
3ebb4d0e8e 3 mapy 2019-04-23 11:29:21 +02:00
Michał Dulski
977368ad02 Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame 2019-04-23 11:24:37 +02:00
ryuga4
0eeaeb2e44 :/ 2019-04-23 11:24:07 +02:00
Michał Dulski
aa08fb43d9 DisplayInfo 2019-04-23 11:24:01 +02:00
ryuga4
d26d9e1bc8 :/ 2019-04-23 09:30:16 +02:00
ryuga4
39776ce06a XDDDD 2019-04-23 06:32:35 +02:00
Bartosz Chyzy
3167789721 Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into Map_Editor 2019-04-22 22:20:06 +02:00
Bartosz Chyzy
2e44f4653b MapEditor 2019-04-22 22:11:56 +02:00
Michał Dulski
cdffbd636d Merge branch 'MonoGame' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame 2019-04-22 16:51:32 +02:00
c7b71496af Update 'Map.xml' 2019-04-22 14:51:47 +00:00
Michał Dulski
05fc45abda Ładowanie mapy z xml'a 2019-04-22 16:50:40 +02:00
ryuga4
97cd3630fc naprawione 2019-04-22 14:55:47 +02:00
ryuga4
0b534d67b3 naprawione 2019-04-22 14:38:11 +02:00
ryuga4
b0bfeed022 Merge branch 'Dulak-caution' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into MonoGame 2019-04-22 14:35:02 +02:00
6ee17031c6 Add 'Map.xml' 2019-04-22 12:34:50 +00:00
ryuga4
b4fc4af504 xd 2019-04-22 14:32:18 +02:00
ryuga4
7a2548f13d xd 2019-04-22 14:29:02 +02:00
Michał Dulski
c3875873aa Steps nie pyka 2019-04-22 14:19:55 +02:00
Michał Dulski
9668e23646 ło panie 2019-04-22 14:17:44 +02:00
Michał Dulski
dc380b2b89 Skalowanie tekstur 2019-04-22 10:39:00 +02:00
Michał Dulski
deeb13eb82 Reasumując wszystkie aspekty kwintesencji tematu, dochodzę do fundamentalnej konkluzji, warto commitować 2019-04-22 09:24:16 +02:00
ryuga4
e1aac08c6b dfs dziala prawie 2019-04-22 03:16:30 +02:00
Michał Dulski
cb32b99cd9 Dodano projekt MonoGame 2019-04-21 15:05:06 +02:00
ryuga4
1488c8f153 init 2019-04-21 02:43:36 +02:00
ryuga4
a146883668 dupa 2019-04-21 01:30:42 +02:00
ryuga4
0260ff777c dupa 2019-04-21 01:28:38 +02:00
Michał Dulski
9aaa79a5c5 Zmiana pola Image w modelach 2019-04-18 00:43:48 +02:00
s434678
57c53b9bdb Stefan 2019-04-10 12:32:32 +02:00
s434678
aece006b15 Merged 2019-04-10 11:54:39 +02:00
s434678
bad680f65e x 2019-04-10 11:53:12 +02:00
Michał Dulski
6071eb60b9 Dodany obiekt Road2 i odświeżanie Boardu z obiektami 2019-04-08 17:07:08 +02:00
Michał Dulski
e105382084 Dodano drugi konstruktor do ATrashCan 2019-04-08 16:43:52 +02:00
Michał Dulski
9ef87dc4fe Usunięto starego wpf'a i AI_Naive zmieniono z .net core na framework 2019-04-08 16:02:26 +02:00
Michał Dulski
c2f5acee58 Dodano przejście między domkami 2019-04-08 15:51:08 +02:00
Michał Dulski
cc9ccd26ba Tworzenie Mapy 2019-04-08 15:47:01 +02:00
Michał Dulski
163afa21d9 Skalowanie okna i informacje o zawartości śmieci w śmieciarce 2019-04-03 11:52:48 +02:00
Michał Dulski
9f8d9fb785 Informacje o pozycji śmieciarki wyświetlane w oknie 2019-04-02 23:09:32 +02:00
Michał Dulski
3613cad37f Dodano event OnKeyDown 2019-04-02 16:14:33 +02:00
Michał Dulski
18e2eb092c Wyświetlanie Śmieciary na drugim gridzie 2019-04-01 23:47:13 +02:00
Michał Dulski
f08775224a Wyświetlanie domków 2019-04-01 23:10:31 +02:00
Michał Dulski
fe902bb551 Changed ImageBrush to Image 2019-04-01 21:58:40 +02:00
Michał Dulski
1abeccfcdc revert 2019-04-01 21:53:06 +02:00
Michał Dulski
e1bb924f69 Merge branch 'Dulak-caution' of https://git.wmi.amu.edu.pl/s434678/Czoko_Smieciarka into Dulak-caution 2019-04-01 21:48:16 +02:00
Michał Dulski
3f101a763b revert 2019-04-01 21:47:51 +02:00
Michał Dulski
3c9d7872fb Better wpf soon 2019-04-01 21:33:46 +02:00
Michał Dulski
59a15ae6d5 Better wpf soon 2019-03-27 15:54:50 +01:00
Michał Dulski
70b821ce36 zmiana pozycji obiektu smieciarki z interfejsu dla logiki 2019-03-27 02:00:58 +01:00
Michał Dulski
56d2a4ff75 wyświetlanie ilości śmieci 2019-03-27 01:11:14 +01:00
Michał Dulski
9ff635db9f Usprawnienie poruszania 2019-03-27 00:49:55 +01:00
Michał Dulski
d20cdcd6f9 rusza się 2019-03-26 23:25:01 +01:00
Michał Dulski
653e7cc3b7 coś tam 2019-03-26 23:20:41 +01:00
Michał Dulski
5e132690da Optymalizacja ale nie śmiga 2019-03-26 22:47:45 +01:00
ryuga4
680b87e369 Finish 3 / wiecej clonów 2019-03-26 19:46:14 +01:00
ryuga4
5429ed9346 Finish 2 2019-03-26 19:37:23 +01:00
ryuga4
a78fd3cc60 Finish 2 2019-03-26 19:37:15 +01:00
ryuga4
5af6bea5ce Init / Finish 2019-03-26 18:25:53 +01:00
Michał Dulski
b635de5a5f Organizacja kodu 2019-03-20 18:54:57 +01:00
Michał Dulski
31a9e9109c Dodano wysypisko i drobne poprawki 2019-03-20 18:27:11 +01:00
Michał Dulski
b14fd9f43f Dodano poruszanie się śmieciarki przy pomocy strzałek 2019-03-20 16:51:35 +01:00
Michał Dulski
22814fc944 Dodano grafiki domu, śmieciarki i skrzyżowania, interfejs IObject po którym dziedziczą obiekty na mapie, model śmieciarki i drogi, zmieniono nazwę Home.cs na House.cs, dodano pole Object w Tile, ale usunięto atrybut Background. Dodano łączenie obrazków i rysowanie śmieciarki. 2019-03-20 16:02:05 +01:00
s434678
bc8c6ae912 Board 2019-03-20 12:34:03 +01:00
216 changed files with 40197 additions and 647 deletions

63
.gitattributes vendored Normal file
View File

@ -0,0 +1,63 @@
###############################################################################
# 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 Normal file
View File

@ -0,0 +1,98 @@
<?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>

299
Trunk/CodeMap1.dgml Normal file
View File

@ -0,0 +1,299 @@
<?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>

View File

@ -0,0 +1,58 @@
<?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>

View File

@ -0,0 +1,36 @@
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")]

View File

@ -1,13 +0,0 @@
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)
{
}
}
}

View File

@ -1,23 +0,0 @@
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();
}
}
}

View File

@ -1,14 +0,0 @@
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)
{
}
}
}

View File

@ -1,12 +0,0 @@
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)
{
}
}
}

View File

@ -1,12 +0,0 @@
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)
{
}
}
}

View File

@ -1,18 +0,0 @@
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; }
}
}

View File

@ -31,8 +31,6 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
@ -44,25 +42,12 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<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" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Enums\" />
<Folder Include="Interfaces\" />
<Folder Include="Models\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@ -1,42 +0,0 @@
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; }
}
}

View File

@ -1,21 +0,0 @@
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; }
}
}

View File

@ -1,17 +0,0 @@
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; }
}
}

View File

@ -1,7 +0,0 @@
namespace CzokoŚmieciarka.DataModels.Interfaces
{
public interface IStep
{
void Invoke();
}
}

View File

@ -0,0 +1,12 @@
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
{
}
}

View File

@ -0,0 +1,12 @@
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
{
}
}

View File

@ -1,14 +0,0 @@
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();
}
}

View File

@ -1,14 +0,0 @@
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; }
}
}

View File

@ -1,10 +0,0 @@
namespace CzokoŚmieciarka.DataModels.Interfaces.TrashCans
{
public abstract class AGarbageCollectorContainer : ATrashCan
{
protected AGarbageCollectorContainer(ITypeOfGarbage typeOfGarbage, int maxVolume) : base(typeOfGarbage, maxVolume)
{
}
}
}

View File

@ -1,44 +0,0 @@
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;
}
}
}

View File

@ -1,30 +0,0 @@
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);
}
}
}

View File

@ -1,38 +0,0 @@
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);
}
}
}

View File

@ -1,34 +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.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;
}
}
}
}

View File

@ -1,42 +0,0 @@
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);
}
}
}

View File

@ -0,0 +1,9 @@
<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>

View File

@ -0,0 +1,17 @@
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
{
}
}

View File

@ -4,10 +4,10 @@
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{06937DFB-242D-46BD-9A4B-486D156B62A9}</ProjectGuid> <ProjectGuid>{C510F713-91EC-465F-AD99-5BA051072E90}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>CzokoŚmieciarka.WPF</RootNamespace> <RootNamespace>CzokoŚmieciarka.UserInterface.WPF</RootNamespace>
<AssemblyName>CzokoŚmieciarka.WPF</AssemblyName> <AssemblyName>CzokoŚmieciarka.UserInterface.WPF</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
@ -69,8 +69,6 @@
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Models\Board.cs" />
<Compile Include="Models\Tile.cs" />
<Compile Include="Properties\AssemblyInfo.cs"> <Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType> <SubType>Code</SubType>
</Compile> </Compile>

View File

@ -0,0 +1,15 @@
<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>

View File

@ -0,0 +1,69 @@
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);
}
}
}
}
}

View File

@ -0,0 +1,55 @@
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")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <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;
}
}
}
}

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <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;
}
}
}
}

View File

@ -3,30 +3,31 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio 15
VisualStudioVersion = 15.0.28307.136 VisualStudioVersion = 15.0.28307.136
MinimumVisualStudioVersion = 10.0.40219.1 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}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoGameView", "MonoGameView\MonoGameView.csproj", "{EBE9431C-9B66-4300-B288-7A0F7B899415}"
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 EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|Any CPU.ActiveCfg = Debug|x86
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|Any CPU.Build.0 = Debug|x86
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|ARM.ActiveCfg = Debug|x86
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.Build.0 = Release|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x64.ActiveCfg = Debug|x86
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x86.ActiveCfg = Debug|x86
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.Build.0 = Debug|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Debug|x86.Build.0 = Debug|x86
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|Any CPU.ActiveCfg = Release|x86
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.Build.0 = Release|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|ARM.ActiveCfg = Release|x86
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x64.ActiveCfg = Release|x86
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.Build.0 = Debug|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x86.ActiveCfg = Release|x86
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.ActiveCfg = Release|Any CPU {EBE9431C-9B66-4300-B288-7A0F7B899415}.Release|x86.Build.0 = Release|x86
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View File

@ -0,0 +1,3 @@
<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>

View File

@ -0,0 +1,25 @@

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

View File

@ -0,0 +1,10 @@
<?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>

View File

@ -0,0 +1,16 @@
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"];
}
}

View File

@ -0,0 +1,31 @@
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.");
}
}
}

View File

@ -0,0 +1,59 @@
<?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>

View File

@ -0,0 +1,36 @@
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.");
}
}
}

View File

@ -0,0 +1,22 @@
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; }
}
}

View File

@ -0,0 +1,83 @@
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;
}
}
}
}

View File

@ -0,0 +1,36 @@
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")]

View File

@ -0,0 +1,118 @@
#----------------------------- 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

View File

@ -0,0 +1,60 @@
<?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>&#32;</Start>
<End>&#126;</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,91 @@
<?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>

View File

@ -0,0 +1,94 @@
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);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

View File

@ -0,0 +1,14 @@
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; }
}
}

View File

@ -0,0 +1,38 @@
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;
}
}
}
}

View File

@ -0,0 +1,35 @@
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));
}
}
}

View File

@ -6,18 +6,20 @@ using System.Threading.Tasks;
using CzokoŚmieciarka.DataModels.Interfaces; using CzokoŚmieciarka.DataModels.Interfaces;
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans; using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
using CzokoŚmieciarka.DataModels.Models; using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.MonoGame.Interfaces;
namespace CzokoŚmieciarka.DataModels.GeneralModels.Models namespace CzokoŚmieciarka.MonoGame.Models
{ {
public class GarbageLocalization : IGarbageLocalization class WPFHouse : IGarbageLocalization, IWPFObject
{ {
public GarbageLocalization(Coords coords, IEnumerable<ATrashCan> trashCans) public Coords Coords { get; set; }
{
this.Coords = coords;
this.TrashCans = trashCans;
}
public Coords Coords { get; }
public IEnumerable<ATrashCan> TrashCans { get; set; } public IEnumerable<ATrashCan> TrashCans { get; set; }
public WPFHouse(Coords coords, IEnumerable<ATrashCan> trashCans)
{
TrashCans = trashCans;
Coords = coords;
}
} }
} }

View File

@ -0,0 +1,41 @@
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; }
}
}

View File

@ -0,0 +1,20 @@
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()
{
}
}
}

View File

@ -0,0 +1,22 @@
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
}

View File

@ -0,0 +1,36 @@
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")]

View File

@ -0,0 +1,42 @@
<?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>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,24 +0,0 @@
<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>

View File

@ -1,53 +0,0 @@
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; }
}
}
}

View File

@ -1,15 +0,0 @@
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; }
}
}

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
</startup>
</configuration>

View File

@ -1,7 +1,7 @@
<Application x:Class="CzokoŚmieciarka.WPF.App" <Application x:Class="CzokoŚmieciarka.WPFv2.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CzokoŚmieciarka.WPF" xmlns:local="clr-namespace:CzokoŚmieciarka.WPFv2"
StartupUri="MainWindow.xaml"> StartupUri="MainWindow.xaml">
<Application.Resources> <Application.Resources>

View File

@ -6,7 +6,7 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows; using System.Windows;
namespace CzokoŚmieciarka.WPF namespace CzokoŚmieciarka.WPFv2
{ {
/// <summary> /// <summary>
/// Interaction logic for App.xaml /// Interaction logic for App.xaml

View File

@ -0,0 +1,107 @@
<?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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,17 @@
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; }
}
}

View File

@ -0,0 +1,14 @@
<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>

View File

@ -0,0 +1,137 @@
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);
}
}
}

View File

@ -0,0 +1,47 @@
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 System.Windows.Media.Imaging;
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;
namespace CzokoŚmieciarka.WPFv2.Models
{
class WPFDump : ADump, IWPFObject
{
public string ImagePath { get; set; }
public Image Image { get; set; }
public WPFDump(ITypeOfGarbage typeofGarbage, int maxVolume, Coords localization) : base ( typeofGarbage, maxVolume, localization)
{
Image = new Image();
switch (typeofGarbage.GarbageType)
{
case GarbageType.Glass:
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\glass.png";
Image.Source = new BitmapImage(new Uri(ImagePath));
break;
case GarbageType.PlasticMetal:
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\plasticmetal.png";
Image.Source = new BitmapImage(new Uri(ImagePath));
break;
case GarbageType.Organic:
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\organic.png";
Image.Source = new BitmapImage(new Uri(ImagePath));
break;
case GarbageType.Paper:
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\paper.png";
Image.Source = new BitmapImage(new Uri(ImagePath));
break;
}
}
}
}

View File

@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector;
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.WPFv2.Annotations;
using CzokoŚmieciarka.WPFv2.Interfaces;
namespace CzokoŚmieciarka.WPFv2.Models
{
class WPFGarbageCollector : AGarbageCollector, IWPFObject, INotifyPropertyChanged
{
public Image Image { get; set; }
//{
// get
// {
// return new Image
// {
// Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\garbageCollector.png"))
// };
// }
//}
public WPFGarbageCollector(Coords startPosition, IEnumerable<AGarbageCollectorContainer> trashContainers, int columns, int rows) : base(startPosition, trashContainers, columns, rows)
{
Image = new Image()
{
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\garbageCollector.png")),
Width = 100,
Height = 100
};
}
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}

View File

@ -0,0 +1,41 @@
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 System.Windows.Media.Imaging;
using CzokoŚmieciarka.DataModels.Interfaces;
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.WPFv2.Interfaces;
namespace CzokoŚmieciarka.WPFv2.Models
{
class WPFHouse : IGarbageLocalization, IWPFObject
{
public Coords Coords { get; set; }
public IEnumerable<ATrashCan> TrashCans { get; set; }
public Image Image { get; set; }
//{ get {
// return new Image
// {
// Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\house.png"))
// };
// } }
public WPFHouse(Coords coords, IEnumerable<ATrashCan> trashCans)
{
Image = new Image()
{
Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\house.png")),
Width = 100,
Height = 100
};
TrashCans = trashCans;
Coords = coords;
}
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
namespace CzokoŚmieciarka.WPFv2.Models
{
public sealed class ImageContainer
{
private static ImageContainer _Instance = null;
private Dictionary<string, Image> Images;
public static ImageContainer Instance {
get {
if (_Instance == null)
{
_Instance = new ImageContainer();
}
return _Instance;
}
}
public ImageContainer()
{
Images = new Dictionary<string, Image>();
Images.Add("Road", new Image { Source = new BitmapImage(new Uri(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png")) });
}
public Image GetImage(string s)
{
return Images[s];
}
}
}

View File

@ -0,0 +1,32 @@
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 System.Windows.Media.Imaging;
using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.DataModels.Interfaces;
using CzokoŚmieciarka.WPFv2.Interfaces;
namespace CzokoŚmieciarka.WPFv2.Models
{
class Road : IWPFObject, IRoad
{
public Image Image
{
get
{
return ImageContainer.Instance.GetImage("Road");
}
}
public Road()
{
}
public Coords Coords { get; set; }
}
}

View File

@ -0,0 +1,29 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
using CzokoŚmieciarka.DataModels.Models;
using CzokoŚmieciarka.WPFv2.Interfaces;
using CzokoŚmieciarka.DataModels.Interfaces;
namespace CzokoŚmieciarka.WPFv2.Models
{
class Road2 : IWPFObject, IRoad
{
public string ImagePath { get; set; }
public Image Image { get; set; }
public Coords Coords { get; set; }
public Road2()
{
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersectionRED.png";
Image = new Image
{
Source = new BitmapImage(new Uri(ImagePath))
};
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -7,11 +7,11 @@ using System.Windows;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("CzokoŚmieciarka.WPF")] [assembly: AssemblyTitle("CzokoŚmieciarka.WPFv2")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CzokoŚmieciarka.WPF")] [assembly: AssemblyProduct("CzokoŚmieciarka.WPFv2")]
[assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace CzokoŚmieciarka.WPF.Properties namespace CzokoŚmieciarka.WPFv2.Properties
{ {
@ -44,7 +44,7 @@ namespace CzokoŚmieciarka.WPF.Properties
{ {
if ((resourceMan == null)) if ((resourceMan == null))
{ {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CzokoŚmieciarka.WPF.Properties.Resources", typeof(Resources).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CzokoŚmieciarka.WPFv2.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace CzokoŚmieciarka.WPF.Properties namespace CzokoŚmieciarka.WPFv2.Properties
{ {

Some files were not shown because too many files have changed in this diff Show More