revert
@ -63,6 +63,7 @@
|
||||
<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>
|
||||
@ -72,6 +73,7 @@
|
||||
<Compile Include="Models\Dump.cs" />
|
||||
<Compile Include="Models\GarbageCollector.cs" />
|
||||
<Compile Include="Models\House.cs" />
|
||||
<Compile Include="Models\Road.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
|
BIN
Trunk/Interface/CzokoŚmieciarka.WPFv2/Images/Dumps/glass.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPFv2/Images/Dumps/organic.png
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPFv2/Images/Dumps/paper.png
Normal file
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 59 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPFv2/Images/house.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
Trunk/Interface/CzokoŚmieciarka.WPFv2/Images/intersection.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2.Interfaces
|
||||
{
|
||||
public interface IWPFObject
|
||||
{
|
||||
string ImagePath { get; set; }
|
||||
Image Image { get; set; }
|
||||
}
|
||||
}
|
@ -12,6 +12,8 @@ using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
using CzokoŚmieciarka.WPFv2.Interfaces;
|
||||
using CzokoŚmieciarka.WPFv2.Models;
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2
|
||||
{
|
||||
@ -20,17 +22,25 @@ namespace CzokoŚmieciarka.WPFv2
|
||||
/// </summary>
|
||||
public partial class MainWindow : Window
|
||||
{
|
||||
public static int Columns = 9;
|
||||
public static int Rows = 9;
|
||||
IWPFObject[,] Objects = new IWPFObject[Columns,Rows];
|
||||
public MainWindow()
|
||||
{
|
||||
ColumnDefinition column;
|
||||
RowDefinition row;
|
||||
InitializeComponent();
|
||||
for(int i = 0; i < 10; i++)
|
||||
for(int i = 0; i < Rows; i++)
|
||||
{
|
||||
column = new ColumnDefinition();
|
||||
row = new RowDefinition();
|
||||
Board.ColumnDefinitions.Add(column);
|
||||
Board.RowDefinitions.Add(row);
|
||||
for (int j = 0; j < Columns; j++)
|
||||
{
|
||||
Road road = new Road("path");
|
||||
Objects[i, j] = road;
|
||||
}
|
||||
}
|
||||
|
||||
Board.ShowGridLines = true;
|
||||
|
@ -3,17 +3,19 @@ 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.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
|
||||
class WPFDump : ADump, IWPFObject
|
||||
{
|
||||
public string ImagePath { get; set; }
|
||||
public ImageBrush ImageBrush { get; set; }
|
||||
public Image Image { get; set; }
|
||||
|
||||
public WPFDump(ITypeOfGarbage typeOfGarbage, int maxVolume, Coords localization, string imagePath) : base(typeOfGarbage, maxVolume, localization)
|
||||
{
|
||||
|
@ -3,17 +3,19 @@ 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.Interfaces.GarbageCollector;
|
||||
using CzokoŚmieciarka.DataModels.Interfaces.TrashCans;
|
||||
using CzokoŚmieciarka.DataModels.Models;
|
||||
using CzokoŚmieciarka.WPFv2.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2.Models
|
||||
{
|
||||
class WPFGarbageCollector : AGarbageCollector
|
||||
class WPFGarbageCollector : AGarbageCollector, IWPFObject
|
||||
{
|
||||
public string ImagePath { get; set; }
|
||||
public ImageBrush ImageBrush { get; set; }
|
||||
public Image Image { get; set; }
|
||||
|
||||
public WPFGarbageCollector(Coords startPosition, IEnumerable<AGarbageCollectorContainer> trashContainers, string imagePath) : base(startPosition, trashContainers)
|
||||
{
|
||||
|
@ -7,14 +7,15 @@ using System.Windows.Media;
|
||||
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
|
||||
class WPFHouse : IGarbageLocalization, IWPFObject
|
||||
{
|
||||
public Coords Coords { get; }
|
||||
public IEnumerable<ATrashCan> TrashCans { get; set; }
|
||||
private string ImagePath { get; set; }
|
||||
public string ImagePath { get; set; }
|
||||
public ImageBrush ImageBrush { get; set; }
|
||||
|
||||
|
||||
|
24
Trunk/Interface/CzokoŚmieciarka.WPFv2/Models/Road.cs
Normal file
@ -0,0 +1,24 @@
|
||||
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.WPFv2.Interfaces;
|
||||
|
||||
namespace CzokoŚmieciarka.WPFv2.Models
|
||||
{
|
||||
class Road : IWPFObject
|
||||
{
|
||||
public string ImagePath { get; set; }
|
||||
public Image Image { get; set; }
|
||||
|
||||
public Road(string imagePath)
|
||||
{
|
||||
ImagePath = imagePath;
|
||||
}
|
||||
}
|
||||
}
|