feat: add map drawing
58
Client/Application/Components/Map.xaml
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<ContentControl x:Class="Client.Application.Components.Map"
|
||||||
|
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:Client.Application.Components"
|
||||||
|
xmlns:services="clr-namespace:Client.Application.Services"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
services:SizeObserver.Observe="True"
|
||||||
|
services:SizeObserver.ObservedWidth="{Binding ViewportWidth, Mode=OneWayToSource}"
|
||||||
|
services:SizeObserver.ObservedHeight="{Binding ViewportHeight, Mode=OneWayToSource}"
|
||||||
|
>
|
||||||
|
<Grid>
|
||||||
|
<ItemsControl ItemsSource="{Binding Path=Blocks}">
|
||||||
|
<ItemsControl.Resources>
|
||||||
|
<services:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||||
|
</ItemsControl.Resources>
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<Canvas ClipToBounds="True"/>
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Image
|
||||||
|
Source="{Binding ImageSource,Mode=OneWay}"
|
||||||
|
Width="{Binding Size,Mode=OneWay}"
|
||||||
|
Height="{Binding Size,Mode=OneWay}"
|
||||||
|
Visibility="{Binding Visible,Converter={StaticResource BooleanToVisibilityConverter}}"
|
||||||
|
>
|
||||||
|
<Image.RenderTransform>
|
||||||
|
<TranslateTransform X="{Binding DeltaX}" Y="{Binding DeltaY}"/>
|
||||||
|
</Image.RenderTransform>
|
||||||
|
</Image>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
</ItemsControl>
|
||||||
|
<Grid VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="200" Height="20" Margin="0 0 5 5">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="30"></ColumnDefinition>
|
||||||
|
<ColumnDefinition></ColumnDefinition>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Border Background="White" CornerRadius="3" Margin="0 0 5 0">
|
||||||
|
<TextBlock Text="{Binding Scale, Mode=OneWay}" FontSize="14" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||||
|
</Border>
|
||||||
|
<Slider
|
||||||
|
TickFrequency="1"
|
||||||
|
IsSnapToTickEnabled="True"
|
||||||
|
Value="{Binding Scale}"
|
||||||
|
Maximum="32"
|
||||||
|
Minimum="1"
|
||||||
|
Grid.Column="1"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
/>
|
||||||
|
</Grid>
|
||||||
|
<Ellipse Width="10" Height="10" Fill="White" Stroke="Black" StrokeThickness="2" VerticalAlignment="Center" HorizontalAlignment="Center"></Ellipse>
|
||||||
|
</Grid>
|
||||||
|
</ContentControl>
|
28
Client/Application/Components/Map.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
using Client.Application.ViewModels;
|
||||||
|
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.Shapes;
|
||||||
|
|
||||||
|
namespace Client.Application.Components
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for Map.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class Map : ContentControl
|
||||||
|
{
|
||||||
|
public Map()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -4,14 +4,14 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Client.Application.Components"
|
xmlns:local="clr-namespace:Client.Application.Components"
|
||||||
xmlns:converters="clr-namespace:Client.Application.Converters"
|
xmlns:services="clr-namespace:Client.Application.Services"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
IsEnabled="{Binding Path=IsButtonActive,ElementName=root,Mode=OneWay}"
|
IsEnabled="{Binding Path=IsButtonActive,ElementName=root,Mode=OneWay}"
|
||||||
ToolTipService.ShowOnDisabled="True"
|
ToolTipService.ShowOnDisabled="True"
|
||||||
x:Name="root">
|
x:Name="root">
|
||||||
<Button.Resources>
|
<Button.Resources>
|
||||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
<services:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
<services:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
||||||
<DataTemplate x:Key="ToolTipContent">
|
<DataTemplate x:Key="ToolTipContent">
|
||||||
<StackPanel MaxWidth="300">
|
<StackPanel MaxWidth="300">
|
||||||
<TextBlock TextWrapping="Wrap" FontWeight="Bold" FontSize="14" Margin="0,0,0,5">
|
<TextBlock TextWrapping="Wrap" FontWeight="Bold" FontSize="14" Margin="0,0,0,5">
|
||||||
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
|
|
||||||
namespace Client.Application.Converters
|
namespace Client.Application.Services
|
||||||
{
|
{
|
||||||
public class BooleanToVisibilityConverter : IValueConverter
|
public class BooleanToVisibilityConverter : IValueConverter
|
||||||
{
|
{
|
@ -7,7 +7,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
|
|
||||||
namespace Client.Application.Converters
|
namespace Client.Application.Services
|
||||||
{
|
{
|
||||||
public class NullToVisibilityConverter : IValueConverter
|
public class NullToVisibilityConverter : IValueConverter
|
||||||
{
|
{
|
92
Client/Application/Services/SizeObserver.cs
Normal file
@ -0,0 +1,92 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows;
|
||||||
|
|
||||||
|
namespace Client.Application.Services
|
||||||
|
{
|
||||||
|
public static class SizeObserver
|
||||||
|
{
|
||||||
|
public static readonly DependencyProperty ObserveProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"Observe",
|
||||||
|
typeof(bool),
|
||||||
|
typeof(SizeObserver),
|
||||||
|
new FrameworkPropertyMetadata(OnObserveChanged));
|
||||||
|
|
||||||
|
public static readonly DependencyProperty ObservedWidthProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"ObservedWidth",
|
||||||
|
typeof(double),
|
||||||
|
typeof(SizeObserver));
|
||||||
|
|
||||||
|
public static readonly DependencyProperty ObservedHeightProperty = DependencyProperty.RegisterAttached(
|
||||||
|
"ObservedHeight",
|
||||||
|
typeof(double),
|
||||||
|
typeof(SizeObserver));
|
||||||
|
|
||||||
|
public static bool GetObserve(FrameworkElement frameworkElement)
|
||||||
|
{
|
||||||
|
return (bool)frameworkElement.GetValue(ObserveProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetObserve(FrameworkElement frameworkElement, bool observe)
|
||||||
|
{
|
||||||
|
frameworkElement.SetValue(ObserveProperty, observe);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double GetObservedWidth(FrameworkElement frameworkElement)
|
||||||
|
{
|
||||||
|
return (double)frameworkElement.GetValue(ObservedWidthProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetObservedWidth(FrameworkElement frameworkElement, double observedWidth)
|
||||||
|
{
|
||||||
|
frameworkElement.SetValue(ObservedWidthProperty, observedWidth);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double GetObservedHeight(FrameworkElement frameworkElement)
|
||||||
|
{
|
||||||
|
return (double)frameworkElement.GetValue(ObservedHeightProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void SetObservedHeight(FrameworkElement frameworkElement, double observedHeight)
|
||||||
|
{
|
||||||
|
frameworkElement.SetValue(ObservedHeightProperty, observedHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnObserveChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
var frameworkElement = (FrameworkElement)dependencyObject;
|
||||||
|
|
||||||
|
if ((bool)e.NewValue)
|
||||||
|
{
|
||||||
|
frameworkElement.Loaded += OnFrameworkElementLoaded;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
frameworkElement.SizeChanged -= OnFrameworkElementSizeChanged;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnFrameworkElementLoaded(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
var frameworkElement = (FrameworkElement)sender;
|
||||||
|
|
||||||
|
frameworkElement.SizeChanged += OnFrameworkElementSizeChanged;
|
||||||
|
frameworkElement.Loaded -= OnFrameworkElementLoaded;
|
||||||
|
UpdateObservedSizesForFrameworkElement(frameworkElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnFrameworkElementSizeChanged(object sender, SizeChangedEventArgs e)
|
||||||
|
{
|
||||||
|
UpdateObservedSizesForFrameworkElement((FrameworkElement)sender);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void UpdateObservedSizesForFrameworkElement(FrameworkElement frameworkElement)
|
||||||
|
{
|
||||||
|
frameworkElement.SetCurrentValue(ObservedWidthProperty, frameworkElement.ActualWidth);
|
||||||
|
frameworkElement.SetCurrentValue(ObservedHeightProperty, frameworkElement.ActualHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -34,14 +34,18 @@ namespace Client.Application.ViewModels
|
|||||||
{
|
{
|
||||||
Hero = new HeroSummaryInfoViewModel(@event.Hero);
|
Hero = new HeroSummaryInfoViewModel(@event.Hero);
|
||||||
hero = @event.Hero;
|
hero = @event.Hero;
|
||||||
|
Map.Hero = hero;
|
||||||
OnPropertyChanged("Hero");
|
OnPropertyChanged("Hero");
|
||||||
|
OnPropertyChanged("Map");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Handle(HeroDeletedEvent @event)
|
public void Handle(HeroDeletedEvent @event)
|
||||||
{
|
{
|
||||||
Hero = null;
|
Hero = null;
|
||||||
hero = null;
|
hero = null;
|
||||||
|
Map.Hero = null;
|
||||||
OnPropertyChanged("Hero");
|
OnPropertyChanged("Hero");
|
||||||
|
OnPropertyChanged("Map");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Handle(CreatureCreatedEvent @event)
|
public void Handle(CreatureCreatedEvent @event)
|
||||||
@ -116,6 +120,7 @@ namespace Client.Application.ViewModels
|
|||||||
public ObservableCollection<SkillListViewModel> PassiveSkills { get; } = new ObservableCollection<SkillListViewModel>();
|
public ObservableCollection<SkillListViewModel> PassiveSkills { get; } = new ObservableCollection<SkillListViewModel>();
|
||||||
public ObservableCollection<BaseItem> Items { get; } = new ObservableCollection<BaseItem>();
|
public ObservableCollection<BaseItem> Items { get; } = new ObservableCollection<BaseItem>();
|
||||||
public HeroSummaryInfoViewModel? Hero { get; private set; }
|
public HeroSummaryInfoViewModel? Hero { get; private set; }
|
||||||
|
public MapViewModel Map { get; private set; } = new MapViewModel();
|
||||||
public Hero? hero;
|
public Hero? hero;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
58
Client/Application/ViewModels/MapBlockViewModel.cs
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
using Client.Domain.Common;
|
||||||
|
using Client.Domain.ValueObjects;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media;
|
||||||
|
|
||||||
|
namespace Client.Application.ViewModels
|
||||||
|
{
|
||||||
|
public class MapBlockViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
public string ImageSource => "/Assets/maps/" + mapBlock.BlockX + "_" + mapBlock.BlockY + ".jpg";
|
||||||
|
public float DeltaX => mapBlock.DeltaX;
|
||||||
|
public float DeltaY => mapBlock.DeltaY;
|
||||||
|
public float Size => mapBlock.Size;
|
||||||
|
public bool Visible
|
||||||
|
{
|
||||||
|
get => visible;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (visible != value)
|
||||||
|
{
|
||||||
|
visible = value;
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public MapBlock MapBlock => mapBlock;
|
||||||
|
|
||||||
|
public MapBlockViewModel(MapBlock mapBlock)
|
||||||
|
{
|
||||||
|
this.mapBlock = mapBlock;
|
||||||
|
|
||||||
|
mapBlock.PropertyChanged += MapBlock_PropertyChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MapBlock_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.PropertyName == "DeltaX")
|
||||||
|
{
|
||||||
|
OnPropertyChanged("DeltaX");
|
||||||
|
}
|
||||||
|
if (e.PropertyName == "DeltaY")
|
||||||
|
{
|
||||||
|
OnPropertyChanged("DeltaY");
|
||||||
|
}
|
||||||
|
if (e.PropertyName == "Size")
|
||||||
|
{
|
||||||
|
OnPropertyChanged("Size");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private readonly MapBlock mapBlock;
|
||||||
|
private bool visible = true;
|
||||||
|
}
|
||||||
|
}
|
122
Client/Application/ViewModels/MapViewModel.cs
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
using Client.Domain.Common;
|
||||||
|
using Client.Domain.Entities;
|
||||||
|
using Client.Domain.Service;
|
||||||
|
using Client.Domain.ValueObjects;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media.Animation;
|
||||||
|
|
||||||
|
namespace Client.Application.ViewModels
|
||||||
|
{
|
||||||
|
public class MapViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
public Hero? Hero
|
||||||
|
{
|
||||||
|
get => hero;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (hero != value)
|
||||||
|
{
|
||||||
|
if (hero != null)
|
||||||
|
{
|
||||||
|
hero.Transform.Position.PropertyChanged -= HeroPosition_PropertyChanged;
|
||||||
|
}
|
||||||
|
hero = value;
|
||||||
|
if (hero != null)
|
||||||
|
{
|
||||||
|
hero.Transform.Position.PropertyChanged += HeroPosition_PropertyChanged;
|
||||||
|
}
|
||||||
|
UpdateMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HeroPosition_PropertyChanged(object? sender, System.ComponentModel.PropertyChangedEventArgs e)
|
||||||
|
{
|
||||||
|
UpdateMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdateMap()
|
||||||
|
{
|
||||||
|
foreach (var block in Blocks)
|
||||||
|
{
|
||||||
|
block.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hero != null)
|
||||||
|
{
|
||||||
|
var blocks = selector.SelectImages((float)ViewportWidth, (float)ViewportHeight, hero.Transform.Position, Scale);
|
||||||
|
|
||||||
|
foreach (var block in blocks)
|
||||||
|
{
|
||||||
|
if (this.blocks.ContainsKey(block.Id))
|
||||||
|
{
|
||||||
|
this.blocks[block.Id].MapBlock.DeltaX = block.DeltaX;
|
||||||
|
this.blocks[block.Id].MapBlock.DeltaY = block.DeltaY;
|
||||||
|
this.blocks[block.Id].MapBlock.Size = block.Size;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var model = new MapBlockViewModel(block);
|
||||||
|
this.blocks.Add(block.Id, model);
|
||||||
|
Blocks.Add(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.blocks[block.Id].Visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObservableCollection<MapBlockViewModel> Blocks { get; } = new ObservableCollection<MapBlockViewModel>();
|
||||||
|
public double ViewportWidth
|
||||||
|
{
|
||||||
|
get => viewportWidth;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (viewportWidth != value)
|
||||||
|
{
|
||||||
|
viewportWidth = value;
|
||||||
|
UpdateMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public double ViewportHeight
|
||||||
|
{
|
||||||
|
get => viewportHeight;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (viewportHeight != value)
|
||||||
|
{
|
||||||
|
viewportHeight = value;
|
||||||
|
UpdateMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public float Scale
|
||||||
|
{
|
||||||
|
get => scale;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (scale != value)
|
||||||
|
{
|
||||||
|
scale = value;
|
||||||
|
UpdateMap();
|
||||||
|
OnPropertyChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MapImageSelector selector = new MapImageSelector();
|
||||||
|
Dictionary<uint, MapBlockViewModel> blocks = new Dictionary<uint, MapBlockViewModel>();
|
||||||
|
private Hero? hero;
|
||||||
|
private float scale = 8;
|
||||||
|
private double viewportWidth = 50;
|
||||||
|
private double viewportHeight = 50;
|
||||||
|
}
|
||||||
|
}
|
@ -5,7 +5,7 @@
|
|||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:local="clr-namespace:Client"
|
xmlns:local="clr-namespace:Client"
|
||||||
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
||||||
xmlns:converters="clr-namespace:Client.Application.Converters"
|
xmlns:services="clr-namespace:Client.Application.Services"
|
||||||
xmlns:components="clr-namespace:Client.Application.Components"
|
xmlns:components="clr-namespace:Client.Application.Components"
|
||||||
xmlns:views="clr-namespace:Client.Application.Views"
|
xmlns:views="clr-namespace:Client.Application.Views"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
@ -21,7 +21,7 @@
|
|||||||
<scm:SortDescription PropertyName="Distance" Direction="Ascending" />
|
<scm:SortDescription PropertyName="Distance" Direction="Ascending" />
|
||||||
</CollectionViewSource.SortDescriptions>
|
</CollectionViewSource.SortDescriptions>
|
||||||
</CollectionViewSource>
|
</CollectionViewSource>
|
||||||
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
<services:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@ -39,6 +39,7 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
<components:Map DataContext="{Binding Map}" />
|
||||||
<TabControl Grid.Row="0" Grid.Column="1">
|
<TabControl Grid.Row="0" Grid.Column="1">
|
||||||
<TabItem>
|
<TabItem>
|
||||||
<TabItem.Header>Environment</TabItem.Header>
|
<TabItem.Header>Environment</TabItem.Header>
|
||||||
@ -128,8 +129,8 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Button>
|
<Button>
|
||||||
<Button.Resources>
|
<Button.Resources>
|
||||||
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
<services:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
|
||||||
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
<services:NullToVisibilityConverter x:Key="NullToVisibilityConverter"/>
|
||||||
<DataTemplate x:Key="ToolTipContent">
|
<DataTemplate x:Key="ToolTipContent">
|
||||||
<StackPanel MaxWidth="300">
|
<StackPanel MaxWidth="300">
|
||||||
<TextBlock TextWrapping="Wrap" FontWeight="Bold" FontSize="14" Margin="0,0,0,5">
|
<TextBlock TextWrapping="Wrap" FontWeight="Bold" FontSize="14" Margin="0,0,0,5">
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using Client.Application.ViewModels;
|
using Client.Application.Components;
|
||||||
|
using Client.Application.ViewModels;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -21,11 +22,14 @@ namespace Client.Application.Views
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : Window
|
||||||
{
|
{
|
||||||
|
private readonly MainViewModel mainViewModel;
|
||||||
|
|
||||||
public MainWindow(MainViewModel mainViewModel)
|
public MainWindow(MainViewModel mainViewModel)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
DataContext = mainViewModel;
|
DataContext = mainViewModel;
|
||||||
|
this.mainViewModel = mainViewModel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
BIN
Client/Assets/maps/11_23.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/11_24.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/11_25.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/11_26.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/12_22.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/12_23.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/12_24.jpg
Normal file
After Width: | Height: | Size: 574 KiB |
BIN
Client/Assets/maps/12_24_1.jpg
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
Client/Assets/maps/12_25.jpg
Normal file
After Width: | Height: | Size: 596 KiB |
BIN
Client/Assets/maps/13_22.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/13_23.jpg
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
Client/Assets/maps/13_23_1.jpg
Normal file
After Width: | Height: | Size: 131 KiB |
BIN
Client/Assets/maps/13_24.jpg
Normal file
After Width: | Height: | Size: 710 KiB |
BIN
Client/Assets/maps/13_25.jpg
Normal file
After Width: | Height: | Size: 556 KiB |
BIN
Client/Assets/maps/14_22.jpg
Normal file
After Width: | Height: | Size: 470 KiB |
BIN
Client/Assets/maps/14_22_1.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
Client/Assets/maps/14_22_2.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
Client/Assets/maps/14_23.jpg
Normal file
After Width: | Height: | Size: 519 KiB |
BIN
Client/Assets/maps/14_23_1.jpg
Normal file
After Width: | Height: | Size: 191 KiB |
BIN
Client/Assets/maps/14_23_2.jpg
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
Client/Assets/maps/14_24.jpg
Normal file
After Width: | Height: | Size: 734 KiB |
BIN
Client/Assets/maps/14_24_1.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
Client/Assets/maps/14_24_2.jpg
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
Client/Assets/maps/14_24_3.jpg
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
Client/Assets/maps/14_25.jpg
Normal file
After Width: | Height: | Size: 560 KiB |
BIN
Client/Assets/maps/15_10.jpg
Normal file
After Width: | Height: | Size: 165 KiB |
BIN
Client/Assets/maps/15_11.jpg
Normal file
After Width: | Height: | Size: 165 KiB |
BIN
Client/Assets/maps/15_12.jpg
Normal file
After Width: | Height: | Size: 165 KiB |
BIN
Client/Assets/maps/15_22.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/15_23.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/15_24.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/15_25.jpg
Normal file
After Width: | Height: | Size: 520 KiB |
BIN
Client/Assets/maps/16_10.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_11.jpg
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
Client/Assets/maps/16_12.jpg
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
Client/Assets/maps/16_13.jpg
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
Client/Assets/maps/16_14.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_15.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_16.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_17.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_18.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_19.jpg
Normal file
After Width: | Height: | Size: 521 KiB |
BIN
Client/Assets/maps/16_20.jpg
Normal file
After Width: | Height: | Size: 504 KiB |
BIN
Client/Assets/maps/16_20_1.jpg
Normal file
After Width: | Height: | Size: 122 KiB |
BIN
Client/Assets/maps/16_21.jpg
Normal file
After Width: | Height: | Size: 515 KiB |
BIN
Client/Assets/maps/16_22.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_23.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/16_24.jpg
Normal file
After Width: | Height: | Size: 571 KiB |
BIN
Client/Assets/maps/16_25.jpg
Normal file
After Width: | Height: | Size: 600 KiB |
BIN
Client/Assets/maps/17_10.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
Client/Assets/maps/17_11.jpg
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
Client/Assets/maps/17_12.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
Client/Assets/maps/17_13.jpg
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
Client/Assets/maps/17_15.jpg
Normal file
After Width: | Height: | Size: 618 KiB |
BIN
Client/Assets/maps/17_15_1.jpg
Normal file
After Width: | Height: | Size: 69 KiB |
BIN
Client/Assets/maps/17_16.jpg
Normal file
After Width: | Height: | Size: 666 KiB |
BIN
Client/Assets/maps/17_16_1.jpg
Normal file
After Width: | Height: | Size: 137 KiB |
BIN
Client/Assets/maps/17_17.jpg
Normal file
After Width: | Height: | Size: 77 KiB |
BIN
Client/Assets/maps/17_18.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/17_19.jpg
Normal file
After Width: | Height: | Size: 531 KiB |
BIN
Client/Assets/maps/17_19_1.jpg
Normal file
After Width: | Height: | Size: 90 KiB |
BIN
Client/Assets/maps/17_20.jpg
Normal file
After Width: | Height: | Size: 534 KiB |
BIN
Client/Assets/maps/17_20_1.jpg
Normal file
After Width: | Height: | Size: 68 KiB |
BIN
Client/Assets/maps/17_21.jpg
Normal file
After Width: | Height: | Size: 634 KiB |
BIN
Client/Assets/maps/17_21_1.jpg
Normal file
After Width: | Height: | Size: 67 KiB |
BIN
Client/Assets/maps/17_22.jpg
Normal file
After Width: | Height: | Size: 601 KiB |
BIN
Client/Assets/maps/17_23.jpg
Normal file
After Width: | Height: | Size: 543 KiB |
BIN
Client/Assets/maps/17_24.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
Client/Assets/maps/17_25.jpg
Normal file
After Width: | Height: | Size: 534 KiB |
BIN
Client/Assets/maps/18_10.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
Client/Assets/maps/18_11.jpg
Normal file
After Width: | Height: | Size: 73 KiB |
BIN
Client/Assets/maps/18_12.jpg
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
Client/Assets/maps/18_14.jpg
Normal file
After Width: | Height: | Size: 565 KiB |
BIN
Client/Assets/maps/18_15.jpg
Normal file
After Width: | Height: | Size: 590 KiB |
BIN
Client/Assets/maps/18_15_1.jpg
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
Client/Assets/maps/18_16.jpg
Normal file
After Width: | Height: | Size: 672 KiB |
BIN
Client/Assets/maps/18_17.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/18_18.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/18_19.jpg
Normal file
After Width: | Height: | Size: 542 KiB |
BIN
Client/Assets/maps/18_20.jpg
Normal file
After Width: | Height: | Size: 576 KiB |
BIN
Client/Assets/maps/18_20_1.jpg
Normal file
After Width: | Height: | Size: 93 KiB |
BIN
Client/Assets/maps/18_21.jpg
Normal file
After Width: | Height: | Size: 589 KiB |
BIN
Client/Assets/maps/18_22.jpg
Normal file
After Width: | Height: | Size: 628 KiB |
BIN
Client/Assets/maps/18_23.jpg
Normal file
After Width: | Height: | Size: 592 KiB |
BIN
Client/Assets/maps/18_23_1.jpg
Normal file
After Width: | Height: | Size: 101 KiB |
BIN
Client/Assets/maps/18_24.jpg
Normal file
After Width: | Height: | Size: 550 KiB |
BIN
Client/Assets/maps/18_24_1.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
Client/Assets/maps/18_25.jpg
Normal file
After Width: | Height: | Size: 657 KiB |
BIN
Client/Assets/maps/18_25_1.jpg
Normal file
After Width: | Height: | Size: 66 KiB |