aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-10-22 16:43:49 +0300
committerRoy <Roy.mail.net@gmail.com>2023-10-22 16:43:49 +0300
commit4cebc14d3183ee4dc4ade0f85d9bf72cec44533c (patch)
treeb940003b7572fa616fd385ef5c5be00b06f5c01b /Software/Visual_Studio/PPC
parentf35fea4ffd1219e844f94a0b72c12cc91af2c94e (diff)
parent648437dec6e56e32218d88b7a85e70ac00b6e98a (diff)
downloadTango-4cebc14d3183ee4dc4ade0f85d9bf72cec44533c.tar.gz
Tango-4cebc14d3183ee4dc4ade0f85d9bf72cec44533c.zip
Merge branch 'software' of https://twinetfs.visualstudio.com/Tango/_git/Tango into software
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml66
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs160
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.pngbin0 -> 787 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs19
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/FavoriteColor.cs17
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs8
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/MyColors/MyColorsEngine.cs41
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj5
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs45
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs19
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml9
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs6
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs6
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs12
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs6
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs12
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateDB.pngbin0 -> 568 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateVersion.pngbin0 -> 457 bytes
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs44
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml8
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml13
25 files changed, 429 insertions, 103 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
index e737a8f7a..c60fed143 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml
@@ -51,7 +51,7 @@
<Border BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}">
<touch:TouchScrollViewer CanContentScroll="True" Padding="{TemplateBinding Padding}" Focusable="False"
Style="{StaticResource TouchVerticalScrollViewer}">
- <ItemsPresenter />
+ <ItemsPresenter HorizontalAlignment="Stretch"/>
</touch:TouchScrollViewer>
</Border>
</ControlTemplate>
@@ -170,7 +170,7 @@
</Grid>
<Canvas Grid.Column="1" Width="28" Height="28" VerticalAlignment="Top" HorizontalAlignment="Left">
- <touch:TouchToggleButton Canvas.Left="0" Canvas.Top="0" x:Name="addColorToGroup" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" Command="{Binding SaveMyColorsCommand}" >
+ <touch:TouchToggleButton Canvas.Left="0" Canvas.Top="0" x:Name="addColorToGroup" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" Command="{Binding OpenCloseAddMyColorDialogCommand}" >
<touch:TouchToggleButton.Style>
<Style TargetType="touch:TouchToggleButton" BasedOn="{StaticResource TangoTouchToggleButtonNoDisable}">
<Setter Property="IsEnabled" Value="True"/>
@@ -376,18 +376,31 @@
<touch:TouchTextBox Width="220" Height="40" FontSize="{StaticResource TangoButtonFontSize}" Margin=" 20 0 10 0" Text="{Binding MyColorName}" FocusSelectionMode="SelectAll"></touch:TouchTextBox>
</StackPanel>
<Grid Margin="14 10 14 10" >
- <ListBox HorizontalAlignment="Stretch" MaxHeight="220" ItemsSource="{Binding Libraries}" Style="{StaticResource ListBoxVerticalScroll}"
- ScrollViewer.VerticalScrollBarVisibility="Visible" >
+ <ListBox HorizontalAlignment="Stretch" MaxHeight="220" ItemsSource="{Binding Libraries}" Style="{StaticResource ListBoxVerticalScroll}" SelectedItem="{Binding SelectedColorLibraryMyColor}"
+ ScrollViewer.VerticalScrollBarVisibility="Visible" HorizontalContentAlignment="Stretch" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
- <WrapPanel Orientation="Vertical" />
+ <UniformGrid Columns="1" VerticalAlignment="Top" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemTemplate>
<DataTemplate DataType="{x:Type models:ColorLibrary}">
- <touch:TouchButton Command="{Binding DataContext.AddColorToLibraryCommand, ElementName=colorSelectionView}" Style="{StaticResource TangoFlatButton}" CommandParameter="{Binding }" Background="Transparent">
- <TextBlock Text="{Binding Name}" FontSize="{StaticResource TangoButtonFontSize}"></TextBlock>
- </touch:TouchButton>
+ <Grid HorizontalAlignment="Stretch" >
+ <Grid.Style >
+ <Style TargetType="Grid">
+ <Setter Property="Background" Value="Transparent"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsSelected}" Value="True">
+ <Setter Property="Background" Value="{StaticResource TangoLightSelectedBrush}"></Setter>
+ </DataTrigger>
+ </Style.Triggers>
+ </Style>
+ </Grid.Style>
+
+ <touch:TouchButton Command="{Binding DataContext.SelectLibraryCommand, ElementName=colorSelectionView}" Style="{StaticResource TangoFlatButton}" CommandParameter="{Binding }" Background="Transparent">
+ <TextBlock Text="{Binding Name}" FontSize="{StaticResource TangoButtonFontSize}"></TextBlock>
+ </touch:TouchButton>
+ </Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
@@ -678,25 +691,25 @@
<Grid.Background>
<SolidColorBrush Color="{StaticResource TangoDisabledBackgroundColor}" Opacity="0.65" />
</Grid.Background>
- <Border Margin="72 20 69 325" CornerRadius="20" Background="{StaticResource TangoPrimaryBackgroundBrush}">
+ <Border Margin="72 30 69 290" CornerRadius="20" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Border.Effect>
<DropShadowEffect Opacity="0.5" ShadowDepth="6" Color="Silver" BlurRadius="10" Direction="270"/>
</Border.Effect>
<Border CornerRadius="20" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Grid>
<DockPanel >
- <Grid DockPanel.Dock="Bottom" Height="137">
- <Rectangle Height="1" Stroke="{StaticResource TangoDividerBrush}" HorizontalAlignment="Stretch"/>
- <Grid Margin="48 30 0 0" >
+ <Grid DockPanel.Dock="Bottom" Height="136">
+ <Rectangle Height="3" Stroke="{StaticResource TangoDividerBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="0 10 0 0"/>
+ <Grid Margin="48 10 0 0" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
- <touch:TouchImageButton HorizontalAlignment="Left" Width="28" Height="38" Margin="0 20 23 0" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{ Binding AddGroupCommand}" Image="{StaticResource Add_group_mycolors}"/>
- <TextBlock Grid.Column="1" Margin="20 20 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource TangoButtonFontSize}" FontWeight="SemiBold" Visibility="{Binding AddGroupMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}">Add Group</TextBlock>
+ <touch:TouchImageButton HorizontalAlignment="Left" Width="28" Height="38" Margin="0 0 23 0" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{ Binding AddGroupCommand}" Image="{StaticResource Add_group_mycolors}"/>
+ <TextBlock Grid.Column="1" Margin="20 0 0 0" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource TangoButtonFontSize}" FontWeight="SemiBold" Visibility="{Binding AddGroupMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}">Add Group</TextBlock>
<DockPanel Visibility="{Binding AddGroupMode, Converter={StaticResource BooleanToVisibilityConverter}}" Grid.Column="1" Margin=" 20 0 0 20">
- <touch:TouchTextBox DockPanel.Dock="Left" Margin="0 0 80 0" x:Name="newGroupNametext" MinWidth="200" Height="Auto" Text="{Binding NewGroupName, Mode=TwoWay,UpdateSourceTrigger=LostFocus}"></touch:TouchTextBox>
- <touch:TouchButton DockPanel.Dock="Right" Width="160" Height="40" CornerRadius="20" Background="Transparent" EnableDropShadow="False" TextElement.Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" HorizontalAlignment="Right" Margin="10 26 20 0" VerticalAlignment="Bottom"
+ <touch:TouchTextBox DockPanel.Dock="Left" Margin="0 0 80 0" x:Name="newGroupNametext" MinWidth="350" Height="Auto" Text="{Binding NewGroupName, Mode=TwoWay,UpdateSourceTrigger=LostFocus}" VerticalAlignment="Center"></touch:TouchTextBox>
+ <touch:TouchButton DockPanel.Dock="Right" Width="160" Height="40" CornerRadius="20" Background="Transparent" EnableDropShadow="False" TextElement.Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" HorizontalAlignment="Right" Margin="10 20 20 0" VerticalAlignment="Center"
BorderThickness="1" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Command="{Binding AddNewGroupCommand}" CommandParameter="{Binding ElementName=newGroupNametext, Path=Text}">Add</touch:TouchButton>
</DockPanel>
@@ -707,25 +720,30 @@
<TextBlock DockPanel.Dock="Left" Margin="43 53 0 28" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">My Colors</TextBlock>
<touch:TouchImageButton DockPanel.Dock="Top" Width="32" Height="32" Image="{StaticResource Close_mycolorsdlg}" HorizontalAlignment="Right" Margin="0 20 23 0" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding CloseMyColorsCommand}"/>
</DockPanel>
- <StackPanel Orientation="Vertical" Margin="0">
- <DockPanel>
+ <StackPanel Orientation="Vertical" Margin="0 20 0 0">
+ <DockPanel VerticalAlignment="Top">
<touch:TouchButton DockPanel.Dock="Right" Height="48" Command="{Binding DataContext.EditColorsLibrariesCommand, ElementName=colorSelectionView}" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0 0 30 10" Background="Transparent" ShadowDepth="0" ShadowColor="Transparent">
- <StackPanel Height="48" Width="160" Orientation="Horizontal">
- <touch:TouchIcon Margin="0 7 0 0" VerticalAlignment="Center" Foreground="{StaticResource TangoBlackInkBrush}" Height="16.5" Icon="PencilAltSolid" />
- <TextBlock Text="{Binding EditColorButtonName, Mode=TwoWay, TargetNullValue=EDIT}" Height="30" Margin="25 10 0 0" FontSize="{StaticResource TangoButtonFontSize}" FontWeight="SemiBold" VerticalAlignment="Center" Foreground="{StaticResource TangoBlackInkBrush}" ></TextBlock>
+ <StackPanel Height="48" Width="160" Orientation="Horizontal" >
+ <touch:TouchIcon Margin="0 9 0 0" Foreground="{StaticResource TangoBlackInkBrush}" Height="25" Icon="PencilAltSolid" />
+ <TextBlock Text="{Binding EditColorButtonName, Mode=TwoWay, TargetNullValue=EDIT}" Height="30" Margin="25 12 0 0" FontSize="{StaticResource TangoButtonFontSize}" FontWeight="SemiBold" VerticalAlignment="Bottom" Foreground="{StaticResource TangoBlackInkBrush}" ></TextBlock>
</StackPanel>
</touch:TouchButton>
- <Grid DockPanel.Dock="Left" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="60 0 0 0" Width="280">
+ <Grid DockPanel.Dock="Left" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="60 0 0 0" Width="280" Height="48">
<DockPanel>
<Image DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Bottom" Width="40" Height="40" Source="{StaticResource SearchImage}"/>
<!--<touch:TouchIcon DockPanel.Dock="Left" Foreground="{StaticResource TangoGrayBrush}" Width="20" Height="20" VerticalAlignment="Bottom" Icon="Magnify" />-->
- <touch:TouchTextBox Margin="5 0 0 0" Width="300" Text="{Binding SearchColorText,Mode=TwoWay, UpdateSourceTrigger=LostFocus}" ></touch:TouchTextBox>
+ <touch:TouchTextBox Margin="15 0 0 0" Width="300" Text="{Binding SearchColorText,Mode=TwoWay, UpdateSourceTrigger=LostFocus}" VerticalAlignment="Center" ></touch:TouchTextBox>
</DockPanel>
</Grid>
</DockPanel>
- <ListBox x:Name="listLibraries" Grid.Row="1" Margin="10 0 10 60" ItemsSource="{Binding Libraries}" Style="{StaticResource ListBoxVerticalScroll}"
+ <ListBox x:Name="listLibraries" Margin="10 16 10 10" ItemsSource="{Binding Libraries}" Style="{StaticResource ListBoxVerticalScroll}"
ScrollViewer.VerticalScrollBarVisibility="Visible" Width="560" ItemTemplate="{StaticResource ColorLibrary_Template}" Height="580">
</ListBox>
+
+ <StackPanel Height="38" Width="160" Orientation="Horizontal" HorizontalAlignment="Left" Margin=" 50 20 20 0" VerticalAlignment="Bottom">
+ <touch:TouchIconButton Margin="0 7 0 10" VerticalAlignment="Bottom" Foreground="{StaticResource TangoBlackInkBrush}" Width="26" Icon="Upload" Command="{Binding UploadFileCommand}"/>
+ <touch:TouchIconButton Margin="30 7 0 10" VerticalAlignment="Bottom" Foreground="{StaticResource TangoBlackInkBrush}" Width="26" Icon="Download" Command="{Binding DownloadFileCommand}"/>
+ </StackPanel>
</StackPanel>
</DockPanel>
</Grid>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
index 3146da179..cc8ddc84e 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs
@@ -1,9 +1,11 @@
using ColorMine.ColorSpaces;
+using Microsoft.Win32;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.ComponentModel;
+using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
@@ -323,6 +325,24 @@ namespace Tango.PPC.Jobs.Dialogs
private ColorLibrary SelectedColorLibrary { get; set; }
+ private ColorLibrary _selectedColorLibraryMyColor;
+
+ public ColorLibrary SelectedColorLibraryMyColor
+ {
+ get { return _selectedColorLibraryMyColor; }
+ set {
+ if(_selectedColorLibraryMyColor != null)
+ _selectedColorLibraryMyColor.IsSelected = false;
+
+ _selectedColorLibraryMyColor = value;
+
+ if (_selectedColorLibraryMyColor != null)
+ _selectedColorLibraryMyColor.IsSelected = true;
+ RaisePropertyChangedAuto();
+ }
+ }
+
+
private FavoriteColor _selectedColor;
public FavoriteColor SelectedColor
@@ -439,17 +459,36 @@ namespace Tango.PPC.Jobs.Dialogs
set { _editColorButtonName = value;
RaisePropertyChangedAuto();}
}
-
+
+ private PPCSettings _settings;
+ /// <summary>
+ /// Gets the main PPC settings.
+ /// </summary>
+ public PPCSettings Settings
+ {
+ get
+ {
+ if (_settings == null)
+ {
+ _settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ }
+
+ return _settings;
+ }
+ private set { _settings = value; }
+ }
+
#endregion
#region commands
/// <summary>
/// Gets or sets the save my colors command.
/// </summary>
+ public RelayCommand OpenCloseAddMyColorDialogCommand { get; set; }
public RelayCommand SaveMyColorsCommand { get; set; }
public RelayCommand<string> AddNewGroupCommand { get; set; }
public RelayCommand<string> AddNewGroupAndColorCommand { get; set; }
- public RelayCommand<ColorLibrary> AddColorToLibraryCommand { get; set; }
+ public RelayCommand<ColorLibrary> SelectLibraryCommand { get; set; }
/// <summary>
/// Gets or sets the open my colors command.
@@ -464,6 +503,8 @@ namespace Tango.PPC.Jobs.Dialogs
public RelayCommand<object> DeleteColorCommand { get; set; }
public RelayCommand VectorFineTuningCommand { get; set; }
+ public RelayCommand UploadFileCommand { get; set; }
+ public RelayCommand DownloadFileCommand { get; set; }
#endregion
@@ -501,6 +542,7 @@ namespace Tango.PPC.Jobs.Dialogs
}
});
+ OpenCloseAddMyColorDialogCommand = new RelayCommand(OpenCloseAddMyColorDialog);
SaveMyColorsCommand = new RelayCommand(SaveMyColors);
OpenMyColorsCommand = new RelayCommand(() => { MyColorsMode = true; });
CloseMyColorsCommand = new RelayCommand(() => { MyColorsMode = false; SearchColorText = "";});
@@ -508,11 +550,15 @@ namespace Tango.PPC.Jobs.Dialogs
AddGroupCommand = new RelayCommand(AddGroup);
AddNewGroupCommand = new RelayCommand<string>(AddNewGroup);
AddNewGroupAndColorCommand = new RelayCommand<string>(AddNewGroupAndColor);
- AddColorToLibraryCommand = new RelayCommand<ColorLibrary>(AddColorToLibrary);
+
+ SelectLibraryCommand = new RelayCommand<ColorLibrary>(SelectLibrary);
DeleteGroupCommand = new RelayCommand<ColorLibrary>(DeleteGroup);
EditColorsLibraryCommand = new RelayCommand<ColorLibrary>(EditColorsLibrary);
EditColorsLibrariesCommand = new RelayCommand(EditColorsLibraries);
DeleteColorCommand = new RelayCommand<object>(DeleteColor);
+ UploadFileCommand = new RelayCommand(UploadFile);
+ DownloadFileCommand = new RelayCommand(DownloadFile);
+
MyColorsMode = false;
EditColorsGroupMode = false;
SaveMyColorMode = false;
@@ -616,9 +662,7 @@ namespace Tango.PPC.Jobs.Dialogs
CheckIsSelectedColorInLibrary();
SelectedBrushStop.ConvertColor();//test OOG
}
-
-
private void OnSelectedtabChanged()
{
switch (SelectedColorTab)
@@ -824,7 +868,7 @@ namespace Tango.PPC.Jobs.Dialogs
#region MyColors
- private void SaveMyColors()
+ private void OpenCloseAddMyColorDialog()
{
if(IsBusy)
return;
@@ -866,17 +910,37 @@ namespace Tango.PPC.Jobs.Dialogs
else
{
SaveMyColorMode = !SaveMyColorMode;
+ //Init MyColorName on open the dialog
String colorName = "MyColor";
- if (SelectedBrushStop != null && SelectedBrushStop.SegmentModel != null
- && SelectedBrushStop.SegmentModel.Job != null)
+ if ( SelectedBrushStop != null && SelectedBrushStop.SegmentModel != null && SelectedBrushStop.SegmentModel.Job != null )
{
colorName = SelectedBrushStop.SegmentModel.Job.Name;
if(colorName.Length > 40)
colorName = colorName.Substring(0, 40);
}
MyColorName = colorName;
+ SelectedColorLibraryMyColor = null;
+ AddGroupMode = false;
}
-
+ IsBusy = false;
+
+ }
+
+ /// <summary>
+ /// Saves my colors on OK button of dialog "Add my Color"
+ /// </summary>
+ private void SaveMyColors()
+ {
+ if (IsBusy)
+ return;
+ IsBusy = true;
+ if (SelectedColorLibraryMyColor != null)
+ {
+ AddColorToLibrary(SelectedColorLibraryMyColor);
+ }
+ SelectedColorLibraryMyColor = null;
+ AddGroupMode = false;
+ SaveMyColorMode = false;
IsBusy = false;
}
@@ -932,14 +996,15 @@ namespace Tango.PPC.Jobs.Dialogs
{
NotificationProvider.ShowInfo("A group with this name already exists. Try adding a different name.");
}
+ SelectedColorLibrary = library;
- AddColorToLibrary(library);
+ // AddColorToLibrary(library);
}
NewGroupName = "Library" + (Libraries.Count() + 1);
- SaveMyColorMode = false;
- AddGroupMode = false;
+ //SaveMyColorMode = false;
+ //AddGroupMode = false;
}
-
+
/// <summary>
/// Adds the selected color to library in Save my Colors.
/// </summary>
@@ -985,6 +1050,11 @@ namespace Tango.PPC.Jobs.Dialogs
SaveMyColorMode = false;
}
+ private void SelectLibrary(ColorLibrary library)
+ {
+ SelectedColorLibraryMyColor = library;
+ }
+
private void SelectColor(FavoriteColor favoriteColor)
{
SelectedColor = favoriteColor;
@@ -1101,6 +1171,70 @@ namespace Tango.PPC.Jobs.Dialogs
}
}
+ private async void UploadFile()
+ {
+ if (Settings.StorageRootPath == null || false == Directory.Exists(Settings.StorageRootPath))
+ {
+ Settings.StorageRootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Twine", "Storage");
+ Directory.CreateDirectory(Settings.StorageRootPath);
+ }
+ SaveFileDialog dlg = new SaveFileDialog();
+ dlg.InitialDirectory = Path.GetFullPath(Settings.StorageRootPath);
+ dlg.RestoreDirectory = true;
+ dlg.Filter = "Tango Update My Colors|*.colr";
+ dlg.FileName = "MyColors";
+ dlg.DefaultExt = ".colr";
+ if (dlg.ShowDialog().Value)
+ {
+ try
+ {
+ IsFree = false;
+ MyColorsEngine.Default.ToFile(dlg.FileName);
+ await NotificationProvider.ShowSuccess("My colors file saved successfully.");
+ LogManager.Log($"My colors file saved successfully to file {dlg.FileName}.");
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error saving My colors to file.");
+ await NotificationProvider.ShowError($"Error creating My colors file:\n{ex.Message}");
+ }
+ finally
+ {
+ IsFree = true;
+ }
+ }
+ }
+
+ private void DownloadFile()
+ {
+ if (Settings.StorageRootPath == null || false == Directory.Exists(Settings.StorageRootPath))
+ {
+ Settings.StorageRootPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Twine", "Storage");
+ Directory.CreateDirectory(Settings.StorageRootPath);
+ }
+ if (Directory.Exists(Settings.StorageRootPath))
+ {
+ Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog
+ {
+ InitialDirectory = Settings.StorageRootPath,
+ Title = "Browse My Colors Files",
+
+ CheckFileExists = true,
+ CheckPathExists = true,
+
+ DefaultExt = "colr",
+ Filter = "job files (*.colr)|*.colr",
+ ReadOnlyChecked = true,
+ ShowReadOnly = true
+ };
+ if (openFileDialog.ShowDialog().Value)
+ {
+ MyColorsEngine.Default.FromFile(openFileDialog.FileName);
+ Libraries = MyColorsEngine.Default.GetAll().ToObservableCollection();
+ }
+ }
+ }
+
private void LoadLibraryDictionary()
{
_colorSpaceToFavoriteColorDictionary = new Dictionary<ColorSpaces, List<FavoriteColor>>();
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.png
new file mode 100644
index 000000000..0a27c2aaa
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Images/JobView/select_all.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs
index 62dc7ec1b..284b2c787 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ColorLibrary.cs
@@ -16,6 +16,7 @@ namespace Tango.PPC.Jobs.Models
{
public class ColorLibrary: ExtendedObject
{
+ #region Properties
private ObservableCollection<FavoriteColor> _colorList;
public ObservableCollection<FavoriteColor> ColorList
{
@@ -51,7 +52,23 @@ namespace Tango.PPC.Jobs.Models
OnEditGroupModeChanged();
RaisePropertyChangedAuto(); }
}
-
+
+ private bool _isSelected;
+ [BsonIgnore]
+ public bool IsSelected
+ {
+ get {
+ return _isSelected;
+ }
+ set {
+ _isSelected = value;
+ RaisePropertyChangedAuto();
+ }
+ }
+
+
+ #endregion
+
public ColorLibrary()
{
_colorList = new ObservableCollection<FavoriteColor>();
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/FavoriteColor.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/FavoriteColor.cs
index 00c8293bd..1d7b7c7c2 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/FavoriteColor.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/FavoriteColor.cs
@@ -10,6 +10,7 @@ using System.Windows;
using ColorMine.ColorSpaces;
using Tango.Core;
using LiteDB;
+using Newtonsoft.Json;
namespace Tango.PPC.Jobs.Models
{
@@ -86,14 +87,18 @@ namespace Tango.PPC.Jobs.Models
}
[BsonIgnore]
+ [JsonIgnore]
public SolidColorBrush Brush
{
get { return new SolidColorBrush(Color); }
}
[BsonIgnore]
+ [JsonIgnore]
private bool _isSelected;
+
[BsonIgnore]
+ [JsonIgnore]
public bool IsSelected
{
get { return _isSelected; }
@@ -117,5 +122,17 @@ namespace Tango.PPC.Jobs.Models
ColorSpace = ColorSpaces.Volume;
IsSelected = false;
}
+
+ public bool Equals(FavoriteColor color)
+ {
+ if(color == null)
+ return false;
+
+ return (ColorSpace == color.ColorSpace
+ && Cyan == color.Cyan && Magenta == color.Magenta && Yellow == color.Yellow && Black ==color.Black
+ && Red == color.Red && Green == color.Green && Blue == color.Blue
+ && L == color.L && A == color.A && B == color.B
+ && Hue == color.Hue && Saturation == color.Saturation && Brightness == color.Brightness);
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs
index d8a71fc78..983719e57 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs
@@ -79,7 +79,7 @@ namespace Tango.PPC.Jobs.Models
if (Segments != null)
{
if((EnableInterSegment && IsAllSegmentsPerSpool))
- return GroupingSegments.Count > 0 ? (GroupingSegments.Sum(x => x.LengthWithInterSegment) - InterSegmentLength) : 0;
+ return GroupingSegments.Count > 0 ? (GroupingSegments.Sum(x => x.LengthWithInterSegment) ) : 0;
return GroupingSegments.Sum(x => x.FullLength);
//return Segments.Sum(x => x.LengthWithInterSegment);
// return Segments.Sum(x => x.LengthWithFactor) + ((EnableInterSegment && IsAllSegmentsPerSpool) ? (InterSegmentLength * (Segments.Count > 0 ? Segments.Count - 1 : Segments.Count)) : 0);
@@ -1097,8 +1097,9 @@ namespace Tango.PPC.Jobs.Models
// NumberOfUnits = (int)maxRep;
//}
}
- RaisePropertyChanged(nameof(Length));
+
OnUpdateLengthhWeight();
+ RaisePropertyChanged(nameof(Length));
}
RaisePropertyChanged(nameof(GetEstimatedDuration));
@@ -1131,8 +1132,11 @@ namespace Tango.PPC.Jobs.Models
int max = GroupingSegments.Max(x => x.SegmentIndex);
GroupingSegments.Where(i => i.SegmentIndex != max).ToList().ForEach(x => x.EnableInterSegment = InterSegmentLength > 0);
}
+ _enableintersegment = InterSegmentLength > 0;
_preventChange = false;
+
OnLengthChanged();
+ UpdateEffectiveSegments();
}
private void OnNumberOfSpoolsChanged()
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/MyColors/MyColorsEngine.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/MyColors/MyColorsEngine.cs
index 27dabc2e7..2963d290b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/MyColors/MyColorsEngine.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/MyColors/MyColorsEngine.cs
@@ -6,11 +6,15 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tango.PPC.Jobs.Models;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
namespace Tango.PPC.Jobs.MyColors
{
public class MyColorsEngine : IDisposable
{
+ private JsonSerializerSettings _settings;
+
private LiteDatabase _db;
private ILiteCollection<ColorLibrary> _collection;
@@ -35,6 +39,14 @@ namespace Tango.PPC.Jobs.MyColors
Directory.CreateDirectory(dbFolder);
_db = new LiteDatabase($"Filename={Path.Combine(dbFolder, "color_library.db")}");
_collection = _db.GetCollection<ColorLibrary>("Libraries");
+
+ _settings = new JsonSerializerSettings()
+ {
+ TypeNameHandling = TypeNameHandling.Auto,
+ Formatting = Formatting.Indented,
+ ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore,
+ PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects
+ };
}
public void UpdateLibrary(ColorLibrary library)
@@ -72,5 +84,34 @@ namespace Tango.PPC.Jobs.MyColors
{
_collection.Delete(library.ID);
}
+
+ public void ToFile( string flePath)
+ {
+ string jsonCollection = JsonConvert.SerializeObject(GetAll(), _settings);
+ File.WriteAllText(flePath, jsonCollection);
+ }
+
+ public void FromFile(String fileName)
+ {
+ string json = File.ReadAllText(fileName);
+ List<ColorLibrary> colorCollection = JsonConvert.DeserializeObject<List<ColorLibrary>>(json, _settings);
+ foreach(var colorLib in colorCollection)
+ {
+ var currentLib = _collection.FindOne(x => x.Name == colorLib.Name);
+ if (currentLib != null)
+ {
+ var newlist = colorLib.ColorList.Where(s => !currentLib.ColorList.Any(p => p.Equals(s)));
+ foreach( var x in newlist)
+ currentLib.ColorList.Add(x);
+
+ UpdateLibrary(currentLib);
+ }
+ else
+ {
+ _collection.Insert(colorLib);
+ }
+
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj
index 96083d842..33ccc5b53 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj
@@ -752,10 +752,13 @@
<ItemGroup>
<Resource Include="Images\ColorSelection\SearchImage.png" />
</ItemGroup>
+ <ItemGroup>
+ <Resource Include="Images\JobView\select_all.png" />
+ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
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 345231e57..8a01e07cc 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
@@ -110,6 +110,17 @@ namespace Tango.PPC.Jobs.ViewModels
}
}
+ public bool CanDropResume
+ {
+ get
+ {
+ return Job != null && HasResumeModel &&
+ (!MachineProvider.MachineOperator.IsPrinting
+ || (MachineProvider.MachineOperator.RunningJob != null
+ && MachineProvider.MachineOperator.RunningJob.Guid != Job.Guid));
+ }
+ }
+
private ICollectionView _segmentsCollectionView;
/// <summary>
/// Gets or sets the job segments collection view.
@@ -280,19 +291,7 @@ namespace Tango.PPC.Jobs.ViewModels
}
}
}
-
- private bool _showAdvanced;
-
- public bool ShowAdvanced
- {
- get { return _showAdvanced; }
- set
- {
- _showAdvanced = value;
- RaisePropertyChangedAuto();
- }
- }
-
+
private JobResumeModel _resumeModel;
public JobResumeModel ResumeModel
{
@@ -435,7 +434,7 @@ namespace Tango.PPC.Jobs.ViewModels
CopyCommand = new RelayCommand(Copy);
UndoCommand = new RelayCommand(Undo);//(x) => { return UndoRedoManager.Instance.IsEnableUndoOperation(); }
RedoCommand = new RelayCommand(Redo);//(x) => { return UndoRedoManager.Instance.IsEnableRedoOperation();}
- DropResumeCommand = new RelayCommand(DropResume);
+ DropResumeCommand = new RelayCommand(DropResume, (x)=> CanDropResume);
NavigateBackToJobs = new RelayCommand(NavigateBack);
@@ -522,6 +521,7 @@ namespace Tango.PPC.Jobs.ViewModels
}
RaisePropertyChanged(nameof(CanEdit));
+ DropResumeCommand.RaiseCanExecuteChanged();
Job.NameChanged -= Job_NameChanged;
Job.NameChanged += Job_NameChanged;
@@ -547,7 +547,7 @@ namespace Tango.PPC.Jobs.ViewModels
RaisePropertyChanged(nameof(SelectedRML));
await LoadRML(_selectedRML);
- if (BuildProvider.IsEureka && Job.Segments.Count == 1 && Job.Segments[0].BrushStops.Count == 1)
+ if (BuildProvider.IsEureka && Job.Segments.Count == 1 && Job.Segments[0].BrushStops.Count <= 1)
{
IsBasicMode = true;
}
@@ -581,7 +581,6 @@ namespace Tango.PPC.Jobs.ViewModels
IsFullMode = true;
DyeCommand.RaiseCanExecuteChanged();
- ShowAdvanced = Settings.ShowAdvancedOptions;
}
catch (Exception ex)
{
@@ -633,8 +632,8 @@ namespace Tango.PPC.Jobs.ViewModels
JobType = Job.JobType,
InterSegmentLength = Job.InterSegmentLength,
EnableInterSegment = Job.EnableInterSegment,
- NumberSpools = (BuildProvider.IsEureka ? Job.Spools : 1),
- Copies = (BuildProvider.IsEureka ? Job.NumberOfUnits * Job.Spools : Job.NumberOfUnits)
+ NumberSpools = (BuildProvider.IsEureka ? Job.NumberOfSpools : 1),
+ Copies = (BuildProvider.IsEureka ? Job.NumberOfUnits * Job.NumberOfSpools : Job.NumberOfUnits)
};
Dictionary<string, SegmentsGroupModel> guidToGroup = new Dictionary<string, SegmentsGroupModel>();
if (Job.Version < 2)
@@ -781,6 +780,7 @@ namespace Tango.PPC.Jobs.ViewModels
var handler = await PrintingManager.Print(Job, _db, printConfig);
RaisePropertyChanged(nameof(CanEdit));
+ DropResumeCommand.RaiseCanExecuteChanged();
if (!BuildProvider.IsEureka)
{
@@ -1607,6 +1607,7 @@ namespace Tango.PPC.Jobs.ViewModels
{
Job.SpoolType = _spoolTypes.FirstOrDefault(x => x.Code == (int)BL.Enumerations.SpoolTypes.StandardSpool);
}
+ Job.NumberOfSpools = JobModel.NumberSpools;
var oldSegments = Job.Segments.ToList();
@@ -1786,6 +1787,10 @@ namespace Tango.PPC.Jobs.ViewModels
private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e)
{
RaisePropertyChanged(nameof(CanEdit));
+ InvokeUI( () =>
+ {
+ DropResumeCommand.RaiseCanExecuteChanged();
+ });
}
private void MachineOperator_PrintingEnded(object sender, Integration.Operation.PrintingEventArgs e)
@@ -1796,6 +1801,10 @@ namespace Tango.PPC.Jobs.ViewModels
}
RaisePropertyChanged(nameof(CanEdit));
+ InvokeUI(() =>
+ {
+ DropResumeCommand.RaiseCanExecuteChanged();
+ });
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
index e5e41b382..5f005385e 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs
@@ -185,6 +185,16 @@ namespace Tango.PPC.Jobs.ViewModels
set { _collectionFilter = value; RaisePropertyChangedAuto(); }
}
+ private bool _selectAll;
+
+ public bool SelectAll
+ {
+ get { return _selectAll; }
+ set { _selectAll = value;
+ RaisePropertyChangedAuto();}
+ }
+
+
#endregion
@@ -230,6 +240,8 @@ namespace Tango.PPC.Jobs.ViewModels
/// </summary>
public RelayCommand MoveToListJobsCommand { get; set; }
+ public RelayCommand SelectAllJobsCommand { get; set; }
+
#endregion
#region Constructors
@@ -257,6 +269,7 @@ namespace Tango.PPC.Jobs.ViewModels
CloneJobsCommand = new RelayCommand(() => CloneJobs(SelectedJobs));
ExportJobCommand = new RelayCommand(ExportJob);
MoveToListJobsCommand = new RelayCommand(() => MoveToListJobs(SelectedJobs));
+ SelectAllJobsCommand = new RelayCommand(SelectAllJobs);
RegisterForMessage<JobRemovedMessage>(HandleJobRemovedMessage);
RegisterForMessage<JobSavedMessage>(HandleJobSavedMessage);
@@ -421,6 +434,12 @@ namespace Tango.PPC.Jobs.ViewModels
IsMultiSelecting = false;
}
+ private void SelectAllJobs()
+ {
+ SelectAll = !SelectAll;
+ }
+
+
/// <summary>
/// Adds a new job.
/// </summary>
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 d348b2cc7..adf8c22d5 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
@@ -962,7 +962,7 @@
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<DockPanel x:Name="ColorPropertiesPanel" VerticalAlignment="Top" >
- <StackPanel x:Name="AdvansedOptions" DockPanel.Dock="Right" Orientation="Horizontal" VerticalAlignment="Top" Margin="0 5 18 0" Height="55" HorizontalAlignment="Right" Width="Auto" Visibility="{Binding ShowAdvanced, Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel x:Name="AdvansedOptions" DockPanel.Dock="Right" Orientation="Horizontal" Margin="0 5 18 0" Height="55" HorizontalAlignment="Right" Width="Auto" VerticalAlignment="Center">
<TextBlock FontSize="20" VerticalAlignment="Center" >Advanced Options</TextBlock>
<touch:TouchToggleSlider Style="{StaticResource TangoToggleButtonGreenAccent}" Height="28" CornerRadius="14" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="10 0 0 0" Width="54" IsChecked="{Binding IsBasicMode, Converter={StaticResource BooleanInverseConverter}, Mode=TwoWay}"></touch:TouchToggleSlider>
</StackPanel>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
index d3fdedde5..ec080ebed 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml
@@ -35,6 +35,8 @@
<sharedConverters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
<converters:JobsCategoryToVisibilityConverter x:Key="JobsCategoryToVisibilityConverter" />
<converters:JobsCategoryToOpacityConverter x:Key="JobsCategoryToOpacityConverter" />
+
+ <BitmapImage x:Key="SelectAll" UriSource="../Images/JobView/select_all.png" />
</ResourceDictionary>
</UserControl.Resources>
@@ -94,6 +96,22 @@
<touch:TouchIconButton Command="{Binding ClearSelectionCommand}" Visibility="{Binding IsMultiSelecting,Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0 0 30 0" Padding="20" Icon="Close" Width="50" Height="50" Style="{StaticResource TangoRoundTouchIconButton}">
</touch:TouchIconButton>
+ <!--<touch:TouchIconButton Command="{Binding SelectAllJobsCommand}" Margin="0 0 30 0" Padding="20" Icon="CheckboxMultipleMarkedOutline" Style="{StaticResource TangoRoundTouchIconButton}">>-->
+ <touch:TouchButton x:Name="SelectAllButton" Command="{Binding SelectAllJobsCommand}" Margin="0 0 30 0" EnableDropShadow="False">
+ <touch:TouchButton.Style>
+ <Style TargetType="touch:TouchButton" >
+ <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter>
+ <Setter Property="RenderOptions.EdgeMode" Value="Unspecified"></Setter>
+ <Setter Property="RenderOptions.BitmapScalingMode" Value="Fant"></Setter>
+ <Setter Property="CornerRadius" Value="50"></Setter>
+ <Setter Property="RippleCentered" Value="True"></Setter>
+ <Setter Property="RippleFactor" Value="2"></Setter>
+ <Setter Property="Width" Value="{Binding RelativeSource={RelativeSource Self},Path=ActualHeight}"></Setter>
+ </Style>
+ </touch:TouchButton.Style>
+ <Image Source="{StaticResource SelectAll}" Width="24" Height="24"></Image>
+ </touch:TouchButton>
+ <!--</touch:TouchIconButton>-->
<touch:TouchIconButton Command="{Binding MoveToListJobsCommand}" Margin="0 0 30 0" Padding="20" >
<touch:TouchIconButton.Style>
<Style TargetType="touch:TouchIconButton" BasedOn="{StaticResource TangoRoundTouchIconButton}">
@@ -205,7 +223,7 @@
<Grid Grid.Row="1" x:Name="moveGrid">
<touch:TouchLoadingPanel IsLoading="{Binding IsLoadingJobs}" Visibility="{Binding SelectedCategory,Converter={StaticResource JobsCategoryToVisibilityConverter},ConverterParameter='Draft'}">
- <touch:LightTouchDataGrid CollectionFilter="{Binding CollectionFilter}" AnimateSorting="False" RenderOptions.EdgeMode="Unspecified" Style="{StaticResource TangoJobsGrid}" x:Name="dataGridJobs" SelectedItems="{Binding SelectedJobs}" IsMultiSelecting="{Binding IsMultiSelecting,Mode=TwoWay}" OnDragAndDropCommand="{Binding JobDragedDroppedCommand}" ItemsSource="{Binding DraftJobsCollectionView}" ItemSelectedCommand="{Binding JobSelectedCommand}" Margin="10">
+ <touch:LightTouchDataGrid CollectionFilter="{Binding CollectionFilter}" AnimateSorting="False" RenderOptions.EdgeMode="Unspecified" Style="{StaticResource TangoJobsGrid}" x:Name="dataGridJobs" SelectedItems="{Binding SelectedJobs}" IsMultiSelecting="{Binding IsMultiSelecting,Mode=TwoWay}" OnDragAndDropCommand="{Binding JobDragedDroppedCommand}" ItemsSource="{Binding DraftJobsCollectionView}" ItemSelectedCommand="{Binding JobSelectedCommand}" Margin="10" SelectAll="{Binding SelectAll,Mode=TwoWay}">
<touch:LightTouchDataGrid.Columns>
<!--<touch:LightTouchDataGridColumn Width="90">
<touch:LightTouchDataGridColumn.Header>
@@ -267,7 +285,7 @@
<MultiBinding Converter="{StaticResource LengthWithSpoolsConverter}" StringFormat="#,0.0" TargetNullValue='0' FallbackValue='0' Mode="OneWay">
<Binding Path="LengthIncludingNumberOfUnits" Mode="OneWay"/>
<Binding Path="DataContext.BuildProvider.IsEureka" Mode="OneWay" RelativeSource="{RelativeSource AncestorType=UserControl}"/>
- <Binding Path="Spools" Mode="OneWay"/>
+ <Binding Path="NumberOfSpools" Mode="OneWay"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -336,7 +354,7 @@
</touch:TouchLoadingPanel>
<touch:TouchLoadingPanel IsLoading="{Binding IsLoadingJobs}" Visibility="{Binding SelectedCategory,Converter={StaticResource JobsCategoryToVisibilityConverter},ConverterParameter='History'}">
- <touch:LightTouchDataGrid CollectionFilter="{Binding CollectionFilter}" AnimateSorting="False" EnableDragAndDrop="False" RenderOptions.EdgeMode="Unspecified" x:Name="dataGridJobsHistory" Style="{StaticResource TangoJobsGrid}" SelectedItems="{Binding SelectedJobs}" IsMultiSelecting="{Binding IsMultiSelecting,Mode=TwoWay}" ItemsSource="{Binding HistoryJobsCollectionView}" ItemSelectedCommand="{Binding JobSelectedCommand}" Margin="10">
+ <touch:LightTouchDataGrid CollectionFilter="{Binding CollectionFilter}" AnimateSorting="False" EnableDragAndDrop="False" RenderOptions.EdgeMode="Unspecified" x:Name="dataGridJobsHistory" Style="{StaticResource TangoJobsGrid}" SelectedItems="{Binding SelectedJobs}" IsMultiSelecting="{Binding IsMultiSelecting,Mode=TwoWay}" ItemsSource="{Binding HistoryJobsCollectionView}" ItemSelectedCommand="{Binding JobSelectedCommand}" Margin="10" SelectAll="{Binding SelectAll,Mode=TwoWay}">
<touch:LightTouchDataGrid.Columns>
<touch:LightTouchDataGridColumn Width="50">
<touch:LightTouchDataGridColumn.Header>
@@ -390,7 +408,7 @@
<MultiBinding Converter="{StaticResource LengthWithSpoolsConverter}" StringFormat="0.0" TargetNullValue='0' FallbackValue='0'>
<Binding Path="LengthIncludingNumberOfUnits" Mode="OneWay"/>
<Binding Path="DataContext.BuildProvider.IsEureka" Mode="OneWay" RelativeSource="{RelativeSource AncestorType=UserControl}"/>
- <Binding Path="Spools" Mode="OneWay"/>
+ <Binding Path="NumberOfSpools" Mode="OneWay"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
index 764f044d0..7de2818f8 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml
@@ -457,15 +457,10 @@
<DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
<TextBlock VerticalAlignment="Center">Min limit dL (Fine Tuning)</TextBlock>
- <touch:TouchNumericTextBox Minimum="0" Maximum="10" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.FineTuningMinLimitdL}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90" HasDecimalPoint="True"></touch:TouchNumericTextBox>
+ <touch:TouchNumericTextBox Minimum="0" Maximum="10" KeyboardContainer="{Binding ElementName=Container}" Value="{Binding Settings.FineTuningMinLimitdL}" Margin="0 0 100 0" DockPanel.Dock="Right" HorizontalAlignment="Right" Width="90" HasDecimalPoint="True" ></touch:TouchNumericTextBox>
</DockPanel>
- <DockPanel Margin="0 20 0 0" TextElement.FontSize="{StaticResource TangoDefaultFontSize}">
- <TextBlock VerticalAlignment="Center">Show advanced options (Segments &amp; Gradients) in the Job Editor</TextBlock>
- <touch:TouchToggleSlider IsChecked="{Binding Settings.ShowAdvancedOptions}" Margin="0 0 100 0" DockPanel.Dock="Right" Style="{StaticResource TangoToggleButtonGrayAccent}" HorizontalAlignment="Right" Width="90"></touch:TouchToggleSlider>
- </DockPanel>
-
- <DockPanel Margin="0 20 0 0">
+ <DockPanel Margin="0 20 0 10">
<touch:TouchIcon VerticalAlignment="Top" Icon="InformationOutline" Foreground="{StaticResource TangoGrayTextBrush}"></touch:TouchIcon>
<TextBlock Margin="10 0 0 0" VerticalAlignment="Top" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoGrayTextBrush}">
Please restart the application for advanced settings to take effect.
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs
index ed7784b2b..b3cb5673b 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/ViewModels/MainViewVM.cs
@@ -201,9 +201,9 @@ namespace Tango.PPC.Storage.ViewModels
public override Task<bool> OnNavigateBackRequest()
{
- String path = Settings.StorageRootPath != null ? Settings.StorageRootPath : StorageProvider.Drive.RootDirectory.FullName;
-
- if (_allow_exit || CurrentPath == path)
+ if (_allow_exit ||
+ (Settings.StorageRootPath != null && Settings.StorageRootPath == CurrentPath)
+ || (StorageProvider.Drive != null && StorageProvider.Drive.RootDirectory != null && CurrentPath == StorageProvider.Drive.RootDirectory.FullName))
{
return Task.FromResult(true);
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
index acb84191b..03215553b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
@@ -361,11 +361,6 @@ namespace Tango.PPC.Common
public double FineTuningMinLimitdL { get; set; }
/// <summary>
- /// Gets or sets a value indicating whether [show advanced options].
- /// </summary>
- public bool ShowAdvancedOptions { get; set; }
-
- /// <summary>
/// Gets or sets a value indicating whether to force full screen mode on TwineX4.
/// </summary>
public bool ForceTouchMode { get; set; }
@@ -455,7 +450,6 @@ namespace Tango.PPC.Common
ScreenSaverStartDuration = 5;
EnableScreenSaver = true;
EnableRemoteJobUpload = true;
- ShowAdvancedOptions = false;
}
}
}
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 377d02d81..f43405085 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressLengthSpoolConverter.cs
@@ -15,11 +15,12 @@ namespace Tango.PPC.UI.Converters
{
try
{
- if (values.Count() == 2)
+ if (values.Count() == 3)
{
double length = System.Convert.ToDouble(values[0]);
bool forOneSpool = System.Convert.ToBoolean(values[1]);
- var totalBy4Spools = (double)length*4;// spools ;
+ int number_of_spools = System.Convert.ToInt16(values[2]);
+ var totalBy4Spools = (double)length* number_of_spools;
if (forOneSpool)
{
return (double)totalBy4Spools / 4;
@@ -27,14 +28,15 @@ namespace Tango.PPC.UI.Converters
return totalBy4Spools;
}
- if (values.Count() == 3)
+ 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]) ;
+ int number_of_spools = System.Convert.ToInt16(values[3]);
- var totalBy4Spools = (double)length * 4;
- var currentProgressBy4Spools = (double)currentProgresslength * 4 ;
+ var totalBy4Spools = (double)length * number_of_spools;
+ var currentProgressBy4Spools = (double)currentProgresslength * number_of_spools;
int coeff = (int)currentProgressBy4Spools / (int)totalBy4Spools;
var progressCurrent = (coeff == 0 || coeff == 1) ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs
index d0cc8284e..66303ab27 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressUnitSpoolConverter.cs
@@ -14,11 +14,11 @@ namespace Tango.PPC.UI.Converters
{
try
{
- if (values.Count() == 1)//may be added count of spools
+ if (values.Count() == 2)//may be added count of spools
{
int CurrentUnit = System.Convert.ToInt16(values[0]);
-
- var totalBy4Spools = (double)CurrentUnit * 4;// spools ;
+ int number_of_spools = System.Convert.ToInt16(values[1]);
+ var totalBy4Spools = (double)CurrentUnit * number_of_spools;
return totalBy4Spools.ToString();
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs
index f451fe0d9..7ffb1e8a7 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Converters/ProgressWeightSpoolConverter.cs
@@ -16,12 +16,13 @@ namespace Tango.PPC.UI.Converters
{
try
{
- if (values.Count() == 3)
+ if (values.Count() == 4)
{
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 ;
+ int number_of_spools = System.Convert.ToInt16(values[3]);
+ var totalBy4Spools = (double)length * number_of_spools;
var weight = ((double)totalBy4Spools * coef) / (1000);//(g)
if (forOneSpool)
@@ -31,15 +32,16 @@ namespace Tango.PPC.UI.Converters
return weight;
}
- if (values.Count() == 4)
+ if (values.Count() == 5)
{
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]);
+ int number_of_spools = System.Convert.ToInt16(values[4]);
- var totalBy4Spools = (double)length * 4;
- var currentProgressBy4Spools = (double)currentProgresslength * 4;
+ var totalBy4Spools = (double)length * number_of_spools;
+ var currentProgressBy4Spools = (double)currentProgresslength * number_of_spools;
int coeff = (int)currentProgressBy4Spools / (int)totalBy4Spools;
var progressCurrent = (coeff == 0 || coeff == 1) ? currentProgressBy4Spools : currentProgressBy4Spools % (coeff * totalBy4Spools);//show for progress
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateDB.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateDB.png
new file mode 100644
index 000000000..519f570fc
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateDB.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateVersion.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateVersion.png
new file mode 100644
index 000000000..5510f1006
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Menu/updateVersion.png
Binary files differ
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 a0fba3632..8f65f225b 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
@@ -646,6 +646,8 @@
<Resource Include="Images\Overview Icons\temperature.png" />
<Resource Include="Images\screw.png" />
<Resource Include="Images\Menu\AppPower_image.png" />
+ <Resource Include="Images\Menu\updateDB.png" />
+ <Resource Include="Images\Menu\updateVersion.png" />
<Content Include="Intro.wmv" />
<Content Include="Manifests\release.xml" />
<Content Include="Manifests\debug.xml" />
@@ -991,7 +993,7 @@ if $(ConfigurationName) == Eureka copy /Y "$(ProjectDir)Intro.wmv" "$(TargetDir)
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
<Import Project="..\..\packages\WPFMediaKit.2.2.0\build\WPFMediaKit.targets" Condition="Exists('..\..\packages\WPFMediaKit.2.2.0\build\WPFMediaKit.targets')" />
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 17b676499..56314414a 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs
@@ -14,8 +14,10 @@ using Tango.Integration.Operation;
using Tango.PMR.IFS;
using Tango.PPC.Common;
using Tango.PPC.Common.Connection;
+using Tango.PPC.Common.MachineUpdate;
using Tango.PPC.Common.Modules;
using Tango.PPC.Common.Navigation;
+using Tango.PPC.Common.Web;
using Tango.PPC.UI.Dialogs;
using Tango.PPC.UI.Views;
using Tango.PPC.UI.ViewsContracts;
@@ -39,6 +41,9 @@ namespace Tango.PPC.UI.ViewModels
[TangoInject]
public IPPCModuleLoader ModuleLoader { get; set; }
+ [TangoInject]
+ public IMachineUpdateManager MachineUpdateManager { get; set; }
+
#region Classes
public class CartridgeModel : ExtendedObject
@@ -230,6 +235,26 @@ namespace Tango.PPC.UI.ViewModels
set { _currentDateTime = value; RaisePropertyChangedAuto(); }
}
+ private bool _enableDBUpdate;
+ /// <summary>
+ /// Gets or sets a value indicating whether to automatically check for new application updates.
+ /// </summary>
+ public bool EnableDBUpdate
+ {
+ get { return _enableDBUpdate; }
+ set { _enableDBUpdate = value; RaisePropertyChangedAuto(); }
+ }
+
+ private bool _enableVersionUpdate;
+ /// <summary>
+ /// Gets or sets a value indicating whether to automatically check for new application updates.
+ /// </summary>
+ public bool EnableVersionUpdate
+ {
+ get { return _enableVersionUpdate; }
+ set { _enableVersionUpdate = value; RaisePropertyChangedAuto(); }
+ }
+
#endregion
#region Commands
@@ -327,6 +352,8 @@ namespace Tango.PPC.UI.ViewModels
_date_timer.Interval = TimeSpan.FromSeconds(1);
_date_timer.Tick += _date_timer_Tick;
_date_timer.Start();
+
+ _enableDBUpdate = _enableVersionUpdate = false;
}
#endregion
@@ -564,6 +591,22 @@ namespace Tango.PPC.UI.ViewModels
MachineProvider.MachineOperator.InkFillingStatusChanged += MachineOperator_InkFillingStatusChanged;
}
+ private void MachineUpdateManager_UpdateAvailable(object sender, CheckForUpdateResponse e)
+ {
+ EnableVersionUpdate = false;
+ EnableDBUpdate = false;
+
+ if(e.IsUpdateAvailable)
+ {
+ EnableVersionUpdate = true;
+ return;
+ }
+ else if (e.IsDatabaseUpdateAvailable)
+ {
+ EnableDBUpdate = true;
+ }
+ }
+
private void MachineOperator_InkFillingStatusChanged(object sender, InkFillingStatusChangedEventArgs e)
{
if (Cartridges == null)
@@ -618,6 +661,7 @@ namespace Tango.PPC.UI.ViewModels
{
base.OnApplicationReady();
MachineProvider.MachineOperator.StatusChanged += MachineOperator_StatusChanged;
+ MachineUpdateManager.UpdateAvailable += MachineUpdateManager_UpdateAvailable;
}
private void MachineOperator_StatusChanged(object sender, MachineStatuses e)
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 049f2268d..62538d9d6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutEurekaView.xaml
@@ -119,7 +119,9 @@
<touch:TouchButton Style="{StaticResource TangoFlatButton}" Padding="10 0" Height="45" Foreground="{StaticResource TangoDarkForegroundBrush}" Command="{Binding UpdateCommand}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Image Source="/Images/Menu/update.png" VerticalAlignment="Center" Width="20" Height="20"></Image>
- <TextBlock VerticalAlignment="Center" Margin="20 0 0 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoDataGridHeaderFontSize}" FontWeight="Light">Update</TextBlock>
+ <TextBlock VerticalAlignment="Center" Margin="20 0 20 0" Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoDataGridHeaderFontSize}" FontWeight="Light">Update</TextBlock>
+ <Image Margin="30 0 0 0" Source="/Images/Menu/updateDB.png" VerticalAlignment="Center" Width="16" Height="16" HorizontalAlignment="Right" Visibility="{Binding EnableDBUpdate, Converter={StaticResource BooleanToVisibilityConverter}}" SnapsToDevicePixels="True"></Image>
+ <Image Margin="30 0 0 0" Source="/Images/Menu/updateVersion.png" VerticalAlignment="Center" Width="16" Height="16" HorizontalAlignment="Right" Visibility="{Binding EnableVersionUpdate, Converter={StaticResource BooleanToVisibilityConverter}}" SnapsToDevicePixels="True"></Image>
</StackPanel>
</touch:TouchButton>
</Border>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
index 3664e3997..1196a2c0e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml
@@ -177,7 +177,7 @@
</Border.Style>
<Grid>
<Grid.RowDefinitions>
- <RowDefinition Height="1.4*"/>
+ <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
@@ -196,16 +196,16 @@
</UniformGrid>
</Grid>
- <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="25 0" Opacity="0.3" StrokeThickness="1" Stroke="{StaticResource TangoDividerBrush}" />
+ <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="25 0" Opacity="0.3" StrokeThickness="2" Stroke="{StaticResource TangoDividerBrush}" />
<Grid Grid.Row="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="188*"/>
<ColumnDefinition Width="261*"/>
</Grid.ColumnDefinitions>
- <Image Source="/Images/power-tablet.png" Margin="30" />
+ <Image Source="/Images/power-tablet.png" Margin="30" VerticalAlignment="Center" />
- <touch:TouchButton Command="{Binding RestartApplicationCommand}" Grid.Column="1" Style="{StaticResource PowerButton}">Restart</touch:TouchButton>
+ <touch:TouchButton Command="{Binding RestartApplicationCommand}" Grid.Column="1" Style="{StaticResource PowerButton}" VerticalAlignment="Center">Restart</touch:TouchButton>
</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 0436cdab6..f9338b813 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml
@@ -558,7 +558,7 @@
<Image Source="../Images/Job Issues/spools.png" Stretch="None" VerticalAlignment="Top"/>
<StackPanel Orientation="Vertical" Margin="15 0 0 0">
<TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoDefaultFontSize}">Spools</TextBlock>
- <TextBlock Text="{Binding Job.Spools, TargetNullValue='-', FallbackValue='-'}" FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></TextBlock>
+ <TextBlock Text="{Binding Job.NumberOfSpools, TargetNullValue='-', FallbackValue='-'}" FontWeight="DemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></TextBlock>
</StackPanel>
</StackPanel>
</UniformGrid>
@@ -650,6 +650,7 @@
<Binding Path="RunningJobStatus.TotalProgressMinusSettingUp" />
<Binding Path="IsSpoolView"/>
<Binding Path="RunningJobStatus.ProgressMinusSettingUp" />
+ <Binding Path="Job.NumberOfSpools"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -659,6 +660,7 @@
<MultiBinding Converter="{StaticResource ProgressLengthSpoolConverter}" StringFormat="#,0" TargetNullValue='-' FallbackValue='0' Mode="OneWay">
<Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/>
<Binding Path="IsSpoolView"/>
+ <Binding Path="Job.NumberOfSpools"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -673,6 +675,7 @@
<Binding Path="IsSpoolView"/>
<Binding Path="RunningJobStatus.ProgressMinusSettingUp" />
<Binding Path="Job.GramPerLength" Mode="OneWay"/>
+ <Binding Path="Job.NumberOfSpools"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -683,6 +686,7 @@
<Binding Path="RunningJobStatus.TotalProgressMinusSettingUp"/>
<Binding Path="IsSpoolView"/>
<Binding Path="Job.GramPerLength" Mode="OneWay"/>
+ <Binding Path="Job.NumberOfSpools"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -792,7 +796,7 @@
<TextBlock.Text>
<MultiBinding Converter="{StaticResource LengthWithSpoolsConverter}" StringFormat="#,0" TargetNullValue='-' FallbackValue='-' Mode="OneWay">
<Binding Path="RunningJobStatus.ProgressMinusSettingUp" Mode="OneWay"/>
- <Binding Path="Job.Spools" Mode="OneWay"/>
+ <Binding Path="Job.NumberOfSpools" Mode="OneWay"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -807,7 +811,7 @@
<MultiBinding Converter="{StaticResource LengthToWeightConverter}" StringFormat="#,0.##" TargetNullValue='-' FallbackValue='-' Mode="OneWay">
<Binding Path="RunningJobStatus.ProgressMinusSettingUp" Mode="OneWay"/>
<Binding Path="Job.GramPerLength" Mode="OneWay"/>
- <Binding Path="Job.Spools" Mode="OneWay"/>
+ <Binding Path="Job.NumberOfSpools" Mode="OneWay"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
@@ -830,6 +834,7 @@
<Setter.Value>
<MultiBinding Converter="{StaticResource ProgressUnitSpoolConverter}" TargetNullValue='-' FallbackValue='-' >
<Binding Path="RunningJobStatus.CurrentUnit" Mode="OneWay"/>
+ <Binding Path="Job.NumberOfSpools" Mode="OneWay"/>
</MultiBinding>
</Setter.Value>
</Setter>
@@ -1019,7 +1024,7 @@
<TextBlock.Text>
<MultiBinding Converter="{StaticResource LengthWithSpoolsConverter}" StringFormat="#,0.##" TargetNullValue='-' FallbackValue='-' Mode="OneWay">
<Binding Path="RunningJobStatus.ProgressMinusSettingUp" Mode="OneWay"/>
- <Binding Path="Job.Spools" Mode="OneWay"/>
+ <Binding Path="Job.NumberOfSpools" Mode="OneWay"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>