From e571f20e27c4fca6bb6efe03d6427a1f332f9830 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 27 May 2018 19:33:15 +0300 Subject: Working on panel pc. --- Software/Visual_Studio/PPC/Tango.PPC.UI/App.config | 72 +++++++ Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml | 164 ++++++++++++++ .../Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs | 26 +++ .../PPC/Tango.PPC.UI/Images/Job Issues/cyan.png | Bin 0 -> 1905 bytes .../PPC/Tango.PPC.UI/Images/account.png | Bin 0 -> 3373 bytes .../PPC/Tango.PPC.UI/Images/arrows.png | Bin 0 -> 472 bytes .../PPC/Tango.PPC.UI/Images/liquid.png | Bin 0 -> 1043 bytes .../PPC/Tango.PPC.UI/Images/warning.png | Bin 0 -> 603 bytes .../Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml | 17 ++ .../PPC/Tango.PPC.UI/MainWindow.xaml.cs | 40 ++++ .../Navigation/DefaultNavigationManager.cs | 26 +++ .../Notifications/DefaultNotificationProvider.cs | 116 ++++++++++ .../PPCApplication/DefaultPPCApplicationManager.cs | 88 ++++++++ .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 55 +++++ .../Tango.PPC.UI/Properties/Resources.Designer.cs | 71 +++++++ .../PPC/Tango.PPC.UI/Properties/Resources.resx | 117 ++++++++++ .../Tango.PPC.UI/Properties/Settings.Designer.cs | 30 +++ .../PPC/Tango.PPC.UI/Properties/Settings.settings | 7 + .../PPC/Tango.PPC.UI/Resources/Colors.xaml | 14 ++ .../Tango.PPC.UI/Resources/MaterialOverride.xaml | 185 ++++++++++++++++ .../PPC/Tango.PPC.UI/Resources/Styles.xaml | 19 ++ .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 236 +++++++++++++++++++++ .../PPC/Tango.PPC.UI/ViewModelLocator.cs | 93 ++++++++ .../PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs | 55 +++++ .../PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs | 14 ++ .../PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs | 29 +++ .../PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs | 20 ++ .../PPC/Tango.PPC.UI/Views/JobsView.xaml | 94 ++++++++ .../PPC/Tango.PPC.UI/Views/JobsView.xaml.cs | 28 +++ .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 119 +++++++++++ .../PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs | 31 +++ .../PPC/Tango.PPC.UI/Views/LoadingView.xaml | 18 ++ .../PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs | 28 +++ .../PPC/Tango.PPC.UI/Views/MainView.xaml | 18 ++ .../PPC/Tango.PPC.UI/Views/MainView.xaml.cs | 31 +++ .../Visual_Studio/PPC/Tango.PPC.UI/packages.config | 8 + 36 files changed, 1869 insertions(+) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/App.config create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/cyan.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/account.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/arrows.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/liquid.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Images/warning.png create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Navigation/DefaultNavigationManager.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.resx create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.settings create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Styles.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/JobsViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml.cs create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config new file mode 100644 index 000000000..895afa970 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config @@ -0,0 +1,72 @@ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml new file mode 100644 index 000000000..ddfb18c60 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.xaml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + + var s = SettingsManager.Default.GetOrCreate(); + 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 new file mode 100644 index 000000000..d53382f28 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/Job Issues/cyan.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/account.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/account.png new file mode 100644 index 000000000..46f0d38fc Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/account.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/arrows.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/arrows.png new file mode 100644 index 000000000..ae3482ee5 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/arrows.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/liquid.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/liquid.png new file mode 100644 index 000000000..7c5a4bceb Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/liquid.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/warning.png b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/warning.png new file mode 100644 index 000000000..5c7672421 Binary files /dev/null and b/Software/Visual_Studio/PPC/Tango.PPC.UI/Images/warning.png differ diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml new file mode 100644 index 000000000..f716a6e88 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml @@ -0,0 +1,17 @@ + + + + + + + + + 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 +{ + /// + /// Interaction logic for MainWindow.xaml + /// + 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/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs new file mode 100644 index 000000000..7f97f2a49 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Notifications/DefaultNotificationProvider.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Media; +using FontAwesome.WPF; +using Tango.PPC.Common.Notifications; + +namespace Tango.PPC.UI.Notifications +{ + public class DefaultNotificationProvider : INotificationProvider + { + public ObservableCollection TaskItems + { + get + { + throw new NotImplementedException(); + } + } + + public TaskItem CurrentTaskItem + { + get + { + throw new NotImplementedException(); + } + } + + public bool HasTaskItems + { + get + { + throw new NotImplementedException(); + } + } + + public void PopTaskItem(TaskItem taskItem) + { + throw new NotImplementedException(); + } + + public void PushTaskItem(TaskItem taskItem) + { + throw new NotImplementedException(); + } + + public TaskItem PushTaskItem(string message) + { + throw new NotImplementedException(); + } + + public void ShowError(string message) + { + throw new NotImplementedException(); + } + + public void ShowInfo(string message) + { + throw new NotImplementedException(); + } + + public bool? ShowMessageBox(FontAwesomeIcon icon, Brush iconColor, string message, bool hasCancel) + { + throw new NotImplementedException(); + } + + public void ShowModalDialog(Action onAccept, Action onCancel) + where View : FrameworkElement + where VM : DialogViewVM + { + throw new NotImplementedException(); + } + + public void ShowModalDialog(Action onAccept, Action onCancel) where VM : DialogViewVM + { + throw new NotImplementedException(); + } + + public void ShowModalDialog(VM vm, Action onAccept, Action onCancel) + where VM : DialogViewVM + where View : FrameworkElement + { + throw new NotImplementedException(); + } + + public void ShowModalDialog(VM vm, View view, Action onAccept, Action onCancel) + where VM : DialogViewVM + where View : FrameworkElement + { + throw new NotImplementedException(); + } + + public void ShowModalDialog(Action onAccept) where VM : DialogViewVM + { + throw new NotImplementedException(); + } + + public bool ShowQuestion(string message) + { + throw new NotImplementedException(); + } + + public string ShowTextInput(string message, string hint, string defaultResponse = null) + { + throw new NotImplementedException(); + } + + public void ShowWarning(string message) + { + 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 ConnectedMachineChanged; + + public DefaultPPCApplicationManager() + { + if (!DesignMode) + { + MainWindow.Instance.ContentRendered += (_, __) => + { + foreach (var vm in TangoIOC.Default.GetAllInstancesByBase()) + { + vm.OnApplicationStarted(); + } + }; + } + } + + public void ShutDown() + { + throw new NotImplementedException(); + } + + public void SetMachine(Machine machine) + { + Machine = machine; + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..acd22cb21 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/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.UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.PanelPC.UI")] +[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 +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the 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.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.Designer.cs new file mode 100644 index 000000000..3af06554c --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace Tango.PPC.UI.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // 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() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [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.UI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [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/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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.Designer.cs new file mode 100644 index 000000000..dab4cb31e --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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. +// +//------------------------------------------------------------------------------ + +namespace Tango.PPC.UI.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/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 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml new file mode 100644 index 000000000..431533fcb --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Colors.xaml @@ -0,0 +1,14 @@ + + + + #2F65EE + + + #FFFFFF + + + #C8CBD4 + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml new file mode 100644 index 000000000..49fb3e837 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/MaterialOverride.xaml @@ -0,0 +1,185 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Styles.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Styles.xaml new file mode 100644 index 000000000..110bbfc86 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Resources/Styles.xaml @@ -0,0 +1,19 @@ + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj new file mode 100644 index 000000000..6a60b6701 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -0,0 +1,236 @@ + + + + + Debug + AnyCPU + {654BEDA3-16FB-44FF-ADE7-B52E50B02E63} + WinExe + Tango.PanelPC.UI + Tango.PanelPC.UI + v4.6 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + AnyCPU + true + full + false + ..\..\Build\Debug\PPC\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + ..\..\Build\Release\PanelPC\ + TRACE + prompt + 4 + + + + ..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll + + + ..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll + + + ..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll + + + ..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll + + + ..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + + + + + + + ..\..\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + + + + + + + + JobsView.xaml + + + LayoutView.xaml + + + LoadingView.xaml + + + MainView.xaml + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {f441feee-322a-4943-b566-110e12fd3b72} + Tango.BL + + + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} + Tango.Core + + + {b112d89a-a106-41ae-a0c1-4abc84c477f5} + Tango.DragAndDrop + + + {4206ac58-3b57-4699-8835-90bf6db01a61} + Tango.Integration + + + {bc932dbd-7cdb-488c-99e4-f02cf441f55e} + Tango.Logging + + + {e4927038-348d-4295-aaf4-861c58cb3943} + Tango.PMR + + + {22f87980-e990-4686-be81-be63d562c4d5} + Tango.Serialization + + + {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} + Tango.Settings + + + {8491d07b-c1f6-4b62-a412-41b9fd2d6538} + Tango.SharedUI + + + {998f8471-dc1b-41b6-9d96-354e1b4e7a32} + Tango.TFS + + + {fd86424c-6e84-491b-8df9-3d0f5c236a2a} + Tango.Touch + + + {74e700b0-1156-4126-be40-ee450d3c3026} + Tango.Transport + + + {0be74eee-22cb-4dba-b896-793b9e1a3ac0} + Tango.PPC.Common + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs new file mode 100644 index 000000000..3a37fe452 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -0,0 +1,93 @@ +using System; +using Tango.Core.DI; +using Tango.Integration.Services; +using Tango.Logging; +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.PPC.UI +{ + /// + /// This class contains static references to all the view models in the + /// application and provides an entry point for the bindings. + /// + public static class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + static ViewModelLocator() + { + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + //TangoIOC.Default.Register(new TeamFoundationServiceExtendedClient("https://twinetfs.visualstudio.com", String.Empty, "szzfokrceo4rhd4eqi5qpmxn3pa5iwl3q7tlqd36l2m7smz2ynoa")); + + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + //TangoIOC.Default.Register(); + //TangoIOC.Default.Register(); + //TangoIOC.Default.Register(); + //TangoIOC.Default.Register(); + //TangoIOC.Default.Register(); + //TangoIOC.Default.Register(); + //TangoIOC.Default.Register(); + } + + public static LoadingViewVM LoadingView + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + + public static MainViewVM MainViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + + public static LayoutViewVM LayoutViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + + public static JobsViewVM JobsViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + } +} \ No newline at end of file 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 _jobs; + + public ObservableCollection 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(); + } + + 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/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs new file mode 100644 index 000000000..cc64f82f5 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LayoutViewVM.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +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/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs new file mode 100644 index 000000000..c75e031f1 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Common.Application; +using Tango.SharedUI; + +namespace Tango.PPC.UI.ViewModels +{ + public class MainViewVM : ViewModel + { + public String Test { get; set; } + + 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 @@ + + + + + + + + + + + + + + + + + + JOBS + + + + + + + + + + READY TO DYE + NOT READY + ALL + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs new file mode 100644 index 000000000..3ccb48c01 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/JobsView.xaml.cs @@ -0,0 +1,28 @@ +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.PPC.UI.Views +{ + /// + /// Interaction logic for JobsView.xaml + /// + public partial class JobsView : UserControl + { + public JobsView() + { + InitializeComponent(); + } + } +} 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 @@ + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + ... + + + + + + + + + + + + + + Home + + + + + + + + + + + + + + + + Sign out + + + + + + + + + + + + + + + + + + + + + DYE + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs new file mode 100644 index 000000000..e6c778a92 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml.cs @@ -0,0 +1,31 @@ +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.PPC.UI.Views +{ + /// + /// Interaction logic for LayoutView.xaml + /// + 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 @@ + + + + + Loading... + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs new file mode 100644 index 000000000..a1214a0df --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoadingView.xaml.cs @@ -0,0 +1,28 @@ +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.PPC.UI.Views +{ + /// + /// Interaction logic for LoadingView.xaml + /// + public partial class LoadingView : UserControl + { + public LoadingView() + { + InitializeComponent(); + } + } +} 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 @@ + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml.cs new file mode 100644 index 000000000..cd7562d04 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MainView.xaml.cs @@ -0,0 +1,31 @@ +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.PPC.UI.Views +{ + /// + /// Interaction logic for MainView.xaml + /// + public partial class MainView : UserControl + { + public static MainView Instance { get; private set; } + + public MainView() + { + InitializeComponent(); + Instance = this; + } + } +} diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config new file mode 100644 index 000000000..e4617d73a --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file -- cgit v1.3.1