Commit 24f8f507 authored by 潘栩锋's avatar 潘栩锋 🚴

删掉NotifyPropertyChanged()

parent fc6802d9
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
xmlns:local="clr-namespace:FLY.Thick.Blowing.UI.Fix.Client" xmlns:local="clr-namespace:FLY.Thick.Blowing.UI.Fix.Client"
xmlns:iservice="clr-namespace:FLY.Thick.Blowing.IService;assembly=FLY.Thick.Blowing" xmlns:iservice="clr-namespace:FLY.Thick.Blowing.IService;assembly=FLY.Thick.Blowing"
xmlns:common="clr-namespace:FLY.Thick.Base.Common;assembly=FLY.Thick.Base" xmlns:common="clr-namespace:FLY.Thick.Base.Common;assembly=FLY.Thick.Base"
xmlns:blowing_common="clr-namespace:FLY.Thick.Blowing.Common;assembly=FLY.Thick.Blowing"
xmlns:misc="clr-namespace:Misc;assembly=MISC" xmlns:misc="clr-namespace:Misc;assembly=MISC"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1024" d:DesignHeight="768" d:DesignWidth="1024"
...@@ -15,6 +16,13 @@ ...@@ -15,6 +16,13 @@
<Page.Resources> <Page.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Theme/GraphTab.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/MaterialDesignIcons.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
<ControlTemplate x:Key="picture_button" TargetType="Button"> <ControlTemplate x:Key="picture_button" TargetType="Button">
<Border Name="border" BorderThickness="1" CornerRadius="5"> <Border Name="border" BorderThickness="1" CornerRadius="5">
<ContentPresenter Content="{TemplateBinding Content}"/> <ContentPresenter Content="{TemplateBinding Content}"/>
...@@ -29,12 +37,7 @@ ...@@ -29,12 +37,7 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<ResourceDictionary.MergedDictionaries> <blowing_common:BlowingFixProfileParam x:Key="profile_param" MMode="Bag"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Theme/GraphTab.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/MaterialDesignIcons.xaml"/>
<ResourceDictionary Source="pack://application:,,,/ThickTcpUiInWindow;component/Converter/Dictionary_MyConv.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Page.Resources> </Page.Resources>
<Grid> <Grid>
...@@ -185,7 +188,7 @@ ...@@ -185,7 +188,7 @@
</Grid> </Grid>
</Border> </Border>
</Button> </Button>
<Button Click="button_profile_click" Template="{StaticResource ResourceKey=picture_button}"> <Button Click="button_profile_click" Template="{StaticResource ResourceKey=picture_button}" d:DataContext="{StaticResource profile_param}">
<Border Style="{StaticResource BorderStyle_module}" Name="Border_Profile"> <Border Style="{StaticResource BorderStyle_module}" Name="Border_Profile">
<StackPanel Margin="2"> <StackPanel Margin="2">
<Grid Margin="2"> <Grid Margin="2">
...@@ -205,7 +208,8 @@ ...@@ -205,7 +208,8 @@
<TextBlock Text="{Binding Comp, StringFormat={}{0:F3}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" /> <TextBlock Text="{Binding Comp, StringFormat={}{0:F3}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" />
</StackPanel> </StackPanel>
</Grid> </Grid>
<Grid Margin="2" Visibility="{Binding SolveEnable, Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}"> <StackPanel Orientation="Vertical">
<Grid Margin="2" >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="182*" /> <ColumnDefinition Width="182*" />
<ColumnDefinition Width="auto" /> <ColumnDefinition Width="auto" />
...@@ -226,6 +230,72 @@ ...@@ -226,6 +230,72 @@
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Grid> </Grid>
<StackPanel.Style>
<Style TargetType="StackPanel">
<Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers>
<DataTrigger Binding="{Binding MMode}" Value="Normal">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
</StackPanel>
<StackPanel Orientation="Vertical">
<Grid Margin="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="182*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="膜宽" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding FilmWidth}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2" Grid.Column="1">
<TextBlock Text="膜边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding FilmPosH}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_activity}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
</StackPanel>
</StackPanel>
</Grid>
<Grid Margin="2" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="182*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" Margin="2">
<TextBlock Text="折边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding BagFold0}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_static}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="2" Grid.Column="1">
<TextBlock Text="折边" FontSize="12" FontWeight="Bold" FontFamily="YouYuan" TextAlignment="Center" HorizontalAlignment="Center" Foreground="#FF3B3B3B" />
<StackPanel Orientation="Horizontal" Margin="5,0">
<TextBlock Text="{Binding BagFold1}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" Foreground="{StaticResource Color_theme_static}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="mm" FontSize="12" />
</StackPanel>
</StackPanel>
</Grid>
<StackPanel.Style>
<Style TargetType="StackPanel">
<Setter Property="Visibility" Value="Collapsed"/>
<Style.Triggers>
<DataTrigger Binding="{Binding MMode}" Value="Bag">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</StackPanel.Style>
</StackPanel>
</StackPanel> </StackPanel>
</Border> </Border>
</Button> </Button>
......
...@@ -13,80 +13,27 @@ namespace FLY.Thick.Blowing.Client ...@@ -13,80 +13,27 @@ namespace FLY.Thick.Blowing.Client
{ {
#region IRenZiJiaService 成员 #region IRenZiJiaService 成员
#region 膜长 计算 #region 膜长 计算
private double flrange;
/// <summary> /// <summary>
/// 膜长查找范围, 以FilmLength为目标值,两边查找,单位m /// 膜长查找范围, 以FilmLength为目标值,两边查找,单位m
/// </summary> /// </summary>
public double FLRange public double FLRange { get; set; }
{
get { return flrange; }
set
{
if (flrange != value)
{
flrange = value;
NotifyPropertyChanged("FLRange");
}
}
}
private string calstate;
/// <summary> /// <summary>
/// 计算的状态,因为是一个很漫长的过程!!! /// 计算的状态,因为是一个很漫长的过程!!!
/// </summary> /// </summary>
public string CalState public string CalState { get; set; }
{
get { return calstate; }
protected set
{
if (calstate != value)
{
calstate = value;
NotifyPropertyChanged("CalState");
}
}
}
#region 计算结果 #region 计算结果
private double maxr;
/// <summary> /// <summary>
/// 最大相识度 /// 最大相识度
/// </summary> /// </summary>
public double MaxR public double MaxR { get; set; }
{
get
{
return maxr;
}
set
{
if (maxr != value)
{
maxr = value;
NotifyPropertyChanged("MaxR");
}
}
}
private double maxrfilmlength;
/// <summary> /// <summary>
/// 最大相识度对应速度 /// 最大相识度对应速度
/// </summary> /// </summary>
public double MaxRFilmLength public double MaxRFilmLength { get; set; }
{
get
{
return maxrfilmlength;
}
set
{
if (maxrfilmlength != value)
{
maxrfilmlength = value;
NotifyPropertyChanged("MaxRFilmLength");
}
}
}
#endregion #endregion
#endregion #endregion
...@@ -95,153 +42,45 @@ namespace FLY.Thick.Blowing.Client ...@@ -95,153 +42,45 @@ namespace FLY.Thick.Blowing.Client
/// <summary> /// <summary>
/// 追边开始按钮自锁 /// 追边开始按钮自锁
/// </summary> /// </summary>
public bool IsBtnSelfHold public bool IsBtnSelfHold { get; set; }
{
get
{
return isBtnSelfHold;
}
set
{
if (isBtnSelfHold != value)
{
isBtnSelfHold = value;
NotifyPropertyChanged("IsBtnSelfHold");
}
}
}
RenZiJiaFixEPCType epctype = RenZiJiaFixEPCType.Null;
public RenZiJiaFixEPCType EPCType
{
get
{
return epctype;
}
set
{
if (epctype != value)
{
epctype = value;
NotifyPropertyChanged("EPCType");
}
}
}
TimeSpan sampleconsume = TimeSpan.FromSeconds(2); public RenZiJiaFixEPCType EPCType { get; set; }
/// <summary> /// <summary>
/// 采样时间, 默认2s /// 采样时间, 默认2s
/// </summary> /// </summary>
public TimeSpan SampleConsume public TimeSpan SampleConsume { get; set; } = TimeSpan.FromSeconds(2);
{
get { return sampleconsume; }
set
{
if (sampleconsume != value)
{
sampleconsume = value;
NotifyPropertyChanged("SampleConsume");
}
}
}
TimeSpan sampleinterval = TimeSpan.FromMinutes(45);
/// <summary> /// <summary>
/// 温修间隔,默认45分钟 /// 温修间隔,默认45分钟
/// </summary> /// </summary>
public TimeSpan SampleInterval public TimeSpan SampleInterval { get; set; } = TimeSpan.FromMinutes(45);
{
get { return sampleinterval; }
set
{
if (sampleinterval != value)
{
sampleinterval = value;
NotifyPropertyChanged("SampleInterval");
}
}
}
TimeSpan sampletimer = TimeSpan.Zero;
/// <summary> /// <summary>
/// 当前温修计时,大于温修间隔就会去温修 /// 当前温修计时,大于温修间隔就会去温修
/// </summary> /// </summary>
public TimeSpan SampleTimer public TimeSpan SampleTimer { get; protected set; } = TimeSpan.Zero;
{
get
{
return sampletimer;
}
protected set
{
if (sampletimer != value)
{
sampletimer = value;
NotifyPropertyChanged("SampleTimer");
}
}
}
TimeSpan backedgewait = TimeSpan.FromSeconds(5);
/// <summary> /// <summary>
/// 回到边界后,再等待一段时间,那就肯定找到边界了。 默认5s /// 回到边界后,再等待一段时间,那就肯定找到边界了。 默认5s
/// </summary> /// </summary>
public TimeSpan BackEdgeWait public TimeSpan BackEdgeWait { get; set; } = TimeSpan.FromSeconds(5);
{
get
{
return backedgewait;
}
set
{
if (backedgewait != value)
{
backedgewait = value;
NotifyPropertyChanged("BackEdgeWait");
}
}
}
private int samplead = -1;
/// <summary> /// <summary>
/// 采样得到的样品AD /// 采样得到的样品AD
/// </summary> /// </summary>
public int SampleAD public int SampleAD { get; protected set; } = -1;
{
get
{
return samplead;
}
protected set
{
if (samplead != value)
{
samplead = value;
NotifyPropertyChanged("SampleAD");
}
}
}
bool epcisrunning = false;
/// <summary> /// <summary>
/// 追边运行中! /// 追边运行中!
/// </summary> /// </summary>
public bool EPCIsRunning public bool EPCIsRunning { get; set; }
{
get
{
return epcisrunning;
}
protected set
{
if (epcisrunning != value)
{
epcisrunning = value;
NotifyPropertyChanged("EPCIsRunning");
}
}
}
#endregion #endregion
#endregion #endregion
......
...@@ -14,63 +14,20 @@ namespace FLY.Thick.Blowing.Client ...@@ -14,63 +14,20 @@ namespace FLY.Thick.Blowing.Client
protected IFConn mConn; protected IFConn mConn;
protected UInt32 mServerID; protected UInt32 mServerID;
private bool isconnected = false; public bool IsConnected { get; set; }
public bool IsConnected
{
get { return isconnected; }
set
{
if (isconnected != value)
{
isconnected = value;
NotifyPropertyChanged("IsConnected");
}
}
}
#region IBlowing 成员变量 #region IBlowing 成员变量
#region 分区设定 #region 分区设定
private int channelcnt = 44;
/// <summary> /// <summary>
/// 加热通道数 /// 加热通道数
/// </summary> /// </summary>
public int ChannelCnt public int ChannelCnt { get; set; } = 44;
{
get
{
return channelcnt;
}
set
{
if (channelcnt != value)
{
channelcnt = value;
NotifyPropertyChanged("ChannelCnt");
NotifyPropertyChanged("NBolts");
}
}
}
private int bpc = 2;
/// <summary> /// <summary>
/// 分区数/加热通道数 /// 分区数/加热通道数
/// </summary> /// </summary>
public int BPC public int BPC { get; set; } = 2;
{
get
{
return bpc;
}
set
{
if (bpc != value)
{
bpc = value;
NotifyPropertyChanged("BPC");
NotifyPropertyChanged("NBolts");
}
}
}
/// <summary> /// <summary>
...@@ -83,52 +40,19 @@ namespace FLY.Thick.Blowing.Client ...@@ -83,52 +40,19 @@ namespace FLY.Thick.Blowing.Client
public int OrgBoltNo { get; set; } = 1;
private int orgboltno = 1;
public int OrgBoltNo
{
get
{
return orgboltno;
}
set
{
if (orgboltno != value)
{
orgboltno = value;
NotifyPropertyChanged("OrgBoltNo");
}
}
}
private bool isUsedMap = false;
/// <summary> /// <summary>
/// 使用分区表 /// 使用分区表
/// </summary> /// </summary>
public bool IsUsedMap public bool IsUsedMap { get; set; }
{
get { return isUsedMap; }
set {
if (isUsedMap != value)
{
isUsedMap = value;
NotifyPropertyChanged("IsUsedMap");
}
}
}
private List<BoltMapCell> map = new List<BoltMapCell>();
/// <summary> /// <summary>
/// 分区表 /// 分区表
/// </summary> /// </summary>
public List<BoltMapCell> Map public List<BoltMapCell> Map { get; set; } = new List<BoltMapCell>();
{
get { return map; }
set {
map = value;
NotifyPropertyChanged("Map");
}
}
#endregion #endregion
...@@ -171,11 +95,7 @@ namespace FLY.Thick.Blowing.Client ...@@ -171,11 +95,7 @@ namespace FLY.Thick.Blowing.Client
#region INotifyPropertyChanged 成员 #region INotifyPropertyChanged 成员
protected void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
#endregion #endregion
......
...@@ -166,7 +166,7 @@ namespace FLY.Weight.Server ...@@ -166,7 +166,7 @@ namespace FLY.Weight.Server
RollMixBuffer.Add(w, new BufferStorage<FlyData_Mix>(w.Number + "_rollmixbuffer.csv", 1, 400)); RollMixBuffer.Add(w, new BufferStorage<FlyData_Mix>(w.Number + "_rollmixbuffer.csv", 1, 400));
} }
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
//Test(); Test();
plcos.Init(); plcos.Init();
......
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