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

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

2.修复 整理 上料53435
3.修复 自动风环 能弹出 window 的 都添加 owner
parent 15a7c792
......@@ -604,6 +604,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UIModule
private void button_save_click(object sender, RoutedEventArgs e)
{
Window_Save w = new Window_Save();
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
w.FileName = mFeedback.HeatsProductName;
if (w.ShowDialog() == true)
......@@ -646,6 +647,7 @@ namespace FLY.FeedbackRenZiJia.UI.Client.UIModule
private void button_load_click(object sender, RoutedEventArgs e)
{
Window_Load w = new Window_Load();
w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
w.Init(mFeedback);
w.ShowDialog();
}
......
......@@ -70,7 +70,7 @@ namespace FLY.Thick.Blowing.UI.Fix.Client
mWarningService = new WarningServiceSimple();
mTDGageService = new TDGageService();
//mInitParamService = new InitParamService();
mFixService = new FixService();
mPasswordService = new PasswordService();
......
......@@ -1128,7 +1128,9 @@ namespace FLY.Thick.BlowingScan.UI.Client
return -1;
}
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()
{
......@@ -1170,6 +1172,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// <param name="direction">输出: 方向</param>
void LimitListCal_ConstantVelocity(DateTime dtEnd, DateTime dtStart, int noStart, DateTime dt, out double angle, out Misc.DIRECTION direction)
{
TimeSpan ts1 = dt - dtStart;
TimeSpan ts2 = dtEnd - dtStart;
......@@ -1272,7 +1275,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
/// <param name="direction"></param>
/// <param name="rotationCnt"></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;
ListFindIndexResult ret = LimitList_FindIndex(dt, out index);
......@@ -1337,11 +1340,22 @@ namespace FLY.Thick.BlowingScan.UI.Client
else
no = 0;
dt_start = mDefaultTime;
dt_start = mDefaultTime;
dt_end = mLimitList[0].dt_begin;
if (dt < dt_start)
{
//数据发生在太遥远的过去,删除!!!!!
angle = 0;
direction = DIRECTION.FIX;
rotationCnt = -1;
inCV = false;
return false;
}
rotationCnt = LimitIndexToRotationCnt(-1);
inCV = true;
LimitListCal_ConstantVelocity(dt_end, dt_start, no, dt, out angle, out direction);
......@@ -1421,7 +1435,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
break;
}
return true;
}
......@@ -1520,7 +1534,10 @@ namespace FLY.Thick.BlowingScan.UI.Client
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;
if (a >= 360)
......
......@@ -188,28 +188,31 @@
<RowDefinition Height="auto"/>
<RowDefinition/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeCurr">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="当前范围:" />
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<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 Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeCurr">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="当前范围:" />
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<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 Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeNewest">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="最新范围:" />
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<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 Orientation="Horizontal" Margin="5" x:Name="stackpanel_bmRangeNewest">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader2}" Text="最新范围:" />
<StackPanel Orientation="Horizontal" >
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="'" VerticalAlignment="Top" />
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent2}" Text="{Binding FirstBM}" />
<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" Grid.Column="1">
<Path Data="{StaticResource Geometry_refresh}" RenderTransformOrigin="0.5,0.5" Margin="20,5" Visibility="{Binding IsStep2Ing,Converter={StaticResource visbilityconv}}">
<Path.RenderTransform>
......@@ -250,7 +253,8 @@
</Style>
</Path.Style>
</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>
<Path Data="{StaticResource Geometry_progress-download}" />
<ed:Arc Width="53" Height="53"
......@@ -288,9 +292,11 @@
</ed:Arc.Style>
</ed:Arc>
</Grid>
</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">
<Path Data="{StaticResource Geometry_floppy}" />
</Button>
......
......@@ -71,6 +71,7 @@ namespace FLY.Thick.BlowingScan.UI.Client
InitializeChart_gage(chart3, System.Drawing.Color.Blue);
this.button_download.DataContext = this;
}
/// <summary>
/// 解方程图
......@@ -784,6 +785,8 @@ namespace FLY.Thick.BlowingScan.UI.Client
mAnaylze.mGagedata.PropertyChanged += MGagedata_PropertyChanged;
button_focus1_Click(null, null);
this.text_download.DataContext = mRenZiJia;
}
private void MGagedata_PropertyChanged(object sender, PropertyChangedEventArgs e)
......
......@@ -90,7 +90,11 @@ namespace FLY.Thick.BlowingScan.Client
public int LastBM { get; set; } = -1;
#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)
{
base.ConnectNotify(from);
......@@ -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>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -838,6 +838,16 @@ namespace FObjBase
return;
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)
{
retdata = null;
......@@ -938,6 +948,8 @@ namespace FObjBase
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,
Proto.INFO_CALL_FUNCTION_REPONSE_BIGSIZE, null);
......@@ -945,8 +957,7 @@ namespace FObjBase
else
{
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);
}
} break;
......
......@@ -66,6 +66,18 @@ namespace FObjBase
/// <param name="infoid">消息ID</param>
/// <param name="infodata">消息数据</param>
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
#region Client->Server
......@@ -152,6 +164,21 @@ namespace FObjBase
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
#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