MainWindow.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <base:WindowBase x:Class="YSAI.Tool.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:base="clr-namespace:YSAI.Window;assembly=YSAI.Window"
  5. xmlns:local="clr-namespace:YSAI.Tool"
  6. xmlns:hm="clr-namespace:YSAI.Controls.hamburgermenu;assembly=YSAI.Controls"
  7. xmlns:tc="clr-namespace:YSAI.Controls.transition;assembly=YSAI.Controls"
  8. Icon="YSAI_One.ico"
  9. FontFamily="{DynamicResource AllFontFamily}" WindowStartupLocation="CenterScreen" IsContentBackgroundPicture="True" ResizeMode="CanResize"
  10. Title="[ 远舢智能 ] 调试工具">
  11. <Window.DataContext>
  12. <local:MainWindowController />
  13. </Window.DataContext>
  14. <Grid>
  15. <Grid.ColumnDefinitions>
  16. <ColumnDefinition Width="auto" />
  17. <ColumnDefinition Width="*" />
  18. </Grid.ColumnDefinitions>
  19. <Border Grid.Column="0" Margin="0,0,0,0">
  20. <Border.Effect>
  21. <DropShadowEffect BlurRadius="10" ShadowDepth="5" Opacity="0.1" Direction="-10" />
  22. </Border.Effect>
  23. <hm:HamburgerMenu ToWidth="100" Background="{DynamicResource Follow.Style.Background}" MenuIconColor="{DynamicResource Follow.Style.ImageColor}" HorizontalAlignment="Left" x:Name="hmc">
  24. <hm:HamburgerMenu.Content>
  25. <hm:HamburgerMenuItem Icon="{DynamicResource AboutUs}" Text="关于" ToolTip="关于我们" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding AboutUsTool}" />
  26. <hm:HamburgerMenuItem Icon="{DynamicResource Can}" Text="CAN 工具" ToolTip="CanTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding CanTool}" />
  27. <hm:HamburgerMenuItem Icon="{DynamicResource MqttClient}" Text="MQTT 客户端工具" ToolTip="MqttClientTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding MqttClientTool}" />
  28. <hm:HamburgerMenuItem Icon="{DynamicResource MqttService}" Text="MQTT 服务端工具" ToolTip="MqttServiceTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding MqttServiceTool}" />
  29. <hm:HamburgerMenuItem Icon="{DynamicResource MqttWebSocketService}" Text="MQTT WS 服务端工具" ToolTip="MqttWebSocketServiceTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding MqttWebSocketServiceTool}" />
  30. <hm:HamburgerMenuItem Icon="{DynamicResource Can}" Text="OPCDA HTTP 工具" ToolTip="OpcDaHttpClientTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding OpcDaHttpClientTool}" />
  31. <hm:HamburgerMenuItem Icon="{DynamicResource OpcUaClient}" Text="OPCUA 客户端工具" ToolTip="OpcUaClientTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding OpcUaClientTool}" />
  32. <hm:HamburgerMenuItem Icon="{DynamicResource OpcUaService}" Text="OPCUA 服务端工具" ToolTip="OpcUaServiceTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding OpcUaServiceTool}" />
  33. <hm:HamburgerMenuItem Icon="{DynamicResource SerialPort}" Text="串口工具" ToolTip="SerialPortTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding SerialPortTool}" />
  34. <hm:HamburgerMenuItem Icon="{DynamicResource Client}" Text="TCP 客户端工具" ToolTip="SocketTcpClientTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding SocketTcpClientTool}" />
  35. <hm:HamburgerMenuItem Icon="{DynamicResource Service}" Text="TCP 服务端工具" ToolTip="SocketTcpServerTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding SocketTcpServerTool}" />
  36. <hm:HamburgerMenuItem Icon="{DynamicResource Udp}" Text="UDP 工具" ToolTip="SocketUdpTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding SocketUdpTool}" />
  37. <hm:HamburgerMenuItem Icon="{DynamicResource Svg}" Text="Svg 工具" ToolTip="SvgTool" SelectionIndicatorColor="{DynamicResource Follow.Style.ImageColor}" Foreground="{DynamicResource Follow.Style.Foreground}" SelectionCommand="{Binding SvgTool}" />
  38. </hm:HamburgerMenu.Content>
  39. </hm:HamburgerMenu>
  40. </Border>
  41. <Grid Grid.Column="1">
  42. <ContentControl Content="{Binding UserControl}" />
  43. </Grid>
  44. </Grid>
  45. </base:WindowBase>