<Window x:Class="RichCreator.Editor.Tools.AStarTools"
|
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:RichCreator.Editor.Tools"
|
mc:Ignorable="d"
|
|
Title="AStarFindingTools" Height="720" Width="1280">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto" />
|
<RowDefinition Height="*" />
|
</Grid.RowDefinitions>
|
|
<Border Grid.Row="0" BorderThickness="1" BorderBrush="Gray">
|
<Grid>
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
|
<TextBlock Text="宽高:" />
|
<TextBox Width="45" x:Name="rectWidth" Text="30" />
|
<TextBlock Text="*" />
|
<TextBox Width="45" x:Name="rectHeight" Text="30"/>
|
|
|
<TextBlock Text="行列:" Margin="22 0 0 0" />
|
<TextBox Width="45" x:Name="rectCol" Text="10" />
|
<TextBlock Text="*" />
|
<TextBox Width="45" x:Name="rectRow" Text="10"/>
|
|
|
<Button Content="生成" Margin="5 0" Click="GenericRect" />
|
|
|
<TextBlock Text="标记号:" Margin="22 0 0 0" />
|
<TextBox Width="45" x:Name="tagNumber" Text="0" />
|
|
<ComboBox SelectedIndex="0" x:Name="ClickOperate">
|
<ComboBoxItem>添加障碍</ComboBoxItem>
|
<ComboBoxItem>消除障碍</ComboBoxItem>
|
<ComboBoxItem>添加起点</ComboBoxItem>
|
<ComboBoxItem>添加终点</ComboBoxItem>
|
<ComboBoxItem>添加标记</ComboBoxItem>
|
</ComboBox>
|
</StackPanel>
|
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="5 5">
|
<Button Content="寻路" Margin="5 0" Click="FindingPath" />
|
<Button Content="清空寻路" Margin="5 0" Click="OpenFromFile" />
|
<Button Content="清空标记" Margin="5 0" Click="ClearTag" />
|
<Button Content="加载图片" Margin="5 0" Click="OpenFromFile" />
|
<Button Content="复制为JSON" Margin="5 0" />
|
</StackPanel>
|
|
</Grid>
|
</Border>
|
|
|
<ScrollViewer x:Name="scrollViewer" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" >
|
<Canvas x:Name="mainContainer" HorizontalAlignment="Left" VerticalAlignment="Top">
|
<Image x:Name="SourceImage" Stretch="None" HorizontalAlignment="Left" VerticalAlignment="Top" MouseMove="SourceImage_MouseMove" MouseDown="SourceImage_MouseDown" MouseUp="SourceImage_MouseUp" />
|
<Rectangle Width="1" Height="1" Stroke="Green" StrokeThickness="1" x:Name="SelectArea" Visibility="Hidden" IsHitTestVisible="False" />
|
<Canvas x:Name="ImageOverflowLayer"/>
|
</Canvas>
|
</ScrollViewer>
|
</Grid>
|
</Window>
|