Commit 0f5c1818 authored by 潘栩锋's avatar 潘栩锋 🚴

1.添加 吹膜扫描测厚, 下载解方程数据界面,添加下载进度。 (因为太慢了)

2.修复 整理 上料53435
3.修复 自动风环 能弹出 window 的 都添加 owner
parent 15a7c792
...@@ -604,6 +604,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UIModule ...@@ -604,6 +604,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UIModule
private void button_save_click(object sender, RoutedEventArgs e) private void button_save_click(object sender, RoutedEventArgs e)
{ {
Window_Save w = new Window_Save(); Window_Save w = new Window_Save();
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
w.FileName = mFeedback.HeatsProductName; w.FileName = mFeedback.HeatsProductName;
if (w.ShowDialog() == true) if (w.ShowDialog() == true)
...@@ -646,6 +647,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UIModule ...@@ -646,6 +647,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UIModule
private void button_load_click(object sender, RoutedEventArgs e) private void button_load_click(object sender, RoutedEventArgs e)
{ {
Window_Load w = new Window_Load(); Window_Load w = new Window_Load();
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
w.Init(mFeedback); w.Init(mFeedback);
w.ShowDialog(); w.ShowDialog();
} }
......
...@@ -70,7 +70,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client ...@@ -70,7 +70,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
mWarningService = new WarningServiceSimple(); mWarningService = new WarningServiceSimple();
mTDGageService = new TDGageService(); mTDGageService = new TDGageService();
//mInitParamService = new InitParamService();
mFixService = new FixService(); mFixService = new FixService();
mPasswordService = new PasswordService(); mPasswordService = new PasswordService();
......
...@@ -1128,7 +1128,9 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -1128,7 +1128,9 @@ namespace FLY.Thick.BlowingScan.UI.Client
return -1; return -1;
} }
ago_dt = GetAgo(dt, filmLen, velocity); ago_dt = GetAgo(dt, filmLen, velocity);
GetAngle(a, ago_dt, out angle0, out angle1, out direction, out rotationcnt, out inCV); bool r = GetAngle(a, ago_dt, out angle0, out angle1, out direction, out rotationcnt, out inCV);
if (r == false)//太久之前了
return -1;
filminfo = new FilmInfo() filminfo = new FilmInfo()
{ {
...@@ -1170,6 +1172,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -1170,6 +1172,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// <param name="direction">输出: 方向</param> /// <param name="direction">输出: 方向</param>
void LimitListCal_ConstantVelocity(DateTime dtEnd, DateTime dtStart, int noStart, DateTime dt, out double angle, out Misc.DIRECTION direction) void LimitListCal_ConstantVelocity(DateTime dtEnd, DateTime dtStart, int noStart, DateTime dt, out double angle, out Misc.DIRECTION direction)
{ {
TimeSpan ts1 = dt - dtStart; TimeSpan ts1 = dt - dtStart;
TimeSpan ts2 = dtEnd - dtStart; TimeSpan ts2 = dtEnd - dtStart;
...@@ -1272,7 +1275,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -1272,7 +1275,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// <param name="direction"></param> /// <param name="direction"></param>
/// <param name="rotationCnt"></param> /// <param name="rotationCnt"></param>
/// <param name="inCV"></param> /// <param name="inCV"></param>
void LimitListSearch(DateTime dt, bool modifyparam, out double angle, out Misc.DIRECTION direction, out int rotationCnt, out bool inCV) bool LimitListSearch(DateTime dt, bool modifyparam, out double angle, out Misc.DIRECTION direction, out int rotationCnt, out bool inCV)
{ {
int index; int index;
ListFindIndexResult ret = LimitList_FindIndex(dt, out index); ListFindIndexResult ret = LimitList_FindIndex(dt, out index);
...@@ -1337,11 +1340,22 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -1337,11 +1340,22 @@ namespace FLY.Thick.BlowingScan.UI.Client
else else
no = 0; no = 0;
dt_start = mDefaultTime;
dt_start = mDefaultTime;
dt_end = mLimitList[0].dt_begin; dt_end = mLimitList[0].dt_begin;
if (dt < dt_start)
{
//数据发生在太遥远的过去,删除!!!!!
angle = 0;
direction = DIRECTION.FIX;
rotationCnt = -1;
inCV = false;
return false;
}
rotationCnt = LimitIndexToRotationCnt(-1); rotationCnt = LimitIndexToRotationCnt(-1);
inCV = true; inCV = true;
LimitListCal_ConstantVelocity(dt_end, dt_start, no, dt, out angle, out direction); LimitListCal_ConstantVelocity(dt_end, dt_start, no, dt, out angle, out direction);
...@@ -1421,7 +1435,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -1421,7 +1435,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
break; break;
} }
return true;
} }
...@@ -1520,7 +1534,10 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -1520,7 +1534,10 @@ namespace FLY.Thick.BlowingScan.UI.Client
double angle; double angle;
LimitListSearch(dt, false, out angle, out direction, out rotationCnt, out inCV); bool r = LimitListSearch(dt, false, out angle, out direction, out rotationCnt, out inCV);
if (r == false)
return false;
a += angle; a += angle;
if (a >= 360) if (a >= 360)
......
...@@ -188,28 +188,31 @@ ...@@ -188,28 +188,31 @@
<RowDefinition Height="auto"/> <RowDefinition Height="auto"/>
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeCurr"> <StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="当前范围:" /> <StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeCurr">
<StackPanel Orientation="Horizontal" > <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="当前范围:" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top"/> <StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" /> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top"/> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" /> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
</StackPanel>
</StackPanel> </StackPanel>
</StackPanel> <StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeNewest">
<StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeNewest"> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="最新范围:" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="最新范围:" /> <StackPanel Orientation="Horizontal" >
<StackPanel Orientation="Horizontal" > <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" /> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'-'" VerticalAlignment="Top" /> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding LastBM}" /> <TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" /> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
<StackPanel Orientation="Horizontal" Grid.Column="1"> <StackPanel Orientation="Horizontal" Grid.Column="1">
<Path Data="{StaticResource Geometry_refresh}" RenderTransformOrigin="0.5,0.5" Margin="20,5" Visibility="{Binding IsStep2Ing,Converter={StaticResource visbilityconv}}"> <Path Data="{StaticResource Geometry_refresh}" RenderTransformOrigin="0.5,0.5" Margin="20,5" Visibility="{Binding IsStep2Ing,Converter={StaticResource visbilityconv}}">
<Path.RenderTransform> <Path.RenderTransform>
...@@ -250,7 +253,8 @@ ...@@ -250,7 +253,8 @@
</Style> </Style>
</Path.Style> </Path.Style>
</Path> </Path>
<Button Name="button_download" Click="button_download_Click" Margin="20,5" > <Grid>
<Button Name="button_download" Click="button_download_Click" Margin="20,5" >
<Grid> <Grid>
<Path Data="{StaticResource Geometry_progress-download}" /> <Path Data="{StaticResource Geometry_progress-download}" />
<ed:Arc Width="53" Height="53" <ed:Arc Width="53" Height="53"
...@@ -288,9 +292,11 @@ ...@@ -288,9 +292,11 @@
</ed:Arc.Style> </ed:Arc.Style>
</ed:Arc> </ed:Arc>
</Grid> </Grid>
</Button> </Button>
<TextBlock x:Name="text_download" FontSize="15" VerticalAlignment="Bottom" HorizontalAlignment="Right" Visibility="{Binding IsDownloading,Mode=OneWay,Converter={StaticResource visbilityconv}}">
<Run Text="{Binding CurrentSize,Mode=OneWay}"/><Run Text="/"/><Run Text="{Binding TotalSize,Mode=OneWay}"/>
</TextBlock>
</Grid>
<Button Click="button_save_Click" Margin="20,5"> <Button Click="button_save_Click" Margin="20,5">
<Path Data="{StaticResource Geometry_floppy}" /> <Path Data="{StaticResource Geometry_floppy}" />
</Button> </Button>
......
...@@ -71,6 +71,7 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -71,6 +71,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
InitializeChart_gage(chart3, System.Drawing.Color.Blue); InitializeChart_gage(chart3, System.Drawing.Color.Blue);
this.button_download.DataContext = this; this.button_download.DataContext = this;
} }
/// <summary> /// <summary>
/// 解方程图 /// 解方程图
...@@ -784,6 +785,8 @@ namespace FLY.Thick.BlowingScan.UI.Client ...@@ -784,6 +785,8 @@ namespace FLY.Thick.BlowingScan.UI.Client
mAnaylze.mGagedata.PropertyChanged += MGagedata_PropertyChanged; mAnaylze.mGagedata.PropertyChanged += MGagedata_PropertyChanged;
button_focus1_Click(null, null); button_focus1_Click(null, null);
this.text_download.DataContext = mRenZiJia;
} }
private void MGagedata_PropertyChanged(object sender, PropertyChangedEventArgs e) private void MGagedata_PropertyChanged(object sender, PropertyChangedEventArgs e)
......
...@@ -90,7 +90,11 @@ namespace FLY.Thick.BlowingScan.Client ...@@ -90,7 +90,11 @@ namespace FLY.Thick.BlowingScan.Client
public int LastBM { get; set; } = -1; public int LastBM { get; set; } = -1;
#endregion #endregion
#region 下载进度
public bool IsDownloading { get; private set; }
public int TotalSize { get; private set; }
public int CurrentSize { get; private set; }
#endregion
public override void ConnectNotify(IFConn from) public override void ConnectNotify(IFConn from)
{ {
base.ConnectNotify(from); base.ConnectNotify(from);
...@@ -150,7 +154,27 @@ namespace FLY.Thick.BlowingScan.Client ...@@ -150,7 +154,27 @@ namespace FLY.Thick.BlowingScan.Client
} }
} }
public override void PushCallFunctionBigSizeStatus(IFConn from, uint srcid, uint magic, ushort funcid, int total_size, int download_size, object AsyncState)
{
switch (funcid)
{
case BLOWING_SCAN_OBJ_INTERFACE.CALL_GETBUF:
{
TotalSize = total_size;
CurrentSize = download_size;
if (CurrentSize == TotalSize)
{
IsDownloading = false;
}
else
{
IsDownloading = true;
}
}
break;
}
}
/// <summary> /// <summary>
/// 参数应用 /// 参数应用
/// </summary> /// </summary>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -838,6 +838,16 @@ namespace FObjBase ...@@ -838,6 +838,16 @@ namespace FObjBase
return; return;
destobj.PushCallFunction(from, srcid, magic, infoid, infodata, AsyncDelegate, AsyncState); destobj.PushCallFunction(from, srcid, magic, infoid, infodata, AsyncDelegate, AsyncState);
} }
void PushCallFunctionBigSizeStatus(IFConn from, UInt32 srcid, UInt32 destid, UInt32 magic, UInt16 infoid, int total_size, int download_size, object AsyncState)
{
IFObj destobj = Find(destid);
if (destobj == null)
return;
destobj.PushCallFunctionBigSizeStatus(from, srcid, magic, infoid, total_size, download_size, AsyncState);
}
int Process(IFConn from, UInt32 srcid, UInt32 destid, UInt32 magic, UInt16 info_no, byte[] infodata, out byte[] retdata) int Process(IFConn from, UInt32 srcid, UInt32 destid, UInt32 magic, UInt16 info_no, byte[] infodata, out byte[] retdata)
{ {
retdata = null; retdata = null;
...@@ -938,6 +948,8 @@ namespace FObjBase ...@@ -938,6 +948,8 @@ namespace FObjBase
if (!tran.ToBuf(pack)) if (!tran.ToBuf(pack))
{ {
PushCallFunctionBigSizeStatus(conn, p.srcid, p.destid, p.magic, tran.FuncID, tran.Size, tran.Position, tran.AsyncState);
//继续获取参数!!!!!!!!! //继续获取参数!!!!!!!!!
SendMessageEx(conn, p.srcid, p.destid, p.magic, SendMessageEx(conn, p.srcid, p.destid, p.magic,
Proto.INFO_CALL_FUNCTION_REPONSE_BIGSIZE, null); Proto.INFO_CALL_FUNCTION_REPONSE_BIGSIZE, null);
...@@ -945,8 +957,7 @@ namespace FObjBase ...@@ -945,8 +957,7 @@ namespace FObjBase
else else
{ {
Transactions.Remove(tran);//用完了,删除!!! Transactions.Remove(tran);//用完了,删除!!!
PushCallFunctionBigSizeStatus(conn, p.srcid, p.destid, p.magic, tran.FuncID, tran.Size, tran.Position, tran.AsyncState);
PushCallFunction(conn, p.srcid, p.destid, p.magic, tran.FuncID, tran.Buf, tran.AsyncDelegate, tran.AsyncState); PushCallFunction(conn, p.srcid, p.destid, p.magic, tran.FuncID, tran.Buf, tran.AsyncDelegate, tran.AsyncState);
} }
} break; } break;
......
...@@ -66,6 +66,18 @@ namespace FObjBase ...@@ -66,6 +66,18 @@ namespace FObjBase
/// <param name="infoid">消息ID</param> /// <param name="infoid">消息ID</param>
/// <param name="infodata">消息数据</param> /// <param name="infodata">消息数据</param>
void PushInfo(IFConn from, UInt32 srcid, UInt16 infoid, byte[] infodata); void PushInfo(IFConn from, UInt32 srcid, UInt16 infoid, byte[] infodata);
/// <summary>
/// 作为客户端, 服务器回复CallFunction, 回复数据为大包,显示进度
/// </summary>
/// <param name="from"></param>
/// <param name="srcid"></param>
/// <param name="magic"></param>
/// <param name="funcid"></param>
/// <param name="total_size"></param>
/// <param name="download_size"></param>
/// <param name="AsyncState"></param>
void PushCallFunctionBigSizeStatus(IFConn from, UInt32 srcid, UInt32 magic, UInt16 funcid, int total_size, int download_size, object AsyncState);
#endregion #endregion
#region Client->Server #region Client->Server
...@@ -152,6 +164,21 @@ namespace FObjBase ...@@ -152,6 +164,21 @@ namespace FObjBase
public virtual void PushInfo(IFConn from, uint srcid, ushort infoid, byte[] infodata) public virtual void PushInfo(IFConn from, uint srcid, ushort infoid, byte[] infodata)
{ {
}
/// <summary>
/// 作为客户端, 服务器回复CallFunction, 回复数据为大包,显示进度
/// </summary>
/// <param name="from"></param>
/// <param name="srcid"></param>
/// <param name="magic"></param>
/// <param name="funcid"></param>
/// <param name="total_size"></param>
/// <param name="download_size"></param>
/// <param name="AsyncState"></param>
public virtual void PushCallFunctionBigSizeStatus(IFConn from, UInt32 srcid, UInt32 magic, UInt16 funcid, int total_size, int download_size, object AsyncState)
{
} }
#endregion #endregion
#region Client->Server #region Client->Server
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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