Commit cecb057a authored by 潘栩锋's avatar 潘栩锋 🚴

1. 修复 FlyADIODefine 获取GetIODefine返回数据出错

2. 添加 不含报警的 DynAreaIO2.xaml
3. 添加 OnInitLcus1_Multi.cs OnInitLcus1_One.cs 单个报警,lcus1 也能工作
parent 8a75715a
...@@ -149,6 +149,8 @@ ...@@ -149,6 +149,8 @@
<Compile Include="LCUS1.cs" /> <Compile Include="LCUS1.cs" />
<Compile Include="OnInit\OnInitAutoScan.cs" /> <Compile Include="OnInit\OnInitAutoScan.cs" />
<Compile Include="OnInit\OnInitControllerState.cs" /> <Compile Include="OnInit\OnInitControllerState.cs" />
<Compile Include="OnInit\OnInitLcus1_Multi.cs" />
<Compile Include="OnInit\OnInitLcus1_One.cs" />
<Compile Include="OnInit\OnInitWarnings.cs" /> <Compile Include="OnInit\OnInitWarnings.cs" />
<Compile Include="OnInit\OnInitError.cs" /> <Compile Include="OnInit\OnInitError.cs" />
<Compile Include="OnInit\OnInitGageCommand.cs" /> <Compile Include="OnInit\OnInitGageCommand.cs" />
...@@ -217,6 +219,9 @@ ...@@ -217,6 +219,9 @@
<Compile Include="UiModule\DynAreaFilmWidth.xaml.cs"> <Compile Include="UiModule\DynAreaFilmWidth.xaml.cs">
<DependentUpon>DynAreaFilmWidth.xaml</DependentUpon> <DependentUpon>DynAreaFilmWidth.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="UiModule\DynAreaIO2.xaml.cs">
<DependentUpon>DynAreaIO2.xaml</DependentUpon>
</Compile>
<Compile Include="UiModule\DynAreaIO.xaml.cs"> <Compile Include="UiModule\DynAreaIO.xaml.cs">
<DependentUpon>DynAreaIO.xaml</DependentUpon> <DependentUpon>DynAreaIO.xaml</DependentUpon>
</Compile> </Compile>
...@@ -400,6 +405,10 @@ ...@@ -400,6 +405,10 @@
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
<Page Include="UiModule\DynAreaIO2.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="UiModule\DynAreaIO.xaml"> <Page Include="UiModule\DynAreaIO.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
......
using Misc;
using MultiLayout.UiModule;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unity;
namespace FLY.Thick.Base.UI.OnInit
{
public class OnInitLcus1_Multi : IOnInit
{
public int Level { get; private set; }
ParamDictionary paramDictionary;
LCUS1 lcus1;
WarningSystemManager warningSystemManager;
public OnInitLcus1_Multi(
ParamDictionary paramDictionary,
WarningSystemManager warningSystemManager,
LCUS1 lcus1,
int lv = 1)
{
Level = lv;
this.lcus1 = lcus1;
this.paramDictionary = paramDictionary;
this.warningSystemManager = warningSystemManager;
}
public void OnInit()
{
warningSystemManager.PropertyChanged += (s, e) =>
{
if (e.PropertyName == nameof(warningSystemManager.IsRinging))
{
if (this.paramDictionary.GetValue(ParamDistItemKeys.LCUS1_Enable, false))
{
if (warningSystemManager.IsRinging)
lcus1.On();
else
lcus1.Off();
}
}
};
}
}
}
using Misc;
using MultiLayout.UiModule;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Unity;
namespace FLY.Thick.Base.UI.OnInit
{
public class OnInitLcus1_One : IOnInit
{
public int Level { get; private set; }
ParamDictionary paramDictionary;
LCUS1 lcus1;
FLY.OBJComponents.IService.IWarningSystem2Service warningService;
public OnInitLcus1_One(
ParamDictionary paramDictionary,
FLY.OBJComponents.IService.IWarningSystem2Service warningService,
LCUS1 lcus1,
int lv = 1)
{
Level = lv;
this.lcus1 = lcus1;
this.paramDictionary = paramDictionary;
this.warningService = warningService;
}
public void OnInit()
{
warningService.PropertyChanged += (s, e) =>
{
if (e.PropertyName == nameof(warningService.IsRinging))
{
if (this.paramDictionary.GetValue(ParamDistItemKeys.LCUS1_Enable, false))
{
if (warningService.IsRinging)
lcus1.On();
else
lcus1.Off();
}
}
};
}
}
}
...@@ -28,22 +28,17 @@ namespace FLY.Thick.Base.UI.OnInit ...@@ -28,22 +28,17 @@ namespace FLY.Thick.Base.UI.OnInit
FlyLayoutManager flyLayoutManager; FlyLayoutManager flyLayoutManager;
DispatcherTimer timer_error; DispatcherTimer timer_error;
int reason_list_index = -1; int reason_list_index = -1;
ParamDictionary paramDictionary;
LCUS1 lcus1;
public OnInitWarnings( public OnInitWarnings(
IUnityContainer container, IUnityContainer container,
FlyLayoutManager flyLayoutManager, FlyLayoutManager flyLayoutManager,
WarningSystemManager warningSystemManager, WarningSystemManager warningSystemManager,
ParamDictionary paramDictionary, ParamDictionary paramDictionary,
LCUS1 lcus1,
int lv = 1) int lv = 1)
{ {
Level = lv; Level = lv;
this.container = container; this.container = container;
this.flyLayoutManager = flyLayoutManager; this.flyLayoutManager = flyLayoutManager;
this.warningSystemManager = warningSystemManager; this.warningSystemManager = warningSystemManager;
this.lcus1 = lcus1;
this.paramDictionary = paramDictionary;
if (warningSystemManager.Warnings.Count() == 0) if (warningSystemManager.Warnings.Count() == 0)
return; return;
...@@ -68,21 +63,6 @@ namespace FLY.Thick.Base.UI.OnInit ...@@ -68,21 +63,6 @@ namespace FLY.Thick.Base.UI.OnInit
UpdateError(); UpdateError();
}; };
UpdateError(); UpdateError();
warningSystemManager.PropertyChanged += (s, e) =>
{
if (e.PropertyName == nameof(warningSystemManager.IsRinging))
{
if (this.paramDictionary.GetValue(ParamDistItemKeys.LCUS1_Enable, false))
{
if (warningSystemManager.IsRinging)
lcus1.On();
else
lcus1.Off();
}
}
};
} }
private void WarningSystemManager_PropertyChanged(object sender, PropertyChangedEventArgs e) private void WarningSystemManager_PropertyChanged(object sender, PropertyChangedEventArgs e)
......
...@@ -22,6 +22,8 @@ using Unity; ...@@ -22,6 +22,8 @@ using Unity;
using Unity.Resolution; using Unity.Resolution;
using MultiLayout; using MultiLayout;
using FLY.OBJComponents.IService; using FLY.OBJComponents.IService;
using GalaSoft.MvvmLight.Command;
using FObjBase.Reflect;
namespace FLY.Thick.Base.UI.UiModule namespace FLY.Thick.Base.UI.UiModule
{ {
...@@ -30,8 +32,8 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -30,8 +32,8 @@ namespace FLY.Thick.Base.UI.UiModule
/// </summary> /// </summary>
public partial class DynAreaIO : UserControl public partial class DynAreaIO : UserControl
{ {
DynAreaErrorVm errorVm;
DynAreaIOViewModel viewModel; DynAreaIOVm ioVm;
IUnityContainer container; IUnityContainer container;
...@@ -41,27 +43,18 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -41,27 +43,18 @@ namespace FLY.Thick.Base.UI.UiModule
} }
[InjectionMethod] [InjectionMethod]
public void Init( public void Init(
IUnityContainer container, IUnityContainer container)
ITDGageService gageService,
IWarningSystem2Service warningSystem)
{ {
this.container = container; this.container = container;
viewModel = new DynAreaIOViewModel(); ioVm = container.Resolve<DynAreaIOVm>();
viewModel.Init(gageService, gageService.DynArea, warningSystem); errorVm = container.Resolve<DynAreaErrorVm>();
this.DataContext = viewModel;
}
protected virtual void Border_IO_Click(object sender, RoutedEventArgs e)
{
if (!WdPassword.Authorize("Warning"))
return;
var p = container.Resolve<PgErrorTable>();
FlyLayoutManager.NavigationService.Navigate(p);
this.DataContext = ioVm;
grid_error.DataContext = errorVm;
} }
} }
public class DynAreaIOViewModel : INotifyPropertyChanged public class DynAreaIOVm : INotifyPropertyChanged
{ {
#region 延时推送 MARKNO #region 延时推送 MARKNO
const int MARKNO_UPDATEERROR = 1; const int MARKNO_UPDATEERROR = 1;
...@@ -78,29 +71,112 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -78,29 +71,112 @@ namespace FLY.Thick.Base.UI.UiModule
/// 是永久使用 /// 是永久使用
/// </summary> /// </summary>
public bool IsForever { get; set; } = false; public bool IsForever { get; set; } = false;
public RelayCommand OpenIoTipCmd { get; private set; }
public RelayCommand OpenAccessCmd { get; private set; }
DynArea dynArea;
IUnityContainer container;
public DynAreaIOVm()
{
OpenIoTipCmd = new RelayCommand(OpenIoTip);
OpenAccessCmd = new RelayCommand(OpenAccess);
}
[InjectionMethod]
public void Init(
IUnityContainer container,
ITDGageService gageService)
{
this.dynArea = gageService.DynArea;
this.container = container;
Misc.BindingOperations.SetBinding(this.dynArea, nameof(this.dynArea.IStatus), this, nameof(IStatus));
Misc.BindingOperations.SetBinding(this.dynArea, nameof(this.dynArea.OStatus), this, nameof(OStatus));
Misc.BindingOperations.SetBinding(this.dynArea, nameof(this.dynArea.Hrs), this, nameof(Hrs));
UpdateIsForever();
this.dynArea.PropertyChanged += (s, e) =>
{
if (e.PropertyName == nameof(this.dynArea.Hrs))
{
UpdateIsForever();
}
};
}
void UpdateIsForever()
{
if (dynArea.Hrs > 50000)
IsForever = true;
else
IsForever = false;
}
private void OpenAccess()
{
WdFlyADAccess w = new WdFlyADAccess();
var flyAdService = container.Resolve<FLY.Thick.Base.IService.IFlyADService>();
w.Init(flyAdService);
w.Owner = App.Current.MainWindow;
w.ShowDialog();
}
private void OpenIoTip()
{
var w = new WdIOTip();
container.BuildUp(w);
w.Owner = App.Current.MainWindow;
w.ShowDialog();
}
}
public class DynAreaIOVmUt : DynAreaIOVm
{
public DynAreaIOVmUt()
{
IStatus = 0xff7f;
OStatus = 0x0005;
Hrs = 2000;
IsForever = false;
}
}
public class DynAreaErrorVm : INotifyPropertyChanged
{
/// <summary>
/// 有异常
/// </summary>
public bool IsError { get; set; } public bool IsError { get; set; }
/// <summary> /// <summary>
/// 异常消息 /// 异常消息
/// </summary> /// </summary>
public string ErrMsg { get; set; } public string ErrMsg { get; set; }
ITDGageService gageService; public RelayCommand OpenWarningCmd { get; }
DynArea dynArea;
public event PropertyChangedEventHandler PropertyChanged;
IWarningSystem2Service warningSystem; IWarningSystem2Service warningSystem;
IUnityContainer container;
DispatcherTimer timer_error; DispatcherTimer timer_error;
private int reason_list_index = -1; private int reason_list_index = -1;
public void Init(ITDGageService gageService, DynArea dynArea, IWarningSystem2Service warningSystem)
public DynAreaErrorVm()
{ {
//创建窗口观察 报警原因列表 OpenWarningCmd = new RelayCommand(OpenWarning);
this.warningSystem = warningSystem; }
this.dynArea = dynArea;
this.gageService = gageService;
Misc.BindingOperations.SetBinding(this.dynArea, nameof(this.dynArea.IStatus), this, nameof(IStatus));
Misc.BindingOperations.SetBinding(this.dynArea, nameof(this.dynArea.OStatus), this, nameof(OStatus));
Misc.BindingOperations.SetBinding(this.dynArea, nameof(this.dynArea.Hrs), this, nameof(Hrs));
UpdateIsForever();
[InjectionMethod]
public void Init(
IUnityContainer container,
IWarningSystem2Service warningSystem)
{
this.container = container;
this.warningSystem = warningSystem;
//报警原因轮流显示 //报警原因轮流显示
timer_error = new DispatcherTimer(); timer_error = new DispatcherTimer();
...@@ -117,30 +193,19 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -117,30 +193,19 @@ namespace FLY.Thick.Base.UI.UiModule
}; };
warningSystem.PropertyChanged += WarningSystem_PropertyChanged; warningSystem.PropertyChanged += WarningSystem_PropertyChanged;
if (this.gageService is FObjBase.FObjServiceClient) {
var client = this.gageService as FObjBase.FObjServiceClient;
client.PropertyChanged += (s, e) =>
{
if (e.PropertyName == nameof(FObjBase.FObjServiceClient.IsConnected)) {
UpdateError();
}
};
}
this.dynArea.PropertyChanged += (s, e) =>
{
if (e.PropertyName == nameof(this.dynArea.Hrs))
{
UpdateIsForever();
}
};
UpdateError(); UpdateError();
} }
private void WarningService_PropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == nameof(Reflect_SeviceClient.IsConnected))
{
UpdateError();
}
}
private void WarningSystem_PropertyChanged(object sender, PropertyChangedEventArgs e) private void WarningSystem_PropertyChanged(object sender, PropertyChangedEventArgs e)
{ {
if (e.PropertyName == nameof(warningSystem.ReasonList)) { if (e.PropertyName == nameof(warningSystem.ReasonList))
{
if (warningSystem.ReasonList != null && warningSystem.ReasonList.Count() > 0) if (warningSystem.ReasonList != null && warningSystem.ReasonList.Count() > 0)
reason_list_index = warningSystem.ReasonList.Count() - 1; reason_list_index = warningSystem.ReasonList.Count() - 1;
else else
...@@ -149,16 +214,6 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -149,16 +214,6 @@ namespace FLY.Thick.Base.UI.UiModule
UpdateError(); UpdateError();
} }
} }
void UpdateIsForever()
{
if (dynArea.Hrs > 50000)
IsForever = true;
else
IsForever = false;
}
void UpdateError() void UpdateError()
{ {
if (this.warningSystem is FObjBase.FObjServiceClient) if (this.warningSystem is FObjBase.FObjServiceClient)
...@@ -166,7 +221,7 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -166,7 +221,7 @@ namespace FLY.Thick.Base.UI.UiModule
var client = this.warningSystem as FObjBase.FObjServiceClient; var client = this.warningSystem as FObjBase.FObjServiceClient;
if (!client.IsConnected) if (!client.IsConnected)
{ {
ErrMsg = "服务器连接断开"; ErrMsg = "测厚仪服务器连接断开";
IsError = true; IsError = true;
reason_list_index = -1; reason_list_index = -1;
timer_error.Stop(); timer_error.Stop();
...@@ -195,31 +250,19 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -195,31 +250,19 @@ namespace FLY.Thick.Base.UI.UiModule
} }
} }
} private void OpenWarning()
public class DynAreaIOViewModel_UnitTest : INotifyPropertyChanged {
{ if (!WdPassword.Authorize("Warning"))
public event PropertyChangedEventHandler PropertyChanged; return;
var p = container.Resolve<PgErrorTable>();
public UInt16 IStatus { get; set; } = 0xff7f; FlyLayoutManager.NavigationService.Navigate(p);
public UInt16 OStatus { get; set; } = 0x0005; }
public int Hrs { get; set; } = 2000;
/// <summary>
/// 是永久使用
/// </summary>
public bool IsForever { get; set; } = false;
public bool IsError { get; set; }
/// <summary>
/// 异常消息
/// </summary>
public string ErrMsg { get; set; }
} }
public class UiModule2_DynAreaIO : IUiModule2 public class UiModule2_DynAreaIO : IUiModule2
{ {
public string Title => "IO状态"; public string Title => "测厚.IO状态(报警)";
public ComponentType Type => ComponentType.DynArea; public ComponentType Type => ComponentType.DynArea;
......
<UserControl x:Class="FLY.Thick.Base.UI.UiModule.DynAreaIO2"
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:FLY.Thick.Base.UI.UiModule"
d:DesignWidth="250"
mc:Ignorable="d" >
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="Rectangle" x:Key="IOStyle">
<Setter Property="Width" Value="9" />
<Setter Property="Height" Value="20" />
<Setter Property="Margin" Value="1" />
</Style>
<Style x:Key="IOTextStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource Brushes.ThemeBackground}" />
<Setter Property="HorizontalAlignment" Value="Center" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="FontSize" Value="9"/>
</Style>
<local:DynAreaIOVm x:Key="ioVm" IStatus = "0xff7f" OStatus = "0x0005" Hrs = "2000" IsForever="False"/>
</ResourceDictionary>
</UserControl.Resources>
<Button Style="{StaticResource Styles.Button.Empty}" d:DataContext="{StaticResource ioVm}" Command="{Binding OpenIoTipCmd}">
<Grid>
<Border Style="{StaticResource Styles.Module.Border}" >
<StackPanel Margin="2">
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="入" />
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=15}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=14}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=13}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=12}" Style="{StaticResource IOStyle}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=11}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=10}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=9}" Style="{StaticResource IOStyle}"/>
<Grid>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=8}" Style="{StaticResource IOStyle}"/>
<TextBlock Text="8" Style="{StaticResource IOTextStyle}"/>
</Grid>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=7}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=6}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=5}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=4}" Style="{StaticResource IOStyle}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=3}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=2}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=1}" Style="{StaticResource IOStyle}"/>
<Grid>
<Rectangle Fill="{Binding IStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=0}" Style="{StaticResource IOStyle}"/>
<TextBlock Text="1" Style="{StaticResource IOTextStyle}"/>
</Grid>
</StackPanel>
</StackPanel>
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<TextBlock Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="出" />
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=7}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=6}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=5}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=4}" Style="{StaticResource IOStyle}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="4,0">
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=3}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=2}" Style="{StaticResource IOStyle}"/>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=1}" Style="{StaticResource IOStyle}"/>
<Grid>
<Rectangle Fill="{Binding OStatus,Converter={StaticResource io2bitcolorconv},ConverterParameter=0}" Style="{StaticResource IOStyle}"/>
<TextBlock Text="1" Style="{StaticResource IOTextStyle}"/>
</Grid>
</StackPanel>
</StackPanel>
<Button Grid.Column="1" Style="{StaticResource Styles.Button.Empty}" Command="{Binding OpenAccessCmd}">
<StackPanel Visibility="{Binding IsForever,Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" Background="White">
<TextBlock Style="{StaticResource Styles.Module.Text.ItemHeader}" Text="剩余时间" />
<StackPanel Orientation="Horizontal" Background="Black" >
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue}" Text="{Binding Hrs}" Foreground="White" Padding="2,0"/>
<TextBlock Style="{StaticResource Styles.Module.Text.ItemValue.Unit}" Text="小时" Foreground="White"/>
</StackPanel>
</StackPanel>
</Button>
</Grid>
</StackPanel>
</Border>
</Grid>
</Button>
</UserControl>
using FLY.OBJComponents.Client;
using FLY.Thick.Base.Common;
using FLY.Thick.Base.IService;
using MultiLayout.UiModule;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Threading;
using FLY.Thick.Base.UI;
using Unity;
using Unity.Resolution;
using MultiLayout;
using FLY.OBJComponents.IService;
namespace FLY.Thick.Base.UI.UiModule
{
/// <summary>
/// DynAreaIO.xaml 的交互逻辑
/// </summary>
public partial class DynAreaIO2 : UserControl
{
DynAreaIOVm ioVm;
IUnityContainer container;
public DynAreaIO2()
{
InitializeComponent();
}
[InjectionMethod]
public void Init(
IUnityContainer container)
{
this.container = container;
ioVm = container.Resolve<DynAreaIOVm>();
this.DataContext = ioVm;
}
}
public class UiModule2_DynAreaIO2 : IUiModule2
{
public string Title => "测厚.IO状态";
public ComponentType Type => ComponentType.DynArea;
public bool IsUnique => true;
public FrameworkElement GetComponent(int id, IUnityContainer container)
{
var graph = container.Resolve<DynAreaIO2>();
return graph;
}
public FrameworkElement GetThumbnail()
{
return new System.Windows.Controls.Grid();
}
public void MatchParam(int[] IDs)
{
}
}
}
...@@ -37,7 +37,7 @@ namespace FLY.Thick.Base.UI.UiModule ...@@ -37,7 +37,7 @@ namespace FLY.Thick.Base.UI.UiModule
public class UiModule2_DynAreaThick : IUiModule2 public class UiModule2_DynAreaThick : IUiModule2
{ {
public string Title => "测厚.面密度状态"; public string Title => "测厚.AD值状态";
public ComponentType Type => ComponentType.DynArea; public ComponentType Type => ComponentType.DynArea;
......
...@@ -266,7 +266,7 @@ namespace FLY.Thick.Base.Common ...@@ -266,7 +266,7 @@ namespace FLY.Thick.Base.Common
list.Add(iodefine); list.Add(iodefine);
} }
asyncDelegate?.Invoke(asyncContext, list); asyncDelegate?.Invoke(asyncContext, reponse);
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment