From cda2e6fb9c2f6e92e3800a8d21a2691f5744bb6b Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 20 Jun 2018 16:24:10 +0300 Subject: Working on PPC... --- .../Tango.PPC.Jobs/Images/JobView/delete.png | Bin 0 -> 420 bytes .../Tango.PPC.Jobs/Images/JobView/job-details.png | Bin 0 -> 1164 bytes .../Tango.PPC.Jobs/Images/JobView/remove.png | Bin 0 -> 313 bytes .../Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj | 9 +++ .../Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 10 +-- .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 74 ++++++++++++++++++++- .../PPC/Tango.PPC.Common/Resources/Merged.xaml | 1 + .../Images/GlobalStatus/ready-to-dye.png | Bin 0 -> 891 bytes .../Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml | 3 +- .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 1 + .../PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs | 3 + .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 6 ++ .../Tango.SharedUI/Controls/TableGrid.cs | 23 +++++-- .../Tango.Touch/Controls/TouchExpander.xaml | 9 +-- .../Tango.Touch/Controls/TouchTable.cs | 31 +++++++++ .../Tango.Touch/Controls/TouchTextBox.xaml | 5 +- .../Tango.Touch/Resources/Colors.xaml | 18 +++-- .../Visual_Studio/Tango.Touch/Resources/Fonts.xaml | 2 + .../Visual_Studio/Tango.Touch/Tango.Touch.csproj | 1 + .../Utilities/Tango.UITests/MainWindow.xaml | 3 + 20 files changed, 176 insertions(+), 23 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/delete.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/job-details.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/remove.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/ready-to-dye.png create mode 100644 Software/Visual_Studio/Tango.Touch/Controls/TouchTable.cs (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/delete.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/delete.png new file mode 100644 index 000000000..1e4cf9945 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/delete.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/job-details.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/job-details.png new file mode 100644 index 000000000..e0ebc547e Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/job-details.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/remove.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/remove.png new file mode 100644 index 000000000..68ee07788 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Images/JobView/remove.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index 810191efe..8381120e5 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -194,5 +194,14 @@ + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index 59c6aafc3..99daba4cb 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -15,14 +15,14 @@ namespace Tango.PPC.Jobs.ViewModels /// public class JobViewVM : PPCViewModel { - private Job _selectedJob; + private Job _job; /// /// Gets or sets the selected job. /// - public Job SelectedJob + public Job Job { - get { return _selectedJob; } - set { _selectedJob = value; RaisePropertyChangedAuto(); } + get { return _job; } + set { _job = value; RaisePropertyChangedAuto(); } } /// @@ -39,7 +39,7 @@ namespace Tango.PPC.Jobs.ViewModels /// The message. private void HandleJobSelectedMessage(JobSelectedMessage message) { - SelectedJob = message.Job; + Job = message.Job; } /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index 16a448d67..e82b0ad2c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -4,7 +4,9 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:vm="clr-namespace:Tango.PPC.Jobs.ViewModels" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:global="clr-namespace:Tango.PPC.Jobs" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:local="clr-namespace:Tango.PPC.Jobs.Views" mc:Ignorable="d" d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobViewVM}"> @@ -18,7 +20,77 @@ - + + + + + + + + + + + + + + + + + + + Job Details + + + + + + + + Job name: + + Customer name: + + Thread type: + + Comment: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml index beb273e2e..405868e24 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Resources/Merged.xaml @@ -22,6 +22,7 @@ + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/ready-to-dye.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/ready-to-dye.png new file mode 100644 index 000000000..7edf624be Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/GlobalStatus/ready-to-dye.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml index cabd05265..718eb5519 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml @@ -9,7 +9,8 @@ Title="MainWindow" Height="1000" Stylus.IsTapFeedbackEnabled="False" Stylus.IsPressAndHoldEnabled="False" Stylus.IsTouchFeedbackEnabled="False" Width="800" WindowStyle="SingleBorderWindow" ResizeMode="CanResize" WindowStartupLocation="CenterScreen" FontFamily="{StaticResource TangoFlexoFontFamily}" FontSize="{StaticResource TangoDefaultFontSize}" - Foreground="{StaticResource TangoDarkForegroundBrush}"> + Foreground="{StaticResource TangoDarkForegroundBrush}" + FontWeight="Medium"> 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 2f6491be3..d4c2bb037 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 @@ -182,6 +182,7 @@ Settings.settings True + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs index 5086fd323..6107a906d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs @@ -35,6 +35,9 @@ namespace Tango.PPC.UI.ViewModels public LoginViewVM() { LoginCommand = new RelayCommand(Login); + + Email = "roy@twine-s.com"; + Password = "1234"; } public override void OnApplicationStarted() 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 9e59b7f33..78d040d27 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -102,6 +102,12 @@ + + + + Ready to Dye + + diff --git a/Software/Visual_Studio/Tango.SharedUI/Controls/TableGrid.cs b/Software/Visual_Studio/Tango.SharedUI/Controls/TableGrid.cs index 084df75ac..0987e2445 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Controls/TableGrid.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Controls/TableGrid.cs @@ -20,6 +20,19 @@ namespace Tango.SharedUI.Controls DependencyProperty.Register("RowHeight", typeof(GridLength), typeof(TableGrid), new FrameworkPropertyMetadata(new GridLength(1, GridUnitType.Star), FrameworkPropertyMetadataOptions.AffectsRender)); + + public Thickness SecondRowMargin + { + get { return (Thickness)GetValue(SecondRowMarginProperty); } + set { SetValue(SecondRowMarginProperty, value); } + } + + // Using a DependencyProperty as the backing store for SecondRowMargin. This enables animation, styling, binding, etc... + public static readonly DependencyProperty SecondRowMarginProperty = + DependencyProperty.Register("SecondRowMargin", typeof(Thickness), typeof(TableGrid), new PropertyMetadata(new Thickness(20, 0, 0, 0))); + + + public TableGrid() { ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(1, GridUnitType.Auto) }); @@ -27,11 +40,6 @@ namespace Tango.SharedUI.Controls this.Loaded += TableGrid_Loaded; } - protected override void OnRender(DrawingContext dc) - { - base.OnRender(dc); - } - private void TableGrid_Loaded(object sender, RoutedEventArgs e) { InvalidateGrid(); @@ -62,7 +70,10 @@ namespace Tango.SharedUI.Controls if (i % 2 != 0) { SetColumn(Children[i], 1); - (Children[i] as FrameworkElement).Margin = new Thickness(20, 0, 0, 0); + if ((Children[i] as FrameworkElement).Margin == new Thickness()) + { + (Children[i] as FrameworkElement).Margin = SecondRowMargin; + } currentRow++; RowDefinitions.Add(new RowDefinition() { Height = RowHeight }); } diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml index 87a164158..9122744bf 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchExpander.xaml @@ -9,6 +9,7 @@