<hc:Window xmlns:View="clr-namespace:智慧物流软件系统"  x:Class="智慧物流软件系统.MainWindow1"
        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:智慧物流软件系统"
        xmlns:hc="https://handyorg.github.io/handycontrol"
        xmlns:pi="https://github.com/ping9719/wpfex"
        xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
        mc:Ignorable="d"
        Closed="Window_Closed"
        Title="{Binding Title}" NonClientAreaBackground="#FFDCEEFF" Height="800" Width="1280" Icon="/Resources/Logo.ico"
        Background="#FFDCEEFF" WindowStartupLocation="CenterScreen" Loaded="load">
    <!--标题栏-->
    <hc:Window.NonClientAreaContent>
        <StackPanel HorizontalAlignment="Right">
            <Menu Height="29" Background="#FFDCEEFF">
                <MenuItem Height="29" Command="{Binding OpenUserCommand}">
                    <MenuItem.Header>
                        <TextBlock Text="{Binding LoginName,Source={x:Static local:UserInfoView.viewModel},TargetNullValue=登录}" Foreground="DimGray" Margin="-5,0"></TextBlock>
                    </MenuItem.Header>
                    <MenuItem.Icon>
                        <TextBlock Text="&#xe61a;" FontSize="16" FontFamily="{StaticResource IconFont}"></TextBlock>
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Height="29" Width="35">
                    <MenuItem.Icon>
                        <TextBlock Text="&#xe617;" FontSize="15" FontFamily="{StaticResource IconFont}"></TextBlock>
                    </MenuItem.Icon>
                    <MenuItem Width="120" Header="本地日志" Command="{Binding OpenLogCommand}">
                        <MenuItem.Icon>
                            <TextBlock Text="&#xe69d;" FontSize="16" FontFamily="{StaticResource IconFont}"></TextBlock>
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Width="120" Header="操作说明" Command="{Binding OpenHelpCommand}">
                        <MenuItem.Icon>
                            <TextBlock Text="&#xe617;" FontSize="16" FontFamily="{StaticResource IconFont}"></TextBlock>
                        </MenuItem.Icon>
                    </MenuItem>
                    <MenuItem Width="120" Header="关     于" Command="{Binding OpenWeCommand}">
                        <MenuItem.Icon>
                            <TextBlock Text="&#xe6b3;" FontSize="16" FontFamily="{StaticResource IconFont}"></TextBlock>
                        </MenuItem.Icon>
                    </MenuItem>
                </MenuItem>
            </Menu>
        </StackPanel>
    </hc:Window.NonClientAreaContent>
    <!--内容-->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="3"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
        </Grid.RowDefinitions>
        <!--内容-->
        <TabControl Grid.Row="1"  TabStripPlacement="Left" 
                    Margin="5,0,5,2" Padding="0,0,3,0" 
                    BorderThickness="0" Style="{StaticResource TabControlRectangle}" 
                    PreviewKeyDown="tabControl_PreviewKeyDown">
            <!--<TabItem Padding="10,10,40,10" IsSelected="True">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                        <TextBlock Text="&#xe603;" FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">主页</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:HomeView />
                </hc:TransitioningContentControl>
            </TabItem>-->

            <!--<TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.物料入库},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe681;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">物料入库</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:InInventoryView/>
                </hc:TransitioningContentControl>
            </TabItem>-->

            <!--<TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.出库单据},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe67d;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">出库单据</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:OutInventoryDocumentView/>
                </hc:TransitioningContentControl>
            </TabItem>

            <TabItem IsSelected="{Binding GoToOutVentoryView}" Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.物料出库},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe67d;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">物料出库</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:OutVentoryView/>
                </hc:TransitioningContentControl>
            </TabItem>

            <TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.盘点单据},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe65f;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">盘点单据</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:StocktakingDocumentView/>
                </hc:TransitioningContentControl>
            </TabItem>-->

            <!--<TabItem IsSelected="{Binding GoToStockTakingView}" Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.物料盘点},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe65f;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">物料盘点</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:StockTakingView/>
                </hc:TransitioningContentControl>
            </TabItem>-->

            <TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.货架存量},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe978;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">
                                   货架存量</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:MatDetailCurrentInfoView/>
                </hc:TransitioningContentControl>
            </TabItem>
            <TabItem Padding="10,10,40,10"
                     Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.位置管理},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe621;"
                                   FontSize="20"
                                   FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">位置管理</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:LocationInfoView />
                </hc:TransitioningContentControl>
            </TabItem>
            <TabItem Padding="10,10,40,10"
                     Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.物料管理},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe662;"
                                   FontSize="20"
                                   FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">物料管理</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:MatBaseInfoView />
                </hc:TransitioningContentControl>
            </TabItem>
            <TabItem Padding="10,10,40,10"
                     Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.货架管理},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe614;"
                                   FontSize="20"
                                   FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">货架管理</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:ShelfInfoView />
                </hc:TransitioningContentControl>
            </TabItem>
            <TabItem Padding="10,10,40,10"
                     Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.库存盘点},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe65e;"
                                   FontSize="20"
                                   FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">库存盘点</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:MatDetailStocktakingInfoView />
                </hc:TransitioningContentControl>
            </TabItem>
            <TabItem Padding="10,10,40,10"
                     Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.物料绑定},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe620;"
                                   FontSize="20"
                                   FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">物料绑定</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:BatchBindMatDetailView />
                </hc:TransitioningContentControl>
            </TabItem>
            <TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.数据记录},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe60b;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">数据记录</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:MatDetailHistoryInfoView/>
                </hc:TransitioningContentControl>
            </TabItem>
            <TabItem Padding="10,10,40,10"
                     Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.任务管理},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xec35;"
                                   FontSize="20"
                                   FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">任务管理</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:AGVTaskView />
                </hc:TransitioningContentControl>
            </TabItem>
            
         
            
            <TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.接口记录},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe600;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">接口记录</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:InterfaceRecordView/>
                </hc:TransitioningContentControl>
            </TabItem>

            <TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.权限},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xe63f;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">用户权限</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <TabControl Margin="5" Style="{StaticResource TabControlBaseStyle.MouseOver}">
                    <TabItem Header="角色管理">
                        <hc:TransitioningContentControl TransitionMode="Fade">
                            <View:RoleView Margin="0,5"/>
                        </hc:TransitioningContentControl>
                    </TabItem>
                    <TabItem Header="用户管理" >
                        <hc:TransitioningContentControl TransitionMode="Fade">
                            <View:UserView Margin="0,5"/>
                        </hc:TransitioningContentControl>
                    </TabItem>
                </TabControl>
            </TabItem>

            <!--<TabItem Padding="10,10,40,10" Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.调试},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
                        <TextBlock Text="&#xe601;"  FontSize="20" FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0" FontSize="16">调试</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <TabControl Margin="5" Style="{StaticResource TabControlBaseStyle.MouseOver}">
                    <TabItem Header="调试">
                        <hc:TransitioningContentControl TransitionMode="Fade">
                            <View:DeviceView Margin="0,5"/>
                        </hc:TransitioningContentControl>
                    </TabItem>
                </TabControl>
            </TabItem>-->
            <TabItem Padding="10,10,40,10"
                     Visibility="{Binding Auth,Source={x:Static local:UserInfoView.viewModel},ConverterParameter={x:Static local:AuthEnum.设置},Converter={StaticResource AuthVisConverter}}">
                <TabItem.Header>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="&#xeb8d;"
                                   FontSize="20"
                                   FontFamily="{StaticResource IconFont}"></TextBlock>
                        <TextBlock Margin="10,0,0,0"
                                   FontSize="16">系统配置</TextBlock>
                    </StackPanel>
                </TabItem.Header>
                <hc:TransitioningContentControl TransitionMode="Fade">
                    <View:SetView />
                </hc:TransitioningContentControl>
            </TabItem>
        </TabControl>
        <!--状态栏-->
        <Border Margin="5,3" Grid.Row="2" Grid.ColumnSpan="2" Background="AliceBlue" CornerRadius="3">
            <Grid>
                <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Right">
                    <TextBlock Margin="0,0" Text="{Binding Time,StringFormat=yyyy-MM-dd HH:mm:ss,FallbackValue=2000-01-01 00:00:00}" Foreground="#FF3A90C1" VerticalAlignment="Center"></TextBlock>
                </StackPanel>
            </Grid>
        </Border>
        <!--全局提示-->
        <ScrollViewer Background="{x:Null}" Grid.Row="1" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Right" VerticalAlignment="Bottom">
            <StackPanel Background="{x:Null}" hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10" HorizontalAlignment="Right"/>
        </ScrollViewer>
    </Grid>
</hc:Window>