aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy.mail.net@gmail.com>2023-07-27 04:12:12 +0300
committerRoy Ben-Shabat <Roy.mail.net@gmail.com>2023-07-27 04:12:12 +0300
commit2e5ee293c310f5d4c8de46993f2b812742ae9188 (patch)
tree878d2466963a9d689960bda728880f41071e2694 /Software/Visual_Studio/PPC/Tango.PPC.UI
parent08b0f6c9ea547cec0e21f7210f0e10f17f899b6f (diff)
parentd9d009df1da8630ec6726ed506865ca9818d1eff (diff)
downloadTango-2e5ee293c310f5d4c8de46993f2b812742ae9188.tar.gz
Tango-2e5ee293c310f5d4c8de46993f2b812742ae9188.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml145
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs80
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
5 files changed, 213 insertions, 24 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml
index 8ae0f4354..fe9875009 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationView.xaml
@@ -6,7 +6,7 @@
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:local="clr-namespace:Tango.PPC.UI.Dialogs"
mc:Ignorable="d"
- Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="750" Height="700" d:DataContext="{d:DesignInstance Type=local:GeneralInformationViewVM, IsDesignTimeCreatable=False}">
+ Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="750" Height="1000" d:DataContext="{d:DesignInstance Type=local:GeneralInformationViewVM, IsDesignTimeCreatable=False}">
<Grid Margin="20">
<DockPanel>
@@ -16,11 +16,12 @@
<StackPanel DockPanel.Dock="Top" HorizontalAlignment="Center">
<Image Source="../Images/logo.png" RenderOptions.BitmapScalingMode="Fant" Width="157" Height="51" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 0 10"/>
- <TextBlock VerticalAlignment="Center" Margin="0 30 0 0" FontSize="{StaticResource TangoHeaderFontSize}">General Information</TextBlock>
+
</StackPanel>
- <Grid Margin="0 30 0 0">
- <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled" >
+ <StackPanel Margin="0 20 0 0" Orientation="Vertical">
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 30 0 0" FontSize="{StaticResource TangoDialogFontSize}">Machine information:</TextBlock>
+ <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled" Margin="0 10 0 0">
<FlowDocument>
<Table CellSpacing="0" FontFamily="{StaticResource TangoFlexoFontFamily}">
<Table.Resources>
@@ -41,6 +42,32 @@
</Table.Columns>
<TableRowGroup>
+ <TableRow>
+ <TableCell>
+ <Paragraph>
+ <TextBlock>Machine S/N:</TextBlock>
+ </Paragraph>
+ </TableCell>
+
+ <TableCell>
+ <Paragraph>
+ <TextBlock Text="{Binding MachineProvider.Machine.SerialNumber,Mode=OneWay,IsAsync=True,FallbackValue='0000'}"/>
+ </Paragraph>
+ </TableCell>
+ </TableRow>
+ <TableRow>
+ <TableCell>
+ <Paragraph>
+ <TextBlock>Site:</TextBlock>
+ </Paragraph>
+ </TableCell>
+
+ <TableCell>
+ <Paragraph>
+ <TextBlock Text="{Binding SiteName,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
+ </Paragraph>
+ </TableCell>
+ </TableRow>
<TableRow>
<TableCell>
@@ -55,31 +82,44 @@
</Paragraph>
</TableCell>
</TableRow>
+ <TableRow>
+ <TableCell>
+ <Paragraph>
+ <TextBlock>IP Address:</TextBlock>
+ </Paragraph>
+ </TableCell>
+ <TableCell>
+ <Paragraph>
+ <TextBlock Text="{Binding IPAddress,Mode=OneWay,FallbackValue=0}"></TextBlock>
+ </Paragraph>
+ </TableCell>
+ </TableRow>
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>Application Version:</TextBlock>
+ <TextBlock>Up Time:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding ApplicationManager.VersionAndTag,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
+ <TextBlock Text="{Binding UpTime,Mode=OneWay,StringFormat=hh\\:mm\\:ss,FallbackValue='00:00:00'}"></TextBlock>
</Paragraph>
</TableCell>
</TableRow>
+
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>Site:</TextBlock>
+ <TextBlock>Total Dye Time:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding SiteName,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
+ <TextBlock Text="{Binding TotalDyeTime,Mode=OneWay,FallbackValue=0}"></TextBlock>
</Paragraph>
</TableCell>
</TableRow>
@@ -87,90 +127,153 @@
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>Machine S/N:</TextBlock>
+ <TextBlock>Total Dye Meters:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding MachineProvider.Machine.SerialNumber,Mode=OneWay,IsAsync=True,FallbackValue='0000'}"/>
+ <TextBlock Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock>
</Paragraph>
</TableCell>
</TableRow>
+ </TableRowGroup>
+ </Table>
+ </FlowDocument>
+ </FlowDocumentScrollViewer>
+ <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoDialogFontSize}">Installed Software &amp; Firmware:</TextBlock>
+ <FlowDocumentScrollViewer VerticalScrollBarVisibility="Disabled" Margin="0 10 0 0">
+ <FlowDocument>
+ <Table CellSpacing="0" FontFamily="{StaticResource TangoFlexoFontFamily}">
+ <Table.Resources>
+ <Style TargetType="{x:Type TableRowGroup}">
+ <Setter Property="FontSize" Value="{StaticResource TangoDefaultFontSize}"/>
+ </Style>
+
+ <Style TargetType="TableCell">
+ <Setter Property="BorderThickness" Value="0 0 0 1"></Setter>
+ <Setter Property="BorderBrush" Value="{StaticResource TangoGrayBrush}"></Setter>
+ <Setter Property="Padding" Value="5"></Setter>
+ </Style>
+ </Table.Resources>
+ <Table.Columns>
+ <TableColumn Width="160" />
+ <TableColumn />
+ <TableColumn />
+ </Table.Columns>
+
+ <TableRowGroup>
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>Firmware Version:</TextBlock>
+ <TextBlock>Application Version:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
+ <TextBlock Text="{Binding ApplicationManager.VersionAndTag,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
</Paragraph>
</TableCell>
</TableRow>
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>Up Time:</TextBlock>
+ <TextBlock>Main Firmware:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding UpTime,Mode=OneWay,StringFormat=hh\\:mm\\:ss,FallbackValue='00:00:00'}"></TextBlock>
+ <TextBlock Text="{Binding MachineProvider.MachineOperator.DeviceInformation.Version,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
</Paragraph>
</TableCell>
</TableRow>
+
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>IP Address:</TextBlock>
+ <TextBlock>Head Firmware:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding IPAddress,Mode=OneWay,FallbackValue=0}"></TextBlock>
+ <TextBlock Text="{Binding HeadFirmware,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
</Paragraph>
</TableCell>
</TableRow>
+ <TableRow>
+ <TableCell>
+ <Paragraph>
+ <TextBlock>Dryer Firmware:</TextBlock>
+ </Paragraph>
+ </TableCell>
+ <TableCell>
+ <Paragraph>
+ <TextBlock Text="{Binding DryerFirmware,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
+ </Paragraph>
+ </TableCell>
+ </TableRow>
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>Total Dye Time:</TextBlock>
+ <TextBlock>Mid-tanks Firmware:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding TotalDyeTime,Mode=OneWay,FallbackValue=0}"></TextBlock>
+ <TextBlock Text="{Binding MidtanksFirmware,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
</Paragraph>
</TableCell>
</TableRow>
+ <TableRow>
+ <TableCell>
+ <Paragraph>
+ <TextBlock>Lubricant Firmware:</TextBlock>
+ </Paragraph>
+ </TableCell>
+ <TableCell>
+ <Paragraph>
+ <TextBlock Text="{Binding LubricantFirmware,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
+ </Paragraph>
+ </TableCell>
+ </TableRow>
<TableRow>
<TableCell>
<Paragraph>
- <TextBlock>Total Dye Meters:</TextBlock>
+ <TextBlock>Dispensers Firmware:</TextBlock>
</Paragraph>
</TableCell>
<TableCell>
<Paragraph>
- <TextBlock Text="{Binding TotalDyeMeters,Mode=OneWay,FallbackValue=0}"></TextBlock>
+ <TextBlock Text="{Binding DispensersFWFirmware,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
</Paragraph>
</TableCell>
</TableRow>
+ <TableRow>
+ <TableCell>
+ <Paragraph>
+ <TextBlock>Winders Firmware:</TextBlock>
+ </Paragraph>
+ </TableCell>
+ <TableCell>
+ <Paragraph>
+ <TextBlock Text="{Binding WindersFWFirmware,Mode=OneWay,TargetNullValue='N/A',FallbackValue='N/A'}"/>
+ </Paragraph>
+ </TableCell>
+ </TableRow>
</TableRowGroup>
</Table>
</FlowDocument>
</FlowDocumentScrollViewer>
- </Grid>
+ </StackPanel>
</DockPanel>
</Grid>
</UserControl>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs
index 7f810b2f3..1fd826af2 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/GeneralInformationViewVM.cs
@@ -23,7 +23,7 @@ using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Timers;
-
+using Tango.PMR.FirmwareUpgrade;
namespace Tango.PPC.UI.Dialogs
{
@@ -87,6 +87,53 @@ namespace Tango.PPC.UI.Dialogs
get { return _upTime; }
set { _upTime = value; RaisePropertyChangedAuto(); }
}
+ private string _headFirmware;
+
+ public string HeadFirmware
+ {
+ get { return _headFirmware; }
+ set { _headFirmware = value; RaisePropertyChangedAuto(); }
+ }
+
+ private string _dryerFirmware;
+
+ public string DryerFirmware
+ {
+ get { return _dryerFirmware; }
+ set { _dryerFirmware = value; RaisePropertyChangedAuto(); }
+ }
+
+ private string _MidtanksFirmware;
+
+ public string MidtanksFirmware
+ {
+ get { return _MidtanksFirmware; }
+ set { _MidtanksFirmware = value; RaisePropertyChangedAuto(); }
+ }
+
+ private string _lubricantFirmware;
+
+ public string LubricantFirmware
+ {
+ get { return _lubricantFirmware; }
+ set { _lubricantFirmware = value; RaisePropertyChangedAuto(); }
+ }
+
+ private string _dispensersFWFirmware;
+
+ public string DispensersFWFirmware
+ {
+ get { return _dispensersFWFirmware; }
+ set { _dispensersFWFirmware = value; RaisePropertyChangedAuto(); }
+ }
+
+ private string _windersFWFirmware;
+
+ public string WindersFWFirmware
+ {
+ get { return _windersFWFirmware; }
+ set { _windersFWFirmware = value; RaisePropertyChangedAuto(); }
+ }
public GeneralInformationViewVM( IMachineProvider provider, IPPCApplicationManager appManager)
{
@@ -98,6 +145,11 @@ namespace Tango.PPC.UI.Dialogs
InitTotalDyeProp();
UpTime = DateTime.Now - ApplicationManager.StartUpDate;
}
+ public override void OnShow()
+ {
+ base.OnShow();
+ GetFirmwareVersionDescriptors();
+ }
public async void InitSite()
{
@@ -157,6 +209,32 @@ namespace Tango.PPC.UI.Dialogs
TotalDyeMeters = "error!";
}
}
+
+ public async void GetFirmwareVersionDescriptors()
+ {
+ try
+ {
+ var descriptors = await MachineProvider.MachineOperator.GetFirmwareVersionDescriptors();
+
+ HeadFirmware = GetVersionByFileDescriptor(descriptors, VersionFileDestination.HeadCardSw);
+ DryerFirmware = GetVersionByFileDescriptor(descriptors, VersionFileDestination.DryerCardSw);
+ MidtanksFirmware = GetVersionByFileDescriptor(descriptors, VersionFileDestination.MidTankCardSw);
+ LubricantFirmware = GetVersionByFileDescriptor(descriptors, VersionFileDestination.LubricantCardSw);
+ DispensersFWFirmware = GetVersionByFileDescriptor(descriptors, VersionFileDestination.PumpCardSw);
+ WindersFWFirmware = GetVersionByFileDescriptor(descriptors, VersionFileDestination.WinderCardSw);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "GetFirmwareVersionDescriptors");
+ }
+ }
+ private String GetVersionByFileDescriptor(List<VersionFileDescriptor> descriptors, VersionFileDestination dtype)
+ {
+ var descriptor = descriptors.Where(x => x.Destination == VersionFileDestination.HeadCardSw).FirstOrDefault();
+ return descriptor != null ? descriptor.Version : "";
+ }
+
+
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
index f4a3f643d..10f417edc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -109,6 +109,14 @@ namespace Tango.PPC.UI.Printing
job.SpoolType = spoolType;
+ if (printConfig.GlobalStartPosition > 0)
+ {
+ config.ResumeConfig = new AdditionalJobConfiguration.ResumeConfiguration();
+ config.ResumeConfig.FirstUnitStartPosition = printConfig.FirstUnitStartPosition;
+ config.ResumeConfig.GlobalStartPosition = printConfig.GlobalStartPosition;
+ config.ResumeConfig.RemainingUnits = printConfig.RemainingUnits;
+ }
+
handler = await _machineProvider.MachineOperator.Print(job, config);
_notificationProvider.ReleaseGlobalBusyMessage();
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml
index b08aab298..1e864c7e3 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/PowerOffView.xaml
@@ -16,7 +16,7 @@
<Grid Margin="0 30 0 0">
<touch:TouchGifAnimation Source="/Images/power_off_2.gif" EnableAnimation="{Binding IsVisible}" HorizontalAlignment="Center" />
<TextBlock FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="DemiBold" HorizontalAlignment="Center" Margin="0 50 0 0">
- <Run Text="{Binding Status.ProgressPercentage, TargetNullValue=0}"/>%
+ <Run Text="{Binding Status.ProgressPercentage, TargetNullValue=0, StringFormat=0}"/>%
</TextBlock>
</Grid>
<TextBlock HorizontalAlignment="Center" Margin="0 60 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Machine is turning Off</TextBlock>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index d72e75011..efc5f8179 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
+ <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
</requestedPrivileges>
</security>
</trustInfo>