Ver a proveniência

调整修改

样式分支
pry há 2 anos
ascendente
cometimento
83f566068d
11 ficheiros alterados com 139 adições e 86 eliminações
  1. BIN
     
  2. +1
    -1
      BPASmartClient.CustomResource/Pages/View/LoginView.xaml
  3. +1
    -1
      BPASmartClient.CustomResource/RecDictionarys/RecIcoButtonStyle.xaml
  4. +1
    -1
      BPASmartClient.CustomResource/Themes/MyStyle.xaml
  5. +1
    -1
      BPASmartClient.CustomResource/UserControls/IcoButton.cs
  6. +5
    -0
      BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs
  7. +2
    -2
      BPASmartClient/Control/ShopDeviceConfigView.xaml
  8. +8
    -11
      BPASmartClient/Control/ShopDeviceConfigView.xaml.cs
  9. +1
    -1
      DosingSystem/View/RecipeSettingsView.xaml
  10. +7
    -6
      FryPot_DosingSystem/App.xaml
  11. +112
    -62
      FryPot_DosingSystem/View/RecipeSetView.xaml

+ 1
- 1
BPASmartClient.CustomResource/Pages/View/LoginView.xaml Ver ficheiro

@@ -14,8 +14,8 @@
Background="{x:Null}"
Topmost="False"
WindowStartupLocation="CenterScreen"
WindowStyle="None"
WindowState="Normal"
WindowStyle="None"
mc:Ignorable="d">

<Window.DataContext>


+ 1
- 1
BPASmartClient.CustomResource/RecDictionarys/RecIcoButtonStyle.xaml Ver ficheiro

@@ -39,7 +39,7 @@
<Setter Property="Background" Value="#2219b7ec" />
<Setter Property="BorderBrush" Value="#ff19b7ec" />
<Setter Property="BorderThickness" Value="2" />
<Setter Property="EnterBackground" Value="#2219b7ec" />
<Setter Property="EnterBackground" Value="#8819b7ec" />
</Style>

<Style x:Key="IcoTitleBarStyle" TargetType="local:IcoButton">


+ 1
- 1
BPASmartClient.CustomResource/Themes/MyStyle.xaml Ver ficheiro

@@ -834,7 +834,7 @@
<Style.Setters>
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/背景矢量/beijing.png"/>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/背景矢量/beijing.png" />
</Setter.Value>
</Setter>
</Style.Setters>


+ 1
- 1
BPASmartClient.CustomResource/UserControls/IcoButton.cs Ver ficheiro

@@ -173,7 +173,7 @@ namespace BPASmartClient.CustomResource.UserControls

if (gr != null)
{
gr.MouseLeftButtonDown += Gr_MouseLeftButtonDown;
//gr.MouseLeftButtonDown += Gr_MouseLeftButtonDown;
gr.MouseEnter += Gr_MouseEnter;
gr.MouseLeave += Gr_MouseLeave;
}


+ 5
- 0
BPASmartClient.ViewModel/ShopDeviceConfigViewModel.cs Ver ficheiro

