From ecf55f4193c0a7ab273c7e8243e446a2f2c32d51 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 16 Dec 2018 08:22:45 +0200 Subject: Working on PPC tech mode & logging module. Working on PPC date picker & calendar. Implemented no-permissions view. --- .../PPC/Modules/Tango.PPC.Logging/App.xaml | 11 ++ .../Tango.PPC.Logging/Images/logging_module.png | Bin 0 -> 1345 bytes .../PPC/Modules/Tango.PPC.Logging/LoggingModule.cs | 47 +++++++++ .../Tango.PPC.Logging/Properties/AssemblyInfo.cs | 20 ++++ .../Properties/Resources.Designer.cs | 62 +++++++++++ .../Tango.PPC.Logging/Properties/Resources.resx | 117 +++++++++++++++++++++ .../Properties/Settings.Designer.cs | 30 ++++++ .../Tango.PPC.Logging/Properties/Settings.settings | 7 ++ .../Tango.PPC.Logging/Tango.PPC.Logging.csproj | 117 +++++++++++++++++++++ .../Modules/Tango.PPC.Logging/ViewModelLocator.cs | 32 ++++++ .../Tango.PPC.Logging/ViewModels/MainViewVM.cs | 17 +++ .../Modules/Tango.PPC.Logging/Views/MainView.xaml | 45 ++++++++ .../Tango.PPC.Logging/Views/MainView.xaml.cs | 28 +++++ 13 files changed, 533 insertions(+) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/App.xaml create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Images/logging_module.png create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/LoggingModule.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Resources.resx create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Settings.settings create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Tango.PPC.Logging.csproj create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModelLocator.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModels/MainViewVM.cs create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.xaml create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.xaml.cs (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/App.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/App.xaml new file mode 100644 index 000000000..66ea48976 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/App.xaml @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Images/logging_module.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Images/logging_module.png new file mode 100644 index 000000000..3f8318f70 Binary files /dev/null and b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Images/logging_module.png differ diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/LoggingModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/LoggingModule.cs new file mode 100644 index 000000000..78c597e81 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/LoggingModule.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; +using Tango.BL.Enumerations; +using Tango.PPC.Common; +using Tango.PPC.Logging.Views; +using Tango.SharedUI.Helpers; + +namespace Tango.PPC.Logging +{ + [PPCModule(5)] + public class LoggingModule : PPCModuleBase + { + public override string Name => "Logging"; + public override string Description => "PPC logging module."; + public override BitmapSource Image => ResourceHelper.GetImageFromResources("Images/logging_module.png"); + public override Type MainViewType => typeof(MainView); + public override Permissions Permission => Permissions.RunPPC; + + public LoggingModule() + { + IsVisibleInMenu = false; + } + + public override void OnTechnicianEntered() + { + base.OnTechnicianEntered(); + + IsVisibleInMenu = true; + } + + public override void OnTechnicianExited() + { + base.OnTechnicianExited(); + + IsVisibleInMenu = false; + } + + public override void Dispose() + { + + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..612af80ce --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/AssemblyInfo.cs @@ -0,0 +1,20 @@ +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 Logging Module")] +[assembly: AssemblyVersion("2.0.4.1119")] + +[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) +)] diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Resources.Designer.cs new file mode 100644 index 000000000..6cbf8164a --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Resources.Designer.cs @@ -0,0 +1,62 @@ +//------------------------------------------------------------------------------ +// +// 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.Logging.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.PPC.Logging.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/Modules/Tango.PPC.Logging/Properties/Resources.resx b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/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/Modules/Tango.PPC.Logging/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Settings.Designer.cs new file mode 100644 index 000000000..ab102e0eb --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/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.Logging.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/Modules/Tango.PPC.Logging/Properties/Settings.settings b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Tango.PPC.Logging.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Tango.PPC.Logging.csproj new file mode 100644 index 000000000..cc6394c9f --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Tango.PPC.Logging.csproj @@ -0,0 +1,117 @@ + + + + + Debug + AnyCPU + {D2EE865B-B006-487A-9487-60A663636AC3} + library + Tango.PPC.Logging + Tango.PPC.Logging + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + + + true + full + false + ..\..\..\Build\PPC\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\..\Build\PPC\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + 4.0 + + + + + + + + GlobalVersionInfo.cs + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + + + MainView.xaml + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + {F441FEEE-322A-4943-B566-110E12FD3B72} + Tango.BL + + + {A34EE0F0-649D-41C8-8489-B6F1CC6924EE} + Tango.Core + + + {8491D07B-C1F6-4B62-A412-41B9FD2D6538} + Tango.SharedUI + + + {fd86424c-6e84-491b-8df9-3d0f5c236a2a} + Tango.Touch + + + {0BE74EEE-22CB-4DBA-B896-793B9E1A3AC0} + Tango.PPC.Common + + + + + + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModelLocator.cs new file mode 100644 index 000000000..d86a0d2ab --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModelLocator.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.DI; +using Tango.PPC.Logging.ViewModels; + +namespace Tango.PPC.Logging +{ + public static class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + static ViewModelLocator() + { + TangoIOC.Default.Register(); + } + + /// + /// Gets the main view VM. + /// + public static MainViewVM MainViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModels/MainViewVM.cs new file mode 100644 index 000000000..736bff5a2 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/ViewModels/MainViewVM.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Common; + +namespace Tango.PPC.Logging.ViewModels +{ + public class MainViewVM : PPCViewModel + { + public override void OnApplicationStarted() + { + + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.xaml new file mode 100644 index 000000000..fb4dd5d04 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.xaml @@ -0,0 +1,45 @@ + + + + + + + + + + + + Logs + + + + + + + + Application + Embedded + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.xaml.cs new file mode 100644 index 000000000..eb448c67c --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Views/MainView.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.Logging.Views +{ + /// + /// Interaction logic for MainView.xaml + /// + public partial class MainView : UserControl + { + public MainView() + { + InitializeComponent(); + } + } +} -- cgit v1.3.1