You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
2.2 KiB

<Window x:Class="ScadaTool.MainWindow"
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:ScadaTool"
xmlns:vm="clr-namespace:ScadaTool.ViewModel"
xmlns:tb="http://www.hardcodet.net/taskbar"
mc:Ignorable="d" WindowStartupLocation="CenterScreen"
Closing="Window_Closing"
Title="SCADA采集工具" Height="350" Width="700" Icon="Resources/icon.ico">
<Window.DataContext>
<vm:MainViewModel/>
</Window.DataContext>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="395"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="300"/>
</Grid.ColumnDefinitions>
<!--托盘图标-->
<tb:TaskbarIcon x:Name="myNotifyIcon"
Visibility="Visible"
DoubleClickCommand="{Binding ShowWindowCommand}"
ToolTipText="{Binding toolTip, UpdateSourceTrigger=PropertyChanged}"
IconSource="{Binding icoPath, UpdateSourceTrigger=PropertyChanged}">
<tb:TaskbarIcon.ContextMenu>
<ContextMenu>
<MenuItem Header="显示窗口" Command="{Binding ShowWindowCommand}" />
<Separator />
<MenuItem Header="退出" Command="{Binding ExitApplicationCommand}" />
</ContextMenu>
</tb:TaskbarIcon.ContextMenu>
</tb:TaskbarIcon>
<Grid Grid.Column="0">
<TextBlock Text="软件说明..." HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
<GridSplitter Grid.Column="1" Width="5" HorizontalAlignment="Stretch" />
<Grid Grid.Column="2">
<Button x:Name="StartBtn" HorizontalAlignment="Center" VerticalAlignment="Center"
Content="点击启动" Width="120" Height="60" Command="{Binding StartServiceCommand}"/>
</Grid>
</Grid>
</Window>