完成编辑设备和删除设备

This commit is contained in:
2025-07-01 21:34:20 +08:00
parent 0110ba9492
commit 663e4fda0c
23 changed files with 504 additions and 235 deletions

View File

@@ -1,25 +1,28 @@
<Window
x:Class="PMSWPF.Views.MainView"
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:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:local="clr-namespace:PMSWPF.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:PMSWPF.ViewModels"
xmlns:mo="clr-namespace:PMSWPF.Models"
xmlns:hc="https://handyorg.github.io/handycontrol"
Title="设备管理系统"
Width="1080"
Height="800"
Loaded="MainView_OnLoaded"
ui:WindowHelper.UseModernWindowStyle="True"
ui:WindowHelper.SystemBackdropType="Mica"
d:DataContext="{d:DesignInstance vm:MainViewModel}"
mc:Ignorable="d">
<Window x:Class="PMSWPF.Views.MainView"
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:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
xmlns:local="clr-namespace:PMSWPF.Views"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:PMSWPF.ViewModels"
xmlns:mo="clr-namespace:PMSWPF.Models"
xmlns:hc="https://handyorg.github.io/handycontrol"
Title="设备管理系统"
Width="1080"
Height="800"
WindowStartupLocation="CenterScreen"
WindowState="Maximized"
Loaded="MainView_OnLoaded"
ui:WindowHelper.UseModernWindowStyle="True"
ui:WindowHelper.SystemBackdropType="Mica"
d:DataContext="{d:DesignInstance vm:MainViewModel}"
mc:Ignorable="d">
<Window.Resources>
<DataTemplate x:Key="NavigationViewMenuItem" DataType="{x:Type mo:MenuBean}">
<ui:NavigationViewItem Content="{Binding Name}" MenuItemsSource="{Binding Items }">
<DataTemplate x:Key="NavigationViewMenuItem"
DataType="{x:Type mo:MenuBean}">
<ui:NavigationViewItem Content="{Binding Name}"
MenuItemsSource="{Binding Items }">
<ui:NavigationViewItem.Icon>
<ui:FontIcon Glyph="{Binding Icon}" />
</ui:NavigationViewItem.Icon>
@@ -27,21 +30,18 @@
</DataTemplate>
</Window.Resources>
<Grid>
<ui:NavigationView
ExpandedModeThresholdWidth="500"
IsTabStop="False"
PaneDisplayMode="Left"
PaneTitle="设备管理系统"
IsSettingsVisible="False"
AlwaysShowHeader="True"
IsBackButtonVisible="Collapsed"
IsBackEnabled="False"
SelectionFollowsFocus="Disabled"
MenuItemsSource="{Binding Menus}"
MenuItemTemplate="{StaticResource NavigationViewMenuItem}"
SelectionChanged="NavigationView_SelectionChanged"
>
<ui:NavigationView ExpandedModeThresholdWidth="500"
IsTabStop="False"
PaneDisplayMode="Left"
PaneTitle="设备管理系统"
IsSettingsVisible="False"
AlwaysShowHeader="True"
IsBackButtonVisible="Collapsed"
IsBackEnabled="False"
SelectionFollowsFocus="Disabled"
MenuItemsSource="{Binding Menus}"
MenuItemTemplate="{StaticResource NavigationViewMenuItem}"
SelectionChanged="NavigationView_SelectionChanged">
<ui:NavigationView.AutoSuggestBox>
<ui:AutoSuggestBox AutomationProperties.Name="Search">
@@ -83,8 +83,11 @@
</ContentControl.Resources>
</ContentControl>
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right">
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10" />
<ScrollViewer VerticalScrollBarVisibility="Hidden"
HorizontalAlignment="Right">
<StackPanel hc:Growl.GrowlParent="True"
VerticalAlignment="Top"
Margin="0,10,10,10" />
</ScrollViewer>
</Grid>