Optional Window UI
99
GisDevelop_Exp/OptionsWindow.xaml
Normal file
@ -0,0 +1,99 @@
|
||||
<Window x:Class="GisDevelop_Exp.OptionsWindow"
|
||||
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:GisDevelop_Exp"
|
||||
mc:Ignorable="d"
|
||||
Title="符号系统" Height="453" Width="399"
|
||||
Loaded="Window_Loaded">
|
||||
<Grid Margin="0,0,30,70">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="726*"/>
|
||||
<ColumnDefinition Width="73*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TabControl Grid.ColumnSpan="3" HorizontalAlignment="Left" Width="398" Margin="0,0,0,-70">
|
||||
<TabItem Header="点符号" Loaded="Point_Tab_OnLoaded">
|
||||
<Grid Background="#FFE5E5E5" Margin="0,0,0,0" RenderTransformOrigin="0.384,0.599">
|
||||
<Canvas Margin="0,0,0,0">
|
||||
<Label Content="样式:" Canvas.Left="25" Canvas.Top="22"/>
|
||||
<Label x:Name="Label_Point_Size" Content="大小:" Canvas.Left="198" Canvas.Top="22" HorizontalAlignment="Left" VerticalAlignment="Center"/>
|
||||
<RadioButton x:Name="Radio_Point_Circle" Content="Circle" HorizontalAlignment="Left" Margin="25,80,0,0" VerticalAlignment="Top" Checked="Radio_Point_Circle_OnChecked"/>
|
||||
<RadioButton x:Name="Radio_Point_Cross" Content="Cross" HorizontalAlignment="Left" Margin="25,100,0,0" VerticalAlignment="Top" Checked="Radio_Point_Cross_OnChecked"/>
|
||||
<RadioButton x:Name="Radio_Point_Diamond" Content="Diamond" HorizontalAlignment="Left" Margin="25,120,0,0" VerticalAlignment="Top" Checked="Radio_Point_Diamond_OnChecked"/>
|
||||
<RadioButton x:Name="Radio_Point_Square" Content="Square" HorizontalAlignment="Left" Margin="25,140,0,0" VerticalAlignment="Top" Checked="Radio_Point_Square_OnChecked"/>
|
||||
<RadioButton x:Name="Radio_Point_X" Content="X" HorizontalAlignment="Left" Margin="25,160,0,0" VerticalAlignment="Top" Checked="Radio_Point_X_OnChecked"/>
|
||||
<RadioButton x:Name="Radio_Point_Triangle" Content="Triangle" HorizontalAlignment="Left" Margin="25,180,0,0" VerticalAlignment="Top" Checked="Radio_Point_Triangle_OnChecked"/>
|
||||
<Slider x:Name="Slider_Point_Size" HorizontalAlignment="Left" Margin="198,52,0,0" VerticalAlignment="Top" Width="150" ValueChanged="Slider_Point_Size_OnValueChanged"/>
|
||||
<Label Content="颜色:" HorizontalAlignment="Left" Margin="198,93,0,0" VerticalAlignment="Top" MouseLeftButtonUp="Control_OnMouseDoubleClick"/>
|
||||
<Label x:Name="Label_Color" Content="" HorizontalAlignment="Left" Margin="198,126,0,0" VerticalAlignment="Top" Width="167" Background="White" MouseLeftButtonUp="Control_OnMouseDoubleClick"/>
|
||||
<Button x:Name="Btn_Point_Confirm" Content="确定" HorizontalAlignment="Left" Margin="28,285,0,0" VerticalAlignment="Top" Height="20" Width="75" Click="Btn_Point_Confirm_OnClick"/>
|
||||
<Button x:Name="Btn_Point_Apply" Content="应用" HorizontalAlignment="Left" Margin="128,285,0,0" VerticalAlignment="Top" Height="20" Width="75" Click="Btn_Point_Apply_OnClick"/>
|
||||
<Button x:Name="Btn_Point_Cancel" Content="取消" HorizontalAlignment="Left" Margin="236,285,0,0" VerticalAlignment="Top" Height="20" Width="75" Click="Btn_Point_Cancel_OnClick"/>
|
||||
</Canvas>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="线符号">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
<ComboBox HorizontalAlignment="Left" Margin="24,49,0,0" VerticalAlignment="Top" Width="305">
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Line_Solid" Content="实线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Line_Dash" Content="虚线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Line_Dot" Content="点线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Line_DashDot" Content="虚-点线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Line_DashDotDot" Content="虚-点-点线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Line_Null" Content="空"/>
|
||||
</ComboBox>
|
||||
<Label Content="宽度:" HorizontalAlignment="Left" Margin="24,97,0,0" VerticalAlignment="Top"/>
|
||||
<Slider x:Name="Slider_Line_Width" HorizontalAlignment="Left" Margin="24,128,0,0" VerticalAlignment="Top" Width="305"/>
|
||||
<Label Content="颜色:" HorizontalAlignment="Left" Margin="24,179,0,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="Label_Line_Color" Content="" HorizontalAlignment="Left" Margin="28,210,0,0" VerticalAlignment="Top" Width="301" Background="White"/>
|
||||
<Button x:Name="Btn_Line_Confirm" Content="确定" HorizontalAlignment="Left" Margin="28,285,0,0" VerticalAlignment="Top" Height="20" Width="75"/>
|
||||
<Button x:Name="Btn_Line_Apply" Content="应用" HorizontalAlignment="Left" Margin="128,285,0,0" VerticalAlignment="Top" Height="20" Width="75"/>
|
||||
<Button x:Name="Btn_Line_Cancel" Content="取消" HorizontalAlignment="Left" Margin="236,285,0,0" VerticalAlignment="Top" Height="20" Width="75"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="面符号">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
<Canvas>
|
||||
<Label Content="样式:" Canvas.Left="28" Canvas.Top="22"/>
|
||||
</Canvas>
|
||||
<ListBox Width="100" Margin="30,53,262,204">
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_Solid"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FSolid.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_Horizontal"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FHori.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_Vertical"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FVer.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_Cross"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FVerHori.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_ForwardDiagonal"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FXie.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_BackwardDiagonal"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FXie2.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_DiagonalCross"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FDialog2.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
<ListBoxItem x:Name="ListBoxItem_Polygon_Null"><Image Source="D:\01_Development\10_Visual_Studio_Project\GisDevelop\GisDevelop_Exp\GisDevelop_Exp\image\FNo.png" Width="32" Height="32"></Image></ListBoxItem>
|
||||
</ListBox>
|
||||
<CheckBox x:Name="Checkbox_Border" Content="边界线" HorizontalAlignment="Left" Margin="184,28,0,0" VerticalAlignment="Top"/>
|
||||
<Border BorderBrush="Black" BorderThickness="1" Margin="162,53,49,180">
|
||||
<Canvas>
|
||||
<Label Content="边界线样式" Canvas.Left="10" Canvas.Top="10"/>
|
||||
<ComboBox Canvas.Left="10" Canvas.Top="36" HorizontalAlignment="Center" VerticalAlignment="Top" Width="159">
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Border_Solid" Content="实线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Border_Dash" Content="虚线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Border_Dot" Content="点线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Border_DashDot" Content="虚-点线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Border_DashDotDot" Content="虚-点-点线"/>
|
||||
<ComboBoxItem x:Name="ComboBoxItem_Border_Null" Content="空"/>
|
||||
</ComboBox>
|
||||
<Label Content="宽度" Canvas.Left="18" Canvas.Top="75"/>
|
||||
<TextBox x:Name="TextBox_Border_Width" HorizontalAlignment="Left" VerticalAlignment="Top" Width="109" Canvas.Left="52" Canvas.Top="79" />
|
||||
<Label Content="颜色" Canvas.Left="18" Canvas.Top="114" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
<Label x:Name="Label_Border_Color" Content="" Canvas.Left="57" Canvas.Top="114" HorizontalAlignment="Left" VerticalAlignment="Center" Width="104" Background="White"/>
|
||||
</Canvas>
|
||||
</Border>
|
||||
<Label Content="填充颜色" HorizontalAlignment="Left" Margin="42,229,0,0" VerticalAlignment="Top"/>
|
||||
<Label x:Name="Label_Polygon_Color" Content="" HorizontalAlignment="Left" Margin="151,229,0,0" VerticalAlignment="Top" Background="White" Width="182"/>
|
||||
<Button x:Name="Btn_Polygon_Confirm" Content="确定" HorizontalAlignment="Left" Margin="30,294,0,0" VerticalAlignment="Top" Width="70"/>
|
||||
<Button x:Name="Btn_Polygon_Apply" Content="应用" HorizontalAlignment="Left" Margin="151,294,0,0" VerticalAlignment="Top" Width="70"/>
|
||||
<Button x:Name="Btn_Polygon_Cancel" Content="取消" HorizontalAlignment="Left" Margin="273,294,0,0" VerticalAlignment="Top" Width="70"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
208
GisDevelop_Exp/OptionsWindow.xaml.cs
Normal file
@ -0,0 +1,208 @@
|
||||
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;
|
||||
using Esri.ArcGISRuntime.Symbology;
|
||||
|
||||
namespace GisDevelop_Exp
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for OptionsWindow.xaml
|
||||
/// </summary>
|
||||
public partial class OptionsWindow : Window
|
||||
{
|
||||
private SimpleMarkerSymbol pointSymbol;
|
||||
private System.Drawing.Color pointColor;
|
||||
private double pointSize;
|
||||
private SimpleMarkerSymbolStyle pointStyle;
|
||||
|
||||
private SimpleLineSymbol lineSymbol;
|
||||
private System.Drawing.Color lineColor;
|
||||
private double lineSize;
|
||||
private SimpleLineSymbolStyle lineStyle;
|
||||
|
||||
private SimpleFillSymbol fillSymbol;
|
||||
private SimpleLineSymbol outlineSymbol;
|
||||
|
||||
private System.Drawing.Color fillColor;
|
||||
private SimpleFillSymbolStyle fillStyle;
|
||||
|
||||
private System.Drawing.Color outlineColor;
|
||||
private SimpleLineSymbolStyle outlineStyle;
|
||||
private double outlineSize;
|
||||
|
||||
public OptionsWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public SimpleMarkerSymbol PointSymbol
|
||||
{
|
||||
get { return pointSymbol; }
|
||||
set { pointSymbol = value; }
|
||||
}
|
||||
|
||||
public SimpleLineSymbol LineSymbol
|
||||
{
|
||||
get { return lineSymbol; }
|
||||
set { lineSymbol = value; }
|
||||
}
|
||||
|
||||
public SimpleFillSymbol FillSymbol
|
||||
{
|
||||
get { return fillSymbol; }
|
||||
set { fillSymbol = value; }
|
||||
}
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (pointSymbol != null)
|
||||
{
|
||||
pointColor=pointSymbol.Color;
|
||||
pointStyle=pointSymbol.Style;
|
||||
pointSize=pointSymbol.Size;
|
||||
}
|
||||
|
||||
if (lineSymbol != null)
|
||||
{
|
||||
lineColor=lineSymbol.Color;
|
||||
lineStyle=lineSymbol.Style;
|
||||
lineSize=lineSymbol.Width;
|
||||
}
|
||||
|
||||
if (fillSymbol != null)
|
||||
{
|
||||
fillColor = fillSymbol.Color;
|
||||
fillStyle=fillSymbol.Style;
|
||||
|
||||
if (fillSymbol.Outline != null)
|
||||
{
|
||||
outlineSymbol=(SimpleLineSymbol)fillSymbol.Outline;
|
||||
Checkbox_Border.IsChecked = true;
|
||||
Checkbox_Border.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
{
|
||||
outlineSymbol = null;
|
||||
Checkbox_Border.IsChecked = false;
|
||||
Checkbox_Border.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Point_Tab_OnLoaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
switch (pointStyle)
|
||||
{
|
||||
case SimpleMarkerSymbolStyle.Circle:
|
||||
Radio_Point_Circle.IsChecked = true;
|
||||
break;
|
||||
case SimpleMarkerSymbolStyle.Cross:
|
||||
Radio_Point_Cross.IsChecked = true;
|
||||
break;
|
||||
case SimpleMarkerSymbolStyle.Diamond:
|
||||
Radio_Point_Diamond.IsChecked = true;
|
||||
break;
|
||||
case SimpleMarkerSymbolStyle.Square:
|
||||
Radio_Point_Square.IsChecked = true;
|
||||
break;
|
||||
case SimpleMarkerSymbolStyle.Triangle:
|
||||
Radio_Point_Triangle.IsChecked = true;
|
||||
break;
|
||||
case SimpleMarkerSymbolStyle.X:
|
||||
Radio_Point_X.IsChecked = true;
|
||||
break;
|
||||
}
|
||||
Slider_Point_Size.Value=pointSize;
|
||||
System.Windows.Media.Color color = System.Windows.Media.Color.FromArgb(pointColor.A, pointColor.R, pointColor.G, pointColor.B);
|
||||
Label_Color.Background = new SolidColorBrush(color);
|
||||
int v = Convert.ToInt32(Slider_Point_Size.Value);
|
||||
Label_Point_Size.Content = "大小:" + v.ToString();
|
||||
}
|
||||
|
||||
private void Radio_Point_Circle_OnChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pointStyle = SimpleMarkerSymbolStyle.Circle;
|
||||
}
|
||||
|
||||
private void Radio_Point_Cross_OnChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pointStyle = SimpleMarkerSymbolStyle.Cross;
|
||||
}
|
||||
|
||||
|
||||
private void Radio_Point_Diamond_OnChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pointStyle = SimpleMarkerSymbolStyle.Diamond;
|
||||
}
|
||||
|
||||
|
||||
private void Radio_Point_Square_OnChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pointStyle = SimpleMarkerSymbolStyle.Square;
|
||||
}
|
||||
|
||||
|
||||
private void Radio_Point_X_OnChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pointStyle = SimpleMarkerSymbolStyle.X;
|
||||
}
|
||||
|
||||
|
||||
private void Radio_Point_Triangle_OnChecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
pointStyle = SimpleMarkerSymbolStyle.Triangle;
|
||||
}
|
||||
|
||||
|
||||
private void Slider_Point_Size_OnValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||
{
|
||||
double v = e.NewValue;
|
||||
Label_Point_Size.Content = "大小:"+v.ToString();
|
||||
pointSize = v;
|
||||
}
|
||||
|
||||
|
||||
private void Control_OnMouseDoubleClick(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
System.Windows.Forms.ColorDialog colorDialog = new System.Windows.Forms.ColorDialog();
|
||||
SolidColorBrush colorBrush = (SolidColorBrush)Label_Color.Background;
|
||||
colorDialog.Color = System.Drawing.Color.FromArgb(colorBrush.Color.A, colorBrush.Color.R, colorBrush.Color.G, colorBrush.Color.B);
|
||||
if (colorDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
pointColor = colorDialog.Color;
|
||||
System.Windows.Media.Color color = System.Windows.Media.Color.FromArgb(pointColor.A, pointColor.R, pointColor.G, pointColor.B);
|
||||
Label_Color.Background = new SolidColorBrush(color);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void Btn_Point_Confirm_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.DialogResult = true;
|
||||
}
|
||||
|
||||
|
||||
private void Btn_Point_Apply_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
PointSymbol.Color = pointColor;
|
||||
PointSymbol.Style = pointStyle;
|
||||
PointSymbol.Size = pointSize;
|
||||
}
|
||||
|
||||
|
||||
private void Btn_Point_Cancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
this.DialogResult = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
GisDevelop_Exp/image/FDialog2.png
Normal file
|
After Width: | Height: | Size: 629 B |
BIN
GisDevelop_Exp/image/FHori.png
Normal file
|
After Width: | Height: | Size: 910 B |
BIN
GisDevelop_Exp/image/FNo.png
Normal file
|
After Width: | Height: | Size: 212 B |
BIN
GisDevelop_Exp/image/FSolid.png
Normal file
|
After Width: | Height: | Size: 456 B |
BIN
GisDevelop_Exp/image/FVer.png
Normal file
|
After Width: | Height: | Size: 912 B |
BIN
GisDevelop_Exp/image/FVerHori.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
GisDevelop_Exp/image/FXie.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
GisDevelop_Exp/image/FXie2.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
GisDevelop_Exp/image/LDash.png
Normal file
|
After Width: | Height: | Size: 192 B |
BIN
GisDevelop_Exp/image/LDashDot.png
Normal file
|
After Width: | Height: | Size: 197 B |
BIN
GisDevelop_Exp/image/LDashDotDot.png
Normal file
|
After Width: | Height: | Size: 197 B |
BIN
GisDevelop_Exp/image/LDot.png
Normal file
|
After Width: | Height: | Size: 191 B |
BIN
GisDevelop_Exp/image/LSolid.png
Normal file
|
After Width: | Height: | Size: 180 B |