diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-04-18 20:25:46 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2023-04-18 20:25:46 +0300 |
| commit | 1133972c0c51feb478aa3944fad5f374a8a2da35 (patch) | |
| tree | aa02e09e89e5e80c918500dbe3d59ea2b5259248 /Software/Visual_Studio/PPC | |
| parent | 1c7f16c34f85dd65a02ad08dde984f04a4d82b83 (diff) | |
| download | Tango-1133972c0c51feb478aa3944fad5f374a8a2da35.tar.gz Tango-1133972c0c51feb478aa3944fad5f374a8a2da35.zip | |
Added connective icons and time to bottom of menu.
Diffstat (limited to 'Software/Visual_Studio/PPC')
9 files changed, 187 insertions, 147 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs index da021858c..6227610e4 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs @@ -581,8 +581,8 @@ namespace Tango.PPC.Jobs.ViewModels JobType = Job.JobType, InterSegmentLength = Job.InterSegmentLength, EnableInterSegment = Job.EnableInterSegment, - NumberSpools = (BuildProvider.IsEureka? 4 : 1), - NumberOfUnitsMultipliedBySpools = (BuildProvider.IsEureka ? Job.NumberOfUnits * 4 : Job.NumberOfUnits) + NumberSpools = (BuildProvider.IsEureka? Job.Spools : 1), + Copies = (BuildProvider.IsEureka ? Job.NumberOfUnits * Job.Spools : Job.NumberOfUnits) }; Dictionary<string, SegmentsGroupModel> guidToGroup = new Dictionary<string, SegmentsGroupModel>(); if (Job.Version < 2) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index 987314d3f..f8a74443d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -1306,17 +1306,17 @@ <DockPanel> - <touch:TouchIconButton Icon="ArrowLeftSolid" IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" IsEnabled="{Binding NavigationManager.CanNavigateBack}" Width="40" Height="40" Padding="10" Margin="10 0 10 0" Command="{Binding NavigateBackToJobs}" EnableDropShadow="False"> + <!--<touch:TouchIconButton Icon="ArrowLeftSolid" IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" IsEnabled="{Binding NavigationManager.CanNavigateBack}" Width="40" Height="40" Padding="10" Margin="10 0 10 0" Command="{Binding NavigateBackToJobs}" EnableDropShadow="False"> <touch:TouchIconButton.Style> <Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource {x:Type touch:TouchIconButton}}"> <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter> </Style> </touch:TouchIconButton.Style> - </touch:TouchIconButton> - <TextBlock Margin="0 0 40 0" MaxWidth="410" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding JobModel.Name,FallbackValue='Job Name'}" ToolTip="{Binding JobModel.Name}" VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold"></TextBlock> + </touch:TouchIconButton>--> + <TextBlock Margin="20 0 40 0" MaxWidth="410" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Text="{Binding JobModel.Name,FallbackValue='Job Name'}" ToolTip="{Binding JobModel.Name}" VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold"></TextBlock> <touch:TouchButton Margin="0 0 0 0" VerticalAlignment="Center" Width="50" Height="50" HorizontalAlignment="Left" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding EditJobDetailsCommand}" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" components:TransformationHelper.TransformWhenPressed ="False"> - <Border Height="20" Width="20" Margin="0 0 0 0" BorderThickness="0" Background="Transparent" HorizontalAlignment="Center"> + <Border Height="24" Width="24" Margin="0 0 0 0" BorderThickness="0" Background="Transparent" HorizontalAlignment="Center"> <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/job_details.png"/> </Border> </touch:TouchButton> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs index 00473955b..3be7a8818 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs @@ -15,13 +15,11 @@ namespace Tango.PPC.UI.Converters { try { - if (values.Count() == 4) + if (values.Count() == 2) { double length = System.Convert.ToDouble(values[0]); - int spools = System.Convert.ToInt32(values[1]); - int NumberOfUnits = System.Convert.ToInt32(values[2]); - bool forOneSpool = System.Convert.ToBoolean(values[3]); - var totalBy4Spools = (double)length* spools * NumberOfUnits/ 4; + bool forOneSpool = System.Convert.ToBoolean(values[1]); + var totalBy4Spools = (double)length*4;// spools ; if (forOneSpool) { return (double)totalBy4Spools / 4; @@ -29,16 +27,14 @@ namespace Tango.PPC.UI.Converters return totalBy4Spools; } - if (values.Count() == 5) + if (values.Count() == 3) { double length = System.Convert.ToDouble(values[0]); - int spools = System.Convert.ToInt32(values[1]); - int NumberOfUnits = System.Convert.ToInt32(values[2]); - bool forOneSpool = System.Convert.ToBoolean(values[3]); - double currentProgresslength = System.Convert.ToDouble(values[4]) ; + bool forOneSpool = System.Convert.ToBoolean(values[1]); + double currentProgresslength = System.Convert.ToDouble(values[2]) ; - var totalBy4Spools = (double)length * spools * NumberOfUnits / 4; - var currentProgressBy4Spools = (double)currentProgresslength * spools ; + var totalBy4Spools = (double)length * 4; + var currentProgressBy4Spools = (double)currentProgresslength * 4 ; int coeff = (int)currentProgressBy4Spools / (int)totalBy4Spools; var progressCurrent = coeff == 0 ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs new file mode 100644 index 000000000..05a41912c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; + + +namespace Tango.PPC.UI.Converters +{ + public class ProgressWeightSpoolConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + if (values.Count() == 3) + { + double length = System.Convert.ToDouble(values[0]); + bool forOneSpool = System.Convert.ToBoolean(values[1]); + double coef = System.Convert.ToDouble(values[2]); + var totalBy4Spools = (double)length * 4;// spools ; + + var weight = ((double)totalBy4Spools * coef) / (1000);//(g) + if (forOneSpool) + { + return (double)weight / 4; + } + return weight; + + } + if (values.Count() == 4) + { + double length = System.Convert.ToDouble(values[0]); + bool forOneSpool = System.Convert.ToBoolean(values[1]); + double currentProgresslength = System.Convert.ToDouble(values[2]); + double coef = System.Convert.ToDouble(values[3]); + + var totalBy4Spools = (double)length * 4; + var currentProgressBy4Spools = (double)currentProgresslength * 4; + + int coeff = (int)currentProgressBy4Spools / (int)totalBy4Spools; + var progressCurrent = coeff == 0 ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress + var weight = ((double)progressCurrent * coef) / (1000);//(g) + if (forOneSpool) + { + return (double)weight / 4; + + } + return weight; + } + return "-"; + } + catch + { + return "-"; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index d32900728..1534d8a73 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -145,6 +145,7 @@ <Compile Include="Converters\LengthToWeightConverter.cs" /> <Compile Include="Converters\LengthWithSpoolsConverter.cs" /> <Compile Include="Converters\ProgressLengthSpoolConverter.cs" /> + <Compile Include="Converters\ProgressWeightSpoolConverter.cs" /> <Compile Include="Dialogs\BitResultsView.xaml.cs"> <DependentUpon>BitResultsView.xaml</DependentUpon> </Compile> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index d16792ead..95eb22d7a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -31,6 +31,7 @@ namespace Tango.PPC.UI.ViewModels { private JobHandler _jobHandler; private bool _resettingDevice; + private DispatcherTimer _date_timer; /// <summary> /// Gets or sets the module loader. @@ -219,6 +220,16 @@ namespace Tango.PPC.UI.ViewModels set { _cartridges = value; RaisePropertyChangedAuto(); } } + private DateTime _currentDateTime; + /// <summary> + /// Gets or sets the current date time. + /// </summary> + public DateTime CurrentDateTime + { + get { return _currentDateTime; } + set { _currentDateTime = value; RaisePropertyChangedAuto(); } + } + #endregion #region Commands @@ -306,6 +317,11 @@ namespace Tango.PPC.UI.ViewModels PowerOffCommand = new RelayCommand(PowerOffMachine, () => MachineProvider.MachineOperator.Status != MachineStatuses.Disconnected); ResetCommand = new RelayCommand(ResetMachine, () => MachineProvider.MachineOperator.Status != MachineStatuses.Disconnected); StandByCommand = new RelayCommand(StandBy, () => MachineProvider.MachineOperator.CanPrint); + + _date_timer = new DispatcherTimer(); + _date_timer.Interval = TimeSpan.FromSeconds(1); + _date_timer.Tick += _date_timer_Tick; + _date_timer.Start(); } #endregion @@ -614,6 +630,11 @@ namespace Tango.PPC.UI.ViewModels #region Event Handlers + private void _date_timer_Tick(object sender, EventArgs e) + { + CurrentDateTime = DateTime.Now; + } + /// <summary> /// Handles the PrintingStarted event of the MachineOperator. /// </summary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index b41dbb0bf..95db08dfa 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -194,7 +194,7 @@ namespace Tango.PPC.UI.ViewModels { StopCommand = new RelayCommand(StopJob, ()=>CanStopped()); AbortCommand = new RelayCommand(AbortJob, () => CanStopped()); - GoToJobCommand = new RelayCommand(GoToJob, () => CanStopped()); + GoToJobCommand = new RelayCommand(GoToJob); JobStatusViewCommand = new RelayCommand(JobStatusView); OverviewViewCommand = new RelayCommand(OverviewView); ClearAllNotificationsCommand = new RelayCommand(ClearAllNotifications); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml index 092088ca6..d90ddd962 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml @@ -35,19 +35,19 @@ <Grid Background="{StaticResource TangoPrimaryBackgroundBrush}"> <Viewbox Stretch="Fill" Width="350"> - <Grid Width="205" Height="750" > + <Grid Width="204" Height="750" > <Border TextElement.FontSize="16" x:Name="border" BorderThickness="0 0 0 0" BorderBrush="{StaticResource TangoDarkForegroundBrush}" TextElement.Foreground="{StaticResource TangoDarkForegroundBrush}"> <Grid Background="{StaticResource TangoMenuPanelDarkBrush}" > <StackPanel VerticalAlignment="Top"> - <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0"> - <Grid> - <Border Height="82" Background="{StaticResource TangoPrimaryBackgroundBrush}"> + <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 0" > + <Grid > + <Border Height="72" Background="{StaticResource TangoPrimaryBackgroundBrush}"> <Border.Effect> <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> </Border.Effect> </Border> - <StackPanel> - <DockPanel> + <StackPanel > + <DockPanel Background="{StaticResource TangoMenuPanelDarkBrush}"> <touch:TouchIconButton Icon="ChevronLeft" IsHitTestVisible="{Binding NavigationManager.IsNavigating,Converter={StaticResource BooleanInverseConverter}}" IsEnabled="{Binding NavigationManager.CanNavigateBack}" Width="40" Height="40" Padding="10" Margin="10 0 0 0" Command="{Binding MenuOrBackCommand}" EnableDropShadow="False"> <touch:TouchIconButton.Style> <Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource {x:Type touch:TouchIconButton}}"> @@ -55,7 +55,7 @@ </Style> </touch:TouchIconButton.Style> </touch:TouchIconButton> - <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 10 10" Width="157"></Image> + <Image Source="/Images/logo.png" Stretch="Uniform" HorizontalAlignment="Center" Margin="0 10 10 10" Width="157" Height="51"></Image> </DockPanel> </StackPanel> </Grid> @@ -92,7 +92,7 @@ <Border BorderBrush="{StaticResource TangoDividerBrush}" BorderThickness="0 0 0 1"> <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 15" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}"> <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="20" Height="20"></Image> + <Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="20" Height="20" ></Image> <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light">Power</TextBlock> </StackPanel> </touch:TouchButton> @@ -101,119 +101,77 @@ </StackPanel> <Grid VerticalAlignment="Bottom"> - <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" Height="350" Padding="20" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> - <!--<Border.Resources> - <Style x:Key="PowerButton" TargetType="touch:TouchButton" BasedOn="{StaticResource TangoLinkButton}"> - <Setter Property="Foreground" Value="{StaticResource TangoPrimaryBackgroundBrush}"></Setter> - <Setter Property="FontSize" Value="{StaticResource TangoTitleFontSize}"></Setter> - <Setter Property="HorizontalAlignment" Value="Left"></Setter> - <Setter Property="VerticalAlignment" Value="Center"></Setter> - <Setter Property="Padding" Value="50 20"></Setter> - <Setter Property="Height" Value="Auto"></Setter> - <Style.Triggers> - <Trigger Property="IsEnabled" Value="False"> - <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> - </Trigger> - </Style.Triggers> - </Style> - </Border.Resources>--> - <Border.Style> - <Style TargetType="Border"> - <Setter Property="RenderTransform"> - <Setter.Value> - <ScaleTransform ScaleX="1" ScaleY="0" /> - </Setter.Value> - </Setter> - <!--<Style.Triggers> - <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> - <DataTrigger.EnterActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.EnterActions> - <DataTrigger.ExitActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.ExitActions> - </DataTrigger> - </Style.Triggers>--> - </Style> - </Border.Style> - <Grid> - <Grid.RowDefinitions> - <RowDefinition Height="1.4*"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - <!--<Grid> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="188*"/> - <ColumnDefinition Width="261*"/> - </Grid.ColumnDefinitions> + <StackPanel Orientation="Vertical"> + <Border Background="Transparent" Padding="5"> + <UniformGrid Columns="5" Rows="1"> + + <touch:TouchIcon Width="20" Height="20" VerticalAlignment="Center"> + <touch:TouchIcon.Style> + <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}"> + <Setter Property="Icon" Value="WifiStrengthOff"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding ConnectivityProvider.IsConnected}" Value="True"> + <Setter Property="Icon" Value="Wifi"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchIcon.Style> + </touch:TouchIcon> - <Image Source="/Images/power-machine.png" Margin="30" /> + <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center"> + <touch:TouchIcon.Style> + <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}"> + <Setter Property="Icon" Value="LanDisconnect"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding ConnectivityProvider.IsLanConnected}" Value="True"> + <Setter Property="Icon" Value="LanConnect"></Setter> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchIcon.Style> + </touch:TouchIcon> - <UniformGrid Grid.Column="1" Rows="3"> - <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding PowerOffCommand}">Turn Off</touch:TouchButton> - <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding StandByCommand}">Stand By</touch:TouchButton> - <touch:TouchButton Style="{StaticResource PowerButton}" Command="{Binding ResetCommand}">Reset</touch:TouchButton> - </UniformGrid> - </Grid>--> + <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" Icon="Bridge" Visibility="{Binding ExternalBridgeService.Enabled,Converter={StaticResource BooleanToVisibilityConverter}}"> + <touch:TouchIcon.Style> + <Style TargetType="touch:TouchIcon"> + <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding ExternalBridgeService.HasSessions}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchIcon.Style> + </touch:TouchIcon> - <!--<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="25 0" Opacity="0.3" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" /> + <touch:TouchIcon Margin="10 0 0 0" Width="18" Height="18" VerticalAlignment="Center" Foreground="{StaticResource TangoSuccessBrush}" Icon="RemoteDesktop" /> + <!--Visibility="{Binding RemoteDesktopService.InSession,Converter={StaticResource BooleanToVisibilityConverter}}"--> - <Grid Grid.Row="1"> - <Grid.ColumnDefinitions> - <ColumnDefinition Width="188*"/> - <ColumnDefinition Width="261*"/> - </Grid.ColumnDefinitions> - <Image Source="/Images/power-tablet.png" Margin="30" /> + <touch:TouchIcon Margin="10 0 0 0" Width="20" Height="20" Icon="HddSolid"> + <touch:TouchIcon.Style> + <Style TargetType="touch:TouchIcon" BasedOn="{StaticResource {x:Type touch:TouchIcon}}"> + <Setter Property="Foreground" Value="{StaticResource TangoGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding StorageProvider.IsConnected}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource TangoSuccessBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </touch:TouchIcon.Style> + </touch:TouchIcon> - <touch:TouchButton Command="{Binding RestartApplicationCommand}" Grid.Column="1" Style="{StaticResource PowerButton}">Restart</touch:TouchButton> - </Grid>--> - </Grid> - </Border> - - <!--<Border Background="{StaticResource TangoMidBackgroundBrush}" RenderTransformOrigin="0.5,1" VerticalAlignment="Bottom"> - <Border.Style> - <Style TargetType="Border"> - <Setter Property="RenderTransform"> - <Setter.Value> - <ScaleTransform ScaleX="1" ScaleY="1" /> - </Setter.Value> - </Setter> - <Style.Triggers> - <DataTrigger Binding="{Binding IsPowerOpened}" Value="True"> - <DataTrigger.EnterActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.EnterActions> - <DataTrigger.ExitActions> - <BeginStoryboard> - <Storyboard> - <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="00:00:0.2" /> - </Storyboard> - </BeginStoryboard> - </DataTrigger.ExitActions> - </DataTrigger> - </Style.Triggers> - </Style> - </Border.Style> - <touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 0 0 25" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding PowerCommand}" Background="{StaticResource TangoMenuPanelDarkBrush}"> - <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> - <Image Source="/Images/menu/power.png" VerticalAlignment="Center" Width="20" Height="20"></Image> - <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoComboBoxItemFontSize}" FontWeight="Light">Power</TextBlock> - </StackPanel> - </touch:TouchButton> - </Border>--> + </UniformGrid> + </Border> + <Border Height="1" Margin="10" Background="{StaticResource TangoDividerBrush}"></Border> + <TextBlock VerticalAlignment="Center" Text="{Binding CurrentDateTime, StringFormat='{}{0:HH:mm MM/dd/yyyy}'}" FontSize="18" Foreground="{StaticResource TangoPrimaryBackgroundBrush}" HorizontalAlignment="Center" Margin="0 0 0 16" FontWeight="Light"></TextBlock> + </StackPanel> + + </Grid> </Grid> </Border> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index e69f33514..9230f61c3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -18,6 +18,7 @@ <localConverters:LengthWithSpoolsConverter x:Key="LengthWithSpoolsConverter"/> <localConverters:CollectionToCountConverter x:Key="CollectionToCountConverter"/> <localConverters:ProgressLengthSpoolConverter x:Key="ProgressLengthSpoolConverter"/> + <localConverters:ProgressWeightSpoolConverter x:Key="ProgressWeightSpoolConverter"/> <Style x:Key="LinkRoundButtonStyle" TargetType="{x:Type touch:TouchButton}"> <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter> @@ -352,14 +353,12 @@ <TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> Weight</TextBlock> </StackPanel> </StackPanel> - - <StackPanel Orientation="Horizontal" Margin="0 15 0 0" HorizontalAlignment="Center" > + + <StackPanel Orientation="Horizontal" Margin="0 15 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center"> <TextBlock.Text> <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0.#" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> - <Binding Path="Job.Spools" Mode="OneWay"/> - <Binding Path="Job.NumberOfUnits" Mode="OneWay"/> <Binding Path="IsSpoolView"/> <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> </MultiBinding> @@ -370,38 +369,36 @@ <TextBlock.Text> <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0" TargetNullValue='-' FallbackValue='0' Mode="OneWay"> <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/> - <Binding Path="Job.Spools" Mode="OneWay"/> - <Binding Path="Job.NumberOfUnits" Mode="OneWay"/> <Binding Path="IsSpoolView"/> </MultiBinding> </TextBlock.Text> </TextBlock> <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center" Text=" m"></TextBlock> </StackPanel> - - <!--<StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> + + <StackPanel Orientation="Horizontal" Margin="0 10 0 0" HorizontalAlignment="Center" Visibility="{Binding IsWeghtView, Converter={StaticResource BooleanToVisibilityConverter}}"> <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center"> <TextBlock.Text> - <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0" TargetNullValue='-' FallbackValue='0'> + <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.##" TargetNullValue='-' FallbackValue='0'> <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" /> - <Binding Path="Job.NumberOfUnits" Mode="OneWay"/> <Binding Path="IsSpoolView"/> <Binding Path="RunningJobStatus.ProgressMinusSettingUp" /> + <Binding Path="Job.GramPerLength" Mode="OneWay"/> </MultiBinding> </TextBlock.Text> </TextBlock> <TextBlock FontSize="{StaticResource TangoLargeInfoFontSize}" VerticalAlignment="Center" Text="/"></TextBlock> <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center"> <TextBlock.Text> - <MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="0" TargetNullValue='-' FallbackValue='0' > + <MultiBinding Converter="{StaticResource ProgressWeightSpoolConverter}" StringFormat="0.#" TargetNullValue='-' FallbackValue='0' > <Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/> - <Binding Path="Job.NumberOfUnits" Mode="OneWay"/> <Binding Path="IsSpoolView"/> + <Binding Path="Job.GramPerLength" Mode="OneWay"/> </MultiBinding> </TextBlock.Text> </TextBlock> <TextBlock FontSize="{StaticResource TangoTitleFontSize}" VerticalAlignment="Center" Text=" g"></TextBlock> - </StackPanel>--> + </StackPanel> </StackPanel> <StackPanel Height="90" Visibility="{Binding RunningJobStatus.IsSettingUp, FallbackValue=collapsed, Converter={StaticResource BooleanToVisibilityConverter}}"> |
