62 lines
1.8 KiB
C#
62 lines
1.8 KiB
C#
|
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;
|
|||
|
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];
|
|||
|
public MainWindow()
|
|||
|
{
|
|||
|
ColumnDefinition column;
|
|||
|
RowDefinition row;
|
|||
|
InitializeComponent();
|
|||
|
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;
|
|||
|
for(int rows = 0; rows < 3; rows++)
|
|||
|
{
|
|||
|
row = new RowDefinition();
|
|||
|
CollectorInfo.RowDefinitions.Add(row);
|
|||
|
}
|
|||
|
|
|||
|
for (int columns = 0; columns < 2; columns++)
|
|||
|
{
|
|||
|
column = new ColumnDefinition();
|
|||
|
CollectorInfo.ColumnDefinitions.Add(column);
|
|||
|
}
|
|||
|
CollectorInfo.ShowGridLines = true;
|
|||
|
}
|
|||
|
}
|
|||
|
}
|