Skalowanie okna i informacje o zawartości śmieci w śmieciarce
This commit is contained in:
parent
9f8d9fb785
commit
163afa21d9
@ -9,7 +9,7 @@
|
|||||||
KeyDown="MainWindow_OnKeyDown">
|
KeyDown="MainWindow_OnKeyDown">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid Name="Board" Margin="0,0,200,0"/>
|
<Grid Name="Board" Margin="0,0,200,0"/>
|
||||||
<DataGrid Name="CollectorInfo" Margin="800,0,0,0"/>
|
<DataGrid Name="CollectorInfo" HorizontalAlignment="Right" Width="192"/>
|
||||||
<Grid Name="CollectorBoard" Margin="0,0,200,0"/>
|
<Grid Name="CollectorBoard" Margin="0,0,200,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -71,9 +71,10 @@ namespace CzokoŚmieciarka.WPFv2
|
|||||||
Grid.SetColumn(garbageCollector.Image, garbageCollector.Position.X);
|
Grid.SetColumn(garbageCollector.Image, garbageCollector.Position.X);
|
||||||
CollectorBoard.Children.Add(garbageCollector.Image);
|
CollectorBoard.Children.Add(garbageCollector.Image);
|
||||||
CollectorBoard.ShowGridLines = true;
|
CollectorBoard.ShowGridLines = true;
|
||||||
CollectorInfo.Items.Add(garbageCollector);
|
CollectorInfo.ItemsSource = garbageCollector.TrashContainers;
|
||||||
CollectorInfo.Columns.Add(new DataGridTextColumn {Header="X", Binding = new Binding("Position.X")});
|
//CollectorInfo.Items.Add(garbageCollector);
|
||||||
CollectorInfo.Columns.Add(new DataGridTextColumn { Header = "Y", Binding = new Binding("Position.Y") });
|
//CollectorInfo.Columns.Add(new DataGridTextColumn {Header="X", Binding = new Binding("Position.X")});
|
||||||
|
//CollectorInfo.Columns.Add(new DataGridTextColumn { Header = "Y", Binding = new Binding("Position.Y") });
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MainWindow_OnKeyDown(object sender, KeyEventArgs e)
|
private void MainWindow_OnKeyDown(object sender, KeyEventArgs e)
|
||||||
@ -88,6 +89,7 @@ namespace CzokoŚmieciarka.WPFv2
|
|||||||
Grid.SetRow(garbageCollector.Image, garbageCollector.Position.Y);
|
Grid.SetRow(garbageCollector.Image, garbageCollector.Position.Y);
|
||||||
Grid.SetColumn(garbageCollector.Image, garbageCollector.Position.X);
|
Grid.SetColumn(garbageCollector.Image, garbageCollector.Position.X);
|
||||||
CollectorBoard.Children.Add(garbageCollector.Image);
|
CollectorBoard.Children.Add(garbageCollector.Image);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user