diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-27 19:33:15 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-05-27 19:33:15 +0300 |
| commit | e571f20e27c4fca6bb6efe03d6427a1f332f9830 (patch) | |
| tree | b16041b76ea3b4e8368039c9396f9bbf9624dcc2 /Software/Visual_Studio | |
| parent | 157e0685abb2e7b22b6584cdc7d6f5838ed0a808 (diff) | |
| download | Tango-e571f20e27c4fca6bb6efe03d6427a1f332f9830.tar.gz Tango-e571f20e27c4fca6bb6efe03d6427a1f332f9830.zip | |
Working on panel pc.
Diffstat (limited to 'Software/Visual_Studio')
103 files changed, 2623 insertions, 565 deletions
diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/PanelPCApplication/IPanelPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs index fd5b68f3c..3a516c072 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/PanelPCApplication/IPanelPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Application/IPPCApplicationManager.cs @@ -4,17 +4,29 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; +using Tango.BL.Entities; using Tango.Integration.Operation; using Tango.Integration.Services; -namespace Tango.PanelPC.UI.PanelPCApplication +namespace Tango.PPC.Common.Application { /// <summary> /// Represents the Machine Studio application manager. /// </summary> - public interface IPanelPCApplicationManager + public interface IPPCApplicationManager { /// <summary> + /// Gets or sets the DAL machine. + /// </summary> + Machine Machine { get; } + + /// <summary> + /// Sets the machine. + /// </summary> + /// <param name="machine">The machine.</param> + void SetMachine(Machine machine); + + /// <summary> /// Occurs when the connected machine property has changed. /// </summary> event EventHandler<IMachineOperator> ConnectedMachineChanged; diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/DefaultAuthenticationProvider.cs index 6129e9a87..c8e89ac2f 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Authentication/DefaultAuthenticationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/DefaultAuthenticationProvider.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; -namespace Tango.PanelPC.UI.Authentication +namespace Tango.PPC.Common.Authentication { public class DefaultAuthenticationProvider : IAuthenticationProvider { diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Authentication/IAuthenticationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/IAuthenticationProvider.cs index 02542926f..0892932a8 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Authentication/IAuthenticationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Authentication/IAuthenticationProvider.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; -namespace Tango.PanelPC.UI.Authentication +namespace Tango.PPC.Common.Authentication { /// <summary> /// Represents the Machine Studio user authentication provider responsible for the current logged-in user. diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChart.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChart.xaml new file mode 100644 index 000000000..0c6ae7630 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChart.xaml @@ -0,0 +1,8 @@ +<UserControl x:Class="Tango.PPC.Common.Controls.MultiPieChart" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:pieCharts="clr-namespace:Tango.PPC.Common.Controls"> + + <Image x:Name="_pieChartImage" RenderOptions.BitmapScalingMode="NearestNeighbor"/> + +</UserControl> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChart.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChart.xaml.cs new file mode 100644 index 000000000..2415573fe --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChart.xaml.cs @@ -0,0 +1,263 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.Linq; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Media; + +namespace Tango.PPC.Common.Controls +{ + /// <summary> + /// Interaction logic for MultiPieChart.xaml + /// </summary> + public partial class MultiPieChart : UserControl + { + private const string DefaultDataBrush = "#939496"; + + #region dependency properties + + public static readonly DependencyProperty SizeProperty = + DependencyProperty.Register( "Size", typeof( double ), typeof( MultiPieChart ), new PropertyMetadata( 100.0, OnPiePropertyChanged ) ); + + public static readonly DependencyProperty InnerPieSliceFillProperty = + DependencyProperty.Register( "InnerPieSliceFill", typeof( Brush ), typeof( MultiPieChart ), new PropertyMetadata( CreateBrush( "#939496" ), OnPiePropertyChanged ) ); + + public static readonly DependencyProperty OuterPieSliceFillProperty = + DependencyProperty.Register( "OuterPieSliceFill", typeof( Brush ), typeof( MultiPieChart ), new PropertyMetadata( CreateBrush( "#D0D1D3" ), OnPiePropertyChanged ) ); + + public static readonly DependencyProperty DataListProperty = + DependencyProperty.Register( "DataList", typeof( IList<double> ), typeof( MultiPieChart ), new PropertyMetadata( null, OnDataListPropertyChanged ) ); + + public static readonly DependencyProperty DataBrushesProperty = + DependencyProperty.Register( "DataBrushes", typeof( MultiPieChartBrushCollection ), typeof( MultiPieChart ), new PropertyMetadata( new MultiPieChartBrushCollection(), OnPiePropertyChanged ) ); + + public double Size + { + get { return (double)GetValue( SizeProperty ); } + set { SetValue( SizeProperty, value ); } + } + + public Brush InnerPieSliceFill + { + get { return (Brush)GetValue( InnerPieSliceFillProperty ); } + set { SetValue( InnerPieSliceFillProperty, value ); } + } + + public Brush OuterPieSliceFill + { + get { return (Brush)GetValue( OuterPieSliceFillProperty ); } + set { SetValue( OuterPieSliceFillProperty, value ); } + } + + public IList<double> DataList + { + get { return (IList<double>)GetValue( DataListProperty ); } + set { SetValue( DataListProperty, value ); } + } + + public MultiPieChartBrushCollection DataBrushes + { + get { return (MultiPieChartBrushCollection)GetValue( DataBrushesProperty ); } + set { SetValue( DataBrushesProperty, value ); } + } + + #endregion + + #region constructor + + public MultiPieChart() + { + InitializeComponent(); + this.Loaded += (_, __) => { CreatePieChart(); }; + } + + #endregion + + #region overrides + + #endregion + + #region events + + private static void OnPiePropertyChanged( DependencyObject dep, DependencyPropertyChangedEventArgs ev ) + { + //var chart = (MultiPieChart)dep; + + //if ( chart.IsInitialized ) + //{ + // chart.CreatePieChart(); + //} + } + + private static void OnDataListPropertyChanged( DependencyObject dep, DependencyPropertyChangedEventArgs ev ) + { + var chart = (MultiPieChart)dep; + + var collection = ev.OldValue as INotifyCollectionChanged; + if ( collection != null ) + { + collection.CollectionChanged -= chart.DataListCollectionChanged; + } + + collection = ev.NewValue as INotifyCollectionChanged; + if ( collection != null ) + { + collection.CollectionChanged += chart.DataListCollectionChanged; + } + } + + + private void DataListCollectionChanged( object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs ) + { + //CreatePieChart(); + } + + #endregion + + #region private methods + + private void CreatePieChart() + { + Size = ActualWidth; + + if ( _pieChartImage != null ) + { + if ( !double.IsNaN( Size ) && DataList != null && DataList.Any() ) + { + _pieChartImage.Width = _pieChartImage.Height = Width = Height = Size; + + var di = new DrawingImage(); + _pieChartImage.Source = di; + + var dg = new DrawingGroup(); + di.Drawing = dg; + + if ( DataList.Count > 1 ) + { + var total = DataList.Sum(); + var startPoint = new Point( Width / 2, 0 ); + double radians = 0; + + for ( int i = 0; i < DataList.Count; i++ ) + { + var data = DataList[i]; + var dataBrush = GetBrushFromList( i ); + var percentage = data / total; + + Point endPoint; + var angle = 360 * percentage; + + if ( i + 1 == DataList.Count ) + { + endPoint = new Point( Width / 2, 0 ); + } + else + { + radians += ( Math.PI / 180 ) * angle; + var endPointX = Math.Sin( radians ) * Height / 2 + Height / 2; + var endPointY = Width / 2 - Math.Cos( radians ) * Width / 2; + endPoint = new Point( endPointX, endPointY ); + } + + dg.Children.Add( CreatePathGeometry( dataBrush, startPoint, endPoint, angle > 180 ) ); + + startPoint = endPoint; + } + } + else + { + dg.Children.Add( CreateEllipseGeometry( GetBrushFromList( 0 ) ) ); + } + } + else + { + _pieChartImage.Source = null; + } + } + } + + private GeometryDrawing CreatePathGeometry( Brush brush, Point startPoint, Point arcPoint, bool isLargeArc ) + { + /* + * <GeometryDrawing Brush="@Brush"> + <GeometryDrawing.Geometry> + <PathGeometry> + <PathFigure StartPoint="@Size/2"> + <PathFigure.Segments> + <LineSegment Point="@startPoint"/> + <ArcSegment Point="@arcPoint" SweepDirection="Clockwise" Size="@Size/2"/> + <LineSegment Point="@Size/2"/> + </PathFigure.Segments> + </PathFigure> + </PathGeometry> + </GeometryDrawing.Geometry> + </GeometryDrawing> + * */ + + var midPoint = new Point( Width / 2, Height / 2 ); + + var drawing = new GeometryDrawing { Brush = brush }; + var pathGeometry = new PathGeometry(); + var pathFigure = new PathFigure { StartPoint = midPoint }; + + var ls1 = new LineSegment( startPoint, false ); + var arc = new ArcSegment + { + SweepDirection = SweepDirection.Clockwise, + Size = new Size( Width / 2, Height / 2 ), + Point = arcPoint, + IsLargeArc = isLargeArc + }; + var ls2 = new LineSegment( midPoint, false ); + + drawing.Geometry = pathGeometry; + pathGeometry.Figures.Add( pathFigure ); + + pathFigure.Segments.Add( ls1 ); + pathFigure.Segments.Add( arc ); + pathFigure.Segments.Add( ls2 ); + + return drawing; + } + + private GeometryDrawing CreateEllipseGeometry( Brush brush ) + { + var midPoint = new Point( Width / 2, Height / 2 ); + + var drawing = new GeometryDrawing { Brush = brush }; + var ellipse = new EllipseGeometry( midPoint, Size / 2, Size / 2 ); + + drawing.Geometry = ellipse; + + return drawing; + } + + private static SolidColorBrush CreateBrush( string brush ) + { + var color = ColorConverter.ConvertFromString( brush ); + if ( color != null ) + { + return new SolidColorBrush( (Color)color ); + } + + return null; + } + + private Brush GetBrushFromList( int index ) + { + if ( DataBrushes == null || !DataBrushes.Any() ) + { + return CreateBrush( DefaultDataBrush ); + } + else + { + var modIndex = index % DataBrushes.Count; + return DataBrushes[modIndex]; + } + } + + #endregion + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChartBrushCollection.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChartBrushCollection.cs new file mode 100644 index 000000000..0d8c754f7 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/MultiPieChartBrushCollection.cs @@ -0,0 +1,9 @@ +using System.Collections.Generic; +using System.Windows.Media; + +namespace Tango.PPC.Common.Controls +{ + public class MultiPieChartBrushCollection : List<Brush> + { + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Converters/SegmentsToPieConverter.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Converters/SegmentsToPieConverter.cs new file mode 100644 index 000000000..77eab71b8 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Converters/SegmentsToPieConverter.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media; +using Tango.BL.Entities; +using Tango.PPC.Common.Controls; + +namespace Tango.PPC.Common.Converters +{ + public class SegmentsToPieConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + ObservableCollection<Segment> segments = value as ObservableCollection<Segment>; + + if (segments != null) + { + MultiPieChart pie = new MultiPieChart(); + + pie.DataList = new List<Double>(); + + if (segments.Count > 0) + { + foreach (var segment in segments) + { + pie.DataList.Add(10); + pie.DataBrushes.Add(segment.GetSegmentBrush()); + } + } + else + { + pie.DataList.Add(10); + pie.DataBrushes.Add(new SolidColorBrush(Colors.Gainsboro)); + } + + return pie; + } + + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/CustomControl1.cs index c82b9e898..82fcc6431 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/CustomControl1.cs @@ -13,16 +13,13 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace Tango.PanelPC.UI +namespace Tango.PPC.Common { - /// <summary> - /// Interaction logic for MainWindow.xaml - /// </summary> - public partial class MainWindow : Window + public class CustomControl1 : Control { - public MainWindow() + static CustomControl1() { - InitializeComponent(); + DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomControl1), new FrameworkPropertyMetadata(typeof(CustomControl1))); } } } diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Diagnostics/DefaultDiagnosticsFrameProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs index 0dfeaf631..c4e0563ab 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Diagnostics/DefaultDiagnosticsFrameProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/DefaultDiagnosticsFrameProvider.cs @@ -6,10 +6,10 @@ using System.Threading.Tasks; using Tango.Core; using Tango.Integration.Operation; using Tango.Integration.Services; -using Tango.PanelPC.UI.PanelPCApplication; using Tango.PMR.Diagnostics; +using Tango.PPC.Common.Application; -namespace Tango.PanelPC.UI.Diagnostics +namespace Tango.PPC.Common.Diagnostics { /// <summary> /// Represents the default diagnostics frame provider. @@ -17,7 +17,7 @@ namespace Tango.PanelPC.UI.Diagnostics /// <seealso cref="Tango.MachineStudio.Common.Diagnostics.IDiagnosticsFrameProvider" /> public class DefaultDiagnosticsFrameProvider : ExtendedObject, IDiagnosticsFrameProvider { - private IPanelPCApplicationManager _application; + private IPPCApplicationManager _application; private bool _disable; /// <summary> @@ -41,7 +41,7 @@ namespace Tango.PanelPC.UI.Diagnostics /// Initializes a new instance of the <see cref="DefaultDiagnosticsFrameProvider"/> class. /// </summary> /// <param name="applicationManager">The application manager.</param> - public DefaultDiagnosticsFrameProvider(IPanelPCApplicationManager applicationManager) + public DefaultDiagnosticsFrameProvider(IPPCApplicationManager applicationManager) { _application = applicationManager; applicationManager.ConnectedMachineChanged += ApplicationManager_ConnectedMachineChanged; diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Diagnostics/IDiagnosticsFrameProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/IDiagnosticsFrameProvider.cs index 7e9ddab23..169870042 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Diagnostics/IDiagnosticsFrameProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Diagnostics/IDiagnosticsFrameProvider.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Tango.Integration.Operation; using Tango.PMR.Diagnostics; -namespace Tango.PanelPC.UI.Diagnostics +namespace Tango.PPC.Common.Diagnostics { /// <summary> /// Represents a tango machine diagnostics frame provider. diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/EventLogging/DefaultEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs index edc0e2afd..2675fa1fa 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/EventLogging/DefaultEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/DefaultEventLogger.cs @@ -11,13 +11,12 @@ using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Core; using Tango.Integration.Services; -using Tango.Logging; using Tango.PMR.Diagnostics; using Tango.Integration.Operation; -using Tango.PanelPC.UI.PanelPCApplication; -using Tango.PanelPC.UI.Authentication; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Authentication; -namespace Tango.PanelPC.UI.EventLogging +namespace Tango.PPC.Common.EventLogging { /// <summary> /// Represents the default database events logger. @@ -28,7 +27,7 @@ namespace Tango.PanelPC.UI.EventLogging private ObservablesContext _db; private Thread _logThread; private ConcurrentQueue<MachinesEvent> _events; - private IPanelPCApplicationManager _application; + private IPPCApplicationManager _application; private IAuthenticationProvider _authentication; private Dictionary<EventTypes, BL.Entities.EventType> _eventTypesGuids; private String _hostName; @@ -51,7 +50,7 @@ namespace Tango.PanelPC.UI.EventLogging /// </summary> /// <param name="applicationManager">The application manager.</param> /// <param name="authenticationProvider">The authentication provider.</param> - public DefaultEventLogger(IPanelPCApplicationManager applicationManager, IAuthenticationProvider authenticationProvider) + public DefaultEventLogger(IPPCApplicationManager applicationManager, IAuthenticationProvider authenticationProvider) { _hostName = Environment.MachineName; diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/EventLogging/IEventLogger.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/IEventLogger.cs index d43aea14c..f7eadac1e 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/EventLogging/IEventLogger.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/EventLogging/IEventLogger.cs @@ -7,7 +7,7 @@ using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.PMR.Diagnostics; -namespace Tango.PanelPC.UI.EventLogging +namespace Tango.PPC.Common.EventLogging { /// <summary> /// Represents a database events logger. diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Navigation/INavigationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/INavigationManager.cs index d4b03519b..f29476631 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Navigation/INavigationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/INavigationManager.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Tango.PanelPC.UI.Navigation +namespace Tango.PPC.Common.Navigation { /// <summary> /// Represents the Machine Studio views navigation manager. diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Navigation/NavigationView.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/NavigationView.cs index 182d3e295..d860bce76 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Navigation/NavigationView.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Navigation/NavigationView.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Tango.PanelPC.UI.Navigation +namespace Tango.PPC.Common.Navigation { /// <summary> /// Represents the available views to navigate to using the <see cref="INavigationManager"/>. @@ -12,9 +12,7 @@ namespace Tango.PanelPC.UI.Navigation public enum NavigationView { LoadingView, - MainView, - LoginView, - ShutdownView, - UpdateView, + LayoutView, + JobsView, } } diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/DialogViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/DialogViewVM.cs index 6c4605217..b7a48f259 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/DialogViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/DialogViewVM.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; using Tango.Core.Commands; using Tango.SharedUI; -namespace Tango.PanelPC.UI.Notifications +namespace Tango.PPC.Common.Notifications { /// <summary> /// Represents a dialog view model base class. diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/INotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/INotificationProvider.cs index f27f78625..edad5c1e9 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/INotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/INotificationProvider.cs @@ -1,5 +1,4 @@ -using MaterialDesignThemes.Wpf; -using System; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; @@ -8,7 +7,7 @@ using System.Threading.Tasks; using System.Windows; using System.Windows.Media; -namespace Tango.PanelPC.UI.Notifications +namespace Tango.PPC.Common.Notifications { /// <summary> /// Represents the Machine Studio user notification provider responsible for displaying information, alerts and dialogs to the user. @@ -95,16 +94,6 @@ namespace Tango.PanelPC.UI.Notifications void ShowModalDialog<VM>(Action<VM> onAccept) where VM : DialogViewVM; /// <summary> - /// Display a message box. - /// </summary> - /// <param name="icon">The icon.</param> - /// <param name="iconColor">Color of the icon.</param> - /// <param name="message">The message.</param> - /// <param name="hasCancel">if set to <c>true</c> displays the cancel button.</param> - /// <returns></returns> - bool? ShowMessageBox(PackIconKind icon, Brush iconColor, String message, bool hasCancel); - - /// <summary> /// Shows an information message box. /// </summary> /// <param name="message">The message.</param> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/TaskItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/TaskItem.cs index 7f0dc7dab..b9ffa4a72 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/TaskItem.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Notification/TaskItem.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.Core; -namespace Tango.PanelPC.UI.Notifications +namespace Tango.PPC.Common.Notifications { /// <summary> /// Represents a Machine Studio "work-bar" item. diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs new file mode 100644 index 000000000..db04c04ee --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Settings; + +namespace Tango.PPC.Common +{ + public class PPCSettings : SettingsBase + { + public String MachineSerialNumber { get; set; } + + public PPCSettings() + { + MachineSerialNumber = "1111"; + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs new file mode 100644 index 000000000..e5f13e394 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCViewModel.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Authentication; +using Tango.PPC.Common.Navigation; +using Tango.PPC.Common.Notifications; +using Tango.Settings; +using Tango.SharedUI; + +namespace Tango.PPC.Common +{ + public abstract class PPCViewModel : ViewModel + { + public IPPCApplicationManager ApplicationManager { get; private set; } + + public IAuthenticationProvider AuthenticationProvider { get; private set; } + + public INavigationManager NavigationManager { get; private set; } + + public INotificationProvider NotificationProvider { get; private set; } + + public PPCSettings Settings { get; private set; } + + public PPCViewModel(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) + { + ApplicationManager = application; + AuthenticationProvider = authentication; + NavigationManager = navigation; + NotificationProvider = notification; + + Settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); + } + + public abstract void OnApplicationStarted(); + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..3394347d0 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.PPC.Common")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.PanelPC.Common")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file +//inside a <PropertyGroup>. For example, if you are using US english +//in your source files, set the <UICulture> to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly:ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs new file mode 100644 index 000000000..243da50ac --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.PPC.Common.Properties { + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if ((resourceMan == null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PanelPC.Common.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Resources.resx b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.resx index af7dbebba..af7dbebba 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Resources.resx +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Resources.resx diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Settings.Designer.cs new file mode 100644 index 000000000..8537a6bb1 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.PPC.Common.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Settings.settings b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Settings.settings index 033d7a5e9..033d7a5e9 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Settings.settings +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/Settings.settings diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj new file mode 100644 index 000000000..3a3090c6a --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj @@ -0,0 +1,188 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}</ProjectGuid> + <OutputType>library</OutputType> + <RootNamespace>Tango.PanelPC.Common</RootNamespace> + <AssemblyName>Tango.PanelPC.Common</AssemblyName> + <TargetFrameworkVersion>v4.6</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <WarningLevel>4</WarningLevel> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>..\..\Build\Debug\PPC\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll</HintPath> + </Reference> + <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL"> + <HintPath>..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll</HintPath> + </Reference> + <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> + <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.ComponentModel.DataAnnotations" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xaml"> + <RequiredTargetFramework>4.0</RequiredTargetFramework> + </Reference> + <Reference Include="WindowsBase" /> + <Reference Include="PresentationCore" /> + <Reference Include="PresentationFramework" /> + </ItemGroup> + <ItemGroup> + <Page Include="Controls\MultiPieChart.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Page Include="Themes\Generic.xaml"> + <Generator>MSBuild:Compile</Generator> + <SubType>Designer</SubType> + </Page> + <Compile Include="Application\IPPCApplicationManager.cs" /> + <Compile Include="Authentication\DefaultAuthenticationProvider.cs" /> + <Compile Include="Authentication\IAuthenticationProvider.cs" /> + <Compile Include="Controls\MultiPieChart.xaml.cs"> + <DependentUpon>MultiPieChart.xaml</DependentUpon> + </Compile> + <Compile Include="Controls\MultiPieChartBrushCollection.cs" /> + <Compile Include="Converters\SegmentsToPieConverter.cs" /> + <Compile Include="CustomControl1.cs"> + <SubType>Code</SubType> + </Compile> + </ItemGroup> + <ItemGroup> + <Compile Include="Diagnostics\DefaultDiagnosticsFrameProvider.cs" /> + <Compile Include="Diagnostics\IDiagnosticsFrameProvider.cs" /> + <Compile Include="EventLogging\DefaultEventLogger.cs" /> + <Compile Include="EventLogging\IEventLogger.cs" /> + <Compile Include="Navigation\INavigationManager.cs" /> + <Compile Include="Navigation\NavigationView.cs" /> + <Compile Include="Notification\DialogViewVM.cs" /> + <Compile Include="Notification\INotificationProvider.cs" /> + <Compile Include="Notification\TaskItem.cs" /> + <Compile Include="PPCSettings.cs" /> + <Compile Include="PPCViewModel.cs" /> + <Compile Include="Properties\AssemblyInfo.cs"> + <SubType>Code</SubType> + </Compile> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DesignTime>True</DesignTime> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + </EmbeddedResource> + <None Include="app.config" /> + <None Include="packages.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj"> + <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> + <Name>Tango.BL</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Core\Tango.Core.csproj"> + <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> + <Name>Tango.Core</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Integration\Tango.Integration.csproj"> + <Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project> + <Name>Tango.Integration</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Logging\Tango.Logging.csproj"> + <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> + <Name>Tango.Logging</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Settings\Tango.Settings.csproj"> + <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> + <Name>Tango.Settings</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.SharedUI\Tango.SharedUI.csproj"> + <Project>{8491d07b-c1f6-4b62-a412-41b9fd2d6538}</Project> + <Name>Tango.SharedUI</Name> + </ProjectReference> + <ProjectReference Include="..\..\Tango.Transport\Tango.Transport.csproj"> + <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> + <Name>Tango.Transport</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="..\..\..\DB\Tango.mdf"> + <Link>DB\Tango.mdf</Link> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + <Content Include="..\..\..\DB\Tango_log.ldf"> + <Link>DB\Tango_log.ldf</Link> + <CopyToOutputDirectory>Always</CopyToOutputDirectory> + </Content> + </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include=".NETFramework,Version=v4.6"> + <Visible>False</Visible> + <ProductName>Microsoft .NET Framework 4.6 %28x86 and x64%29</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>false</Install> + </BootstrapperPackage> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml new file mode 100644 index 000000000..af7652bf7 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Themes/Generic.xaml @@ -0,0 +1,18 @@ +<ResourceDictionary + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:local="clr-namespace:Tango.PPC.Common"> + <Style TargetType="{x:Type local:CustomControl1}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:CustomControl1}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> +</ResourceDictionary> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config b/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config new file mode 100644 index 000000000..dcbe9e918 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/app.config @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <configSections> + <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 --> + <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> + </configSections> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> + <entityFramework> + <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> + <providers> + <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" /> + </providers> + </entityFramework> +</configuration>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config b/Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config new file mode 100644 index 000000000..033360b54 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="EntityFramework" version="6.0.0" targetFramework="net46" /> + <package id="Google.Protobuf" version="3.4.1" targetFramework="net46" /> +</packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config index 895afa970..895afa970 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.config +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml index 6b54c0f0d..ddfb18c60 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml @@ -1,73 +1,17 @@ -<Application x:Class="Tango.PanelPC.UI.App" +<Application x:Class="Tango.PPC.UI.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" - xmlns:local="clr-namespace:Tango.PanelPC.UI" + xmlns:local="clr-namespace:Tango.PPC.UI" StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"> <Application.Resources> <ResourceDictionary> - <ResourceDictionary.MergedDictionaries> - <!-- MahApps.Metro resource dictionaries. Make sure that all file names are Case Sensitive! --> - <!-- Accent and AppTheme setting --> - <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml"> - </ResourceDictionary> - <!--Material Design--> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/materialdesigncolor.blue.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/materialdesigncolor.yellow.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.CheckBox.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListBox.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.TextBlock.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Label.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.Slider.xaml"> - </ResourceDictionary> - <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/materialdesigntheme.ProgressBar.xaml"/> - - <!--MahApps Brushes--> - <ResourceDictionary> - <SolidColorBrush x:Key="HighlightBrush" Color="{DynamicResource Primary700}" /> - <SolidColorBrush x:Key="AccentColorBrush" Color="{DynamicResource Primary500}" /> - <SolidColorBrush x:Key="AccentColorBrush2" Color="{DynamicResource Primary400}" /> - <SolidColorBrush x:Key="AccentColorBrush3" Color="{DynamicResource Primary300}" /> - <SolidColorBrush x:Key="AccentColorBrush4" Color="{DynamicResource Primary200}" /> - <SolidColorBrush x:Key="WindowTitleColorBrush" Color="{DynamicResource Primary700}" /> - <SolidColorBrush x:Key="AccentSelectedColorBrush" Color="{DynamicResource Primary500Foreground}" /> - <LinearGradientBrush x:Key="ProgressBrush" EndPoint="0.001,0.5" StartPoint="1.002,0.5"> - <GradientStop Color="{DynamicResource Primary700}" Offset="0" /> - <GradientStop Color="{DynamicResource Primary300}" Offset="1" /> - </LinearGradientBrush> - <SolidColorBrush x:Key="CheckmarkFill" Color="{DynamicResource Primary500}" /> - <SolidColorBrush x:Key="RightArrowFill" Color="{DynamicResource Primary500}" /> - <SolidColorBrush x:Key="IdealForegroundColorBrush" Color="{DynamicResource Primary500Foreground}" /> - <SolidColorBrush x:Key="IdealForegroundDisabledBrush" Color="{DynamicResource Primary500}" Opacity="0.4" /> - </ResourceDictionary> - + <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Colors.xaml"/> - - <!--Styles--> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Fonts.xaml"/> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchToggleButton.xaml" /> + + <!--Styles--> <ResourceDictionary> <Style TargetType="{x:Type ListBoxItem}" x:Key="basicListBoxItem"> <Setter Property="Background" Value="Transparent"/> @@ -213,9 +157,8 @@ </ResourceDictionary> <ResourceDictionary Source="Resources/Colors.xaml"></ResourceDictionary> - <ResourceDictionary Source="Resources/MaterialOverride.xaml"></ResourceDictionary> - <ResourceDictionary Source="Resources/Styles.xaml"></ResourceDictionary> - </ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="Resources/MaterialOverride.xaml"></ResourceDictionary> + </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs new file mode 100644 index 000000000..357d15171 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; +using Tango.Settings; + +namespace Tango.PPC.UI +{ + /// <summary> + /// Interaction logic for App.xaml + /// </summary> + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + var s = SettingsManager.Default.GetOrCreate<Core.CoreSettings>(); + s.SQLServerAddress = "DB\\Tango.mdf"; + s.Save(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/cyan.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/cyan.png Binary files differnew file mode 100644 index 000000000..d53382f28 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/cyan.png diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Images/account.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/account.png Binary files differindex 46f0d38fc..46f0d38fc 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Images/account.png +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/account.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/arrows.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/arrows.png Binary files differnew file mode 100644 index 000000000..ae3482ee5 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/arrows.png diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Images/liquid.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/liquid.png Binary files differindex 7c5a4bceb..7c5a4bceb 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Images/liquid.png +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/liquid.png diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/warning.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/warning.png Binary files differnew file mode 100644 index 000000000..5c7672421 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/warning.png diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml index 7bc312cc7..f716a6e88 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/MainWindow.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml @@ -1,12 +1,12 @@ -<Window x:Class="Tango.PanelPC.UI.MainWindow" +<Window x:Class="Tango.PPC.UI.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:local="clr-namespace:Tango.PanelPC.UI" - xmlns:views="clr-namespace:Tango.PanelPC.UI.Views" + xmlns:local="clr-namespace:Tango.PPC.UI" + xmlns:views="clr-namespace:Tango.PPC.UI.Views" mc:Ignorable="d" - Title="MainWindow" Height="1000" Width="625"> + Title="MainWindow" Height="1000" Width="625" WindowStyle="None" ResizeMode="NoResize"> <Grid> <Viewbox Stretch="Fill"> <Grid Height="1280" Width="800"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs new file mode 100644 index 000000000..42ea21123 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Forms; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.PPC.UI +{ + /// <summary> + /// Interaction logic for MainWindow.xaml + /// </summary> + public partial class MainWindow : Window + { + public static MainWindow Instance { get; private set; } + + public MainWindow() + { + Instance = this; + + InitializeComponent(); + + WindowStartupLocation = WindowStartupLocation.Manual; + var lastMonitor = Screen.AllScreens.LastOrDefault(); + Left = lastMonitor.Bounds.Left; + Top = lastMonitor.Bounds.Top; + Width = lastMonitor.Bounds.Width; + Height = lastMonitor.Bounds.Height; + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs new file mode 100644 index 000000000..83cf92f11 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs @@ -0,0 +1,26 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Common.Navigation; +using Tango.PPC.UI.Views; +using Tango.SharedUI.Controls; + +namespace Tango.PPC.UI.Navigation +{ + public class DefaultNavigationManager : INavigationManager + { + public void NavigateTo(NavigationView view) + { + NavigationControl[] controls = new NavigationControl[] + { + MainView.Instance.NavigationControl, + LayoutView.Instance.NavigationControl + }; + + var control = controls.Where(x => x.Elements.ToList().Exists(y => NavigationControl.GetNavigationName(y) == view.ToString())).SingleOrDefault(); + control.NavigateTo(view.ToString()); + } + } +} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs index 9601d61ea..7f97f2a49 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Notifications/DefaultNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -6,9 +6,10 @@ using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Media; -using MaterialDesignThemes.Wpf; +using FontAwesome.WPF; +using Tango.PPC.Common.Notifications; -namespace Tango.PanelPC.UI.Notifications +namespace Tango.PPC.UI.Notifications { public class DefaultNotificationProvider : INotificationProvider { @@ -61,7 +62,7 @@ namespace Tango.PanelPC.UI.Notifications throw new NotImplementedException(); } - public bool? ShowMessageBox(PackIconKind icon, Brush iconColor, string message, bool hasCancel) + public bool? ShowMessageBox(FontAwesomeIcon icon, Brush iconColor, string message, bool hasCancel) { throw new NotImplementedException(); } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs new file mode 100644 index 000000000..29b9f7823 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.Integration.Operation; +using Tango.Settings; +using Tango.PPC.Common.Application; +using Tango.Core.DI; +using Tango.PPC.Common; +using System.Windows; +using Tango.Core; + +namespace Tango.PPC.UI.PPCApplication +{ + public class DefaultPPCApplicationManager : ExtendedObject, IPPCApplicationManager + { + public bool IsShuttingDown + { + get + { + throw new NotImplementedException(); + } + } + + public IMachineOperator ConnectedMachine + { + get + { + throw new NotImplementedException(); + } + + set + { + throw new NotImplementedException(); + } + } + + public string Version + { + get + { + throw new NotImplementedException(); + } + } + + private Machine _machine; + public Machine Machine + { + private set + { + _machine = value; + } + get + { + return _machine; + } + } + + public event EventHandler<IMachineOperator> ConnectedMachineChanged; + + public DefaultPPCApplicationManager() + { + if (!DesignMode) + { + MainWindow.Instance.ContentRendered += (_, __) => + { + foreach (var vm in TangoIOC.Default.GetAllInstancesByBase<PPCViewModel>()) + { + vm.OnApplicationStarted(); + } + }; + } + } + + public void ShutDown() + { + throw new NotImplementedException(); + } + + public void SetMachine(Machine machine) + { + Machine = machine; + } + } +} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index cf2bc2e13..acd22cb21 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -7,7 +7,7 @@ using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Tango.PanelPC.UI")] +[assembly: AssemblyTitle("Tango.PPC.UI")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.Designer.cs index 22ca0612f..3af06554c 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Resources.Designer.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace Tango.PanelPC.UI.Properties +namespace Tango.PPC.UI.Properties { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.resx b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.Designer.cs index 2b6ca1383..dab4cb31e 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Properties/Settings.Designer.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.Designer.cs @@ -8,7 +8,7 @@ // </auto-generated> //------------------------------------------------------------------------------ -namespace Tango.PanelPC.UI.Properties +namespace Tango.PPC.UI.Properties { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.settings b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.settings @@ -0,0 +1,7 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile>
\ No newline at end of file diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Resources/Colors.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml index d0800fc89..431533fcb 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Resources/Colors.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml @@ -1,6 +1,6 @@ <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="clr-namespace:Tango.PanelPC.UI.Resources"> + xmlns:local="clr-namespace:Tango.PPC.UI.Resources"> <Color x:Key="AccentColor">#2F65EE</Color> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Resources/MaterialOverride.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml index f7f81a974..49fb3e837 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Resources/MaterialOverride.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml @@ -2,7 +2,7 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf" xmlns:converters="clr-namespace:MaterialDesignThemes.Wpf.Converters;assembly=MaterialDesignThemes.Wpf" - xmlns:local="clr-namespace:Tango.PanelPC.UI.Resources"> + xmlns:local="clr-namespace:Tango.PPC.UI.Resources"> <Style TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}"> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Styles.xaml index 01a5ff01f..110bbfc86 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Resources/Styles.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Styles.xaml @@ -1,6 +1,6 @@ <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:local="clr-namespace:Tango.PanelPC.UI.Resources"> + xmlns:local="clr-namespace:Tango.PPC.UI.Resources"> <Style x:Key="JobsListBoxItem" TargetType="ListBoxItem" BasedOn="{StaticResource {x:Type ListBoxItem}}"> <Setter Property="BorderBrush" Value="Silver"></Setter> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Tango.PanelPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 549ed57bb..6a60b6701 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Tango.PanelPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -19,7 +19,7 @@ <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> - <OutputPath>..\..\Build\Debug\PanelPC\</OutputPath> + <OutputPath>..\..\Build\Debug\PPC\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> @@ -49,12 +49,11 @@ <Reference Include="Google.Protobuf, Version=3.4.1.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL"> <HintPath>..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll</HintPath> </Reference> - <Reference Include="MahApps.Metro, Version=1.6.0.0, Culture=neutral, processorArchitecture=MSIL"> - <HintPath>..\..\packages\MahApps.Metro.1.6.4\lib\net46\MahApps.Metro.dll</HintPath> - </Reference> <Reference Include="System" /> <Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.Data" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll</HintPath> </Reference> @@ -76,25 +75,13 @@ <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> </ApplicationDefinition> - <Compile Include="Authentication\DefaultAuthenticationProvider.cs" /> - <Compile Include="Authentication\IAuthenticationProvider.cs" /> - <Compile Include="Diagnostics\DefaultDiagnosticsFrameProvider.cs" /> - <Compile Include="Diagnostics\IDiagnosticsFrameProvider.cs" /> - <Compile Include="EventLogging\DefaultEventLogger.cs" /> - <Compile Include="EventLogging\IEventLogger.cs" /> <Compile Include="Navigation\DefaultNavigationManager.cs" /> - <Compile Include="Navigation\INavigationManager.cs" /> - <Compile Include="Navigation\NavigationView.cs" /> <Compile Include="Notifications\DefaultNotificationProvider.cs" /> - <Compile Include="Notifications\DialogViewVM.cs" /> - <Compile Include="Notifications\INotificationProvider.cs" /> - <Compile Include="Notifications\TaskItem.cs" /> - <Compile Include="PanelPCApplication\DefaultPanelPCApplicationManager.cs" /> - <Compile Include="PanelPCApplication\IPanelPCApplicationManager.cs" /> + <Compile Include="PPCApplication\DefaultPPCApplicationManager.cs" /> <Compile Include="ViewModelLocator.cs" /> <Compile Include="ViewModels\JobsViewVM.cs" /> <Compile Include="ViewModels\LayoutViewVM.cs" /> - <Compile Include="ViewModels\LoadingView.cs" /> + <Compile Include="ViewModels\LoadingViewVM.cs" /> <Compile Include="ViewModels\MainViewVM.cs" /> <Compile Include="Views\JobsView.xaml.cs"> <DependentUpon>JobsView.xaml</DependentUpon> @@ -177,14 +164,6 @@ <None Include="App.config" /> </ItemGroup> <ItemGroup> - <ProjectReference Include="..\..\SideChains\MaterialDesignInXamlToolkit-master\MaterialDesignColors.Wpf\MaterialDesignColors.Wpf.csproj"> - <Project>{90b53209-c60c-4655-b28d-a1b3e1044ba3}</Project> - <Name>MaterialDesignColors.Wpf</Name> - </ProjectReference> - <ProjectReference Include="..\..\SideChains\MaterialDesignInXamlToolkit-master\MaterialDesignThemes.Wpf\MaterialDesignThemes.Wpf.csproj"> - <Project>{f079fb0a-a8ed-4216-b6a5-345756751a04}</Project> - <Name>MaterialDesignThemes.Wpf</Name> - </ProjectReference> <ProjectReference Include="..\..\Tango.BL\Tango.BL.csproj"> <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> <Name>Tango.BL</Name> @@ -233,6 +212,10 @@ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project> <Name>Tango.Transport</Name> </ProjectReference> + <ProjectReference Include="..\Tango.PPC.Common\Tango.PPC.Common.csproj"> + <Project>{0be74eee-22cb-4dba-b896-793b9e1a3ac0}</Project> + <Name>Tango.PPC.Common</Name> + </ProjectReference> </ItemGroup> <ItemGroup> <Resource Include="Images\liquid.png" /> @@ -240,5 +223,14 @@ <ItemGroup> <Resource Include="Images\account.png" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\arrows.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\Job Issues\cyan.png" /> + </ItemGroup> + <ItemGroup> + <Resource Include="Images\warning.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index 061454b32..3a37fe452 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -2,16 +2,19 @@ using System; using Tango.Core.DI; using Tango.Integration.Services; using Tango.Logging; -using Tango.PanelPC.UI.Authentication; -using Tango.PanelPC.UI.Diagnostics; -using Tango.PanelPC.UI.EventLogging; -using Tango.PanelPC.UI.Navigation; -using Tango.PanelPC.UI.Notifications; -using Tango.PanelPC.UI.PanelPCApplication; -using Tango.PanelPC.UI.ViewModels; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Authentication; +using Tango.PPC.Common.Diagnostics; +using Tango.PPC.Common.EventLogging; +using Tango.PPC.Common.Navigation; +using Tango.PPC.Common.Notifications; +using Tango.PPC.UI.Navigation; +using Tango.PPC.UI.Notifications; +using Tango.PPC.UI.PPCApplication; +using Tango.PPC.UI.ViewModels; using Tango.TFS; -namespace Tango.PanelPC.UI +namespace Tango.PPC.UI { /// <summary> /// This class contains static references to all the view models in the @@ -27,7 +30,7 @@ namespace Tango.PanelPC.UI TangoIOC.Default.Unregister<INotificationProvider>(); TangoIOC.Default.Unregister<IAuthenticationProvider>(); TangoIOC.Default.Unregister<INavigationManager>(); - TangoIOC.Default.Unregister<IPanelPCApplicationManager>(); + TangoIOC.Default.Unregister<IPPCApplicationManager>(); TangoIOC.Default.Unregister<ExternalBridgeScanner>(); TangoIOC.Default.Unregister<IDiagnosticsFrameProvider>(); TangoIOC.Default.Unregister<IEventLogger>(); @@ -36,13 +39,13 @@ namespace Tango.PanelPC.UI TangoIOC.Default.Register<INotificationProvider, DefaultNotificationProvider>(); TangoIOC.Default.Register<IAuthenticationProvider, DefaultAuthenticationProvider>(); TangoIOC.Default.Register<INavigationManager, DefaultNavigationManager>(); - TangoIOC.Default.Register<IPanelPCApplicationManager, DefaultPanelPCApplicationManager>(); + TangoIOC.Default.Register<IPPCApplicationManager, DefaultPPCApplicationManager>(); TangoIOC.Default.Register<ExternalBridgeScanner, ExternalBridgeScanner>(); TangoIOC.Default.Register<IDiagnosticsFrameProvider, DefaultDiagnosticsFrameProvider>(); TangoIOC.Default.Register<IEventLogger, DefaultEventLogger>(); //TangoIOC.Default.Register<TeamFoundationServiceExtendedClient>(new TeamFoundationServiceExtendedClient("https://twinetfs.visualstudio.com", String.Empty, "szzfokrceo4rhd4eqi5qpmxn3pa5iwl3q7tlqd36l2m7smz2ynoa")); - TangoIOC.Default.Register<LoadingView>(); + TangoIOC.Default.Register<LoadingViewVM>(); TangoIOC.Default.Register<MainViewVM>(); TangoIOC.Default.Register<LayoutViewVM>(); TangoIOC.Default.Register<JobsViewVM>(); @@ -55,11 +58,11 @@ namespace Tango.PanelPC.UI //TangoIOC.Default.Register<UpdateViewVM>(); } - public static LoadingView LoadingView + public static LoadingViewVM LoadingView { get { - return TangoIOC.Default.GetInstance<LoadingView>(); + return TangoIOC.Default.GetInstance<LoadingViewVM>(); } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs new file mode 100644 index 000000000..0eb59eeeb --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.PPC.Common; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Authentication; +using Tango.PPC.Common.Navigation; +using Tango.PPC.Common.Notifications; +using Tango.Settings; +using Tango.SharedUI; + +namespace Tango.PPC.UI.ViewModels +{ + public class JobsViewVM : PPCViewModel + { + private ObservablesContext _jobsContext; + + private ObservableCollection<Job> _jobs; + + public ObservableCollection<Job> Jobs + { + get { return _jobs; } + set { _jobs = value; RaisePropertyChangedAuto(); } + } + + public JobsViewVM(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) : base(application, authentication, navigation, notification) + { + Jobs = new ObservableCollection<Job>(); + } + + public override void OnApplicationStarted() + { + LoadJobs(); + } + + private void LoadJobs() + { + Task.Factory.StartNew(() => + { + if (_jobsContext != null) + { + _jobsContext.Dispose(); + } + + _jobsContext = ObservablesContext.CreateDefault(); + Jobs = _jobsContext.Jobs.Where(x => x.Machine.SerialNumber == Settings.MachineSerialNumber).ToObservableCollection(); + }); + } + } +} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs index 4ea7a4bb5..cc64f82f5 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/LayoutViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Tango.SharedUI; -namespace Tango.PanelPC.UI.ViewModels +namespace Tango.PPC.UI.ViewModels { public class LayoutViewVM : ViewModel { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs new file mode 100644 index 000000000..4cc812a17 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Common; +using Tango.PPC.Common.Application; +using Tango.PPC.Common.Authentication; +using Tango.PPC.Common.Navigation; +using Tango.PPC.Common.Notifications; +using Tango.SharedUI; + +namespace Tango.PPC.UI.ViewModels +{ + public class LoadingViewVM : PPCViewModel + { + public LoadingViewVM(IPPCApplicationManager application, IAuthenticationProvider authentication, INavigationManager navigation, INotificationProvider notification) : base(application, authentication, navigation, notification) + { + + } + + public async override void OnApplicationStarted() + { + await Task.Delay(2000); + NavigationManager.NavigateTo(NavigationView.LayoutView); + NavigationManager.NavigateTo(NavigationView.JobsView); + } + } +} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs index 71501c8b1..c75e031f1 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs @@ -3,16 +3,16 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -using Tango.PanelPC.UI.PanelPCApplication; +using Tango.PPC.Common.Application; using Tango.SharedUI; -namespace Tango.PanelPC.UI.ViewModels +namespace Tango.PPC.UI.ViewModels { public class MainViewVM : ViewModel { public String Test { get; set; } - public MainViewVM(IPanelPCApplicationManager application) + public MainViewVM(IPPCApplicationManager application) { Test = "This is a binding test"; } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml new file mode 100644 index 000000000..8062280de --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml @@ -0,0 +1,94 @@ +<UserControl x:Class="Tango.PPC.UI.Views.JobsView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" + xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:keyboard="clr-namespace:Tango.SharedUI.Keyboard;assembly=Tango.SharedUI" + xmlns:converters="clr-namespace:Tango.PPC.Common.Converters;assembly=Tango.PanelPC.Common" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:sys="clr-namespace:System;assembly=mscorlib" + xmlns:sharedConverters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:local="clr-namespace:Tango.PPC.UI.Views" + mc:Ignorable="d" + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobsViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobsViewVM}"> + + <UserControl.Resources> + <converters:SegmentsToPieConverter x:Key="SegmentsToPieConverter" /> + <sharedConverters:DateTimeUTCToShortDateConverter x:Key="DateTimeUTCToShortDateConverter" /> + </UserControl.Resources> + + <Grid Background="{StaticResource TangoMidBackgroundBrush}"> + <Grid.RowDefinitions> + <RowDefinition Height="82"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}"> + <Border.Effect> + <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> + </Border.Effect> + <TextBlock VerticalAlignment="Center" Margin="20" FontSize="25" FontWeight="SemiBold">JOBS</TextBlock> + </Border> + + <Grid Grid.Row="1"> + <Grid.RowDefinitions> + <RowDefinition Height="100"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <touch:TouchNavigationLinks VerticalAlignment="Bottom" Margin="20" FontSize="18" FontWeight="SemiBold"> + <sys:String>READY TO DYE</sys:String> + <sys:String>NOT READY</sys:String> + <sys:String>ALL</sys:String> + </touch:TouchNavigationLinks> + + <Grid Grid.Row="1"> + <touch:TouchDataGrid ItemsSource="{Binding Jobs}" Margin="10" EnableDropShadow="True" ShadowColor="#ECECEC" AutoGenerateColumns="False" RowHeight="68" ColumnHeaderHeight="67"> + <touch:TouchDataGrid.Columns> + <DataGridTemplateColumn> + <DataGridTemplateColumn.Header> + <Image Source="/Images/warning.png" Width="24" /> + </DataGridTemplateColumn.Header> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Image Source="/Images/Job Issues/cyan.png" Width="38" /> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTextColumn Header="Status" Binding="{Binding Name}"></DataGridTextColumn> + <DataGridTextColumn Header="Name" Width="295" Binding="{Binding Name}"></DataGridTextColumn> + <DataGridTextColumn Header="Length (m)" Binding="{Binding Length,StringFormat=0.0}"></DataGridTextColumn> + <DataGridTemplateColumn Header="Colors" SortMemberPath="Segments.Count"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <ContentControl Content="{Binding Segments,Converter={StaticResource SegmentsToPieConverter}}" Width="23" Height="23"></ContentControl> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTextColumn Header="Updated" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateConverter}}"></DataGridTextColumn> + <DataGridTextColumn Binding="{Binding JobIndex}" Width="70" SortMemberPath="JobIndex"> + <DataGridTextColumn.HeaderStyle> + <Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}"> + <Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"></Setter> + <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter> + <Setter Property="VerticalContentAlignment" Value="Stretch"></Setter> + </Style> + </DataGridTextColumn.HeaderStyle> + <DataGridTextColumn.Header> + <Grid> + <Grid IsHitTestVisible="False"> + <Rectangle HorizontalAlignment="Left" StrokeThickness="2" Stroke="{StaticResource TangoColumnDividerBrush}" /> + <Image Source="/Images/arrows.png" Width="28" /> + </Grid> + </Grid> + </DataGridTextColumn.Header> + </DataGridTextColumn> + </touch:TouchDataGrid.Columns> + </touch:TouchDataGrid> + </Grid> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/JobsView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs index 918b2c973..3ccb48c01 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/JobsView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace Tango.PanelPC.UI.Views +namespace Tango.PPC.UI.Views { /// <summary> /// Interaction logic for JobsView.xaml diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml new file mode 100644 index 000000000..2a6d1b52b --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -0,0 +1,119 @@ +<UserControl x:Class="Tango.PPC.UI.Views.LayoutView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:local="clr-namespace:Tango.PPC.UI.Views" + xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" + xmlns:fa="http://schemas.fontawesome.io/icons/" + xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" + xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" + mc:Ignorable="d" + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LayoutViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LayoutViewVM}"> + + <Grid> + <touch:TouchSideMenu x:Name="menu"> + <touch:TouchSideMenu.MenuContent> + <Border x:Name="border" BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDividerBrush}"> + <DockPanel LastChildFill="False" Background="{StaticResource TangoPrimaryBackgroundBrush}"> + <StackPanel MinWidth="300" DockPanel.Dock="Top"> + <Grid> + <touch:TouchToggleButton Style="{StaticResource TouchToggleButtonHamburger}" + HorizontalAlignment="Right" Margin="16" + IsChecked="{Binding ElementName=menu,Path=IsOpened}" /> + + <StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> + <Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image> + <StackPanel Margin="0 5 0 0"> + <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock> + <TextBlock FontSize="12" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" Margin="10 5 0 0" VerticalAlignment="Center"> + <Run Text="{Binding AuthenticationProvider.CurrentUser.Organization.Name}"></Run> + , + <Run Text="{Binding AuthenticationProvider.CurrentUser.Roles[0].Name}"> + <Run.ToolTip> + <ItemsControl ItemsSource="{Binding AuthenticationProvider.CurrentUser.Roles}"> + <ItemsControl.ItemTemplate> + <DataTemplate> + <StackPanel Orientation="Horizontal" Margin="2"> + <fa:ImageAwesome Icon="User" Width="16" Height="16" /> + <TextBlock Margin="5 0 0 0" Text="{Binding Name}"></TextBlock> + </StackPanel> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + </Run.ToolTip> + </Run> + <Run>...</Run> + </TextBlock> + </StackPanel> + </StackPanel> + </Grid> + <StackPanel Margin="0 16 0 0"> + <ListBoxItem> + <i:Interaction.Triggers> + <i:EventTrigger EventName="PreviewMouseUp"> + <i:InvokeCommandAction Command="{Binding HomeCommand}"></i:InvokeCommandAction> + </i:EventTrigger> + </i:Interaction.Triggers> + <StackPanel Orientation="Horizontal"> + <fa:ImageAwesome VerticalAlignment="Center" Icon="Home" Width="32" Height="32"></fa:ImageAwesome> + <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Home</TextBlock> + </StackPanel> + </ListBoxItem> + </StackPanel> + </StackPanel> + + <StackPanel DockPanel.Dock="Bottom"> + <Separator Margin="0 10 0 0" Background="Gainsboro" /> + <ListBoxItem> + <i:Interaction.Triggers> + <i:EventTrigger EventName="PreviewMouseUp"> + <i:InvokeCommandAction Command="{Binding SignoutCommand}"></i:InvokeCommandAction> + </i:EventTrigger> + </i:Interaction.Triggers> + <StackPanel Orientation="Horizontal"> + <fa:ImageAwesome VerticalAlignment="Center" Icon="SignOut" Width="32" Height="32"></fa:ImageAwesome> + <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Sign out</TextBlock> + </StackPanel> + </ListBoxItem> + </StackPanel> + </DockPanel> + </Border> + </touch:TouchSideMenu.MenuContent> + + <DockPanel> + <Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}" DockPanel.Dock="Top"> + <DockPanel> + <Border Padding="20" BorderThickness="0 0 1 0" BorderBrush="{StaticResource BorderColorBrush}"> + <touch:TouchToggleButton Width="50" Height="50" Foreground="{StaticResource TangoPrimaryAccentBrush}" Style="{StaticResource TouchToggleButtonHamburger}" IsChecked="{Binding ElementName=menu,Path=IsOpened}"> + <ToggleButton.Effect> + <DropShadowEffect ShadowDepth="15" BlurRadius="20" Color="Silver" /> + </ToggleButton.Effect> + </touch:TouchToggleButton> + </Border> + <Grid> + <StackPanel HorizontalAlignment="Right" Margin="30 0" Orientation="Horizontal"> + <touch:TouchButton Height="54" FontSize="20" Padding="0" Width="184" CornerRadius="30" BlurRadius="20"> + DYE + </touch:TouchButton> + </StackPanel> + </Grid> + </DockPanel> + </Border> + + <Grid Background="{StaticResource TangoMidBackgroundBrush}"> + <Grid> + <keyboard:KeyboardView> + <controls:NavigationControl x:Name="NavigationControl" x:FieldModifier="public" TransitionAlwaysFades="False" TransitionType="Slide"> + <local:JobsView controls:NavigationControl.NavigationName="JobsView"></local:JobsView> + </controls:NavigationControl> + </keyboard:KeyboardView> + </Grid> + </Grid> + </DockPanel> + </touch:TouchSideMenu> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LayoutView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs index 789386aca..e6c778a92 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LayoutView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs @@ -13,16 +13,19 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace Tango.PanelPC.UI.Views +namespace Tango.PPC.UI.Views { /// <summary> /// Interaction logic for LayoutView.xaml /// </summary> public partial class LayoutView : UserControl { + public static LayoutView Instance { get; private set; } + public LayoutView() { InitializeComponent(); + Instance = this; } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml new file mode 100644 index 000000000..d50c42f7c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml @@ -0,0 +1,18 @@ +<UserControl x:Class="Tango.PPC.UI.Views.LoadingView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" + xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" + xmlns:local="clr-namespace:Tango.PPC.UI.Views" + mc:Ignorable="d" + d:DesignHeight="1280" d:DesignWidth="720" Background="White" d:DataContext="{d:DesignInstance Type=vm:LoadingViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}"> + <Grid> + <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center"> + <touch:TouchBusyIndicator IsIndeterminate="True" Value="0" Width="200" Height="200" StrokeThickness="10"></touch:TouchBusyIndicator> + <TextBlock FontSize="20" Margin="20" HorizontalAlignment="Center">Loading...</TextBlock> + </StackPanel> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LoadingView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs index 612fe308b..a1214a0df 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LoadingView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs @@ -13,7 +13,7 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace Tango.PanelPC.UI.Views +namespace Tango.PPC.UI.Views { /// <summary> /// Interaction logic for LoadingView.xaml diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml new file mode 100644 index 000000000..9d264afae --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml @@ -0,0 +1,18 @@ +<UserControl x:Class="Tango.PPC.UI.Views.MainView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" + xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:local="clr-namespace:Tango.PPC.UI.Views" + mc:Ignorable="d" + d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + <Grid> + <controls:NavigationControl TransitionAlwaysFades="True" TransitionType="Zoom" x:Name="NavigationControl" x:FieldModifier="public"> + <local:LoadingView controls:NavigationControl.NavigationName="LoadingView"></local:LoadingView> + <local:LayoutView controls:NavigationControl.NavigationName="LayoutView"></local:LayoutView> + </controls:NavigationControl> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml.cs index 581a4e774..cd7562d04 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml.cs @@ -13,16 +13,19 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; -namespace Tango.PanelPC.UI.Views +namespace Tango.PPC.UI.Views { /// <summary> /// Interaction logic for MainView.xaml /// </summary> public partial class MainView : UserControl { + public static MainView Instance { get; private set; } + public MainView() { InitializeComponent(); + Instance = this; } } } diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/packages.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config index e2e2bc482..e4617d73a 100644 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/packages.config +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config @@ -5,7 +5,4 @@ <package id="Expression.Blend.Sdk" version="1.0.2" targetFramework="net46" /> <package id="FontAwesome.WPF" version="4.7.0.9" targetFramework="net46" /> <package id="Google.Protobuf" version="3.4.1" targetFramework="net46" /> - <package id="MahApps.Metro" version="1.6.4" targetFramework="net46" /> - <package id="MaterialDesignColors" version="1.1.2" targetFramework="net46" /> - <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net46" /> </packages>
\ No newline at end of file diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.xaml.cs b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.xaml.cs deleted file mode 100644 index 69f8d217a..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/App.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Data; -using System.Linq; -using System.Threading.Tasks; -using System.Windows; - -namespace Tango.PanelPC.UI -{ - /// <summary> - /// Interaction logic for App.xaml - /// </summary> - public partial class App : Application - { - } -} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Navigation/DefaultNavigationManager.cs b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Navigation/DefaultNavigationManager.cs deleted file mode 100644 index 0ad28f8ab..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Navigation/DefaultNavigationManager.cs +++ /dev/null @@ -1,16 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.PanelPC.UI.Navigation -{ - public class DefaultNavigationManager : INavigationManager - { - public void NavigateTo(NavigationView view) - { - throw new NotImplementedException(); - } - } -} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/PanelPCApplication/DefaultPanelPCApplicationManager.cs b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/PanelPCApplication/DefaultPanelPCApplicationManager.cs deleted file mode 100644 index aa36bb9cd..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/PanelPCApplication/DefaultPanelPCApplicationManager.cs +++ /dev/null @@ -1,48 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.Integration.Operation; - -namespace Tango.PanelPC.UI.PanelPCApplication -{ - public class DefaultPanelPCApplicationManager : IPanelPCApplicationManager - { - public bool IsShuttingDown - { - get - { - throw new NotImplementedException(); - } - } - - public IMachineOperator ConnectedMachine - { - get - { - throw new NotImplementedException(); - } - - set - { - throw new NotImplementedException(); - } - } - - public string Version - { - get - { - throw new NotImplementedException(); - } - } - - public event EventHandler<IMachineOperator> ConnectedMachineChanged; - - public void ShutDown() - { - throw new NotImplementedException(); - } - } -} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/JobsViewVM.cs deleted file mode 100644 index 27a3f8a84..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/JobsViewVM.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.SharedUI; - -namespace Tango.PanelPC.UI.ViewModels -{ - public class JobsViewVM : ViewModel - { - private ObservableCollection<Job> _jobs; - public ObservableCollection<Job> Jobs - { - get { return _jobs; } - set { _jobs = value; RaisePropertyChangedAuto(); } - } - - public JobsViewVM() - { - Jobs = new ObservableCollection<Job>(); - - for (int i = 0; i < 50; i++) - { - Jobs.Add(new Job() - { - Name = "Job " + (i + 1), - Description = "Some Description..." - }); - } - } - } -} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/LoadingView.cs b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/LoadingView.cs deleted file mode 100644 index c1c9d1bb4..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/ViewModels/LoadingView.cs +++ /dev/null @@ -1,14 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.SharedUI; - -namespace Tango.PanelPC.UI.ViewModels -{ - public class LoadingView : ViewModel - { - - } -} diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/JobsView.xaml b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/JobsView.xaml deleted file mode 100644 index 358eba147..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/JobsView.xaml +++ /dev/null @@ -1,50 +0,0 @@ -<UserControl x:Class="Tango.PanelPC.UI.Views.JobsView" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:vm="clr-namespace:Tango.PanelPC.UI.ViewModels" - xmlns:global="clr-namespace:Tango.PanelPC.UI" - xmlns:keyboard="clr-namespace:Tango.SharedUI.Keyboard;assembly=Tango.SharedUI" - xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:entities="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" - xmlns:sys="clr-namespace:System;assembly=mscorlib" - xmlns:local="clr-namespace:Tango.PanelPC.UI.Views" - mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:JobsViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.JobsViewVM}"> - <Grid Background="{StaticResource TangoMidBackgroundBrush}"> - <Grid.RowDefinitions> - <RowDefinition Height="82"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - - <Border Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}"> - <Border.Effect> - <DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" /> - </Border.Effect> - <TextBlock VerticalAlignment="Center" Margin="20" FontSize="25" FontWeight="SemiBold">JOBS</TextBlock> - </Border> - - <Grid Grid.Row="1"> - <Grid.RowDefinitions> - <RowDefinition Height="100"/> - <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - - <touch:TouchNavigationLinks VerticalAlignment="Bottom" Margin="20" FontSize="18" FontWeight="SemiBold"> - <sys:String>READY TO DYE</sys:String> - <sys:String>NOT READY</sys:String> - <sys:String>ALL</sys:String> - </touch:TouchNavigationLinks> - - <Grid Grid.Row="1"> - <touch:TouchDataGrid ItemsSource="{Binding Jobs}" Margin="10" EnableDropShadow="True" ShadowColor="#ECECEC" AutoGenerateColumns="False" RowHeight="68" ColumnHeaderHeight="67"> - <touch:TouchDataGrid.Columns> - <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn> - <DataGridTextColumn Header="Description" Binding="{Binding Description}"></DataGridTextColumn> - </touch:TouchDataGrid.Columns> - </touch:TouchDataGrid> - </Grid> - </Grid> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LayoutView.xaml deleted file mode 100644 index a9cdc8a6c..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LayoutView.xaml +++ /dev/null @@ -1,119 +0,0 @@ -<UserControl x:Class="Tango.PanelPC.UI.Views.LayoutView" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:local="clr-namespace:Tango.PanelPC.UI.Views" - xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" - xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" - xmlns:vm="clr-namespace:Tango.PanelPC.UI.ViewModels" - xmlns:global="clr-namespace:Tango.PanelPC.UI" - xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" - xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" - xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" - mc:Ignorable="d" - d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:LayoutViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LayoutViewVM}"> - - <Grid> - <materialDesign:DrawerHost IsLeftDrawerOpen="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked}"> - <materialDesign:DrawerHost.LeftDrawerContent> - <DockPanel LastChildFill="False"> - <StackPanel MinWidth="300" DockPanel.Dock="Top"> - <Grid> - <ToggleButton Style="{StaticResource MaterialDesignHamburgerToggleButton}" - HorizontalAlignment="Right" Margin="16" - IsChecked="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked, Mode=TwoWay}" /> - - <StackPanel Margin="5 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center"> - <Image Source="/Images/account.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image> - <StackPanel Margin="0 5 0 0"> - <TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock> - <TextBlock FontSize="12" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" Margin="10 5 0 0" VerticalAlignment="Center"> - <Run Text="{Binding AuthenticationProvider.CurrentUser.Organization.Name}"></Run> - , - <Run Text="{Binding AuthenticationProvider.CurrentUser.Roles[0].Name}"> - <Run.ToolTip> - <ItemsControl ItemsSource="{Binding AuthenticationProvider.CurrentUser.Roles}"> - <ItemsControl.ItemTemplate> - <DataTemplate> - <StackPanel Orientation="Horizontal" Margin="2"> - <materialDesign:PackIcon Kind="AccountKey" Width="16" Height="16" /> - <TextBlock Margin="5 0 0 0" Text="{Binding Name}"></TextBlock> - </StackPanel> - </DataTemplate> - </ItemsControl.ItemTemplate> - </ItemsControl> - </Run.ToolTip> - </Run> - <Run>...</Run> - </TextBlock> - </StackPanel> - </StackPanel> - </Grid> - <StackPanel Margin="0 16 0 0"> - <ListBoxItem> - <i:Interaction.Triggers> - <i:EventTrigger EventName="PreviewMouseUp"> - <i:InvokeCommandAction Command="{Binding HomeCommand}"></i:InvokeCommandAction> - </i:EventTrigger> - </i:Interaction.Triggers> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="Home" Width="32" Height="32"></materialDesign:PackIcon> - <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Home</TextBlock> - </StackPanel> - </ListBoxItem> - </StackPanel> - </StackPanel> - - <StackPanel DockPanel.Dock="Bottom"> - <Separator Margin="0 10 0 0" Background="Gainsboro" /> - <ListBoxItem> - <i:Interaction.Triggers> - <i:EventTrigger EventName="PreviewMouseUp"> - <i:InvokeCommandAction Command="{Binding SignoutCommand}"></i:InvokeCommandAction> - </i:EventTrigger> - </i:Interaction.Triggers> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon VerticalAlignment="Center" Kind="Logout" Width="32" Height="32"></materialDesign:PackIcon> - <TextBlock FontSize="16" VerticalAlignment="Center" Margin="10 0 0 0">Sign out</TextBlock> - </StackPanel> - </ListBoxItem> - </StackPanel> - </DockPanel> - </materialDesign:DrawerHost.LeftDrawerContent> - <DockPanel> - <materialDesign:ColorZone Height="96" materialDesign:ShadowAssist.ShadowDepth="Depth2" BorderThickness="0 0 0 1" BorderBrush="{StaticResource BorderColorBrush}" - Foreground="{StaticResource AccentColorBrush}" Background="{StaticResource WhiteColorBrush}" DockPanel.Dock="Top"> - <Border BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}"> - <DockPanel> - <Border Padding="20" BorderThickness="0 0 1 0" BorderBrush="{StaticResource BorderColorBrush}"> - <ToggleButton Width="50" Height="50" Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}" x:Name="MenuToggleButton"> - <ToggleButton.Effect> - <DropShadowEffect ShadowDepth="15" BlurRadius="20" Color="Silver" /> - </ToggleButton.Effect> - </ToggleButton> - </Border> - <Grid> - <StackPanel HorizontalAlignment="Right" Margin="30 0" Orientation="Horizontal"> - <touch:TouchButton Height="54" FontSize="20" Padding="0" Width="184" CornerRadius="30" BlurRadius="20"> - DYE - </touch:TouchButton> - </StackPanel> - </Grid> - </DockPanel> - </Border> - </materialDesign:ColorZone> - - <Grid Background="{StaticResource TangoMidBackgroundBrush}"> - <Grid> - <keyboard:KeyboardView> - <controls:NavigationControl x:Name="NavigationControl" x:FieldModifier="public" TransitionAlwaysFades="True" TransitionType="Zoom"> - <local:JobsView controls:NavigationControl.NavigationName="JobsView"></local:JobsView> - </controls:NavigationControl> - </keyboard:KeyboardView> - </Grid> - </Grid> - </DockPanel> - </materialDesign:DrawerHost> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LoadingView.xaml b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LoadingView.xaml deleted file mode 100644 index 05d57ecf7..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/LoadingView.xaml +++ /dev/null @@ -1,14 +0,0 @@ -<UserControl x:Class="Tango.PanelPC.UI.Views.LoadingView" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:vm="clr-namespace:Tango.PanelPC.UI.ViewModels" - xmlns:global="clr-namespace:Tango.PanelPC.UI" - xmlns:local="clr-namespace:Tango.PanelPC.UI.Views" - mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:LoadingView, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoadingView}"> - <Grid> - - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/MainView.xaml b/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/MainView.xaml deleted file mode 100644 index 8e46a4588..000000000 --- a/Software/Visual_Studio/PanelPC/Tango.PanelPC.UI/Views/MainView.xaml +++ /dev/null @@ -1,17 +0,0 @@ -<UserControl x:Class="Tango.PanelPC.UI.Views.MainView" - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" - xmlns:vm="clr-namespace:Tango.PanelPC.UI.ViewModels" - xmlns:global="clr-namespace:Tango.PanelPC.UI" - xmlns:local="clr-namespace:Tango.PanelPC.UI.Views" - mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - <Grid> - <controls:NavigationControl TransitionAlwaysFades="True" TransitionType="Zoom" x:Name="TransitionControl" x:FieldModifier="public"> - <local:LayoutView controls:NavigationControl.NavigationName="LayoutView"></local:LayoutView> - </controls:NavigationControl> - </Grid> -</UserControl> diff --git a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs index 6f37f4788..4a25f0e32 100644 --- a/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs +++ b/Software/Visual_Studio/Tango.BL/EntitiesExtensions/Segment.cs @@ -7,6 +7,8 @@ using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; namespace Tango.BL.Entities { @@ -86,5 +88,23 @@ namespace Tango.BL.Entities BrushStops.Clear(); base.DefferedDelete(context); } + + public LinearGradientBrush GetSegmentBrush() + { + GradientStopCollection stops = new GradientStopCollection(); + + foreach (var stop in BrushStops.OrderBy(x => x.StopIndex)) + { + stops.Add(new GradientStop(stop.Color, stop.OffsetPercent / 100d)); + } + + LinearGradientBrush brush = new LinearGradientBrush(); + brush.StartPoint = new Point(0, 0); + brush.EndPoint = new Point(1, 0); + + brush.GradientStops = stops; + + return brush; + } } } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs index 83c8ab69b..2eed3056e 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContextExtension.cs @@ -45,7 +45,7 @@ namespace Tango.BL } else { - return String.Format("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFileName={0};Initial Catalog=TestDatabase;Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework", source); + return String.Format("Data Source=(LocalDB)\\MSSQLLocalDB;AttachDbFileName={0};Initial Catalog=Tango;Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework", Path.GetFullPath(source)); } } } diff --git a/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs b/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs index b6ee79324..4a344ebc9 100644 --- a/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs +++ b/Software/Visual_Studio/Tango.Core/DI/TangoIOC.cs @@ -329,7 +329,7 @@ namespace Tango.Core.DI /// <returns></returns> public virtual IEnumerable<object> GetAllInstancesByBase(Type baseType) { - return _registeredTypes.Where(x => baseType.IsAssignableFrom(x.Key)).Select(x => x.Value.Instance); + return _registeredTypes.Where(x => baseType.IsAssignableFrom(x.Key)).Select(x => x.Value.Instance != null ? x.Value.Instance : CreateInstance(x.Value.ImplementationType)); } } } diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUTCToShortDateConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUTCToShortDateConverter.cs new file mode 100644 index 000000000..b8f4666cf --- /dev/null +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/DateTimeUTCToShortDateConverter.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; + +namespace Tango.SharedUI.Converters +{ + public class DateTimeUTCToShortDateConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value != null) + { + DateTime date = (DateTime)value; + return date.ToLocalTime().ToShortDateString(); + } + else + { + return null; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj index 1f05d3ed6..35b9a61e4 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj +++ b/Software/Visual_Studio/Tango.SharedUI/Tango.SharedUI.csproj @@ -84,6 +84,7 @@ <Compile Include="Converters\ColorComponentToOpacityConverter.cs" /> <Compile Include="Converters\ColorToComponentsConverter.cs" /> <Compile Include="Converters\ColorToIntegerConverter.cs" /> + <Compile Include="Converters\DateTimeUTCToShortDateConverter.cs" /> <Compile Include="Converters\DateTimeUTCToShortDateTimeConverter.cs" /> <Compile Include="Converters\DateTimeUTCToStringConverter.cs" /> <Compile Include="Converters\DoubleToIntConverter.cs" /> diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.cs new file mode 100644 index 000000000..eb3ceb85c --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Touch.Controls +{ + public class TouchBusyIndicator : ProgressBar + { + public double StrokeThickness + { + get { return (double)GetValue(StrokeThicknessProperty); } + set { SetValue(StrokeThicknessProperty, value); } + } + public static readonly DependencyProperty StrokeThicknessProperty = + DependencyProperty.Register("StrokeThickness", typeof(double), typeof(TouchBusyIndicator), new PropertyMetadata(3.0)); + + static TouchBusyIndicator() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchBusyIndicator), new FrameworkPropertyMetadata(typeof(TouchBusyIndicator))); + } + } +} diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.xaml new file mode 100644 index 000000000..fa6a83d50 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchBusyIndicator.xaml @@ -0,0 +1,140 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="clr-namespace:Tango.Touch.Converters" + xmlns:local="clr-namespace:Tango.Touch.Controls"> + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary> + <converters:ArcEndPointConverter x:Key="ArcEndPointConverter" /> + <converters:ArcSizeConverter x:Key="ArcSizeConverter" /> + <converters:RotateTransformCentreConverter x:Key="RotateTransformCentreConverter" /> + <converters:NotZeroConverter x:Key="NotZeroConverter" /> + <converters:RotateTransformConverter x:Key="RotateTransformConverter" /> + <converters:StartPointConverter x:Key="StartPointConverter" /> + <converters:LargeArcConverter x:Key="LargeArcConverter" /> + </ResourceDictionary> + + <ResourceDictionary Source="../Resources/Colors.xaml" /> + </ResourceDictionary.MergedDictionaries> + + + <Style TargetType="{x:Type local:TouchBusyIndicator}"> + <Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}" /> + <Setter Property="Background" Value="Transparent" /> + <Setter Property="Width" Value="20" /> + <Setter Property="Height" Value="20" /> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:TouchBusyIndicator}"> + <ControlTemplate.Resources> + <Storyboard x:Key="IsIndeterminateStoryboard" TargetName="RotateTransform" TargetProperty="Angle" RepeatBehavior="Forever"> + <DoubleAnimation From="0" To="359" Duration="0:0:2" /> + </Storyboard> + <Storyboard x:Key="IsFullyIndeterminateScaleStoryboard"> + <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FullyIndeterminateGridScaleTransform" + Storyboard.TargetProperty="ScaleX" + RepeatBehavior="Forever"> + <SplineDoubleKeyFrame KeyTime="0" Value="0.0" /> + <SplineDoubleKeyFrame KeyTime="0:0:1" Value="1.0" /> + <SplineDoubleKeyFrame KeyTime="0:0:4" Value="0.0" /> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimation Storyboard.TargetName="RotateTransform" + Storyboard.TargetProperty="Angle" + RepeatBehavior="Forever" + From="00" To="359" Duration="0:0:1.25" /> + </Storyboard> + </ControlTemplate.Resources> + <Grid x:Name="TemplateRoot" ClipToBounds="False"> + <Grid x:Name="FullyIndeterminateGrid"> + <Grid.RenderTransform> + <ScaleTransform x:Name="FullyIndeterminateGridScaleTransform" ScaleX="0" /> + </Grid.RenderTransform> + </Grid> + <Grid x:Name="PathGrid" Margin="2" /> + <Canvas> + <Ellipse Fill="{TemplateBinding Background}" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" /> + <Path x:Name="Path" Stroke="{TemplateBinding Foreground}" StrokeThickness="{Binding RelativeSource={RelativeSource TemplatedParent},Path=StrokeThickness}" + Canvas.Top="2" Canvas.Left="2" + RenderTransformOrigin="0, 0"> + <Path.Data> + <PathGeometry> + <PathFigure StartPoint="{Binding ElementName=PathGrid, Path=ActualWidth, Converter={StaticResource StartPointConverter}, Mode=OneWay}"> + <ArcSegment Size="{Binding ElementName=PathGrid, Path=ActualWidth, Converter={StaticResource ArcSizeConverter}, Mode=OneWay}" + SweepDirection="Clockwise"> + <ArcSegment.IsLargeArc> + <MultiBinding Converter="{StaticResource LargeArcConverter}"> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Value" /> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Minimum" /> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Maximum" /> + <Binding ElementName="FullyIndeterminateGridScaleTransform" Path="ScaleX" /> + </MultiBinding> + </ArcSegment.IsLargeArc> + <ArcSegment.Point> + <MultiBinding Converter="{StaticResource ArcEndPointConverter}"> + <Binding ElementName="PathGrid" Path="ActualWidth" /> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Value" /> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Minimum" /> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Maximum" /> + <Binding ElementName="FullyIndeterminateGridScaleTransform" Path="ScaleX" /> + </MultiBinding> + </ArcSegment.Point> + </ArcSegment> + </PathFigure> + </PathGeometry> + </Path.Data> + <Path.RenderTransform> + <TransformGroup> + <RotateTransform x:Name="RotateTransform" + CenterX="{Binding ElementName=PathGrid, Path=ActualWidth, Converter={StaticResource RotateTransformCentreConverter}, Mode=OneWay}" + CenterY="{Binding ElementName=PathGrid, Path=ActualWidth, Converter={StaticResource RotateTransformCentreConverter}, Mode=OneWay}"> + <RotateTransform.Angle> + <MultiBinding Converter="{StaticResource RotateTransformConverter}"> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Value" /> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Minimum" /> + <Binding RelativeSource="{RelativeSource TemplatedParent}" Path="Maximum" /> + </MultiBinding> + </RotateTransform.Angle> + </RotateTransform> + </TransformGroup> + </Path.RenderTransform> + </Path> + </Canvas> + </Grid> + <ControlTemplate.Triggers> + <MultiDataTrigger> + <MultiDataTrigger.Conditions> + <Condition Binding="{Binding IsIndeterminate, RelativeSource={RelativeSource Self}}" Value="True" /> + <Condition Binding="{Binding IsVisible, RelativeSource={RelativeSource Self}}" Value="True" /> + <Condition Binding="{Binding Value, RelativeSource={RelativeSource Self}, Converter={StaticResource NotZeroConverter}}" Value="True" /> + </MultiDataTrigger.Conditions> + <MultiDataTrigger.EnterActions> + <RemoveStoryboard BeginStoryboardName="IsFullyIndeterminateStoryboard" /> + <BeginStoryboard Storyboard="{StaticResource IsIndeterminateStoryboard}" + Name="IsIndeterminateStoryboard"/> + </MultiDataTrigger.EnterActions> + <MultiDataTrigger.ExitActions> + <RemoveStoryboard BeginStoryboardName="IsIndeterminateStoryboard" /> + </MultiDataTrigger.ExitActions> + </MultiDataTrigger> + <MultiTrigger> + <MultiTrigger.Conditions> + <Condition Property="IsIndeterminate" Value="True" /> + <Condition Property="Value" Value="0" /> + <Condition Property="IsVisible" Value="True" /> + </MultiTrigger.Conditions> + <MultiTrigger.EnterActions> + <RemoveStoryboard BeginStoryboardName="IsIndeterminateStoryboard" /> + <BeginStoryboard Storyboard="{StaticResource IsFullyIndeterminateScaleStoryboard}" + Name="IsFullyIndeterminateStoryboard"/> + </MultiTrigger.EnterActions> + <MultiTrigger.ExitActions> + <RemoveStoryboard BeginStoryboardName="IsFullyIndeterminateStoryboard" /> + </MultiTrigger.ExitActions> + </MultiTrigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs index f1009d579..1974a9156 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchButton.cs @@ -55,6 +55,12 @@ namespace Tango.Touch.Controls #endregion + public TouchButton() + { + + } + + static TouchButton() { DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchButton), new FrameworkPropertyMetadata(typeof(TouchButton))); diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml index 2cf2fbbb2..454171eb8 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchDataGrid.xaml @@ -7,6 +7,7 @@ <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="../Resources/Colors.xaml" /> + <ResourceDictionary Source="../Resources/Fonts.xaml" /> <ResourceDictionary Source="../Controls/Shared.xaml" /> </ResourceDictionary.MergedDictionaries> @@ -33,6 +34,7 @@ <Style TargetType="{x:Type DataGridColumnHeader}"> <Setter Property="VerticalContentAlignment" Value="Center"/> <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"></Setter> + <Setter Property="FontSize" Value="{StaticResource TangoColumnHeaderFontSize}"></Setter> <Setter Property="FontWeight" Value="SemiBold"></Setter> <Setter Property="Template"> <Setter.Value> diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs index 504b97d9c..bc1a63124 100644 --- a/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchNavigationLinks.cs @@ -52,17 +52,17 @@ namespace Tango.Touch.Controls { var container = ItemContainerGenerator.ContainerFromItem(SelectedItem) as FrameworkElement; - ContentPresenter presenter = UIHelper.FindChild<ContentPresenter>(container); + ContentPresenter presenter = UIHelper.FindChild<ContentPresenter>(container).FindChild<ContentPresenter>(); if (presenter != null) { Point relativePoint = presenter.TransformToAncestor(this).Transform(new Point(0, 0)); - Size size = presenter.RenderSize; + double width = presenter.ActualWidth; if (_lastSelectedItem != null && Items.IndexOf(SelectedItem) > Items.IndexOf(_lastSelectedItem)) { DoubleAnimation aniX2 = new DoubleAnimation(); - aniX2.To = relativePoint.X + size.Width; + aniX2.To = relativePoint.X + width; aniX2.Duration = TimeSpan.FromSeconds(0.2); _line.BeginAnimation(Line.X2Property, aniX2); @@ -80,7 +80,7 @@ namespace Tango.Touch.Controls _line.BeginAnimation(Line.X1Property, aniX1); DoubleAnimation aniX2 = new DoubleAnimation(); - aniX2.To = relativePoint.X + size.Width; + aniX2.To = relativePoint.X + width; aniX2.BeginTime = TimeSpan.FromSeconds(0.2); aniX2.Duration = TimeSpan.FromSeconds(0.1); _line.BeginAnimation(Line.X2Property, aniX2); diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchSideMenu.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchSideMenu.cs new file mode 100644 index 000000000..3f94b2a4a --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchSideMenu.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Markup; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Touch.Controls +{ + [ContentProperty(nameof(Content))] + public class TouchSideMenu : Control + { + public FrameworkElement Content + { + get { return (FrameworkElement)GetValue(ContentProperty); } + set { SetValue(ContentProperty, value); } + } + public static readonly DependencyProperty ContentProperty = + DependencyProperty.Register("Content", typeof(FrameworkElement), typeof(TouchSideMenu), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.AffectsRender,(d,e) => (d as TouchSideMenu).OnContentChanged())); + + public FrameworkElement MenuContent + { + get { return (FrameworkElement)GetValue(MenuContentProperty); } + set { SetValue(MenuContentProperty, value); } + } + public static readonly DependencyProperty MenuContentProperty = + DependencyProperty.Register("MenuContent", typeof(FrameworkElement), typeof(TouchSideMenu), new PropertyMetadata(null,(d,e) => (d as TouchSideMenu).OnMenuContentChanged())); + + public bool IsOpened + { + get { return (bool)GetValue(IsOpenedProperty); } + set { SetValue(IsOpenedProperty, value); } + } + public static readonly DependencyProperty IsOpenedProperty = + DependencyProperty.Register("IsOpened", typeof(bool), typeof(TouchSideMenu), new PropertyMetadata(false)); + + static TouchSideMenu() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchSideMenu), new FrameworkPropertyMetadata(typeof(TouchSideMenu))); + } + + private void OnContentChanged() + { + RemoveLogicalChild(Content); + AddLogicalChild(Content); + } + + private void OnMenuContentChanged() + { + RemoveLogicalChild(MenuContent); + AddLogicalChild(MenuContent); + } + } +} diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchSideMenu.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchSideMenu.xaml new file mode 100644 index 000000000..309a317b9 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchSideMenu.xaml @@ -0,0 +1,68 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:local="clr-namespace:Tango.Touch.Controls"> + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary> + <converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> + </ResourceDictionary> + </ResourceDictionary.MergedDictionaries> + + <Style TargetType="{x:Type local:TouchSideMenu}"> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:TouchSideMenu}"> + <Border Background="{TemplateBinding Background}" + BorderBrush="{TemplateBinding BorderBrush}" + BorderThickness="{TemplateBinding BorderThickness}"> + + <Grid> + + <!--Main Content--> + <ContentControl Content="{TemplateBinding Content}"/> + + <!--Menu Opened Mask--> + <Border Background="#83000000" IsHitTestVisible="True" Visibility="{TemplateBinding IsOpened,Converter={StaticResource BooleanToVisibilityConverter}}"> + <ToggleButton Style="{x:Null}" Opacity="0" IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsOpened}" /> + </Border> + + <!--Menu Content--> + <ContentControl Content="{TemplateBinding MenuContent}" HorizontalAlignment="Left"> + <ContentControl.Style> + <Style TargetType="ContentControl"> + <Setter Property="RenderTransform"> + <Setter.Value> + <ScaleTransform ScaleY="1" ScaleX="0"></ScaleTransform> + </Setter.Value> + </Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent},Path=IsOpened}" Value="True"> + <DataTrigger.EnterActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.EnterActions> + <DataTrigger.ExitActions> + <BeginStoryboard> + <Storyboard> + <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0" Duration="00:00:0.2" /> + </Storyboard> + </BeginStoryboard> + </DataTrigger.ExitActions> + </DataTrigger> + </Style.Triggers> + </Style> + </ContentControl.Style> + </ContentControl> + </Grid> + + </Border> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleButton.cs b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleButton.cs new file mode 100644 index 000000000..bc4e6994f --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleButton.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Controls.Primitives; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.Touch.Controls +{ + public class TouchToggleButton : ToggleButton, ITouchControl + { + private Object _uncheckedContent; + + #region ITouchControl + + public CornerRadius CornerRadius + { + get { return (CornerRadius)GetValue(CornerRadiusProperty); } + set { SetValue(CornerRadiusProperty, value); } + } + public static readonly DependencyProperty CornerRadiusProperty = + DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(TouchToggleButton), new PropertyMetadata(new CornerRadius())); + + public bool EnableDropShadow + { + get { return (bool)GetValue(EnableDropShadowProperty); } + set { SetValue(EnableDropShadowProperty, value); } + } + public static readonly DependencyProperty EnableDropShadowProperty = + DependencyProperty.Register("EnableDropShadow", typeof(bool), typeof(TouchToggleButton), new PropertyMetadata(true)); + + public double BlurRadius + { + get { return (double)GetValue(BlurRadiusProperty); } + set { SetValue(BlurRadiusProperty, value); } + } + public static readonly DependencyProperty BlurRadiusProperty = + DependencyProperty.Register("BlurRadius", typeof(double), typeof(TouchToggleButton), new PropertyMetadata(10.0)); + + public double ShadowDepth + { + get { return (double)GetValue(ShadowDepthProperty); } + set { SetValue(ShadowDepthProperty, value); } + } + public static readonly DependencyProperty ShadowDepthProperty = + DependencyProperty.Register("ShadowDepth", typeof(double), typeof(TouchToggleButton), new PropertyMetadata(1.0)); + + public Color ShadowColor + { + get { return (Color)GetValue(ShadowColorProperty); } + set { SetValue(ShadowColorProperty, value); } + } + public static readonly DependencyProperty ShadowColorProperty = + DependencyProperty.Register("ShadowColor", typeof(Color), typeof(TouchToggleButton), new PropertyMetadata(Colors.Gray)); + + #endregion + + public Object CheckedContent + { + get { return (Object)GetValue(CheckedContentProperty); } + set { SetValue(CheckedContentProperty, value); } + } + public static readonly DependencyProperty CheckedContentProperty = + DependencyProperty.Register("CheckedContent", typeof(Object), typeof(TouchToggleButton), new PropertyMetadata(null)); + + static TouchToggleButton() + { + DefaultStyleKeyProperty.OverrideMetadata(typeof(TouchToggleButton), new FrameworkPropertyMetadata(typeof(TouchToggleButton))); + } + + public TouchToggleButton() + { + Loaded += (_, __) => _uncheckedContent = Content; + Checked += (_, __) => Content = CheckedContent != null ? CheckedContent : Content; + Unchecked += (_, __) => Content = _uncheckedContent; + } + } +} diff --git a/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleButton.xaml b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleButton.xaml new file mode 100644 index 000000000..d7e7e611c --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Controls/TouchToggleButton.xaml @@ -0,0 +1,40 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:components="clr-namespace:Tango.Touch.Components" + xmlns:local="clr-namespace:Tango.Touch.Controls"> + + <ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="../Resources/Colors.xaml" /> + <ResourceDictionary Source="../Controls/Shared.xaml" /> + </ResourceDictionary.MergedDictionaries> + + <Style TargetType="{x:Type local:TouchToggleButton}"> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="Background" Value="{StaticResource TangoPrimaryAccentBrush}"/> + <Setter Property="Foreground" Value="{StaticResource TangoLightForegroundBrush}"/> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"></Setter> + <Setter Property="HorizontalContentAlignment" Value="Center"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="Padding" Value="0"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type local:TouchToggleButton}"> + <Border x:Name="border" Style="{StaticResource DropShadowBorder}" BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true"> + <components:Ripple CornerRadius="{TemplateBinding CornerRadius}"> + <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/> + </components:Ripple> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="IsEnabled" Value="false"> + <Setter Property="Background" TargetName="border" Value="{StaticResource TangoDisabledBackgroundBrush}"/> + <Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TangoDisabledBackgroundBrush}"/> + <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource TangoDisabledForegroundBrush}"/> + </Trigger> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Converters/ArcEndPointConverter.cs b/Software/Visual_Studio/Tango.Touch/Converters/ArcEndPointConverter.cs new file mode 100644 index 000000000..b5bbfa7de --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/ArcEndPointConverter.cs @@ -0,0 +1,47 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Tango.Touch.Converters +{ + public class ArcEndPointConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + var actualWidth = values[0].ExtractDouble(); + var value = values[1].ExtractDouble(); + var minimum = values[2].ExtractDouble(); + var maximum = values[3].ExtractDouble(); + + if (new[] {actualWidth, value, minimum, maximum}.AnyNan()) + return Binding.DoNothing; + + if (values.Length == 5) + { + var fullIndeterminateScaling = values[4].ExtractDouble(); + if (!double.IsNaN(fullIndeterminateScaling) && fullIndeterminateScaling > 0.0) + { + value = (maximum - minimum)*fullIndeterminateScaling; + } + } + + var percent = maximum <= minimum ? 1.0 : (value - minimum)/(maximum - minimum); + var degrees = 360*percent; + var radians = degrees*(Math.PI/180); + + var centre = new Point(actualWidth/2, actualWidth/2); + var hypotenuseRadius = (actualWidth/2); + + var adjacent = Math.Cos(radians)*hypotenuseRadius; + var opposite = Math.Sin(radians)*hypotenuseRadius; + + return new Point(centre.X + opposite, centre.Y - adjacent); + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Converters/ArcSizeConverter.cs b/Software/Visual_Studio/Tango.Touch/Converters/ArcSizeConverter.cs new file mode 100644 index 000000000..8bc90b03a --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/ArcSizeConverter.cs @@ -0,0 +1,25 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Tango.Touch.Converters +{ + public class ArcSizeConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is double && ((double)value > 0.0)) + { + return new Size((double)value / 2, (double)value / 2); + } + + return new Point(); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return Binding.DoNothing; + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Converters/LargeArcConverter.cs b/Software/Visual_Studio/Tango.Touch/Converters/LargeArcConverter.cs new file mode 100644 index 000000000..6ce52afb2 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/LargeArcConverter.cs @@ -0,0 +1,37 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Tango.Touch.Converters +{ + public class LargeArcConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + var value = values[0].ExtractDouble(); + var minimum = values[1].ExtractDouble(); + var maximum = values[2].ExtractDouble(); + + if (new[] { value, minimum, maximum }.AnyNan()) + return Binding.DoNothing; + + if (values.Length == 4) + { + var fullIndeterminateScaling = values[3].ExtractDouble(); + if (!double.IsNaN(fullIndeterminateScaling) && fullIndeterminateScaling > 0.0) + { + value = (maximum - minimum) * fullIndeterminateScaling; + } + } + + var percent = maximum <= minimum ? 1.0 : (value - minimum) / (maximum - minimum); + + return percent > 0.5; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Converters/LocalEx.cs b/Software/Visual_Studio/Tango.Touch/Converters/LocalEx.cs new file mode 100644 index 000000000..d559ae296 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/LocalEx.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.Touch.Converters +{ + internal static class LocalEx + { + public static double ExtractDouble(this object val) + { + var d = val as double? ?? double.NaN; + return double.IsInfinity(d) ? double.NaN : d; + } + + + public static bool AnyNan(this IEnumerable<double> vals) + { + return vals.Any(double.IsNaN); + } + } +} diff --git a/Software/Visual_Studio/Tango.Touch/Converters/NotZeroConverter.cs b/Software/Visual_Studio/Tango.Touch/Converters/NotZeroConverter.cs new file mode 100644 index 000000000..2c206fd9a --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/NotZeroConverter.cs @@ -0,0 +1,23 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Tango.Touch.Converters +{ + public class NotZeroConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (double.TryParse((value ?? "").ToString(), out double val)) + { + return Math.Abs(val) > 0.0; + } + return null; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return Binding.DoNothing; + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Converters/RotateTransformCentreConverter.cs b/Software/Visual_Studio/Tango.Touch/Converters/RotateTransformCentreConverter.cs new file mode 100644 index 000000000..63348117e --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/RotateTransformCentreConverter.cs @@ -0,0 +1,20 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Tango.Touch.Converters +{ + public class RotateTransformCentreConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + //value == actual width + return (double) value/2; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return Binding.DoNothing; + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Converters/RotateTransformConverter.cs b/Software/Visual_Studio/Tango.Touch/Converters/RotateTransformConverter.cs new file mode 100644 index 000000000..ad1155f99 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/RotateTransformConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace Tango.Touch.Converters +{ + public class RotateTransformConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + var value = values[0].ExtractDouble(); + var minimum = values[1].ExtractDouble(); + var maximum = values[2].ExtractDouble(); + + if (new[] { value, minimum, maximum }.AnyNan()) + return Binding.DoNothing; + + var percent = maximum <= minimum ? 1.0 : (value - minimum) / (maximum - minimum); + + return 360*percent; + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Converters/StartPointConverter.cs b/Software/Visual_Studio/Tango.Touch/Converters/StartPointConverter.cs new file mode 100644 index 000000000..5b51065a3 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Converters/StartPointConverter.cs @@ -0,0 +1,28 @@ +using System; +using System.Globalization; +using System.Windows; +using System.Windows.Data; + +namespace Tango.Touch.Converters +{ + public class StartPointConverter : IValueConverter + { + [Obsolete] + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is double && ((double) value > 0.0)) + { + return new Point((double)value / 2, 0); + } + + return new Point(); + } + + [Obsolete] + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return Binding.DoNothing; + } + + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml index 95f884aac..7b3886e4e 100644 --- a/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml +++ b/Software/Visual_Studio/Tango.Touch/Resources/Colors.xaml @@ -8,7 +8,7 @@ <Color x:Key="TangoPrimaryAccentColor">#1c63ea</Color> <Color x:Key="TangoMidAccentColor">#4e556f</Color> - <Color x:Key="TangoLowAccentColor">#62687f</Color> + <Color x:Key="TangoLowAccentColor">#555B76</Color> <Color x:Key="TangoLowerAccentColor">#525971</Color> <Color x:Key="TangoDarkForegroundColor">#2f2f2f</Color> @@ -23,6 +23,8 @@ <Color x:Key="RippleLightColor">#6EFFFFFF</Color> <Color x:Key="RippleDarkColor">#6E000000</Color> + <Color x:Key="TangoColumnDividerColor">#464d67</Color> + <!--Brushes--> <SolidColorBrush x:Key="TangoPrimaryBackgroundBrush" Color="{StaticResource TangoPrimaryBackgroundColor}"></SolidColorBrush> <SolidColorBrush x:Key="TangoMidBackgroundBrush" Color="{StaticResource TangoMidBackgroundColor}"></SolidColorBrush> @@ -44,4 +46,6 @@ <SolidColorBrush x:Key="RippleLightBrush" Color="{StaticResource RippleLightColor}"></SolidColorBrush> <SolidColorBrush x:Key="RippleDarkBrush" Color="{StaticResource RippleDarkColor}"></SolidColorBrush> + <SolidColorBrush x:Key="TangoColumnDividerBrush" Color="{StaticResource TangoColumnDividerColor}"></SolidColorBrush> + </ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml new file mode 100644 index 000000000..1935c29f2 --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Resources/Fonts.xaml @@ -0,0 +1,9 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:sys="clr-namespace:System;assembly=mscorlib" + xmlns:local="clr-namespace:Tango.Touch.Resources"> + + <sys:Double x:Key="TangoColumnHeaderFontSize">13</sys:Double> + + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml b/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml new file mode 100644 index 000000000..36d5e73db --- /dev/null +++ b/Software/Visual_Studio/Tango.Touch/Styles/TouchToggleButton.xaml @@ -0,0 +1,197 @@ +<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:controls="clr-namespace:Tango.Touch.Controls" + xmlns:components="clr-namespace:Tango.Touch.Components" + xmlns:local="clr-namespace:Tango.Touch.Styles"> + + <Style x:Key="TouchToggleButtonHamburger" TargetType="{x:Type controls:TouchToggleButton}"> + <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/> + <Setter Property="Background" Value="Transparent" /> + <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/> + <Setter Property="BorderThickness" Value="1"/> + <Setter Property="HorizontalContentAlignment" Value="Center"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="CornerRadius" Value="50"></Setter> + <Setter Property="Width" Value="37" /> + <Setter Property="Height" Value="37" /> + <Setter Property="Padding" Value="1"/> + <Setter Property="Template"> + <Setter.Value> + <ControlTemplate TargetType="{x:Type controls:TouchToggleButton}"> + <Border Background="{TemplateBinding Property=Background}"> + <VisualStateManager.VisualStateGroups> + <VisualStateGroup x:Name="CommonStates"> + <VisualState Name="Normal"/> + <VisualState Name="Disabled"> + <Storyboard> + <DoubleAnimation Duration="0" To="0.23" Storyboard.TargetProperty="(UIElement.Opacity)" /> + </Storyboard> + </VisualState> + </VisualStateGroup> + <VisualStateGroup x:Name="CheckStates"> + <VisualStateGroup.Transitions> + <VisualTransition From="*" To="Checked"> + <Storyboard> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="45"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.581"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="4.875"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1.875"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-45"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.581"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="4.832"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-2.082"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle1"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.889"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle1"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-1"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="canvas"> + <EasingDoubleKeyFrame KeyTime="0" Value="0"/> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-180"/> + </DoubleAnimationUsingKeyFrames> + </Storyboard> + </VisualTransition> + <VisualTransition From="Checked" To="Unchecked"> + <Storyboard> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle2"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle1"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle1"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="canvas"> + <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/> + </DoubleAnimationUsingKeyFrames> + </Storyboard> + </VisualTransition> + </VisualStateGroup.Transitions> + <VisualState x:Name="Checked"> + <Storyboard> + <DoubleAnimation Duration="0" To="45" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="0.581" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="4.875" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="1.875" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="-45" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="0.581" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="4.832" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="-2.082" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="0.889" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle1" /> + <DoubleAnimation Duration="0" To="-1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle1" /> + <DoubleAnimation Duration="0" To="-180" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="canvas" /> + </Storyboard> + </VisualState> + <VisualState x:Name="Unchecked"> + <Storyboard> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle" /> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="rectangle2" /> + <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" Storyboard.TargetName="rectangle1" /> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="rectangle1" /> + <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="canvas" /> + </Storyboard> + </VisualState> + </VisualStateGroup> + </VisualStateManager.VisualStateGroups> + <components:Ripple CornerRadius="{TemplateBinding CornerRadius}"> + <Viewbox> + <Canvas x:Name="canvas" Width="24" Height="24" RenderTransformOrigin="0.5,0.5"> + <Canvas.RenderTransform> + <TransformGroup> + <ScaleTransform/> + <SkewTransform/> + <RotateTransform/> + <TranslateTransform/> + </TransformGroup> + </Canvas.RenderTransform> + <Rectangle x:Name="rectangle" Fill="{TemplateBinding Foreground}" Height="2" Canvas.Left="3" RadiusY="0" RadiusX="0" Canvas.Top="6" Width="18" RenderTransformOrigin="0.5,0.5" + > + <Rectangle.RenderTransform> + <TransformGroup> + <ScaleTransform/> + <SkewTransform/> + <RotateTransform/> + <TranslateTransform/> + </TransformGroup> + </Rectangle.RenderTransform> + </Rectangle> + <Rectangle x:Name="rectangle1" Fill="{TemplateBinding Foreground}" Height="2" Canvas.Left="3" RadiusY="0" RadiusX="0" Canvas.Top="11" Width="18" RenderTransformOrigin="0.5,0.5" + > + <Rectangle.RenderTransform> + <TransformGroup> + <ScaleTransform/> + <SkewTransform/> + <RotateTransform/> + <TranslateTransform/> + </TransformGroup> + </Rectangle.RenderTransform> + </Rectangle> + <Rectangle x:Name="rectangle2" Fill="{TemplateBinding Foreground}" Height="2" Canvas.Left="3" RadiusY="0" RadiusX="0" Canvas.Top="16" Width="18" RenderTransformOrigin="0.5,0.5" + > + <Rectangle.RenderTransform> + <TransformGroup> + <ScaleTransform/> + <SkewTransform/> + <RotateTransform/> + <TranslateTransform/> + </TransformGroup> + </Rectangle.RenderTransform> + </Rectangle> + </Canvas> + </Viewbox> + </components:Ripple> + </Border> + <ControlTemplate.Triggers> + <Trigger Property="Button.IsDefaulted" Value="true"/> + </ControlTemplate.Triggers> + </ControlTemplate> + </Setter.Value> + </Setter> + </Style> + +</ResourceDictionary>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj index 478d6a52f..547c90cc8 100644 --- a/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj +++ b/Software/Visual_Studio/Tango.Touch/Tango.Touch.csproj @@ -64,6 +64,10 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Controls\TouchBusyIndicator.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Controls\TouchNavigationLinks.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -80,6 +84,14 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Controls\TouchSideMenu.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Controls\TouchToggleButton.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Keyboard\KeyboardView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -92,6 +104,14 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Resources\Fonts.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> + <Page Include="Styles\TouchToggleButton.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Themes\Generic.xaml"> <Generator>MSBuild:Compile</Generator> <SubType>Designer</SubType> @@ -101,10 +121,21 @@ </Compile> <Compile Include="Components\Ripple.cs" /> <Compile Include="Controls\ITouchControl.cs" /> + <Compile Include="Controls\TouchBusyIndicator.cs" /> <Compile Include="Controls\TouchNavigationLinks.cs" /> <Compile Include="Controls\TouchButton.cs" /> <Compile Include="Controls\TouchDataGrid.cs" /> + <Compile Include="Controls\TouchSideMenu.cs" /> + <Compile Include="Controls\TouchToggleButton.cs" /> + <Compile Include="Converters\ArcEndPointConverter.cs" /> + <Compile Include="Converters\ArcSizeConverter.cs" /> + <Compile Include="Converters\LargeArcConverter.cs" /> + <Compile Include="Converters\LocalEx.cs" /> + <Compile Include="Converters\NotZeroConverter.cs" /> + <Compile Include="Converters\RotateTransformCentreConverter.cs" /> + <Compile Include="Converters\RotateTransformConverter.cs" /> <Compile Include="Converters\SizeToRectConverter.cs" /> + <Compile Include="Converters\StartPointConverter.cs" /> <Compile Include="Keyboard\CapsLockMode.cs" /> <Compile Include="Keyboard\KeyboardActionKeyMode.cs" /> <Compile Include="Keyboard\KeyboardDefinition.cs" /> diff --git a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml index 425abd0ab..d31d7d550 100644 --- a/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml +++ b/Software/Visual_Studio/Tango.Touch/Themes/Generic.xaml @@ -3,15 +3,20 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Tango.Touch"> - <ResourceDictionary.MergedDictionaries> + <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Colors.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Resources/Fonts.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Components/Ripple.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Keyboard/TouchKeyboard.xaml" /> - <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Keyboard/KeyboardView.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Keyboard/KeyboardView.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/Shared.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchButton.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchToggleButton.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchDataGrid.xaml" /> <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchNavigationLinks.xaml" /> - </ResourceDictionary.MergedDictionaries> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchSideMenu.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Controls/TouchBusyIndicator.xaml" /> + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchToggleButton.xaml" /> + </ResourceDictionary.MergedDictionaries> </ResourceDictionary> diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index 1ea332280..1a1801234 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -173,9 +173,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "VSIX", "VSIX", "{03937A28-6 EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.BuildExtensions", "VSIX\Tango.BuildExtensions\Tango.BuildExtensions.csproj", "{43A25F41-EE8C-4A29-94D2-4CBC603E6B29}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PanelPC", "PanelPC", "{C81ED1A3-D18C-4D80-A8F5-061994A14A60}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PanelPC.UI", "PanelPC\Tango.PanelPC.UI\Tango.PanelPC.UI.csproj", "{654BEDA3-16FB-44FF-ADE7-B52E50B02E63}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PPC", "PPC", "{C81ED1A3-D18C-4D80-A8F5-061994A14A60}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MaterialDesignColors.Wpf", "SideChains\MaterialDesignInXamlToolkit-master\MaterialDesignColors.Wpf\MaterialDesignColors.Wpf.csproj", "{90B53209-C60C-4655-B28D-A1B3E1044BA3}" EndProject @@ -189,6 +187,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Notes", "Notes", "{CD2513CC EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.Notes", "Notes\Tango.Notes\Tango.Notes.csproj", "{09EE4BC6-F1C6-46DD-B4FE-918377A4EF02}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PPC.Common", "PPC\Tango.PPC.Common\Tango.PPC.Common.csproj", "{0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.PPC.UI", "PPC\Tango.PPC.UI\Tango.PPC.UI.csproj", "{654BEDA3-16FB-44FF-ADE7-B52E50B02E63}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution AppVeyor|Any CPU = AppVeyor|Any CPU @@ -3033,46 +3035,6 @@ Global {43A25F41-EE8C-4A29-94D2-4CBC603E6B29}.Release|x64.Build.0 = Release|Any CPU {43A25F41-EE8C-4A29-94D2-4CBC603E6B29}.Release|x86.ActiveCfg = Release|Any CPU {43A25F41-EE8C-4A29-94D2-4CBC603E6B29}.Release|x86.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|Any CPU.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM64.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x64.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x64.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x86.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x86.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|Any CPU.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM64.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM64.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x64.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x64.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x86.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x86.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x64.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x86.Build.0 = Debug|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|Any CPU.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|Any CPU.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM64.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM64.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x64.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x64.Build.0 = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x86.ActiveCfg = Release|Any CPU - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x86.Build.0 = Release|Any CPU {90B53209-C60C-4655-B28D-A1B3E1044BA3}.AppVeyor|Any CPU.ActiveCfg = AppVeyor|Any CPU {90B53209-C60C-4655-B28D-A1B3E1044BA3}.AppVeyor|Any CPU.Build.0 = AppVeyor|Any CPU {90B53209-C60C-4655-B28D-A1B3E1044BA3}.AppVeyor|ARM.ActiveCfg = AppVeyor|Any CPU @@ -3267,6 +3229,86 @@ Global {09EE4BC6-F1C6-46DD-B4FE-918377A4EF02}.Release|x64.Build.0 = Release|Any CPU {09EE4BC6-F1C6-46DD-B4FE-918377A4EF02}.Release|x86.ActiveCfg = Release|Any CPU {09EE4BC6-F1C6-46DD-B4FE-918377A4EF02}.Release|x86.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|Any CPU.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|ARM.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|ARM.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|ARM64.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|x64.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|x64.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|x86.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.AppVeyor|x86.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|ARM.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|ARM.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|ARM64.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|x64.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|x64.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|x86.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Debug|x86.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|Any CPU.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|ARM.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|ARM.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|ARM64.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|ARM64.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|x64.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|x64.Build.0 = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|x86.ActiveCfg = Release|Any CPU + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0}.Release|x86.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|Any CPU.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|Any CPU.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM64.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|ARM64.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x64.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x64.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x86.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.AppVeyor|x86.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|Any CPU.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|ARM64.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x64.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x64.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x86.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Debug|x86.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|Any CPU.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|Any CPU.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM64.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|ARM64.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x64.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x64.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x86.ActiveCfg = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.DefaultBuild|x86.Build.0 = Debug|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|Any CPU.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|Any CPU.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM64.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|ARM64.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x64.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x64.Build.0 = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x86.ActiveCfg = Release|Any CPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -3318,11 +3360,12 @@ Global {12CC222B-D0F5-4048-B790-D283235F540D} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} {C8F14D59-B18D-469C-8B1B-2D23072ED16A} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} {43A25F41-EE8C-4A29-94D2-4CBC603E6B29} = {03937A28-630D-49B6-8344-6980FF7BF7DD} - {654BEDA3-16FB-44FF-ADE7-B52E50B02E63} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60} {90B53209-C60C-4655-B28D-A1B3E1044BA3} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} {F079FB0A-A8ED-4216-B6A5-345756751A04} = {EC62BC9C-F2FE-4333-B7E4-110E38D43958} {43ECCD8D-EE54-44EF-A51A-D77E3DF7263F} = {4443B71C-216E-4D4C-8D19-868F50803813} {09EE4BC6-F1C6-46DD-B4FE-918377A4EF02} = {CD2513CC-7596-498C-957D-DE6473561A1C} + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60} + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63} = {C81ED1A3-D18C-4D80-A8F5-061994A14A60} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/App.xaml b/Software/Visual_Studio/Utilities/Tango.UITests/App.xaml index 113a61cf7..f0a9e77f7 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/App.xaml +++ b/Software/Visual_Studio/Utilities/Tango.UITests/App.xaml @@ -4,6 +4,6 @@ xmlns:local="clr-namespace:Tango.UITests" StartupUri="MainWindow.xaml"> <Application.Resources> - + <ResourceDictionary Source="pack://application:,,,/Tango.Touch;component/Styles/TouchToggleButton.xaml" /> </Application.Resources> </Application> diff --git a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml index 3f6956d14..9542d8fca 100644 --- a/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml +++ b/Software/Visual_Studio/Utilities/Tango.UITests/MainWindow.xaml @@ -11,11 +11,6 @@ Title="MainWindow" Height="500" Width="400" DataContext="{Binding RelativeSource={RelativeSource Self}}"> <Grid> - <touch:TouchDataGrid ItemsSource="{Binding Persons}" EnableDropShadow="False" AutoGenerateColumns="False" CanUserSortColumns="True" Margin="20" CornerRadius="5"> - <DataGrid.Columns> - <DataGridTextColumn Header="Name" Binding="{Binding Name}"></DataGridTextColumn> - <DataGridTextColumn Header="Age" Binding="{Binding Age}" Width="1*"></DataGridTextColumn> - </DataGrid.Columns> - </touch:TouchDataGrid> - </Grid> + <touch:TouchToggleButton Width="200" Height="50" Style="{StaticResource TouchToggleButtonHamburger}"></touch:TouchToggleButton> + </Grid> </Window> |