@@ -23,8 +23,10 @@ namespace BPASmartClient.ViewModel
string FileName => deviceConfig.Count > 0 ? deviceConfig[0].ShopName : string.Empty;
public static List<string> IDevices = new List<string>();
public static List<string> IPeripherals = new List<string>();
public static Action NewShop { get; set; }
public ShopDeviceConfigViewModel()
{
NewShop = null;
ActionManage.GetInstance.Register(new Action<object[]>((o) =>
{
if (o != null && o is string[] par)
@@ -43,6 +45,7 @@ namespace BPASmartClient.ViewModel
RemoveDeviceCommand = new RelayCommand<object>(RemoveDevice);
NewCommunicationCommand = new RelayCommand<object>(NewCommunication);
RemoveCommunicationCommand = new RelayCommand<object>(RemoveCommunication);
NewShopCommand = new RelayCommand(() => { NewShop?.Invoke(); });

DataListInit();

@@ -172,6 +175,8 @@ namespace BPASmartClient.ViewModel
public RelayCommand<object> RemoveCommunicationCommand { get; set; }

public RelayCommand SaveData { get; set; }

public RelayCommand NewShopCommand { get; set; }
#endregion

#region 列表集合


+ 2
- 2
BPASmartClient/Control/ShopDeviceConfigView.xaml Ver ficheiro

@@ -388,7 +388,7 @@
FontSize="16"
Foreground="{StaticResource TextBlockForeground}"
IcoText="&#xe626;"
MouseLeftButtonDown="IcoButton_MouseLeftButtonDown"
Command="{Binding NewShopCommand}"
Style="{StaticResource IcoButtonStyle}" />

<pry:IcoButton
@@ -399,7 +399,7 @@
Content="保存配置"
FontSize="16"
Foreground="{StaticResource TextBlockForeground}"
IcoText="&#xe626;"
IcoText="&#xe635;"
Style="{StaticResource IcoButtonStyle}" />

</Grid>


+ 8
- 11
BPASmartClient/Control/ShopDeviceConfigView.xaml.cs Ver ficheiro

@@ -30,22 +30,19 @@ namespace BPASmartClient.Control
public ShopDeviceConfigView()
{
InitializeComponent();
}

private void IcoButton_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
NewShopWindow newShopWindow = new NewShopWindow();
var res = newShopWindow.ShowDialog();

if (res != null && res == true)
ShopDeviceConfigViewModel.NewShop = new Action(() =>
{
VisibilityControl();
}
NewShopWindow newShopWindow = new NewShopWindow();
var res = newShopWindow.ShowDialog();
if (res != null && res == true)
{
VisibilityControl();
}
});
}

private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
{

Refresh();
}



+ 1
- 1
DosingSystem/View/RecipeSettingsView.xaml Ver ficheiro

@@ -73,7 +73,7 @@
Content="保存配方"
FontSize="17"
Foreground="Aqua"
IcoText="&#xe936;"
IcoText="&#xe635;"
IsEnabled="True"
Style="{StaticResource IcoButtonStyle}" />
</StackPanel>


+ 7
- 6
FryPot_DosingSystem/App.xaml Ver ficheiro

@@ -1,9 +1,10 @@
<Application x:Class="FryPot_DosingSystem.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FryPot_DosingSystem" xmlns:con="clr-namespace:System.Drawing;assembly=netstandard"
xmlns:con1="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
>
<Application
x:Class="FryPot_DosingSystem.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:con="clr-namespace:System.Drawing;assembly=netstandard"
xmlns:con1="clr-namespace:BPASmartClient.CustomResource.Converters;assembly=BPASmartClient.CustomResource"
xmlns:local="clr-namespace:FryPot_DosingSystem">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>


+ 112
- 62
FryPot_DosingSystem/View/RecipeSetView.xaml Ver ficheiro

@@ -1,15 +1,17 @@
<UserControl x:Class="FryPot_DosingSystem.View.RecipeSetView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:FryPot_DosingSystem.View"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl
x:Class="FryPot_DosingSystem.View.RecipeSetView"
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:local="clr-namespace:FryPot_DosingSystem.View"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
xmlns:vm="clr-namespace:FryPot_DosingSystem.ViewModel"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<UserControl.DataContext>
<vm:RecipeSetViewModel></vm:RecipeSetViewModel>
<vm:RecipeSetViewModel />
</UserControl.DataContext>
<UserControl.Resources>
<SolidColorBrush x:Key="BorderSolid" Color="#5523CACA" />
@@ -36,7 +38,7 @@
<Setter Property="BorderThickness" Value="0" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</Style.Triggers>
</Style>
@@ -44,57 +46,88 @@
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="55"></RowDefinition>
<RowDefinition Height="30"></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition Height="55" />
<RowDefinition Height="30" />
<RowDefinition />
</Grid.RowDefinitions>
<UniformGrid Columns="2">
<Image Source="../hbl.ico" HorizontalAlignment="Left"></Image>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Column="2">
<pry:IcoButton Content="新建配方"
Margin="80,15,10,0"
Width="150"
FontSize="16"
Foreground="Aqua"
IcoText="&#xe626;"
Cursor="Hand"
Style="{StaticResource IcoButtonStyle}"
Command="{Binding NewRecipe}">
</pry:IcoButton>
<Image HorizontalAlignment="Left" Source="../hbl.ico" />
<StackPanel
Grid.Column="2"
HorizontalAlignment="Right"
Orientation="Horizontal">
<pry:IcoButton
Content="保存配方" Margin="5,15,10,0"
Width="150"
FontSize="16"
Foreground="Aqua"
IcoText="&#xe626;"
Cursor="Hand"
Style="{StaticResource IcoButtonStyle}"
Command="{Binding SaveRecipe}">
</pry:IcoButton>
Width="150"
Margin="80,15,10,0"
Command="{Binding NewRecipe}"
Content="新建配方"
Cursor="Hand"
FontSize="16"
Foreground="Aqua"
IcoText="&#xe626;"
Style="{StaticResource IcoButtonStyle}" />
<pry:IcoButton
Width="150"
Margin="5,15,10,0"
Command="{Binding SaveRecipe}"
Content="保存配方"
Cursor="Hand"
FontSize="16"
Foreground="Aqua"
IcoText="&#xe626;"
Style="{StaticResource IcoButtonStyle}" />

</StackPanel>
</UniformGrid>
<!--<TextBlock Grid.Row="1" Text="配方信息" Foreground="Aquamarine" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="18" Margin="0,5" ></TextBlock>-->
<!--<Line Grid.Row="1" X1="0" Y1="5" X2="1920" Y2="10" Stroke="Aqua" VerticalAlignment="Center"></Line>-->
<Grid Grid.Row="1" Background="Cyan" Margin="0,5,0,0">
<Grid
Grid.Row="1"
Margin="0,5,0,0"
Background="Cyan">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.3*" />
<ColumnDefinition Width="0.3*" />
<ColumnDefinition Width="0.3*" />
<!--<ColumnDefinition/>-->
</Grid.ColumnDefinitions>
<!--<TextBlock Text="编号" FontSize="16" Foreground="Tomato" HorizontalAlignment="Center" VerticalAlignment="Center"/>-->
<TextBlock Grid.Column="0" Text="配方名称" FontSize="16" Foreground="Tomato" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<GridSplitter BorderThickness="0.5" BorderBrush="CadetBlue"/>
<TextBlock Grid.Column="1" Text="编辑配方" FontSize="16" Foreground="Tomato" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<GridSplitter Grid.Column="1" BorderThickness="0.5" BorderBrush="CadetBlue"></GridSplitter>
<TextBlock Grid.Column="2" Text="删除配方" FontSize="16" Foreground="Tomato" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBlock
Grid.Column="0"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Tomato"
Text="配方名称" />
<GridSplitter BorderBrush="CadetBlue" BorderThickness="0.5" />
<TextBlock
Grid.Column="1"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Tomato"
Text="编辑配方" />
<GridSplitter
Grid.Column="1"
BorderBrush="CadetBlue"
BorderThickness="0.5" />
<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Tomato"
Text="删除配方" />
</Grid>
<ScrollViewer Grid.Row="2" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" Padding="0,5,0,0">
<ScrollViewer
Grid.Row="2"
Padding="0,5,0,0"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ItemsControl ItemsSource="{Binding recipeModels}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel></StackPanel>
<StackPanel />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
@@ -104,26 +137,43 @@
<ControlTemplate>
<Grid x:Name="gr">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.25*"></ColumnDefinition>
<ColumnDefinition Width="0.25*"></ColumnDefinition>
<ColumnDefinition Width="0.25*"></ColumnDefinition>
<ColumnDefinition Width="0.25*" />
<ColumnDefinition Width="0.25*" />
<ColumnDefinition Width="0.25*" />
<!--<ColumnDefinition Width="0.25*"></ColumnDefinition>-->
</Grid.ColumnDefinitions>
<!--<TextBlock Text="{Binding RecipeId}" Grid.Column="0" FontSize="16" HorizontalAlignment="Left" VerticalAlignment="Center"
Foreground="Aqua"
Margin="5,0,0,5"></TextBlock>-->
<TextBlock Text="{Binding RecipeName}" Grid.Column="0" Margin="5,0,0,5"
HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="Aqua" FontSize="16"></TextBlock>
<Button FontSize="16" Grid.Column="1"
Margin="5,0,0,5" Content="编辑" Style="{StaticResource buttonStyle}" Command="{Binding DataContext.EditRecipeCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}"
CommandParameter="{Binding RecipeId}"></Button>
<Button Margin="5,0,0,5" FontSize="16" Grid.Column="2" Content="删除" Style="{StaticResource buttonStyle}" Command="{Binding DataContext.DeleteRecipeCommand,RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ItemsControl}}" CommandParameter="{Binding RecipeId}">
</Button>
<TextBlock
Grid.Column="0"
Margin="5,0,0,5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
FontSize="16"
Foreground="Aqua"
Text="{Binding RecipeName}" />

<Button
Grid.Column="1"
Margin="5,0,0,5"
Command="{Binding DataContext.EditRecipeCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"
CommandParameter="{Binding RecipeId}"
Content="编辑"
FontSize="16"
Style="{StaticResource buttonStyle}" />


<Button
Grid.Column="2"
Margin="5,0,0,5"
Command="{Binding DataContext.DeleteRecipeCommand, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ItemsControl}}"
CommandParameter="{Binding RecipeId}"
Content="删除"
FontSize="16"
Style="{StaticResource buttonStyle}" />

</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">


Carregando…
Cancelar
Guardar