Commit 586635cf by zxw

打印程序ui调整

parent eb023df0
......@@ -29,10 +29,7 @@
HorizontalAlignment="Right" VerticalAlignment="Center"
pu:ComboBoxHelper.HoverBackground="#1EB5B5B5"
pu:ComboBoxHelper.SelectedBackground="#32B5B5B5"
pu:ComboBoxHelper.IsSearchTextBoxVisible="True"
pu:ComboBoxHelper.Watermark="请选择装备名称"
pu:ComboBoxHelper.SearchTextChanged="cbo_police_SearchTextChanged"
pu:ComboBoxHelper.SearchTextBoxWatermark="在此搜索装备名称..." SelectionChanged="cbo_police_SelectionChanged"></ComboBox>
pu:ComboBoxHelper.Watermark="请选择装备名称" PreviewMouseDown="cbo_inv_MouseDown"></ComboBox>
<TextBlock Grid.Row="2" Grid.Column="1" Text="在库数量:" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24"/>
<TextBlock Grid.Row="2" Grid.Column="1" Name="tb_count" Margin="120,0,5,0" Text="0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
......
......@@ -50,21 +50,23 @@ namespace LiteChannel
private void OnWindow_Loaded(object sender, RoutedEventArgs e)
{
cbo_inv.DisplayMemberPath = "equipmentDetailName";
cbo_inv.SelectedValuePath = "equipmentDetailId";
cbo_inv.SelectedIndex = -1;
InventoryList = HttpHelper.GetAllInventoryList();
if (editFlag)
{
cbo_inv.ItemsSource = InventoryList
.Where(x => x.equipmentDetailId == inventory.equipmentDetailId)
.ToList();
cbo_inv.SelectedIndex = 0;
tb_count.Text = (cbo_inv.SelectedItem as inventory_info)?.detailCount.ToString();
}
else
{
cbo_inv.ItemsSource = InventoryList;
}
cbo_inv.DisplayMemberPath = "equipmentDetailName";
cbo_inv.SelectedValuePath = "equipmentDetailId";
cbo_inv.SelectedIndex = 0;
}
......@@ -119,29 +121,28 @@ namespace LiteChannel
this.Close();
}
private void TextBox_PreviewTextInput(object sender, System.Windows.Input.TextCompositionEventArgs e)
{
e.Handled = new Regex("[^0-9]+").IsMatch(e.Text);
}
private void cbo_police_SearchTextChanged(object sender, Panuon.UI.Silver.Core.SearchTextChangedEventArgs e)
private void cbo_inv_MouseDown(object sender, MouseButtonEventArgs e)
{
if (!IsLoaded)
return;
cbo_inv.ItemsSource = InventoryList.Where(t => t.equipmentDetailName.Contains(e.Text));
cbo_inv.IsDropDownOpen = false;
var select = new SelectInvWindow(InventoryList);
select.ShowDialog();
}
private void cbo_police_SelectionChanged(object sender, SelectionChangedEventArgs e)
inventory = select.inventory;
if (inventory != null)
{
inventory = cbo_inv.SelectedItem as inventory_info;
tb_count.Text = inventory?.detailCount.ToString();
cbo_inv.SelectedItem = inventory;
tb_count.Text = inventory.detailCount.ToString();
var checkItem = RefreshSourcesList.FirstOrDefault(x => x.equCode == inventory.equipmentDetailId);
if (checkItem != null)
{
txt_count.Text = checkItem.equCount.ToString();
}
}
private void TextBox_PreviewTextInput(object sender, System.Windows.Input.TextCompositionEventArgs e)
{
e.Handled = new Regex("[^0-9]+").IsMatch(e.Text);
}
}
}
......@@ -123,6 +123,12 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="SelectPoliceWindow.xaml.cs">
<DependentUpon>SelectPoliceWindow.xaml</DependentUpon>
</Compile>
<Compile Include="SelectInvWindow.xaml.cs">
<DependentUpon>SelectInvWindow.xaml</DependentUpon>
</Compile>
<Compile Include="CHCNetSDK.cs" />
<Compile Include="Commons\EpcConvert.cs" />
<Compile Include="Commons\HttpHelper.cs" />
......@@ -172,6 +178,14 @@
<Compile Include="StoreOutWindow.xaml.cs">
<DependentUpon>StoreOutWindow.xaml</DependentUpon>
</Compile>
<Page Include="SelectPoliceWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SelectInvWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="AutoClosingMessageBox.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
......
......@@ -8,9 +8,9 @@
xmlns:local="clr-namespace:LiteChannel"
xmlns:usControl="clr-namespace:LiteChannel.UsControl"
mc:Ignorable="d"
Height="720" Width="1024" Loaded="MainWindowLoaded" ResizeMode="NoResize"
AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen"
WindowState="Maximized" Closing="OnWindow_Closing" pu:WindowXCaption.DisableCloseButton="True">
Height="720" Width="1024" ResizeMode="NoResize" WindowState="Maximized"
Loaded="MainWindowLoaded" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen"
Closing="OnWindow_Closing" pu:WindowXCaption.DisableCloseButton="True">
<pu:WindowX.Background>
<ImageBrush ImageSource="Resources/1.png"/>
</pu:WindowX.Background>
......
......@@ -8,9 +8,9 @@
xmlns:local="clr-namespace:LiteChannel"
xmlns:usControl="clr-namespace:LiteChannel.UsControl"
mc:Ignorable="d" Icon="1.ico"
Height="450" Width="800" Loaded="MainWindowLoaded" ResizeMode="NoResize"
AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen"
WindowState="Maximized" Closing="OnWindow_Closing" pu:WindowXCaption.DisableCloseButton="True">
Height="720" Width="1024" ResizeMode="NoResize" WindowState="Maximized"
Loaded="MainWindowLoaded" AllowsTransparency="True" WindowStyle="None" WindowStartupLocation="CenterScreen"
Closing="OnWindow_Closing" pu:WindowXCaption.DisableCloseButton="True">
<Grid x:Name="g_main">
<Grid.RowDefinitions>
<RowDefinition Height="60"/>
......
......@@ -5,12 +5,13 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LiteChannel"
mc:Ignorable="d" Icon="1.ico" FontSize="24"
Title="单据明细" Height="350" Width="550" Loaded="OnWindow_Loaded" WindowStartupLocation="CenterScreen" ResizeMode="NoResize">
mc:Ignorable="d" Icon="1.ico"
Height="720" Width="1024" ResizeMode="NoResize" WindowState="Maximized"
FontSize="24" Title="单据明细" Loaded="OnWindow_Loaded" WindowStartupLocation="CenterScreen">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="280"/>
<RowDefinition Height="*"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<DataGrid Grid.Row="0" FontSize="24" ColumnHeaderHeight="60" RowHeight="60" pu:DataGridHelper.ColumnHorizontalContentAlignment="Center" x:Name="dg_detail" HorizontalAlignment="Stretch" BorderThickness="0,0,0,0" VerticalAlignment="Stretch" pu:DataGridHelper.SelectedBackground="#44B5B5B5" pu:DataGridHelper.HoverBackground="#22B5B5B5" CanUserAddRows="False" >
<DataGrid.Columns>
......
......@@ -6,9 +6,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LiteChannel"
mc:Ignorable="d" Icon="1.ico"
Title="快捷创建单据" Height="500" Width="750" WindowState="Normal" FontSize="24"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" Loaded="OnWindow_Loaded" Closing="OnWindow_Closing">
Height="720" Width="1024" ResizeMode="NoResize" WindowState="Maximized"
Title="快捷创建单据" FontSize="24" WindowStartupLocation="CenterScreen"
Loaded="OnWindow_Loaded" Closing="OnWindow_Closing">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
......@@ -42,10 +42,7 @@
HorizontalAlignment="Left" VerticalAlignment="Center"
pu:ComboBoxHelper.HoverBackground="#1EB5B5B5"
pu:ComboBoxHelper.SelectedBackground="#32B5B5B5"
pu:ComboBoxHelper.IsSearchTextBoxVisible="True"
pu:ComboBoxHelper.Watermark="请选择警员"
pu:ComboBoxHelper.SearchTextChanged="cbo_police_SearchTextChanged"
pu:ComboBoxHelper.SearchTextBoxWatermark="在此搜索警员..." SelectionChanged="cbo_police_SelectionChanged"></ComboBox>
pu:ComboBoxHelper.Watermark="请选择警员" PreviewMouseDown="cbo_police_MouseDown"></ComboBox>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Background="Red" pu:ButtonHelper.HoverBrush="Red" Width="120" Height="35" Margin="0,0,270,0" Click="AddInv_Click" FontSize="24">添加装备</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Width="120" Height="35" Margin="0,0,140,0" Click="OnSave_Click" FontSize="24">创建单据</Button>
......
......@@ -47,7 +47,7 @@ namespace LiteChannel
cbo_police.DisplayMemberPath = "name";
cbo_police.SelectedValuePath = "id";
cbo_police.SelectedIndex = 0;
cbo_police.SelectedIndex = -1;
cbo_type.SelectedIndex = 0;
dg_epc.ItemsSource = RefreshSourcesList;
}
......@@ -79,7 +79,7 @@ namespace LiteChannel
if (cbo_type.SelectedIndex == 0)
{
//借用
if (HttpHelper.CreateBorrowJYOrder( police.id, RefreshSourcesList.ToList(), out string msg))
if (HttpHelper.CreateBorrowJYOrder(police.id, RefreshSourcesList.ToList(), out string msg))
{
MessageBox.Show("借用单创建成功");
this.Close();
......@@ -93,7 +93,7 @@ namespace LiteChannel
else
{
//领用
if (HttpHelper.CreateBorrowLYOrder( police.id, RefreshSourcesList.ToList(), out string msg))
if (HttpHelper.CreateBorrowLYOrder(police.id, RefreshSourcesList.ToList(), out string msg))
{
MessageBox.Show("领用单创建成功");
this.Close();
......@@ -106,18 +106,6 @@ namespace LiteChannel
}
}
private void cbo_police_SearchTextChanged(object sender, Panuon.UI.Silver.Core.SearchTextChangedEventArgs e)
{
if (!IsLoaded)
return;
cbo_police.ItemsSource = PoliceList.Where(t => t.name.Contains(e.Text));
}
private void cbo_police_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
police = cbo_police.SelectedItem as sync_police;
}
private void AddInv_Click(object sender, RoutedEventArgs e)
{
var from = new AddInvWindow(RefreshSourcesList);
......@@ -155,5 +143,17 @@ namespace LiteChannel
dg_epc.ItemsSource = RefreshSourcesList;
}
}
private void cbo_police_MouseDown(object sender, MouseButtonEventArgs e)
{
cbo_police.IsDropDownOpen = false;
var select = new SelectPoliceWindow(PoliceList);
select.ShowDialog();
police = select.police;
if (police != null)
{
cbo_police.SelectedItem = police;
}
}
}
}
<pu:WindowX x:Class="LiteChannel.SelectInvWindow"
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:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LiteChannel"
mc:Ignorable="d" Icon="1.ico"
Title="选择装备" Height="350" Width="600" WindowState="Normal" FontSize="24"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" Loaded="OnWindow_Loaded" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="1" Margin="0,0,0,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="430"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" Grid.ColumnSpan="2">
<TextBlock Text="装备名称:" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Margin="0,1,0,0" x:Name="txt_vendor" FontSize="24" Focusable="True" Text="{Binding VendorName,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="360" Background="White" />
</StackPanel>
<StackPanel Grid.Column="4" Orientation="Horizontal">
<Button Content="查询" FontSize="24" Click="OnQueryClick" VerticalAlignment="Center" Margin="0,1,0,0" Width="70" HorizontalAlignment="Left" />
</StackPanel>
</Grid>
<DataGrid EnableRowVirtualization="False" x:Name="g_vender" Margin="3 5 3 20" Grid.Row="2" HeadersVisibility="Column"
GridLinesVisibility="None" Background="Transparent" BorderThickness="1" CanUserAddRows="False"
AutoGenerateColumns="False" SelectionMode="Single" HorizontalScrollBarVisibility="Hidden" RowBackground="Transparent" CanUserSortColumns="True"
>
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="Height" Value="30"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}">
<Setter Property="Height" Value="45" />
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="#EBEBEB"/>
<Setter Property="Opacity" Value="0.4"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="装备名称" IsReadOnly="True" Width="*" FontSize="24" Binding="{Binding equipmentDetailName}" ElementStyle="{StaticResource TextCenterStyle}"/>
<DataGridTextColumn Header="在库数量" IsReadOnly="True" Width="100" FontSize="24" Binding="{Binding detailCount}" ElementStyle="{StaticResource TextCenterStyle}"/>
<DataGridTemplateColumn Header="操作" Width="100" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="选择" Click="OnSelectItemClick" Width="70" Height="35" FontSize="24" Margin="5,0,5,0" pu:ButtonHelper.CornerRadius="4" >
</Button>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</pu:WindowX>
using JmpRfidLp;
using LiteChannel.Commons;
using LiteChannel.Models;
using Panuon.UI.Silver;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
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.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;
using Panuon.UI.Silver.Core;
namespace LiteChannel
{
/// <summary>
/// StoreWindow.xaml 的交互逻辑
/// </summary>
public partial class SelectInvWindow : WindowX, IComponentConnector
{
private List<inventory_info> InventoryList { get; set; }
public inventory_info inventory = null;
public SelectInvWindow(List<inventory_info> inventoryList)
{
InitializeComponent();
InventoryList = inventoryList;
}
private void OnWindow_Loaded(object sender, RoutedEventArgs e)
{
g_vender.ItemsSource = InventoryList;
}
private void OnQueryClick(object sender, RoutedEventArgs e)
{
if (string.IsNullOrEmpty(txt_vendor.Text))
{
g_vender.ItemsSource = InventoryList;
}
else
{
g_vender.ItemsSource = InventoryList?.Where(t => t.equipmentDetailName.Contains(txt_vendor.Text));
}
}
private void OnSelectItemClick(object sender, RoutedEventArgs e)
{
inventory = g_vender.SelectedValue as inventory_info;
this.Close();
}
}
}
<pu:WindowX x:Class="LiteChannel.SelectPoliceWindow"
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:pu="clr-namespace:Panuon.UI.Silver;assembly=Panuon.UI.Silver"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LiteChannel"
mc:Ignorable="d" Icon="1.ico"
Title="选择警员" Height="350" Width="600" WindowState="Normal" FontSize="24"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" Loaded="OnWindow_Loaded" >
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="0"></RowDefinition>
<RowDefinition Height="50"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="1" Margin="0,0,0,0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="50"/>
<ColumnDefinition Width="430"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="1" Orientation="Horizontal" Grid.ColumnSpan="2">
<TextBlock Text="姓名:" FontSize="24" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Margin="0,1,0,0" x:Name="txt_vendor" FontSize="24" Focusable="True" Text="{Binding VendorName,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" Width="360" Background="White" />
</StackPanel>
<StackPanel Grid.Column="4" Orientation="Horizontal">
<Button Content="查询" FontSize="24" Click="OnQueryClick" VerticalAlignment="Center" Margin="0,1,0,0" Width="70" HorizontalAlignment="Left" />
</StackPanel>
</Grid>
<DataGrid EnableRowVirtualization="False" x:Name="g_vender" Margin="3 5 3 20" Grid.Row="2" HeadersVisibility="Column"
GridLinesVisibility="None" Background="Transparent" BorderThickness="1" CanUserAddRows="False"
AutoGenerateColumns="False" SelectionMode="Single" HorizontalScrollBarVisibility="Hidden" RowBackground="Transparent" CanUserSortColumns="True"
>
<DataGrid.ColumnHeaderStyle>
<Style TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="24"/>
<Setter Property="Height" Value="30"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.RowStyle>
<Style TargetType="{x:Type DataGridRow}">
<Setter Property="Height" Value="45" />
<Style.Triggers>
<Trigger Property="ItemsControl.AlternationIndex" Value="0">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
</Trigger>
<Trigger Property="ItemsControl.AlternationIndex" Value="1">
<Setter Property="Background" Value="#EBEBEB"/>
<Setter Property="Opacity" Value="0.4"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="姓名" IsReadOnly="True" Width="*" FontSize="24" Binding="{Binding name}" ElementStyle="{StaticResource TextCenterStyle}"/>
<DataGridTextColumn Header="警号" IsReadOnly="True" Width="150" FontSize="24" Binding="{Binding policeCode}" ElementStyle="{StaticResource TextCenterStyle}"/>
<DataGridTemplateColumn Header="操作" Width="100" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
<Button Content="选择" Click="OnSelectItemClick" Width="70" Height="35" FontSize="24" Margin="5,0,5,0" pu:ButtonHelper.CornerRadius="4" >
</Button>
</StackPanel>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>
</pu:WindowX>
using JmpRfidLp;
using LiteChannel.Commons;
using LiteChannel.Models;
using Panuon.UI.Silver;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
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.Markup;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Windows.Threading;
using Panuon.UI.Silver.Core;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
namespace LiteChannel
{
/// <summary>
/// StoreWindow.xaml 的交互逻辑
/// </summary>
public partial class SelectPoliceWindow : WindowX, IComponentConnector
{
private List<sync_police> PoliceList { get; set; }
public sync_police police = null;
public SelectPoliceWindow(List<sync_police> policeList)
{
InitializeComponent();
PoliceList = policeList;
}
private void OnWindow_Loaded(object sender, RoutedEventArgs e)
{
g_vender.ItemsSource = PoliceList;
}
private void OnQueryClick(object sender, RoutedEventArgs e)
{
if (string.IsNullOrEmpty(txt_vendor.Text))
{
g_vender.ItemsSource = PoliceList;
}
else
{
g_vender.ItemsSource = PoliceList?.Where(t => t.name.Contains(txt_vendor.Text));
}
}
private void OnSelectItemClick(object sender, RoutedEventArgs e)
{
police = g_vender.SelectedValue as sync_police;
this.Close();
}
}
}
......@@ -6,9 +6,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LiteChannel"
mc:Ignorable="d" Icon="1.ico"
Title="盘点入库" Height="400" Width="650" WindowState="Maximized" FontSize="24"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" Loaded="OnWindow_Loaded" Closing="OnWindow_Closing">
Height="720" Width="1024" ResizeMode="NoResize" WindowState="Maximized"
Title="盘点入库" FontSize="24" WindowStartupLocation="CenterScreen"
Loaded="OnWindow_Loaded" Closing="OnWindow_Closing">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
......@@ -32,7 +32,7 @@
<TextBlock Grid.Row="2" Grid.ColumnSpan="2" Margin="0,0,220,0" Foreground="Red" Name="txt_stat" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24">状态:读写器启动失败</TextBlock>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" IsEnabled="false" Name="btn_inv" HorizontalAlignment="Right" Click="OnInv_Click" Width="120" Height="35" Margin="0,0,273,0" FontSize="24">开始读取</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Width="120" Height="35" Margin="0,0,140,0" Click="OnSave_Click" FontSize="24">提交入库</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Background="#C8FF7F00" Click="OnExit_Click" pu:ButtonHelper.HoverBrush="#FF7F00" Width="120" Height="35" Margin="0,0,10,0" FontSize="24">退出</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Background="#C8FF7F00" Click="OnExit_Click" pu:ButtonHelper.HoverBrush="#FF7F00" Width="120" Height="35" Margin="0,0,10,0" FontSize="24">返回</Button>
</Grid>
</pu:WindowX>
......@@ -6,9 +6,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:LiteChannel"
mc:Ignorable="d" Icon="1.ico"
Title="盘点出库" Height="350" Width="650" WindowState="Normal" FontSize="24"
WindowStartupLocation="CenterScreen"
ResizeMode="NoResize" Loaded="OnWindow_Loaded" Closing="OnWindow_Closing">
Height="720" Width="1024" ResizeMode="NoResize" WindowState="Maximized"
Title="盘点出库" FontSize="24" WindowStartupLocation="CenterScreen"
Loaded="OnWindow_Loaded" Closing="OnWindow_Closing">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
......@@ -25,6 +25,6 @@
<TextBlock Grid.Row="1" Margin="0,0,220,0" Foreground="Red" Name="txt_stat" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="24">状态:读写器启动失败</TextBlock>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="1" IsEnabled="false" Name="btn_inv" HorizontalAlignment="Right" Click="OnInv_Click" Width="120" Height="35" Margin="0,0,270,0" FontSize="24">开始读取</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="1" HorizontalAlignment="Right" Width="120" Height="35" Margin="0,0,140,0" Click="OnSave_Click" FontSize="24">提交出库</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="1" HorizontalAlignment="Right" Background="#C8FF7F00" Click="OnExit_Click" pu:ButtonHelper.HoverBrush="#FF7F00" Width="120" Height="35" Margin="0,0,10,0" FontSize="24">退出</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="1" HorizontalAlignment="Right" Background="#C8FF7F00" Click="OnExit_Click" pu:ButtonHelper.HoverBrush="#FF7F00" Width="120" Height="35" Margin="0,0,10,0" FontSize="24">返回</Button>
</Grid>
</pu:WindowX>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论