Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6e6d115a59 | ||
|
aaeb1b3adb | ||
|
680b87e369 | ||
|
5429ed9346 | ||
|
a78fd3cc60 | ||
|
5af6bea5ce | ||
|
b635de5a5f | ||
|
31a9e9109c | ||
|
b14fd9f43f | ||
|
22814fc944 | ||
|
bc8c6ae912 |
299
Trunk/CodeMap1.dgml
Normal 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>
|
@ -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" />
|
||||||
|
@ -35,8 +35,13 @@ namespace CzokoŚmieciarka.DataModels.Interfaces.GarbageCollector
|
|||||||
public Coords MoveRight()
|
public Coords MoveRight()
|
||||||
{
|
{
|
||||||
return new Coords(Position.X+1, Position.Y);
|
return new Coords(Position.X+1, Position.Y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
return this.MemberwiseClone();
|
||||||
|
}
|
||||||
|
|
||||||
public IEnumerable<AGarbageCollectorContainer> TrashContainers { get; }
|
public IEnumerable<AGarbageCollectorContainer> TrashContainers { get; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ using CzokoŚmieciarka.DataModels.Models;
|
|||||||
|
|
||||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||||
{
|
{
|
||||||
public interface IGarbageCollector
|
public interface IGarbageCollector : ICloneable
|
||||||
{
|
{
|
||||||
Coords Position { get; }
|
Coords Position { get; }
|
||||||
Coords MoveUp();
|
Coords MoveUp();
|
||||||
|
@ -8,7 +8,7 @@ using CzokoŚmieciarka.DataModels.Models;
|
|||||||
|
|
||||||
namespace CzokoŚmieciarka.DataModels.Interfaces
|
namespace CzokoŚmieciarka.DataModels.Interfaces
|
||||||
{
|
{
|
||||||
public interface IGarbageLocalization
|
public interface IGarbageLocalization : ICloneable
|
||||||
{
|
{
|
||||||
Coords Coords { get; }
|
Coords Coords { get; }
|
||||||
|
|
||||||
|
@ -9,6 +9,6 @@ namespace CzokoŚmieciarka.DataModels.Interfaces.RoutePlanningEngine
|
|||||||
{
|
{
|
||||||
public interface IRoutePlanningEngine
|
public interface IRoutePlanningEngine
|
||||||
{
|
{
|
||||||
IEnumerable<IStep> CalculateStep();
|
void PerformStep();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace CzokoŚmieciarka.DataModels.Interfaces.TrashCans
|
namespace CzokoŚmieciarka.DataModels.Interfaces.TrashCans
|
||||||
{
|
{
|
||||||
public abstract class ATrashCan
|
public abstract class ATrashCan : ICloneable
|
||||||
{
|
{
|
||||||
protected ATrashCan(ITypeOfGarbage typeOfGarbage, int maxVolume)
|
protected ATrashCan(ITypeOfGarbage typeOfGarbage, int maxVolume)
|
||||||
{
|
{
|
||||||
@ -32,8 +32,13 @@ namespace CzokoŚmieciarka.DataModels.Interfaces.TrashCans
|
|||||||
|
|
||||||
this.Garbage = newGarbage;
|
this.Garbage = newGarbage;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public object Clone()
|
||||||
|
{
|
||||||
|
return this.MemberwiseClone();
|
||||||
|
}
|
||||||
|
|
||||||
public virtual AGarbage TakeGarbage()
|
public virtual AGarbage TakeGarbage()
|
||||||
{
|
{
|
||||||
var result = (AGarbage)this.Garbage.Clone();
|
var result = (AGarbage)this.Garbage.Clone();
|
||||||
|
@ -26,5 +26,14 @@ namespace CzokoŚmieciarka.DataModels.Models
|
|||||||
{
|
{
|
||||||
return !(a == b);
|
return !(a == b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Coords operator + (Coords a, Coords b)
|
||||||
|
{
|
||||||
|
return new Coords(a.X + b.X, a.Y + b.Y);
|
||||||
|
}
|
||||||
|
public static Coords operator -(Coords a, Coords b)
|
||||||
|
{
|
||||||
|
return new Coords(a.X - b.X, a.Y - b.Y);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,6 @@ using System.Drawing;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Shapes;
|
|
||||||
using CzokoŚmieciarka.DataModels.Interfaces;
|
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||||
|
|
||||||
namespace CzokoŚmieciarka.DataModels.Models
|
namespace CzokoŚmieciarka.DataModels.Models
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Components\CzokoŚmieciarka.DataModels\CzokoŚmieciarka.DataModels.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
</Project>
|
113
Trunk/Czoko_Smieciarka.AI_Naive/RoutePlanningEngine.cs
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
using CzokoŚmieciarka.DataModels.Enums;
|
||||||
|
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||||
|
using CzokoŚmieciarka.DataModels.Interfaces.RoutePlanningEngine;
|
||||||
|
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||||
|
using CzokoŚmieciarka.DataModels.Models;
|
||||||
|
using CzokoŚmieciarka.DataModels.Models.Steps;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
namespace Czoko_Smieciarka.AI_Naive
|
||||||
|
{
|
||||||
|
public class RoutePlanningEngine : IRoutePlanningEngine
|
||||||
|
{
|
||||||
|
public IGarbageCollector Collector { get; }
|
||||||
|
public IEnumerable<IGarbageLocalization> Cans { get; }
|
||||||
|
public IEnumerable<ADump> Dumps { get; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
enum State { TravelToDump, TravelToCan, Wait, Finish }
|
||||||
|
public Coords Destination { get; set; }
|
||||||
|
public object DestinationObject { get; set; }
|
||||||
|
private State CurrentState { get; set; }
|
||||||
|
|
||||||
|
public void PerformStep()
|
||||||
|
{
|
||||||
|
PerformMove();
|
||||||
|
}
|
||||||
|
|
||||||
|
public RoutePlanningEngine(IGarbageCollector collector, IEnumerable<IGarbageLocalization> cans, IEnumerable<ADump> dumps)
|
||||||
|
{
|
||||||
|
this.Collector = collector;
|
||||||
|
this.Cans = cans;
|
||||||
|
this.Dumps = dumps;
|
||||||
|
this.CurrentState = State.Wait;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private bool PerformMove()
|
||||||
|
{
|
||||||
|
|
||||||
|
switch (CurrentState)
|
||||||
|
{
|
||||||
|
case State.TravelToDump:
|
||||||
|
if (Destination == Collector.Position)
|
||||||
|
{
|
||||||
|
var dump = (DestinationObject as ADump);
|
||||||
|
var step = new SpillStep(Collector, dump, dump.TypeOfGarbage);
|
||||||
|
step.Invoke();
|
||||||
|
this.CurrentState = State.Wait;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
var dif = Destination - Collector.Position;
|
||||||
|
Direction nextDirection = (dif.X == 0) ?
|
||||||
|
((dif.Y > 0) ? Direction.Up : Direction.Down) :
|
||||||
|
((dif.X > 0) ? Direction.Right : Direction.Left);
|
||||||
|
|
||||||
|
var step = new MoveStep(nextDirection, Collector);
|
||||||
|
step.Invoke();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case State.TravelToCan:
|
||||||
|
if (Destination == Collector.Position)
|
||||||
|
{
|
||||||
|
var garbage = (DestinationObject as IGarbageLocalization);
|
||||||
|
foreach (var item in garbage.TrashCans)
|
||||||
|
{
|
||||||
|
var step = new CollectStep(Collector, garbage, item.TypeOfGarbage);
|
||||||
|
step.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CurrentState = State.Wait;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var dif = Destination - Collector.Position;
|
||||||
|
Direction nextDirection = (dif.X == 0) ?
|
||||||
|
((dif.Y > 0) ? Direction.Up : Direction.Down) :
|
||||||
|
((dif.X > 0) ? Direction.Right : Direction.Left);
|
||||||
|
|
||||||
|
var step = new MoveStep(nextDirection, Collector);
|
||||||
|
step.Invoke();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case State.Wait:
|
||||||
|
var notEmpty = Collector.TrashContainers.Where(i => i.FillPercent > 0);
|
||||||
|
if (notEmpty.Any())
|
||||||
|
{
|
||||||
|
var destDump = Dumps.First(i => i.TypeOfGarbage == notEmpty.First().TypeOfGarbage);
|
||||||
|
this.Destination = destDump.Localization;
|
||||||
|
this.CurrentState = State.TravelToDump;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
var notEmptyCans = Cans.Where(i => i.TrashCans.Any(j => j.FillPercent > 0));
|
||||||
|
if (notEmptyCans.Any())
|
||||||
|
{
|
||||||
|
this.Destination = notEmptyCans.First().Coords;
|
||||||
|
this.CurrentState = State.TravelToCan;
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
this.CurrentState = State.Finish;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case State.Finish:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,37 +1,43 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
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}") = "CzokoŚmieciarka.DataModels", "Components\CzokoŚmieciarka.DataModels\CzokoŚmieciarka.DataModels.csproj", "{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}"
|
||||||
EndProject
|
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}"
|
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
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CzokoŚmieciarka.WPF", "Interface\CzokoŚmieciarka.WPF\CzokoŚmieciarka.WPF.csproj", "{06937DFB-242D-46BD-9A4B-486D156B62A9}"
|
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
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Czoko_Smieciarka.AI_Naive", "Czoko_Smieciarka.AI_Naive\Czoko_Smieciarka.AI_Naive.csproj", "{A1F1D99A-4E5B-4389-B776-321D8A5976EE}"
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
EndProject
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Global
|
||||||
Release|Any CPU = Release|Any CPU
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
EndGlobalSection
|
Debug|Any CPU = Debug|Any CPU
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
Release|Any CPU = Release|Any CPU
|
||||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
EndGlobalSection
|
||||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.Build.0 = Release|Any CPU
|
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{F2E11FEE-C5AC-47D2-BA9C-819909B6DFF7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{A3D5DA96-69D7-463F-B1EE-6FC70716E3B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.Build.0 = Release|Any CPU
|
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
EndGlobalSection
|
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
{06937DFB-242D-46BD-9A4B-486D156B62A9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
HideSolutionNode = FALSE
|
{A1F1D99A-4E5B-4389-B776-321D8A5976EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
EndGlobalSection
|
{A1F1D99A-4E5B-4389-B776-321D8A5976EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
{A1F1D99A-4E5B-4389-B776-321D8A5976EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
SolutionGuid = {AAED00C0-3CC4-470C-8623-232E844D6FF2}
|
{A1F1D99A-4E5B-4389-B776-321D8A5976EE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {AAED00C0-3CC4-470C-8623-232E844D6FF2}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
|
2
Trunk/CzokoŚmieciarka.sln.DotSettings
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<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_002EWPF_002EAnnotations/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
@ -13,5 +13,6 @@ namespace CzokoŚmieciarka.WPF
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Microsoft.CSharp" />
|
<Reference Include="Microsoft.CSharp" />
|
||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
@ -70,7 +71,13 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Models\Board.cs" />
|
<Compile Include="Models\Board.cs" />
|
||||||
|
<Compile Include="Interfaces\IObject.cs" />
|
||||||
|
<Compile Include="Models\DumpWPF.cs" />
|
||||||
|
<Compile Include="Models\GarbageCollectorWPF.cs" />
|
||||||
|
<Compile Include="Models\House.cs" />
|
||||||
|
<Compile Include="Models\Road.cs" />
|
||||||
<Compile Include="Models\Tile.cs" />
|
<Compile Include="Models\Tile.cs" />
|
||||||
|
<Compile Include="Properties\Annotations.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs">
|
<Compile Include="Properties\AssemblyInfo.cs">
|
||||||
<SubType>Code</SubType>
|
<SubType>Code</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@ -96,5 +103,15 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<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="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
</Project>
|
</Project>
|
BIN
Trunk/Interface/CzokoŚmieciarka.WPF/Images/Dumps/glass.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPF/Images/Dumps/organic.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPF/Images/Dumps/paper.png
Normal file
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 27 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPF/Images/garbageCollector.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPF/Images/house.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPF/Images/intersection.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
18
Trunk/Interface/CzokoŚmieciarka.WPF/Interfaces/IObject.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using CzokoŚmieciarka.DataModels.Models;
|
||||||
|
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 interface IObject
|
||||||
|
{
|
||||||
|
Coords Location { get; set; }
|
||||||
|
string ImagePath { get; set; }
|
||||||
|
string Data { get; set; }
|
||||||
|
ImageBrush Image { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@ -6,12 +6,13 @@
|
|||||||
xmlns:local="clr-namespace:CzokoŚmieciarka.WPF"
|
xmlns:local="clr-namespace:CzokoŚmieciarka.WPF"
|
||||||
xmlns:models="clr-namespace:CzokoŚmieciarka.WPF.Models"
|
xmlns:models="clr-namespace:CzokoŚmieciarka.WPF.Models"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="MainWindow" Height="800" Width="800">
|
Title="MainWindow" Height="800" Width="800"
|
||||||
|
KeyDown="MainWindow_OnKeyDown">
|
||||||
<ItemsControl ItemsSource="{Binding Tiles}">
|
<ItemsControl ItemsSource="{Binding Tiles}">
|
||||||
<ItemsControl.Resources>
|
<ItemsControl.Resources>
|
||||||
<DataTemplate DataType="{x:Type models:Tile}">
|
<DataTemplate DataType="{x:Type models:Tile}">
|
||||||
<Grid Background="{Binding Background}">
|
<Grid Background="{Binding Object.Image}">
|
||||||
<TextBlock Text="{Binding Data}"></TextBlock>
|
<TextBlock Text="{Binding Object.Data}"></TextBlock>
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.Resources>
|
</ItemsControl.Resources>
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
@ -13,6 +14,10 @@ using System.Windows.Media;
|
|||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
using System.Windows.Shapes;
|
using System.Windows.Shapes;
|
||||||
|
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.WPF.Models;
|
using CzokoŚmieciarka.WPF.Models;
|
||||||
|
|
||||||
namespace CzokoŚmieciarka.WPF
|
namespace CzokoŚmieciarka.WPF
|
||||||
@ -22,12 +27,51 @@ namespace CzokoŚmieciarka.WPF
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
|
public List<IObject> Objects = new List<IObject>();
|
||||||
|
public GarbageCollector garbageCollector = new GarbageCollector(new Coords(0,0), new List<AGarbageCollectorContainer>());
|
||||||
|
public Board board;
|
||||||
|
private int rows = 9;
|
||||||
|
private int columns = 9;
|
||||||
|
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
|
||||||
|
|
||||||
this.DataContext = new Board(10, 10);
|
InitializeComponent();
|
||||||
|
Objects.Add(new House(columns, new Coords(3, 2)));
|
||||||
|
Objects.Add(new House(columns, new Coords(5, 8)));
|
||||||
|
Objects.Add(new House(columns, new Coords(7, 5)));
|
||||||
|
Objects.Add(new DumpWPF(columns, new Coords(2, 4), new TypeOfGarbage("glass",0,0)));
|
||||||
|
Objects.Add(new DumpWPF(columns, new Coords(2, 5), new TypeOfGarbage("plasticmetal", 0, 0)));
|
||||||
|
Objects.Add(new DumpWPF(columns, new Coords(3, 4), new TypeOfGarbage("organic", 0, 0)));
|
||||||
|
Objects.Add(new DumpWPF(columns, new Coords(3, 5), new TypeOfGarbage("paper", 0, 0)));
|
||||||
|
|
||||||
|
board = new Board(Objects, garbageCollector);
|
||||||
|
this.DataContext = board;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MainWindow_OnKeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Key == Key.Up)
|
||||||
|
{
|
||||||
|
garbageCollector.Position.Y -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.Key == Key.Down)
|
||||||
|
{
|
||||||
|
garbageCollector.Position.Y += 1;
|
||||||
|
}
|
||||||
|
if (e.Key == Key.Left)
|
||||||
|
{
|
||||||
|
garbageCollector.Position.X -= 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e.Key == Key.Right)
|
||||||
|
{
|
||||||
|
garbageCollector.Position.X += 1;
|
||||||
|
}
|
||||||
|
//board = board.BoardRefresh(Objects, garbageCollector);
|
||||||
|
//this.DataContext = board;
|
||||||
|
this.DataContext = new Board(Objects, garbageCollector);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,37 +1,62 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Drawing;
|
||||||
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
using CzokoŚmieciarka.DataModels.GeneralModels.Models;
|
||||||
|
using CzokoŚmieciarka.DataModels.Models;
|
||||||
|
|
||||||
namespace CzokoŚmieciarka.WPF.Models
|
namespace CzokoŚmieciarka.WPF.Models
|
||||||
{
|
{
|
||||||
public class Board
|
public class Board
|
||||||
{
|
{
|
||||||
int _rows;
|
static int _rows = 9;
|
||||||
int _columns;
|
static int _columns = 9;
|
||||||
List<Tile> _tiles = new List<Tile>();
|
List<Tile> _tiles = new List<Tile>();
|
||||||
|
private GarbageCollectorWPF garbageCollectorWPF = new GarbageCollectorWPF(_columns, new Coords(0,0), AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\garbageCollector.png");
|
||||||
|
|
||||||
public Board(int rows, int columns)
|
public Board(List<IObject> objects, GarbageCollector garbageCollector)
|
||||||
{
|
{
|
||||||
_rows = rows;
|
for (int r = 0; r < _rows; r++)
|
||||||
_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++)
|
for (int c = 0; c < _columns; c++)
|
||||||
{
|
{
|
||||||
|
Road road = new Road(AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\intersection.png");
|
||||||
_tiles.Add(new Tile()
|
_tiles.Add(new Tile()
|
||||||
{
|
{
|
||||||
Data = string.Format("Dirt {0}", r * 10 + c),
|
Data = string.Format(""),
|
||||||
Background = imgBrush
|
Object = road
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach(var item in objects)
|
||||||
|
{
|
||||||
|
_tiles[item.Location.X + item.Location.Y].Object = item;
|
||||||
|
}
|
||||||
|
garbageCollectorWPF.Move(_columns, garbageCollector);
|
||||||
|
_tiles[garbageCollectorWPF.Location.X + garbageCollectorWPF.Location.Y].Object.Image = MergedBitmaps(
|
||||||
|
new Bitmap(_tiles[garbageCollectorWPF.Location.X + garbageCollectorWPF.Location.Y].Object.ImagePath),
|
||||||
|
new Bitmap(garbageCollectorWPF.ImagePath));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//public void BoardRefresh(List<IObject> objects, GarbageCollector garbageCollector)
|
||||||
|
//{
|
||||||
|
// foreach (var item in objects)
|
||||||
|
// {
|
||||||
|
// _tiles[item.Location.X + item.Location.Y * _columns].Object = item;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// garbageCollectorWPF.Move(_columns, garbageCollector);
|
||||||
|
// _tiles[garbageCollectorWPF.Location.X + garbageCollectorWPF.Location.Y].Object.Image = MergedBitmaps(
|
||||||
|
// new Bitmap(_tiles[garbageCollectorWPF.Location.X + garbageCollectorWPF.Location.Y].Object.ImagePath),
|
||||||
|
// new Bitmap(garbageCollectorWPF.ImagePath));
|
||||||
|
//}
|
||||||
|
|
||||||
public int Rows
|
public int Rows
|
||||||
{
|
{
|
||||||
get { return _rows; }
|
get { return _rows; }
|
||||||
@ -49,5 +74,22 @@ namespace CzokoŚmieciarka.WPF.Models
|
|||||||
get { return _tiles; }
|
get { return _tiles; }
|
||||||
set { _tiles = value; }
|
set { _tiles = value; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private ImageBrush MergedBitmaps(Bitmap bmp1, Bitmap bmp2)
|
||||||
|
{
|
||||||
|
using (Graphics g = Graphics.FromImage(bmp1))
|
||||||
|
{
|
||||||
|
g.DrawImage(bmp2, new Point(0,0));
|
||||||
|
}
|
||||||
|
MemoryStream ms = new MemoryStream();
|
||||||
|
((System.Drawing.Bitmap)bmp1).Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
|
||||||
|
BitmapImage image = new BitmapImage();
|
||||||
|
image.BeginInit();
|
||||||
|
ms.Seek(0, SeekOrigin.Begin);
|
||||||
|
image.StreamSource = ms;
|
||||||
|
image.EndInit();
|
||||||
|
ImageBrush result = new ImageBrush(image);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
52
Trunk/Interface/CzokoŚmieciarka.WPF/Models/DumpWPF.cs
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using CzokoŚmieciarka.DataModels.Interfaces;
|
||||||
|
using CzokoŚmieciarka.DataModels.Models;
|
||||||
|
|
||||||
|
namespace CzokoŚmieciarka.WPF.Models
|
||||||
|
{
|
||||||
|
class DumpWPF : IObject, INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public Coords Location { get; set; }
|
||||||
|
public string ImagePath { get; set; }
|
||||||
|
public string Data { get; set; }
|
||||||
|
public ImageBrush Image { get; set; }
|
||||||
|
public ITypeOfGarbage TypeOfGarbage { get; set; }
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
public DumpWPF(int columns, Coords location, ITypeOfGarbage typeOfGarbage)
|
||||||
|
{
|
||||||
|
Location = new Coords(location.X, location.Y * columns);
|
||||||
|
TypeOfGarbage = typeOfGarbage;
|
||||||
|
switch (TypeOfGarbage.GarbageType)
|
||||||
|
{
|
||||||
|
case "glass":
|
||||||
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\glass.png";
|
||||||
|
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
|
||||||
|
Data = "Szkło";
|
||||||
|
break;
|
||||||
|
case "plasticmetal":
|
||||||
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\plasticmetal.png";
|
||||||
|
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
|
||||||
|
Data = "Plastiki i metale";
|
||||||
|
break;
|
||||||
|
case "organic":
|
||||||
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\organic.png";
|
||||||
|
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
|
||||||
|
Data = "Organiczne";
|
||||||
|
break;
|
||||||
|
case "paper":
|
||||||
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\Dumps\paper.png";
|
||||||
|
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
|
||||||
|
Data = "Papier";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
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.Media;
|
||||||
|
using System.Windows.Media.Imaging;
|
||||||
|
using CzokoŚmieciarka.DataModels.GeneralModels.Models;
|
||||||
|
using CzokoŚmieciarka.DataModels.Models;
|
||||||
|
using CzokoŚmieciarka.WPF.Annotations;
|
||||||
|
|
||||||
|
namespace CzokoŚmieciarka.WPF.Models
|
||||||
|
{
|
||||||
|
public class GarbageCollectorWPF : IObject, INotifyPropertyChanged
|
||||||
|
{
|
||||||
|
public Coords Location { get; set; }
|
||||||
|
|
||||||
|
public void Move(int columns, GarbageCollector garbageCollector)
|
||||||
|
{
|
||||||
|
Location.X = garbageCollector.Position.X;
|
||||||
|
Location.Y = garbageCollector.Position.Y * columns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string ImagePath { get; set; }
|
||||||
|
public string Data { get; set; }
|
||||||
|
public ImageBrush Image { get; set; }
|
||||||
|
|
||||||
|
public GarbageCollectorWPF(int columns,Coords location, string imagePath)
|
||||||
|
{
|
||||||
|
Location = new Coords(location.X, location.Y * columns);
|
||||||
|
ImagePath = imagePath;
|
||||||
|
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public event PropertyChangedEventHandler PropertyChanged;
|
||||||
|
|
||||||
|
[NotifyPropertyChangedInvocator]
|
||||||
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
||||||
|
{
|
||||||
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
27
Trunk/Interface/CzokoŚmieciarka.WPF/Models/House.cs
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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;
|
||||||
|
using CzokoŚmieciarka.DataModels.Models;
|
||||||
|
|
||||||
|
namespace CzokoŚmieciarka.WPF.Models
|
||||||
|
{
|
||||||
|
public class House : IObject
|
||||||
|
{
|
||||||
|
public Coords Location { get; set; }
|
||||||
|
public string ImagePath { get; set; }
|
||||||
|
public string Data { get; set; }
|
||||||
|
public ImageBrush Image { get; set; }
|
||||||
|
|
||||||
|
public House(int columns, Coords location)
|
||||||
|
{
|
||||||
|
ImagePath = AppDomain.CurrentDomain.BaseDirectory + @"..\..\Images\house.png";
|
||||||
|
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
|
||||||
|
Location = new Coords(location.X, location.Y*columns);
|
||||||
|
Data = "House";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
25
Trunk/Interface/CzokoŚmieciarka.WPF/Models/Road.cs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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;
|
||||||
|
using CzokoŚmieciarka.DataModels.Models;
|
||||||
|
|
||||||
|
namespace CzokoŚmieciarka.WPF.Models
|
||||||
|
{
|
||||||
|
public class Road: IObject
|
||||||
|
{
|
||||||
|
public Coords Location { get; set; }
|
||||||
|
public string ImagePath { get; set; }
|
||||||
|
public string Data { get; set; }
|
||||||
|
public ImageBrush Image { get; set; }
|
||||||
|
|
||||||
|
public Road(string imagePath)
|
||||||
|
{
|
||||||
|
ImagePath = imagePath;
|
||||||
|
Image = new ImageBrush(new BitmapImage(new Uri(ImagePath)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -10,6 +10,6 @@ namespace CzokoŚmieciarka.WPF.Models
|
|||||||
public class Tile
|
public class Tile
|
||||||
{
|
{
|
||||||
public string Data { get; set; }
|
public string Data { get; set; }
|
||||||
public ImageBrush Background { get; set; }
|
public IObject Object { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|