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

删掉NotifyPropertyChanged()

parent fc6802d9
......@@ -6,6 +6,7 @@
xmlns:local="clr-namespace:FLY.Thick.Blowing.UI.Fix.Client"
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:blowing_common="clr-namespace:FLY.Thick.Blowing.Common;assembly=FLY.Thick.Blowing"
xmlns:misc="clr-namespace:Misc;assembly=MISC"
mc:Ignorable="d"
d:DesignHeight="768" d:DesignWidth="1024"
......@@ -15,6 +16,13 @@
<Page.Resources>
<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">
<Border Name="border" BorderThickness="1" CornerRadius="5">
<ContentPresenter Content="{TemplateBinding Content}"/>
......@@ -28,13 +36,8 @@
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<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>
<blowing_common:BlowingFixProfileParam x:Key="profile_param" MMode="Bag"/>
</ResourceDictionary>
</Page.Resources>
<Grid>
......@@ -185,7 +188,7 @@
</Grid>
</Border>
</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">
<StackPanel Margin="2">
<Grid Margin="2">
......@@ -205,27 +208,94 @@
<TextBlock Text="{Binding Comp, StringFormat={}{0:F3}}" FontSize="24" FontFamily="Microsoft Sans Serif" TextAlignment="Center" HorizontalAlignment="Center" />
</StackPanel>
</Grid>
<Grid Margin="2" Visibility="{Binding SolveEnable, Converter={StaticResource visbilityconv}, ConverterParameter=Collapsed}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="182*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<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 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>
<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 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>
</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>
</Border>
</Button>
......
......@@ -13,80 +13,27 @@ namespace FLY.Thick.Blowing.Client
{
#region IRenZiJiaService 成员
#region 膜长 计算
private double flrange;
/// <summary>
/// 膜长查找范围, 以FilmLength为目标值,两边查找,单位m
/// </summary>
public double FLRange
{
get { return flrange; }
set
{
if (flrange != value)
{
flrange = value;
NotifyPropertyChanged("FLRange");
}
}
}
private string calstate;
public double FLRange { get; set; }
/// <summary>
/// 计算的状态,因为是一个很漫长的过程!!!
/// </summary>
public string CalState
{
get { return calstate; }
protected set
{
if (calstate != value)
{
calstate = value;
NotifyPropertyChanged("CalState");
}
}
}
public string CalState { get; set; }
#region 计算结果
private double maxr;
/// <summary>
/// 最大相识度
/// </summary>
public double MaxR
{
get
{
return maxr;
}
set
{
if (maxr != value)
{
maxr = value;
NotifyPropertyChanged("MaxR");
}
}
}
public double MaxR { get; set; }
private double maxrfilmlength;
/// <summary>
/// 最大相识度对应速度
/// </summary>
public double MaxRFilmLength
{
get
{
return maxrfilmlength;
}
set
{
if (maxrfilmlength != value)
{
maxrfilmlength = value;
NotifyPropertyChanged("MaxRFilmLength");
}
}
}
public double MaxRFilmLength { get; set; }
#endregion
#endregion
......@@ -95,153 +42,45 @@ namespace FLY.Thick.Blowing.Client
/// <summary>
/// 追边开始按钮自锁
/// </summary>
public bool IsBtnSelfHold
{
get
{
return isBtnSelfHold;
}
set
{
if (isBtnSelfHold != value)
{
isBtnSelfHold = value;
NotifyPropertyChanged("IsBtnSelfHold");
}
}
}
public bool IsBtnSelfHold { get; set; }
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>
/// 采样时间, 默认2s
/// </summary>
public TimeSpan SampleConsume
{
get { return sampleconsume; }
set
{
if (sampleconsume != value)
{
sampleconsume = value;
NotifyPropertyChanged("SampleConsume");
}
}
}
public TimeSpan SampleConsume { get; set; } = TimeSpan.FromSeconds(2);
TimeSpan sampleinterval = TimeSpan.FromMinutes(45);
/// <summary>
/// 温修间隔,默认45分钟
/// </summary>
public TimeSpan SampleInterval
{
get { return sampleinterval; }
set
{
if (sampleinterval != value)
{
sampleinterval = value;
NotifyPropertyChanged("SampleInterval");
}
}
}
TimeSpan sampletimer = TimeSpan.Zero;
public TimeSpan SampleInterval { get; set; } = TimeSpan.FromMinutes(45);
/// <summary>
/// 当前温修计时,大于温修间隔就会去温修
/// </summary>
public TimeSpan SampleTimer
{
get
{
return sampletimer;
}
protected set
{
if (sampletimer != value)
{
sampletimer = value;
NotifyPropertyChanged("SampleTimer");
}
}
}
public TimeSpan SampleTimer { get; protected set; } = TimeSpan.Zero;
TimeSpan backedgewait = TimeSpan.FromSeconds(5);
/// <summary>
/// 回到边界后,再等待一段时间,那就肯定找到边界了。 默认5s
/// </summary>
public TimeSpan BackEdgeWait
{
get
{
return backedgewait;
}
set
{
if (backedgewait != value)
{
backedgewait = value;
NotifyPropertyChanged("BackEdgeWait");
}
}
}
public TimeSpan BackEdgeWait { get; set; } = TimeSpan.FromSeconds(5);
private int samplead = -1;
/// <summary>
/// 采样得到的样品AD
/// </summary>
public int SampleAD
{
get
{
return samplead;
}
protected set
{
if (samplead != value)
{
samplead = value;
NotifyPropertyChanged("SampleAD");
}
}
}
public int SampleAD { get; protected set; } = -1;
bool epcisrunning = false;
/// <summary>
/// 追边运行中!
/// </summary>
public bool EPCIsRunning
{
get
{
return epcisrunning;
}
protected set
{
if (epcisrunning != value)
{
epcisrunning = value;
NotifyPropertyChanged("EPCIsRunning");
}
}
}
public bool EPCIsRunning { get; set; }
#endregion
#endregion
......
......@@ -13,64 +13,21 @@ namespace FLY.Thick.Blowing.Client
{
protected IFConn mConn;
protected UInt32 mServerID;
private bool isconnected = false;
public bool IsConnected
{
get { return isconnected; }
set
{
if (isconnected != value)
{
isconnected = value;
NotifyPropertyChanged("IsConnected");
}
}
}
public bool IsConnected { get; set; }
#region IBlowing 成员变量
#region 分区设定
private int channelcnt = 44;
/// <summary>
/// 加热通道数
/// </summary>
public int ChannelCnt
{
get
{
return channelcnt;
}
set
{
if (channelcnt != value)
{
channelcnt = value;
NotifyPropertyChanged("ChannelCnt");
NotifyPropertyChanged("NBolts");
}
}
}
public int ChannelCnt { get; set; } = 44;
private int bpc = 2;
/// <summary>
/// 分区数/加热通道数
/// </summary>
public int BPC
{
get
{
return bpc;
}
set
{
if (bpc != value)
{
bpc = value;
NotifyPropertyChanged("BPC");
NotifyPropertyChanged("NBolts");
}
}
}
public int BPC { get; set; } = 2;
/// <summary>
......@@ -82,53 +39,20 @@ 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>
public bool IsUsedMap
{
get { return isUsedMap; }
set {
if (isUsedMap != value)
{
isUsedMap = value;
NotifyPropertyChanged("IsUsedMap");
}
}
}
public bool IsUsedMap { get; set; }
private List<BoltMapCell> map = new List<BoltMapCell>();
/// <summary>
/// 分区表
/// </summary>
public List<BoltMapCell> Map
{
get { return map; }
set {
map = value;
NotifyPropertyChanged("Map");
}
}
public List<BoltMapCell> Map { get; set; } = new List<BoltMapCell>();
#endregion
......@@ -171,11 +95,7 @@ namespace FLY.Thick.Blowing.Client
#region INotifyPropertyChanged 成员
protected void NotifyPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
PropertyChanged.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged;
#endregion
......
......@@ -166,7 +166,7 @@ namespace FLY.Weight.Server
RollMixBuffer.Add(w, new BufferStorage<FlyData_Mix>(w.Number + "_rollmixbuffer.csv", 1, 400));
}
//--------------------------------------------------------------------------------
//Test();
Test();
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