aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/ViewModels/MainViewVM.cs25
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Views/MainView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs4
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs25
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs61
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj7
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/App.config81
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs15
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest2
22 files changed, 126 insertions, 122 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Properties/AssemblyInfo.cs
index 62cabff0f..96fc79687 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Events/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Events Module")]
-[assembly: AssemblyVersion("2.0.1.1407")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
index 8efd46e18..001888c92 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/AppButtons/StartPrintingButton.cs
@@ -11,7 +11,7 @@ namespace Tango.PPC.Jobs.AppButtons
{
public class StartPrintingButton : AppButton
{
- public StartPrintingButton(RelayCommand command, IMachineOperator op) : base("START DYEING", command)
+ public StartPrintingButton(RelayCommand command, IMachineOperator op) : base("DYE", command)
{
op.StatusChanged += Op_StatusChanged;
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs
index 095f10d3b..3f8126e3f 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Jobs Module")]
-[assembly: AssemblyVersion("2.0.7.1119")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly:ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
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
index 612af80ce..a834fd095 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Logging/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// 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: AssemblyVersion("1.0.0.0")]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs
index d07b99ec8..36ac78345 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Settings Module")]
-[assembly: AssemblyVersion("2.0.4.1119")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Properties/AssemblyInfo.cs
index a88d39005..def518165 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango Power Module")]
-[assembly: AssemblyVersion("2.0.1.1407")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/ViewModels/MainViewVM.cs
index b92a43489..bd8fe65f9 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/ViewModels/MainViewVM.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Tango.Core.Commands;
using Tango.PPC.Common;
namespace Tango.PPC.Power.ViewModels
@@ -14,11 +15,35 @@ namespace Tango.PPC.Power.ViewModels
public class MainViewVM : PPCViewModel
{
/// <summary>
+ /// Gets or sets the restart command.
+ /// </summary>
+ public RelayCommand RestartCommand { get; set; }
+
+ /// <summary>
+ /// Initializes a new instance of the <see cref="MainViewVM"/> class.
+ /// </summary>
+ public MainViewVM()
+ {
+ RestartCommand = new RelayCommand(RestartApplication);
+ }
+
+ /// <summary>
/// Called when the application has been started
/// </summary>
public override void OnApplicationStarted()
{
//Start initializing here rather then in the constructor.
}
+
+ /// <summary>
+ /// Restarts the application.
+ /// </summary>
+ private async void RestartApplication()
+ {
+ if (await NotificationProvider.ShowQuestion("Are you sure you want to restart the application?"))
+ {
+ ApplicationManager.Restart();
+ }
+ }
}
}
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Views/MainView.xaml
index 42c43eb32..4add8e94c 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Views/MainView.xaml
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Power/Views/MainView.xaml
@@ -42,7 +42,7 @@
<touch:TouchProgressBar Margin="10 5 0 0" Height="10" VerticalAlignment="Top" Maximum="100" Value="60" Foreground="{StaticResource TangoSuccessBrush}" />
</controls:TableGrid>
- <touch:TouchButton Height="60" Margin="0 0 0 0" CornerRadius="30" Width="250">RESTART</touch:TouchButton>
+ <touch:TouchButton Height="60" Margin="0 0 0 0" CornerRadius="30" Width="250" Command="{Binding RestartCommand}">RESTART</touch:TouchButton>
</StackPanel>
</Grid>
</StackPanel>
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Properties/AssemblyInfo.cs
index 201341ef7..804d83e9d 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Storage/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Storage Module")]
-[assembly: AssemblyVersion("2.0.2.1119")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs
index 0f2c9f8c4..41efbaf89 100644
--- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Synchronization/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango Module")]
-[assembly: AssemblyVersion("2.0.2.1119")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
index 340b64765..7c6287933 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Connection/DefaultMachineProvider.cs
@@ -93,6 +93,8 @@ namespace Tango.PPC.Common.Connection
MachineOperator.EnableEventsNotification = true;
MachineOperator.EnableJobResume = true;
MachineOperator.UseKeepAlive = true;
+ MachineOperator.EnableDiagnostics = false;
+ MachineOperator.EnableEmbeddedDebugging = false;
}
private async void ConnectionThreadMethod()
@@ -128,6 +130,8 @@ namespace Tango.PPC.Common.Connection
LogManager.Log("Connecting machine operator...");
MachineOperatorChanged?.Invoke(this, new MachineOperatorChangedEventArgs(MachineOperator, MachineOperator));
await MachineOperator.Connect();
+
+
}
else
{
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
index 36b31e888..23722319c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/OS/DefaultOperationSystemManager.cs
@@ -10,13 +10,14 @@ using Tango.PPC.Common.Scripting;
namespace Tango.PPC.Common.OS
{
using System.Collections.ObjectModel;
+ using Tango.Core;
using SLID = Guid; //SLID id declaration as typedef GUID SLID; in slpublic.h
/// <summary>
/// Represents the default windows activation manager.
/// </summary>
/// <seealso cref="Tango.PPC.Common.OS.IOperationSystemManager" />
- public class DefaultOperationSystemManager : IOperationSystemManager
+ public class DefaultOperationSystemManager : ExtendedObject, IOperationSystemManager
{
#region Win32
@@ -43,6 +44,8 @@ namespace Tango.PPC.Common.OS
{
return Task.Factory.StartNew<bool>(() =>
{
+ LogManager.Log("Validating windows activation...");
+
Guid ApplicationID = new Guid("55c92734-d682-4d71-983e-d6ec3f16059f"); //Application ID GUID http://technet.microsoft.com/en-us/library/dd772270.aspx
SLID windowsSlid = (Guid)ApplicationID;
try
@@ -51,11 +54,12 @@ namespace Tango.PPC.Common.OS
uint ResultInt = SLIsGenuineLocal(ref windowsSlid, ref genuineState, IntPtr.Zero);
if (ResultInt == 0)
{
+ LogManager.Log("OS activation status: " + genuineState.ToString());
return (genuineState == SL_GENUINE_STATE.SL_GEN_STATE_IS_GENUINE);
}
else
{
- throw new InvalidOperationException("An error occurred while trying to get the OS activation status.");
+ throw LogManager.Log(new InvalidOperationException("An error occurred while trying to get the OS activation status."));
}
}
@@ -73,12 +77,21 @@ namespace Tango.PPC.Common.OS
/// <returns></returns>
public async Task Activate(string activationKey)
{
- CmdCommand command = new CmdCommand("cscript", $"C:\\Windows\\System32\\slmgr.vbs -ipk {activationKey}");
- await command.Run();
+ if (!(await IsActivated()))
+ {
+ CmdCommand command = new CmdCommand("cscript", $"C:\\Windows\\System32\\slmgr.vbs -ipk {activationKey}");
+ await command.Run();
+
+ await Task.Delay(5000);
- if (!await IsActivated())
+ if (!await IsActivated())
+ {
+ throw new ApplicationException("The activation was completed but activation status returned a false response.");
+ }
+ }
+ else
{
- throw new ApplicationException("The activation was completed but activation status returned a false response.");
+ LogManager.Log("Windows is already activated. Skipping activation...");
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
index 7ef9f9fdc..7b617ddaa 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/PPCSettings.cs
@@ -90,7 +90,7 @@ namespace Tango.PPC.Common
EmbeddedComPort = null;
ExternalBridgePassword = "Aa123456";
HotSpotPassword = "Aa123456";
- DeploymentSlot = DeploymentSlot.PROD;
+ DeploymentSlot = DeploymentSlot.TEST;
}
}
}
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs
index d7075ef50..5d595893c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Properties/AssemblyInfo.cs
@@ -8,7 +8,7 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango Panel PC Common Library")]
-[assembly: AssemblyVersion("2.0.12.1608")]
+[assembly: AssemblyVersion("1.0.0.0")]
[assembly:ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs
index 040546b59..e8d19aa20 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteAssistance/DefaultRemoteAssistanceProvider.cs
@@ -94,6 +94,36 @@ namespace Tango.PPC.Common.RemoteAssistance
}
}
+ private async Task<bool> IsRemoteAssistanceInstalled()
+ {
+ bool exist = false;
+
+ for (int i = 0; i < 6; i++)
+ {
+ LogManager.Log("Checking remote assistance service...");
+ await Task.Delay(1000);
+ CmdCommand command = new CmdCommand("sc.exe", "query TeamViewer");
+ try
+ {
+ await command.Run();
+ exist = true;
+ break;
+ }
+ catch { }
+ }
+
+ if (exist)
+ {
+ LogManager.Log("Remote assistance service found.");
+ }
+ else
+ {
+ LogManager.Log("Remote assistance service was not found.");
+ }
+
+ return exist;
+ }
+
/// <summary>
/// Installs the remote assistance.
/// </summary>
@@ -108,31 +138,26 @@ namespace Tango.PPC.Common.RemoteAssistance
throw new FileNotFoundException($"The remote assistance installer file could not be found at {_installer_path}.");
}
- CmdCommand command = new CmdCommand("msiexec.exe", $"/i \"{_installer_path}\" /qn CUSTOMCONFIGID=ke43ann APITOKEN=4765529-gon1LwO1N1TTrlLI21ji ASSIGNMENTOPTIONS=\" --reassign --alias {"TANGO-" + machineSerialNumber} --grant-easy-access\"");
- await command.Run();
+ if (!(await IsRemoteAssistanceInstalled()))
+ {
+ CmdCommand command = new CmdCommand("msiexec.exe", $"/i \"{_installer_path}\" /qn CUSTOMCONFIGID=ke43ann APITOKEN=4765529-gon1LwO1N1TTrlLI21ji ASSIGNMENTOPTIONS=\" --reassign --alias {"TANGO-" + machineSerialNumber} --grant-easy-access\"");
+ command.Timeout = TimeSpan.FromSeconds(30);
+ await command.Run();
- bool exist = false;
+ bool exist = await IsRemoteAssistanceInstalled();
- for (int i = 0; i < 6; i++)
- {
- await Task.Delay(1000);
- command = new CmdCommand("sc.exe", "query TeamViewer");
- try
+ if (exist)
{
- await command.Run();
- exist = true;
- break;
+ await DisableRemoteAssistance();
+ }
+ else
+ {
+ throw new ApplicationException("The remote assistance service was installed but could not be found.");
}
- catch { }
- }
-
- if (exist)
- {
- await DisableRemoteAssistance();
}
else
{
- throw new ApplicationException("The remote assistance service was installed but could not be found.");
+ LogManager.Log("Remote assistance is already installed.");
}
}
catch (Exception ex)
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
index 8230d5a38..1b51876d7 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Tango.PPC.Common.csproj
@@ -86,7 +86,10 @@
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing" />
- <Reference Include="System.IO.Compression.FileSystem" />
+ <Reference Include="System.IO.Compression" />
+ <Reference Include="System.IO.Compression.FileSystem">
+ <Private>True</Private>
+ </Reference>
<Reference Include="System.Management" />
<Reference Include="System.Numerics" />
<Reference Include="System.Runtime.Serialization" />
@@ -350,7 +353,7 @@
</Target>
<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" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
index c4cbcdc32..330ca08df 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/App.config
@@ -9,86 +9,7 @@
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.2.2.0" newVersion="1.2.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Reflection.Metadata" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.4.2.0" newVersion="1.4.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.Compression" publicKeyToken="b77a5c561934e089" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.1.2.0" newVersion="4.1.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Security.Cryptography.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Xml.XPath.XDocument" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Console" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Diagnostics.StackTrace" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Reactive.Core" publicKeyToken="94bc3704cddfc263" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.0.3000.0" newVersion="3.0.3000.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.Data.OData" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.6.4.0" newVersion="5.6.4.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Microsoft.IdentityModel.Clients.ActiveDirectory.Platform" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-3.19.8.16603" newVersion="3.19.8.16603" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
- </dependentAssembly>
+
</assemblyBinding>
</runtime>
<entityFramework>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
index 302e401fb..765c792b1 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs
@@ -51,7 +51,7 @@ namespace Tango.PPC.UI
WindowStyle = WindowStyle.None;
ResizeMode = ResizeMode.NoResize;
WindowStartupLocation = WindowStartupLocation.Manual;
- Topmost = true; // sure?
+ Topmost = false; // sure?
Left = touch_screen.Bounds.Left;
Top = touch_screen.Bounds.Top;
Width = touch_screen.Bounds.Width;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
index 3916d6345..2929908cc 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs
@@ -172,7 +172,7 @@ namespace Tango.PPC.UI.PPCApplication
LogManager.Log("Initializing ObservablesStaticCollections...");
ObservablesStaticCollections.Instance.Initialize();
LogManager.Log("Loading machine from database...");
- _machine = new MachineBuilder(ObservablesContext.CreateDefault()).SetFirst().WithOrganization().WithConfiguration().Build();
+ _machine = new MachineBuilder(ObservablesContext.CreateDefault()).SetFirst().WithOrganization().WithConfiguration().WithSpools().Build();
}
initialized = true;
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
index d4951edda..e9e31e73b 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs
@@ -8,4 +8,4 @@ using System.Windows;
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Tango PPC Application")]
-[assembly: AssemblyVersion("2.0.18.1608")]
+[assembly: AssemblyVersion("1.0.0.0")]
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
index 516349a18..f926a0f4c 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoadingViewVM.cs
@@ -21,6 +21,7 @@ using Tango.PPC.Jobs;
using Tango.SharedUI;
using System.Data.Entity;
using Tango.BL.Enumerations;
+using Tango.BL.Builders;
namespace Tango.PPC.UI.ViewModels
{
@@ -79,7 +80,19 @@ namespace Tango.PPC.UI.ViewModels
if (db.Users.Count() == 1 || machine.AutoLogin)
{
- var user = await db.Users.FirstAsync();
+ var user = await new UserBuilder(db).SetFirst().WithRolesAndPermissions().BuildAsync();
+
+ if (!user.HasRole(Roles.PPCUser))
+ {
+ var role = db.Roles.Single(x => x.Code == (int)Roles.PPCUser);
+ user.Roles.Add(role);
+ db.UsersRoles.Add(new BL.Entities.UsersRole()
+ {
+ User = user,
+ Role = role,
+ });
+ await db.SaveChangesAsync();
+ }
LogManager.Log($"Application started. Single user/Auto login detected ({user.Email}). Skipping LoginView...");
await AuthenticationProvider.Login(user.Email, user.Password, false);
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
index efc5f8179..d72e75011 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest
@@ -16,7 +16,7 @@
Remove this element if your application requires this virtualization for backwards
compatibility.
-->
- <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />-->
+ <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>