aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-09-01 17:46:47 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-09-01 17:46:47 +0300
commit565afd35baab8b2846ebc80a6802a375b3fd876e (patch)
treefa478fa30e6b4bed5b629ef307d35e743bacf0d5 /Software/Visual_Studio/PPC/Modules
parentb3ffc4c7ba0b7f9bb34c878ae186d380ac41a07f (diff)
downloadTango-565afd35baab8b2846ebc80a6802a375b3fd876e.tar.gz
Tango-565afd35baab8b2846ebc80a6802a375b3fd876e.zip
Added bug reporting module to PPC !!
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/App.xaml11
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs104
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingSettings.cs15
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Images/bug_reporting.pngbin0 -> 2178 bytes
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/AssemblyInfo.cs20
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Resources.Designer.cs63
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Resources.resx117
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Settings.Designer.cs26
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Settings.settings7
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationModel.cs21
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationTemplate.cshtml91
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs155
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting.csproj183
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs34
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModels/MainViewVM.cs183
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Views/MainView.xaml94
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Views/MainView.xaml.cs28
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/app.config61
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/packages.config7
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/TechnicianModule.cs2
20 files changed, 1221 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/App.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/App.xaml
new file mode 100644
index 000000000..b6c322d95
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/App.xaml
@@ -0,0 +1,11 @@
+<Application x:Class="Tango.PPC.BugReporting.App"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+ <Application.Resources>
+ <ResourceDictionary>
+ <ResourceDictionary.MergedDictionaries>
+ <ResourceDictionary Source="pack://application:,,,/Tango.PPC.Common;component/Resources/Merged.xaml" />
+ </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary>
+ </Application.Resources>
+</Application> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs
new file mode 100644
index 000000000..e65b44698
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingModule.cs
@@ -0,0 +1,104 @@
+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.BugReporting.Views;
+using Tango.SharedUI.Helpers;
+using Tango.Settings;
+using System.Diagnostics;
+
+namespace Tango.PPC.BugReporting
+{
+ /// <summary>
+ /// Represents a PPC <see cref="BugReportingModule"/>.
+ /// </summary>
+ /// <seealso cref="Tango.PPC.Common.PPCModuleBase" />
+ [PPCModule(5)]
+ public class BugReportingModule : PPCModuleBase
+ {
+ /// <summary>
+ /// Initializes a new instance of the <see cref="BugReportingModule"/> class.
+ /// </summary>
+ public BugReportingModule() : base()
+ {
+ IsVisibleInMenu = false;
+
+ try
+ {
+ var settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ IsVisibleInMenu = settings.DeploymentSlot != Web.DeploymentSlot.PROD;
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("Could not retrieve settings for PPC!\n" + ex.ToString());
+ }
+ }
+
+ /// <summary>
+ /// Gets the module name.
+ /// </summary>
+ public override string Name
+ {
+ get
+ {
+ return "Report Issue";
+ }
+ }
+
+ /// <summary>
+ /// Gets the module description.
+ /// </summary>
+ public override string Description
+ {
+ get
+ {
+ return "Bug Reporting Module";
+ }
+ }
+
+ /// <summary>
+ /// Gets the module cover image.
+ /// </summary>
+ public override BitmapSource Image
+ {
+ get
+ {
+ return ResourceHelper.GetImageFromResources("Images/bug_reporting.png");
+ }
+ }
+
+ /// <summary>
+ /// Gets the module entry point view type.
+ /// </summary>
+ public override Type MainViewType
+ {
+ get
+ {
+ return typeof(MainView);
+ }
+ }
+
+ /// <summary>
+ /// Gets the permission required to see and load this module.
+ /// </summary>
+ public override Permissions Permission
+ {
+ get
+ {
+ return Permissions.RunPPC;
+ }
+ }
+
+ /// <summary>
+ /// Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ /// </summary>
+ public override void Dispose()
+ {
+ //Dispose module here...
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingSettings.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingSettings.cs
new file mode 100644
index 000000000..d2548a656
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/BugReportingSettings.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Settings;
+
+namespace Tango.PPC.BugReporting
+{
+ public class BugReportingSettings : SettingsBase
+ {
+ public String LastCreatedBy { get; set; }
+ public String LastAssignedTo { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Images/bug_reporting.png b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Images/bug_reporting.png
new file mode 100644
index 000000000..a0908bb40
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Images/bug_reporting.png
Binary files differ
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/AssemblyInfo.cs
new file mode 100644
index 000000000..ae128036e
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/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 bug reporting module")]
+[assembly: AssemblyVersion("2.0.1.1407")]
+
+[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.BugReporting/Properties/Resources.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Resources.Designer.cs
new file mode 100644
index 000000000..72dc0bbc4
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Resources.Designer.cs
@@ -0,0 +1,63 @@
+//------------------------------------------------------------------------------
+// <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.BugReporting.Properties {
+ using System;
+
+
+ /// <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", "15.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 (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.PPC.BugReporting.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/PPC/Modules/Tango.PPC.BugReporting/Properties/Resources.resx b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Resources.resx
new file mode 100644
index 000000000..af7dbebba
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/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/PPC/Modules/Tango.PPC.BugReporting/Properties/Settings.Designer.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Settings.Designer.cs
new file mode 100644
index 000000000..28bddb8f3
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Settings.Designer.cs
@@ -0,0 +1,26 @@
+//------------------------------------------------------------------------------
+// <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.BugReporting.Properties {
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.8.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.BugReporting/Properties/Settings.settings b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Properties/Settings.settings
new file mode 100644
index 000000000..033d7a5e9
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/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/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationModel.cs
new file mode 100644
index 000000000..e2fc518c9
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationModel.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+
+namespace Tango.PPC.BugReporting.TFS
+{
+ public class SystemInformationModel
+ {
+ public String ApplicationVersion { get; set; }
+ public String EmbeddedVersion { get; set; }
+ public String UserName { get; set; }
+ public String HostName { get; set; }
+ public Machine Machine { get; set; }
+ public String ConfigurationString { get; set; }
+ public String LoadedHardwareConfigurationString { get; set; }
+ public String LoadedProcessParametersString { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationTemplate.cshtml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationTemplate.cshtml
new file mode 100644
index 000000000..b2d909c80
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/SystemInformationTemplate.cshtml
@@ -0,0 +1,91 @@
+@{
+ Tango.PPC.BugReporting.TFS.SystemInformationModel vm = Model as Tango.PPC.BugReporting.TFS.SystemInformationModel;
+}
+
+<div>
+ <div style="font-size:20pt;text-decoration:underline">System Information</div>
+ <table style="margin-top:10px">
+ <tbody>
+
+ <tr>
+ <td><b>Application Version:</b></td>
+ <td>@vm.ApplicationVersion</td>
+ </tr>
+
+ <tr>
+ <td><b>Embedded Version:</b></td>
+ <td>@vm.EmbeddedVersion</td>
+ </tr>
+
+ <tr>
+ <td><b>Host Name:</b></td>
+ <td>@vm.HostName</td>
+ </tr>
+
+ <tr>
+ <td><b>User:</b></td>
+ <td>@vm.UserName</td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <div style="font-size:20pt;text-decoration:underline;margin-top:10px">Machine</div>
+
+ @if (vm.Machine != null)
+ {
+ <table style="margin-top:10px">
+ <tbody>
+
+ <tr>
+ <td><b>Organization:</b></td>
+ <td>@vm.Machine.Organization.Name</td>
+ </tr>
+
+ <tr>
+ <td><b>Name:</b></td>
+ <td>@vm.Machine.Name</td>
+ </tr>
+
+ <tr>
+ <td><b>S/N:</b></td>
+ <td>@vm.Machine.SerialNumber</td>
+ </tr>
+
+ <tr>
+ <td><b>Version:</b></td>
+ <td>@vm.Machine.MachineVersion.Version</td>
+ </tr>
+
+ </tbody>
+ </table>
+
+ <div style="font-size:20pt;text-decoration:underline;margin-top:10px">Machine Configuration</div>
+ <div style="white-space:pre;margin-top:10px;font-size:8pt">@vm.ConfigurationString</div>
+
+ <div style="font-size:20pt;text-decoration:underline;margin-top:10px">Hardware Configuration</div>
+ if (vm.LoadedHardwareConfigurationString != null)
+ {
+ <div style="white-space:pre;margin-top:10px;font-size:8pt">@vm.LoadedHardwareConfigurationString</div>
+ }
+ else
+ {
+ <div style="color:Red;margin-top:10px">NOT SET</div>
+ }
+
+ <div style="font-size:20pt;text-decoration:underline;margin-top:10px">Process Parameters</div>
+
+ if (vm.LoadedProcessParametersString != null)
+ {
+ <div style="white-space:pre;margin-top:10px;font-size:8pt">@vm.LoadedProcessParametersString</div>
+ }
+ else
+ {
+ <div style="color:Red;margin-top:10px">NOT SET</div>
+ }
+ }
+ else
+ {
+ <div style="color:Red;margin-top:10px">NOT CONNECTED</div>
+ }
+</div> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs
new file mode 100644
index 000000000..56a94afef
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/TFS/TeamFoundationServicePPCClient.cs
@@ -0,0 +1,155 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.BL.Entities;
+using Tango.Core.DI;
+using Tango.Integration.Operation;
+using Tango.Logging;
+using Tango.PPC.Common.Application;
+using Tango.PPC.Common.Connection;
+using Tango.TFS;
+using Tango.Core.ExtensionMethods;
+using Tango.Core.Helpers;
+
+namespace Tango.PPC.BugReporting.TFS
+{
+ public class TeamFoundationServicePPCClient : TeamFoundationServiceClient
+ {
+ private IPPCApplicationManager _applicationManager;
+ private IMachineProvider _machineProvider;
+
+ public Project Project { get; private set; }
+
+ public event EventHandler Initialized;
+
+ public bool IsInitialized { get; private set; }
+
+ public TeamFoundationServicePPCClient(string collectionURL, string userName, string personalToken) : base(collectionURL, userName, personalToken)
+ {
+ _applicationManager = TangoIOC.Default.GetInstance<IPPCApplicationManager>();
+ _machineProvider = TangoIOC.Default.GetInstance<IMachineProvider>();
+ _applicationManager.ApplicationReady += ApplicationManager_ApplicationReady;
+ }
+
+ private void ApplicationManager_ApplicationReady(object sender, EventArgs e)
+ {
+ Init();
+ }
+
+ private async void Init()
+ {
+ try
+ {
+ Project = await GetProject("Tango");
+ IsInitialized = true;
+ Initialized?.Invoke(this, new EventArgs());
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error initializing TFS.");
+ }
+ }
+
+ public async Task SubmitBug(String title, String steps, TeamMember createdBy, TeamMember assignedTo, Severity severity)
+ {
+ WorkItem item = new WorkItem();
+
+ await Task.Factory.StartNew(() =>
+ {
+ item.Title = title;
+
+ item.Area = Project.GetAreaByName("PPC");
+ item.Iteration = Project.Iterations.FirstOrDefault();
+
+ item.CreatedBy = createdBy;
+ item.ChangedBy = createdBy;
+ item.AuthorizedAs = createdBy;
+ item.AssignedTo = assignedTo;
+
+ item.StepsToReproduce = steps;
+
+ item.FoundInBuild = _applicationManager.Version.ToString();
+ item.Priority = Priority.Priority3;
+ item.Severity = severity;
+ item.State = State.New;
+ item.Type = WorkItemType.Bug;
+
+ FileLogger appFileLogger = LogManager.Default.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)) as FileLogger;
+ FileLogger embeddedFileLogger = MachineOperator.EmbeddedLogManager.RegisteredLoggers.FirstOrDefault(x => x.GetType() == typeof(FileLogger)) as FileLogger;
+
+ var tempFolder = TemporaryManager.CreateFolder();
+
+ if (appFileLogger != null)
+ {
+ var appLogFile = tempFolder.CreateImaginaryFile();
+ File.Copy(appFileLogger.LogFile, appLogFile.Path);
+
+ item.Attachments.Add(new Attachment()
+ {
+ Description = "Application Log File",
+ FilePath = appLogFile.Path,
+ Name = Path.GetFileName(appFileLogger.LogFile),
+ });
+ }
+
+ if (embeddedFileLogger != null && File.Exists(embeddedFileLogger.LogFile))
+ {
+ var embeddedLogFile = tempFolder.CreateImaginaryFile();
+ File.Copy(embeddedFileLogger.LogFile, embeddedLogFile.Path);
+
+ item.Attachments.Add(new Attachment()
+ {
+ Description = "Embedded Log File",
+ FilePath = embeddedLogFile.Path,
+ Name = Path.GetFileName(embeddedFileLogger.LogFile),
+ });
+ }
+
+ SystemInformationModel sysModel = new SystemInformationModel();
+ sysModel.ApplicationVersion = _applicationManager.Version.ToString();
+ sysModel.EmbeddedVersion = "N/A";
+ sysModel.HostName = Environment.MachineName;
+ sysModel.UserName = createdBy.AssignName;
+
+ IMachineOperator op = _machineProvider.MachineOperator;
+
+ if (op.Status != MachineStatuses.Disconnected)
+ {
+ Machine machine = _machineProvider.Machine;
+
+ sysModel.Machine = machine;
+ sysModel.EmbeddedVersion = op.DeviceInformation.Version;
+
+ sysModel.ConfigurationString = machine.Configuration.Clone().ToJsonString();
+
+ if (op.CurrentProcessParameters != null)
+ {
+ sysModel.LoadedProcessParametersString = op.CurrentProcessParameters.ToJsonString(nameof(ProcessParametersTable.ProcessParametersTablesGroup));
+ }
+
+ if (op.CurrentHardwareConfiguration != null)
+ {
+ sysModel.LoadedHardwareConfigurationString = op.CurrentHardwareConfiguration.ToJsonString();
+ }
+ }
+
+ String html = String.Empty;
+
+ using (var stream = EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.PPC.BugReporting.TFS.SystemInformationTemplate.cshtml"))
+ {
+ StreamReader reader = new StreamReader(stream);
+ html = reader.ReadToEnd();
+ }
+
+ item.SystemInformation = CodeGeneration.Helper.Parse(html, sysModel);
+
+ item.StepsToReproduce = String.Format("<div style=\"white-space:pre\">{0}</div>", item.StepsToReproduce);
+ });
+
+ await UploadWorkItem(Project, item);
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting.csproj
new file mode 100644
index 000000000..aa400aed2
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Tango.PPC.BugReporting.csproj
@@ -0,0 +1,183 @@
+<?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>{8146FA0A-0725-4A1A-82E6-696C58F33A2B}</ProjectGuid>
+ <OutputType>library</OutputType>
+ <RootNamespace>Tango.PPC.BugReporting</RootNamespace>
+ <AssemblyName>Tango.PPC.BugReporting</AssemblyName>
+ <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <WarningLevel>4</WarningLevel>
+ <TargetFrameworkProfile />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\..\Build\PPC\Debug\</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>..\..\..\Build\PPC\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>
+ <Private>True</Private>
+ </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="FontAwesome.WPF, Version=4.7.0.37774, Culture=neutral, PublicKeyToken=0758b07a11a4f466, processorArchitecture=MSIL">
+ <HintPath>..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.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.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>
+ <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="App.xaml">
+ <Generator>MSBuild:Compile</Generator>
+ <SubType>Designer</SubType>
+ </Page>
+ <Page Include="Views\MainView.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\..\..\Versioning\GlobalVersionInfo.cs">
+ <Link>GlobalVersionInfo.cs</Link>
+ </Compile>
+ <Compile Include="BugReportingModule.cs" />
+ <Compile Include="BugReportingSettings.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>
+ <Compile Include="TFS\SystemInformationModel.cs" />
+ <Compile Include="TFS\TeamFoundationServicePPCClient.cs" />
+ <Compile Include="ViewModelLocator.cs" />
+ <Compile Include="ViewModels\MainViewVM.cs" />
+ <Compile Include="Views\MainView.xaml.cs">
+ <DependentUpon>MainView.xaml</DependentUpon>
+ </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>
+ <EmbeddedResource Include="TFS\SystemInformationTemplate.cshtml" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\..\..\Tango.BL\Tango.BL.csproj">
+ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
+ <Name>Tango.BL</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.CodeGeneration\Tango.CodeGeneration.csproj">
+ <Project>{caedae94-11ed-473c-888a-268a6d38cd20}</Project>
+ <Name>Tango.CodeGeneration</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj">
+ <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project>
+ <Name>Tango.Core</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.DragAndDrop\Tango.DragAndDrop.csproj">
+ <Project>{b112d89a-a106-41ae-a0c1-4abc84c477f5}</Project>
+ <Name>Tango.DragAndDrop</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.TFS\Tango.TFS.csproj">
+ <Project>{998f8471-dc1b-41b6-9d96-354e1b4e7a32}</Project>
+ <Name>Tango.TFS</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Touch\Tango.Touch.csproj">
+ <Project>{fd86424c-6e84-491b-8df9-3d0f5c236a2a}</Project>
+ <Name>Tango.Touch</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Transport\Tango.Transport.csproj">
+ <Project>{74e700b0-1156-4126-be40-ee450d3c3026}</Project>
+ <Name>Tango.Transport</Name>
+ </ProjectReference>
+ <ProjectReference Include="..\..\..\Tango.Web\Tango.Web.csproj">
+ <Project>{5001990f-977b-48ff-b217-0236a5022ad8}</Project>
+ <Name>Tango.Web</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\bug_reporting.png" />
+ </ItemGroup>
+ <ItemGroup />
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <ProjectExtensions>
+ <VisualStudio>
+ <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" />
+ </VisualStudio>
+ </ProjectExtensions>
+</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs
new file mode 100644
index 000000000..1f71ca2c1
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModelLocator.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.DI;
+using Tango.PPC.BugReporting.TFS;
+using Tango.PPC.BugReporting.ViewModels;
+
+namespace Tango.PPC.BugReporting
+{
+ public static class ViewModelLocator
+ {
+ /// <summary>
+ /// Initializes a new instance of the ViewModelLocator class.
+ /// </summary>
+ static ViewModelLocator()
+ {
+ TangoIOC.Default.Register<TeamFoundationServicePPCClient>(new TeamFoundationServicePPCClient("https://twinetfs.visualstudio.com", String.Empty, "szzfokrceo4rhd4eqi5qpmxn3pa5iwl3q7tlqd36l2m7smz2ynoa"));
+ TangoIOC.Default.Register<MainViewVM>();
+ }
+
+ /// <summary>
+ /// Gets the main view VM.
+ /// </summary>
+ public static MainViewVM MainViewVM
+ {
+ get
+ {
+ return TangoIOC.Default.GetInstance<MainViewVM>();
+ }
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModels/MainViewVM.cs
new file mode 100644
index 000000000..e0cf17f79
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/ViewModels/MainViewVM.cs
@@ -0,0 +1,183 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.DataAnnotations;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core.Commands;
+using Tango.PPC.BugReporting.TFS;
+using Tango.PPC.Common;
+using Tango.Settings;
+using Tango.TFS;
+using Tango.Touch.Controls;
+
+namespace Tango.PPC.BugReporting.ViewModels
+{
+ /// <summary>
+ /// Represents the main view VM and entry point for <see cref="Synchronization.MyModule"/>.
+ /// </summary>
+ /// <seealso cref="Tango.PPC.Common.PPCViewModel" />
+ public class MainViewVM : PPCViewModel
+ {
+ private TeamFoundationServicePPCClient _tfsService;
+ private BugReportingSettings _settings;
+
+ public AutoCompleteProvider<TeamMember> TeamMembersProvider { get; set; }
+
+ private String _title;
+ public String Title
+ {
+ get { return _title; }
+ set { _title = value; RaisePropertyChangedAuto(); }
+ }
+
+ private String _steps;
+ public String Steps
+ {
+ get { return _steps; }
+ set { _steps = value; RaisePropertyChangedAuto(); }
+ }
+
+ private TeamMember _fromMember;
+ public TeamMember FromMember
+ {
+ get { return _fromMember; }
+ set { _fromMember = value; RaisePropertyChangedAuto(); }
+ }
+
+ private TeamMember _toMember;
+ public TeamMember ToMember
+ {
+ get { return _toMember; }
+ set { _toMember = value; RaisePropertyChangedAuto(); }
+ }
+
+ private Severity _severity;
+ public Severity Severity
+ {
+ get { return _severity; }
+ set { _severity = value; RaisePropertyChangedAuto(); }
+ }
+
+ private List<TeamMember> _members;
+ public List<TeamMember> Members
+ {
+ get { return _members; }
+ set { _members = value; RaisePropertyChangedAuto(); }
+ }
+
+ public RelayCommand SubmitCommand { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MainViewVM"/> class.
+ /// </summary>
+ public MainViewVM()
+ {
+ TeamMembersProvider = new AutoCompleteProvider<TeamMember>((member, filter) =>
+ {
+ if (filter != null && member != null)
+ {
+ return member.DisplayName.ToLower().Contains(filter.ToLower());
+ }
+ else
+ {
+ return false;
+ }
+ });
+
+ Severity = Severity.Medium;
+
+ SubmitCommand = new RelayCommand(SubmitBug);
+ }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MainViewVM"/> class.
+ /// </summary>
+ /// <param name="tfsService">The TFS service.</param>
+ public MainViewVM(TeamFoundationServicePPCClient tfsService) : this()
+ {
+ _tfsService = tfsService;
+ _tfsService.Initialized += _tfsService_Initialized;
+ }
+
+ private void _tfsService_Initialized(object sender, EventArgs e)
+ {
+ Members = _tfsService.Project.Members.ToList();
+ }
+
+ private async void SubmitBug()
+ {
+ if (String.IsNullOrWhiteSpace(Title))
+ {
+ await NotificationProvider.ShowError("Report title is required.");
+ return;
+ }
+
+ if (FromMember == null)
+ {
+ await NotificationProvider.ShowError("Created By team member is required.");
+ return;
+ }
+
+ if (ToMember == null)
+ {
+ await NotificationProvider.ShowError("Assigned To team member is required.");
+ return;
+ }
+
+ try
+ {
+ IsFree = false;
+ await _tfsService.SubmitBug(Title, Steps, FromMember, ToMember, Severity);
+ await NotificationProvider.ShowSuccess("Issue reported successfully");
+ await NavigationManager.NavigateBack();
+
+ _settings.LastCreatedBy = FromMember.Email;
+ _settings.LastAssignedTo = ToMember.Email;
+ _settings.Save();
+
+ Title = null;
+ Steps = null;
+ Severity = Severity.Medium;
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Error on TFS bug reporting.");
+ await NotificationProvider.ShowError("An error occurred while trying to submit the report. Please restart the application and try again.");
+ }
+ finally
+ {
+ IsFree = true;
+ }
+ }
+
+ public async override void OnNavigatedTo()
+ {
+ base.OnNavigatedTo();
+
+ Title = null;
+ Steps = null;
+ Severity = Severity.Medium;
+
+ if (!_tfsService.IsInitialized)
+ {
+ await NotificationProvider.ShowError("The reporting service was not initialized properly. Issue reporting is currently disabled.");
+ await NavigationManager.NavigateBack();
+ return;
+ }
+
+ FromMember = Members.SingleOrDefault(x => x.Email == _settings.LastCreatedBy);
+ ToMember = Members.SingleOrDefault(x => x.Email == _settings.LastAssignedTo);
+ }
+
+ /// <summary>
+ /// Called when the application has been started
+ /// </summary>
+ public override void OnApplicationStarted()
+ {
+ //Start initializing here rather then in the constructor.
+
+ _settings = SettingsManager.Default.GetOrCreate<BugReportingSettings>();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Views/MainView.xaml
new file mode 100644
index 000000000..563cd49a6
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Views/MainView.xaml
@@ -0,0 +1,94 @@
+<UserControl x:Class="Tango.PPC.BugReporting.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:vm="clr-namespace:Tango.PPC.BugReporting.ViewModels"
+ xmlns:tfs="clr-namespace:Tango.TFS;assembly=Tango.TFS"
+ xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
+ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
+ xmlns:global="clr-namespace:Tango.PPC.BugReporting"
+ xmlns:local="clr-namespace:Tango.PPC.BugReporting.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 Background="{StaticResource TangoMidBackgroundBrush}" IsEnabled="{Binding IsFree}">
+ <Grid.RowDefinitions>
+ <RowDefinition Height="Auto"/>
+ <RowDefinition Height="1*"/>
+ </Grid.RowDefinitions>
+
+ <Border Padding="20" 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" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Report Issue</TextBlock>
+ </Border>
+
+ <Grid Grid.Row="1">
+
+ <DockPanel>
+ <touch:TouchDropShadowBorder DockPanel.Dock="Bottom" Margin="20" Padding="20">
+ <DockPanel>
+ <touch:TouchButton Command="{Binding SubmitCommand}" DockPanel.Dock="Right" Style="{StaticResource TangoHollowButton}" Width="200" Height="60">SUBMIT</touch:TouchButton>
+ <Grid Visibility="{Binding IsBusy,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel Orientation="Horizontal">
+ <touch:TouchBusyIndicator Width="45" Height="45" IsIndeterminate="{Binding IsBusy}"></touch:TouchBusyIndicator>
+ <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}">Submitting report..</TextBlock>
+ </StackPanel>
+ </Grid>
+ </DockPanel>
+ </touch:TouchDropShadowBorder>
+
+ <StackPanel>
+ <touch:TouchDropShadowBorder Margin="20" Padding="20">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+ <touch:TouchIcon Icon="PencilCircle" Width="30"></touch:TouchIcon>
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Details</TextBlock>
+ </StackPanel>
+
+ <StackPanel Margin="0 40 0 0">
+ <DockPanel>
+ <touch:TouchIcon VerticalAlignment="Bottom" Icon="Pencil" Width="22" Height="22" />
+ <touch:TouchTextBox FontSize="{StaticResource TangoTitleFontSize}" Margin="10 0 0 0" Watermark="Title" Text="{Binding Title}" KeyboardAction="Next"></touch:TouchTextBox>
+ </DockPanel>
+
+ <DockPanel Margin="0 40 0 0">
+ <touch:TouchIcon VerticalAlignment="Bottom" Icon="UserTieSolid" Width="22" Height="22" />
+ <touch:TouchAutoComplete FontSize="{StaticResource TangoTitleFontSize}" Margin="10 0 0 0" Watermark="Created By" ItemsSource="{Binding Members}" AutoCompleteProvider="{Binding TeamMembersProvider}" SelectedItem="{Binding FromMember,Mode=TwoWay}" KeyboardAction="Next"></touch:TouchAutoComplete>
+ </DockPanel>
+
+ <DockPanel Margin="0 40 0 0">
+ <touch:TouchIcon VerticalAlignment="Bottom" Icon="UserTagSolid" Width="22" Height="22" />
+ <touch:TouchAutoComplete FontSize="{StaticResource TangoTitleFontSize}" Margin="10 0 0 0" Watermark="Assigned To" ItemsSource="{Binding Members}" AutoCompleteProvider="{Binding TeamMembersProvider}" SelectedItem="{Binding ToMember,Mode=TwoWay}" KeyboardAction="Next"></touch:TouchAutoComplete>
+ </DockPanel>
+
+ <DockPanel Margin="0 40 0 0">
+ <touch:TouchIcon VerticalAlignment="Bottom" Icon="CommentAlertOutline" Width="22" Height="22" />
+ <touch:TouchComboBox FontSize="{StaticResource TangoTitleFontSize}" ItemsSource="{Binding Source={x:Type tfs:Severity},Converter={StaticResource EnumToItemsSourceConverter},ConverterParameter='false'}" SelectedItem="{Binding Severity}" DisplayMemberPath="DisplayName" ValuePath="Value" Margin="10 0 0 0" Watermark="Severity" ></touch:TouchComboBox>
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+
+ <touch:TouchDropShadowBorder Margin="20" Padding="20">
+ <StackPanel>
+ <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
+ <touch:TouchIcon Icon="Repeat" Width="30"></touch:TouchIcon>
+ <TextBlock FontWeight="Medium" Margin="20 0 0 0" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Steps To Reproduce</TextBlock>
+ </StackPanel>
+
+ <StackPanel Margin="0 40 0 0">
+ <DockPanel>
+ <touch:TouchIcon VerticalAlignment="Top" Icon="ChevronRight" Width="24" />
+ <TextBox Margin="10 0 0 0" Text="{Binding Steps}" FocusVisualStyle="{x:Null}" BorderBrush="{StaticResource TangoDividerBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" AcceptsReturn="True" TextWrapping="Wrap" Height="80" Padding="5" keyboard:KeyboardView.Mode="AlphaNumeric" keyboard:KeyboardView.Action="Return" />
+ </DockPanel>
+ </StackPanel>
+ </StackPanel>
+ </touch:TouchDropShadowBorder>
+ </StackPanel>
+ </DockPanel>
+ </Grid>
+ </Grid>
+</UserControl>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Views/MainView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/Views/MainView.xaml.cs
new file mode 100644
index 000000000..56342d3c2
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/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.BugReporting.Views
+{
+ /// <summary>
+ /// Interaction logic for MainView.xaml
+ /// </summary>
+ public partial class MainView : UserControl
+ {
+ public MainView()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/app.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/app.config
new file mode 100644
index 000000000..1e22e6a88
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/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.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral"/>
+ <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0"/>
+ </dependentAssembly>
+ <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>
+ </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>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1"/></startup></configuration>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/packages.config b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/packages.config
new file mode 100644
index 000000000..80367fdd2
--- /dev/null
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.BugReporting/packages.config
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="EntityFramework" version="6.0.0" targetFramework="net46" />
+ <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" />
+</packages> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/TechnicianModule.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/TechnicianModule.cs
index 07ef8cabf..55fea1323 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/TechnicianModule.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Technician/TechnicianModule.cs
@@ -11,7 +11,7 @@ using Tango.SharedUI.Helpers;
namespace Tango.PPC.Technician
{
- [PPCModule(5)]
+ [PPCModule(20)]
public class TechnicianModule : PPCModuleBase
{
public override string Name => "Technician";