aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
diff options
context:
space:
mode:
authorRoy Ben Shabat <roy.mail.net@gmail.com>2025-10-19 16:20:01 +0300
committerRoy Ben Shabat <roy.mail.net@gmail.com>2025-10-19 16:20:01 +0300
commit72fc39f873de467c1431d928bce4d39442205691 (patch)
treefc92559db7b57bb44606e040cd8ed4bd34494256 /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI
parent22ddd9e0b6efe5aef685c7fc9886e3d93cb350c0 (diff)
downloadTango-72fc39f873de467c1431d928bce4d39442205691.tar.gz
Tango-72fc39f873de467c1431d928bce4d39442205691.zip
MS LITE
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs48
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Build/DefaultBuildProvider.cs21
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/machine-trans.pngbin45618 -> 230871 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs12
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj74
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs16
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs24
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs49
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs18
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs41
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml32
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml20
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/lite.icobin0 -> 126856 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/procedures_dde.icobin0 -> 126856 bytes
20 files changed, 318 insertions, 68 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
index 618035112..0a3db2103 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/App.xaml
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Tango.MachineStudio.UI"
xmlns:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
+ xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters;assembly=Tango.MachineStudio.Common"
StartupUri="MainWindow.xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" d1p1:Ignorable="d" xmlns:d1p1="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resources="clr-namespace:Tango.MachineStudio.Common.Resources;assembly=Tango.MachineStudio.Common">
<Application.Resources>
@@ -25,6 +26,9 @@
<local:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
</ResourceDictionary>
</ResourceDictionary.MergedDictionaries>
+
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
</ResourceDictionary>
</Application.Resources>
</Application> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
index 26938b203..3b8e29bc8 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Authentication/DefaultAuthenticationProvider.cs
@@ -19,6 +19,7 @@ using Tango.MachineStudio.Common.Web;
using Tango.BL.Builders;
using System.Data.Entity.Core;
using System.Windows.Threading;
+using Tango.MachineStudio.Common.Buid;
namespace Tango.MachineStudio.UI.Authentication
{
@@ -31,6 +32,7 @@ namespace Tango.MachineStudio.UI.Authentication
{
private MachineStudioWebClient _client;
private DispatcherTimer _refreshTokenTimer;
+ private IBuildProvider _buildProvider;
private User _currentUser;
/// <summary>
@@ -47,6 +49,13 @@ namespace Tango.MachineStudio.UI.Authentication
}
}
+ private Machine _machine;
+ public Machine Machine
+ {
+ get { return _machine; }
+ set { _machine = value; RaisePropertyChangedAuto(); }
+ }
+
/// <summary>
/// Occurs when the current logged-in user has changed.
/// </summary>
@@ -56,9 +65,10 @@ namespace Tango.MachineStudio.UI.Authentication
/// Initializes a new instance of the <see cref="DefaultAuthenticationProvider"/> class.
/// </summary>
/// <param name="machineStudioWebClient">The machine studio web client.</param>
- public DefaultAuthenticationProvider(MachineStudioWebClient machineStudioWebClient)
+ public DefaultAuthenticationProvider(MachineStudioWebClient machineStudioWebClient, IBuildProvider buildProvider)
{
_client = machineStudioWebClient;
+ _buildProvider = buildProvider;
_refreshTokenTimer = new DispatcherTimer();
_refreshTokenTimer.Interval = TimeSpan.FromMinutes(30);
@@ -90,7 +100,7 @@ namespace Tango.MachineStudio.UI.Authentication
/// <param name="password">The password.</param>
/// <returns></returns>
/// <exception cref="AuthenticationException">Login failed for user " + email</exception>
- public AuthenticationLoginResult Login(string email, string password, LoginMethod method, bool bypassVersionCheck = false, Action<String> logAction = null)
+ public AuthenticationLoginResult Login(string email, string password, LoginMethod method, bool bypassVersionCheck = false, Action<String> logAction = null, String serialNumber = null)
{
_refreshTokenTimer.Stop();
@@ -157,10 +167,20 @@ namespace Tango.MachineStudio.UI.Authentication
try
{
- ObservablesStaticCollections.Instance.Initialize((x) =>
+ if (_buildProvider.BuildType == MSBuildType.Default)
{
- logAction.Invoke(x);
- });
+ ObservablesStaticCollections.Instance.Initialize((x) =>
+ {
+ logAction.Invoke(x);
+ });
+ }
+ else
+ {
+ ObservablesStaticCollections.Instance.InitializeLite((x) =>
+ {
+ logAction.Invoke(x);
+ });
+ }
}
catch (Exception ex)
{
@@ -179,6 +199,24 @@ namespace Tango.MachineStudio.UI.Authentication
CurrentUser = user;
+ if (_buildProvider.BuildType == MSBuildType.Lite)
+ {
+ var machine = new MachineBuilder(db).Set(x => x.SerialNumber.ToLower() == serialNumber.ToLower()).WithOrganization().Build();
+
+ if (machine == null)
+ {
+ throw new AuthenticationException($"Machine with serial number '{serialNumber}' could not be found.");
+ }
+
+ if (machine.Organization.Guid != user.Organization.Guid)
+ {
+ throw new AuthenticationException($"You are not authorized to access the specified machine.");
+ }
+
+ Machine = machine;
+
+ }
+
_refreshTokenTimer.Start();
logAction.Invoke("Starting application...");
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Build/DefaultBuildProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Build/DefaultBuildProvider.cs
new file mode 100644
index 000000000..0e1df88c8
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Build/DefaultBuildProvider.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.MachineStudio.Common.Buid;
+
+namespace Tango.MachineStudio.UI.Build
+{
+ public class DefaultBuildProvider : IBuildProvider
+ {
+ public MSBuildType BuildType { get; }
+
+ public DefaultBuildProvider()
+ {
+#if LITE
+ BuildType = MSBuildType.Lite;
+#endif
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/machine-trans.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/machine-trans.png
index a7cf65852..9b4d8c798 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/machine-trans.png
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Images/machine-trans.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
index 2e201b6af..4dc1bb713 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/MainWindow.xaml.cs
@@ -21,6 +21,7 @@ using Tango.Core.DI;
using Tango.Core.Helpers;
using Tango.Logging;
using Tango.MachineStudio.Common;
+using Tango.MachineStudio.Common.Buid;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.Settings;
@@ -43,15 +44,6 @@ namespace Tango.MachineStudio.UI
{
InitializeComponent();
- try
- {
- _is_testing = TestHelper.IsRunningUnderTestStudio();
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, LogCategory.Warning, "An error occurred while trying to get the parent process of machine studio.");
- }
-
if (!_is_testing)
{
Viewbox box = new Viewbox();
@@ -89,7 +81,7 @@ namespace Tango.MachineStudio.UI
{
WindowState = WindowState.Maximized;
- Title = "MACHINE STUDIO " + TangoIOC.Default.GetInstance<IStudioApplicationManager>().Version.ToString(3);
+ Title = "MACHINE STUDIO " + (TangoIOC.Default.GetInstance<IBuildProvider>().BuildType == MSBuildType.Lite ? "LITE " : "") + TangoIOC.Default.GetInstance<IStudioApplicationManager>().Version.ToString(3);
}
private void MainWindow_SizeChanged(object sender, SizeChangedEventArgs e)
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
index b2c5cc8dc..6f2e8e3fb 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs
@@ -4,5 +4,5 @@ using System.Runtime.InteropServices;
[assembly: System.Windows.ThemeInfo(System.Windows.ResourceDictionaryLocation.None, System.Windows.ResourceDictionaryLocation.SourceAssembly)]
[assembly: AssemblyTitle("Tango - Machine Studio")]
-[assembly: AssemblyVersion("6.0.4.0")]
+[assembly: AssemblyVersion("6.1.0.0")]
[assembly: ComVisible(false)] \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
index 7a0a9414c..addf4f941 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/TFS/TeamFoundationServiceExtendedClient.cs
@@ -17,6 +17,7 @@ using Tango.Integration.Operation;
using Tango.Logging;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Authentication;
+using Tango.MachineStudio.Common.Buid;
using Tango.MachineStudio.Common.StudioApplication;
using Tango.Settings;
using Tango.SharedUI.Helpers;
@@ -28,6 +29,7 @@ namespace Tango.MachineStudio.UI.TFS
{
private TemporaryFolder _tempFolder;
private String user_email;
+ private IBuildProvider _buildProvider;
public Project Project { get; private set; }
@@ -48,14 +50,14 @@ namespace Tango.MachineStudio.UI.TFS
public TeamFoundationServiceExtendedClient(string collectionURL, string userName, string personalToken) : base(collectionURL, userName, personalToken)
{
_tempFolder = TemporaryManager.CreateFolder();
-
+ _buildProvider = TangoIOC.Default.GetInstance<IBuildProvider>();
ResolvedWorkItems = new ObservableCollection<WorkItem>();
TangoIOC.Default.GetInstance<IAuthenticationProvider>().CurrentUserChanged += TeamFoundationServiceExtendedClient_CurrentUserChanged;
}
private void TeamFoundationServiceExtendedClient_CurrentUserChanged(object sender, User user)
{
- if (user != null)
+ if (user != null && _buildProvider.BuildType == MSBuildType.Default)
{
user_email = user.Email;
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
index e7ae4f1de..906dc6bbd 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Tango.MachineStudio.UI.csproj
@@ -22,7 +22,17 @@
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Build\Machine Studio\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <DefineConstants>TRACE;DEBUG</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'MS_LITE_Debug|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>..\..\Build\Machine Studio Lite\Debug\</OutputPath>
+ <DefineConstants>TRACE;DEBUG;LITE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
@@ -35,6 +45,15 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'MS_LITE|AnyCPU' ">
+ <PlatformTarget>AnyCPU</PlatformTarget>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\Build\Machine Studio Lite\Release\</OutputPath>
+ <DefineConstants>TRACE;LITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
<PropertyGroup>
<ApplicationIcon>machine_new_small.ico</ApplicationIcon>
</PropertyGroup>
@@ -69,7 +88,9 @@
<Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.WindowsAzure.Storage, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
+ <Reference Include="Microsoft.WindowsAzure.Storage, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
+ <SpecificVersion>False</SpecificVersion>
+ </Reference>
<Reference Include="SimpleValidator, Version=0.6.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\SimpleValidator.0.6.1.0\lib\net40\SimpleValidator.dll</HintPath>
</Reference>
@@ -146,6 +167,7 @@
<Compile Include="..\..\Versioning\GlobalVersionInfo.cs">
<Link>GlobalVersionInfo.cs</Link>
</Compile>
+ <Compile Include="Build\DefaultBuildProvider.cs" />
<Compile Include="Console\ConsoleManager.cs" />
<Compile Include="Console\ConsoleOnExecuteParameters.cs" />
<Compile Include="Console\ConsoleWindow.xaml.cs">
@@ -360,6 +382,12 @@
<Link>TCC\template.bmp</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
+ <Content Include="lite.ico">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </Content>
+ <Resource Include="procedures_dde.ico">
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </Resource>
<Resource Include="Images\external-bridge-lan.png" />
<Resource Include="Images\login_white.png" />
<Resource Include="Images\login.png" />
@@ -408,6 +436,10 @@
<Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project>
<Name>Tango.BL</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\Tango.CircularGauge\Tango.CircularGauge.csproj">
+ <Project>{6efd5895-177b-4bbb-af52-29f4d53b3fbd}</Project>
+ <Name>Tango.CircularGauge</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\Tango.CodeGeneration\Tango.CodeGeneration.csproj">
<Project>{caedae94-11ed-473c-888a-268a6d38cd20}</Project>
<Name>Tango.CodeGeneration</Name>
@@ -428,6 +460,10 @@
<Project>{99081c0e-065c-4d68-bf60-f82330cca02d}</Project>
<Name>Tango.Git</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\Tango.Hive\Tango.Hive.csproj">
+ <Project>{942134ac-6ea2-4500-8f22-0f739b70a05f}</Project>
+ <Name>Tango.Hive</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\Tango.Integration\Tango.Integration.csproj">
<Project>{4206ac58-3b57-4699-8835-90bf6db01a61}</Project>
<Name>Tango.Integration</Name>
@@ -712,7 +748,37 @@ copy /Y "$(SolutionDir)Referenced Assemblies\Microsoft.WITDataStore32.dll" "$(Ta
if $(ConfigurationName) == Release del *.xml
if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)ProtoCompilers\"
if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)Roslyn\"
-if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)lib\"</PostBuildEvent>
+if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)lib\"
+
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.ActionLogs.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.Catalogs.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.DataCapture.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.Dispensers.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.HardwareDesigner.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.Logging.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.MachineDesigner.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.MachineManager.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.Sites.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.Statistics.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.Storage.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.Stubs.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.ThreadExtensions.dll"
+if $(ConfigurationName) == MS_LITE_Debug del "$(TargetDir)Tango.MachineStudio.UsersAndRoles.dll"
+
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.ActionLogs.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.Catalogs.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.DataCapture.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.Dispensers.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.HardwareDesigner.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.Logging.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.MachineDesigner.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.MachineManager.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.Sites.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.Statistics.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.Storage.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.Stubs.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.ThreadExtensions.dll"
+if $(ConfigurationName) == MS_LITE del "$(TargetDir)Tango.MachineStudio.UsersAndRoles.dll"</PostBuildEvent>
</PropertyGroup>
<Import Project="..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.108.0\build\net46\System.Data.SQLite.Core.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
@@ -723,7 +789,7 @@ if $(ConfigurationName) == Release RD /S /Q "$(TargetDir)lib\"</PostBuildEvent>
</Target>
<ProjectExtensions>
<VisualStudio>
- <UserProperties BuildVersion_UseGlobalSettings="False" BuildVersion_DetectChanges="True" BuildVersion_UpdateFileVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_StartDate="2000/1/1" />
+ <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_BuildVersioningStyle="None.None.Increment.DeltaBaseYearDayOfYear" BuildVersion_UpdateFileVersion="True" BuildVersion_DetectChanges="True" BuildVersion_UseGlobalSettings="False" />
</VisualStudio>
</ProjectExtensions>
</Project> \ No newline at end of file
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
index 9f4787004..3aaf3fac5 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModelLocator.cs
@@ -6,6 +6,7 @@ using Tango.Core.DI;
using Tango.Integration.ExternalBridge;
using Tango.Logging;
using Tango.MachineStudio.Common.Authentication;
+using Tango.MachineStudio.Common.Buid;
using Tango.MachineStudio.Common.Diagnostics;
using Tango.MachineStudio.Common.EventLogging;
using Tango.MachineStudio.Common.FirmwareUpgrade;
@@ -18,6 +19,7 @@ using Tango.MachineStudio.Common.Threading;
using Tango.MachineStudio.Common.Video;
using Tango.MachineStudio.Common.Web;
using Tango.MachineStudio.UI.Authentication;
+using Tango.MachineStudio.UI.Build;
using Tango.MachineStudio.UI.Console;
using Tango.MachineStudio.UI.FirmwareUpgrade;
using Tango.MachineStudio.UI.Modules;
@@ -72,6 +74,7 @@ namespace Tango.MachineStudio.UI
TangoIOC.Default.Unregister<IFirmwareUpgrader>();
TangoIOC.Default.Unregister<MachineStudioWebClient>();
TangoIOC.Default.Unregister<IActionLogManager>();
+ TangoIOC.Default.Unregister<IBuildProvider>();
@@ -84,6 +87,7 @@ namespace Tango.MachineStudio.UI
TangoIOC.Default.Register<MachineStudioWebClient, MachineStudioWebClient>(new MachineStudioWebClient());
}
+ TangoIOC.Default.Register<IBuildProvider, DefaultBuildProvider>();
TangoIOC.Default.Register<IDispatcherProvider, DefaultDispatcherProvider>(new DefaultDispatcherProvider(Application.Current.Dispatcher));
TangoIOC.Default.Register<INotificationProvider, DefaultNotificationProvider>();
TangoIOC.Default.Register<IAuthenticationProvider, DefaultAuthenticationProvider>();
@@ -93,7 +97,17 @@ namespace Tango.MachineStudio.UI
TangoIOC.Default.Register<IVideoCaptureProvider, DefaultVideoCaptureProvider>();
TangoIOC.Default.Register<IDiagnosticsFrameProvider, DefaultDiagnosticsFrameProvider>();
TangoIOC.Default.Register<IEventLogger, DefaultEventLogger>();
- TangoIOC.Default.Register<ISpeechProvider, DefaultSpeechProvider>();
+
+
+ if (TangoIOC.Default.GetInstance<IBuildProvider>().BuildType == MSBuildType.Lite)
+ {
+ TangoIOC.Default.Register<ISpeechProvider, LiteSpeechProvider>();
+ }
+ else
+ {
+ TangoIOC.Default.Register<ISpeechProvider, DefaultSpeechProvider>();
+ }
+
TangoIOC.Default.Register<IFirmwareUpgrader, DefaultFirmwareUpgrader>();
TangoIOC.Default.Register<IActionLogManager, DefaultActionLogManager>(new DefaultActionLogManager() { IsAsync = true });
TangoIOC.Default.Register<TeamFoundationServiceExtendedClient>(new TeamFoundationServiceExtendedClient("https://twinetfs.visualstudio.com", String.Empty, "pyulwgs7m3v7pizz3oxusypdkdfw43txggo5mjwu2ouyv2qwprhq"));
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
index e55d0534e..05181fd3f 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoadingViewVM.cs
@@ -21,6 +21,7 @@ using Tango.MachineStudio.Common.Web;
using Tango.Core.DI;
using Tango.Settings;
using Tango.Core;
+using Tango.MachineStudio.Common.Buid;
namespace Tango.MachineStudio.UI.ViewModels
{
@@ -35,6 +36,7 @@ namespace Tango.MachineStudio.UI.ViewModels
private INavigationManager _navigationManager;
private IStudioModuleLoader _studioModuleLoader;
private IEventLogger _eventLogger;
+ private IBuildProvider _buildProvider;
private LogManager logManager = LogManager.Default;
public IStudioApplicationManager ApplicationManager { get; set; }
@@ -58,7 +60,7 @@ namespace Tango.MachineStudio.UI.ViewModels
/// <param name="navigationManager">The navigation manager.</param>
/// <param name="studioModuleLoader">The studio module loader.</param>
/// <param name="notificationProvider">The notification provider.</param>
- public LoadingViewVM(IStudioApplicationManager applicationManager, INavigationManager navigationManager, IStudioModuleLoader studioModuleLoader, INotificationProvider notificationProvider, IEventLogger eventLogger, TeamFoundationServiceExtendedClient teamFoundationClient)
+ public LoadingViewVM(IBuildProvider buildProvider, IStudioApplicationManager applicationManager, INavigationManager navigationManager, IStudioModuleLoader studioModuleLoader, INotificationProvider notificationProvider, IEventLogger eventLogger, TeamFoundationServiceExtendedClient teamFoundationClient)
{
Status = "Loading, please wait...";
_tfs = teamFoundationClient;
@@ -67,6 +69,7 @@ namespace Tango.MachineStudio.UI.ViewModels
_navigationManager = navigationManager;
_studioModuleLoader = studioModuleLoader;
_notificationProvider = notificationProvider;
+ _buildProvider = buildProvider;
}
/// <summary>
@@ -89,15 +92,18 @@ namespace Tango.MachineStudio.UI.ViewModels
{
try
{
- try
+ if (_buildProvider.BuildType == MSBuildType.Default)
{
- Status = "Connecting to Team Foundation Services...";
- _tfs.Initialize();
- Thread.Sleep(500);
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, "Could not initialize Team Foundation Service client.");
+ try
+ {
+ Status = "Connecting to Team Foundation Services...";
+ _tfs.Initialize();
+ Thread.Sleep(500);
+ }
+ catch (Exception ex)
+ {
+ LogManager.Log(ex, "Could not initialize Team Foundation Service client.");
+ }
}
Status = "Loading, please wait...";
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
index 7fa79984b..e7a32d107 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/LoginViewVM.cs
@@ -25,6 +25,8 @@ using Tango.Web;
using SimpleValidator.Extensions;
using Tango.BL.Entities;
using System.Data.Entity;
+using Tango.MachineStudio.Common.Buid;
+using System.Diagnostics;
namespace Tango.MachineStudio.UI.ViewModels
{
@@ -42,6 +44,7 @@ namespace Tango.MachineStudio.UI.ViewModels
private MachineStudioSettings _settings;
private MachineStudioWebClient _machineStudioWebClient;
private TaskCompletionSource<object> _updatePasswordCompletionSource;
+ private IBuildProvider _buildProvider;
private String _email;
/// <summary>
@@ -66,6 +69,17 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _password = value; RaisePropertyChangedAuto(); }
}
+ private String _serialNumber;
+ /// <summary>
+ /// Gets or sets the password.
+ /// </summary>
+ [Required(ErrorMessage = "Serial Number is required")]
+ public String SerialNumber
+ {
+ get { return _serialNumber; }
+ set { _serialNumber = value; RaisePropertyChangedAuto(); }
+ }
+
private DeploymentSlot _deploymentSlot;
/// <summary>
/// Gets or sets the deployment slot.
@@ -156,6 +170,8 @@ namespace Tango.MachineStudio.UI.ViewModels
set { _newPassword2 = value; RaisePropertyChangedAuto(); }
}
+ public List<DeploymentSlot> Environments { get; set; }
+
/// <summary>
/// Gets or sets the login command.
/// </summary>
@@ -172,24 +188,42 @@ namespace Tango.MachineStudio.UI.ViewModels
/// <param name="authenticationProvider">The authentication provider.</param>
/// <param name="navigationManager">The navigation manager.</param>
/// <param name="notificationProvider">The notification provider.</param>
- public LoginViewVM(MachineStudioWebClient machineStudioWebClient, IAuthenticationProvider authenticationProvider, INavigationManager navigationManager, INotificationProvider notificationProvider, IEventLogger eventLogger)
+ public LoginViewVM(IBuildProvider buildProvider, MachineStudioWebClient machineStudioWebClient, IAuthenticationProvider authenticationProvider, INavigationManager navigationManager, INotificationProvider notificationProvider, IEventLogger eventLogger)
{
EnableSlotSelection = true;
ShowLoggingDetails = true;
_machineStudioWebClient = machineStudioWebClient;
+ _buildProvider = buildProvider;
_settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
+ if (_buildProvider.BuildType == MSBuildType.Default)
+ {
+ Environments = Enum.GetValues(typeof(DeploymentSlot)).Cast<DeploymentSlot>().ToList();
+ }
+ else
+ {
+ Environments = new List<DeploymentSlot>();
+
+ Environments.Add(DeploymentSlot.DEV);
+ Environments.Add(DeploymentSlot.TEST);
+ Environments.Add(DeploymentSlot.BETA);
+ Environments.Add(DeploymentSlot.PROD);
+ }
+
_notificationProvider = notificationProvider;
_navigationManager = navigationManager;
_authenticationProvider = authenticationProvider;
+ _buildProvider = buildProvider;
_eventLogger = eventLogger;
LoginCommand = new RelayCommand(Login, () => !IsLogging);
UpdatePasswordCommand = new RelayCommand(UpdatePassword, () => IsChangingPassword);
cryptographer = new Rfc2898Cryptographer();
Email = _settings.LastLoginEmail;
+ SerialNumber = _settings.LastLoginSerialNumber;
DeploymentSlot = _settings.DeploymentSlot;
+
RememberMe = _settings.RememberMe;
if (_settings.LastLoginMethod == LoginMethod.ActiveDirectory)
@@ -201,6 +235,12 @@ namespace Tango.MachineStudio.UI.ViewModels
IsStandardUser = true;
}
+ if (_buildProvider.BuildType == MSBuildType.Lite)
+ {
+ IsStandardUser = true;
+ }
+
+
try
{
Password = cryptographer.Decrypt(_settings.LastLoginPassword);
@@ -236,7 +276,7 @@ namespace Tango.MachineStudio.UI.ViewModels
LoginResponse result = _authenticationProvider.Login(Email, Password, loginMethod, _settings.ByPassEnvironmentVersionCheck, (progress) =>
{
ProgressLog = progress;
- }).Response;
+ }, SerialNumber).Response;
if (result.VersionChangeRequired && !_settings.ByPassEnvironmentVersionCheck)
{
@@ -271,6 +311,7 @@ namespace Tango.MachineStudio.UI.ViewModels
_settings.RememberMe = RememberMe;
_settings.LastLoginMethod = loginMethod;
_settings.LastLoginPassword = RememberMe ? cryptographer.Encrypt(Password) : null;
+ _settings.LastLoginSerialNumber = SerialNumber;
_settings.Save();
EnableSlotSelection = false;
@@ -280,11 +321,11 @@ namespace Tango.MachineStudio.UI.ViewModels
IsChangingPassword = false;
InvalidateRelayCommands();
- InvokeUI(() =>
+ InvokeUI(() =>
{
MainWindow.Instance.Title += $" - {_settings.DeploymentSlot}";
});
-
+
});
}
catch (Exception ex)
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
index 511733984..04e645afd 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MachineConnectionViewVM.cs
@@ -9,6 +9,7 @@ using Tango.Emulations.ExternalBridge;
using Tango.Integration.ExternalBridge;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Authentication;
+using Tango.MachineStudio.Common.Buid;
using Tango.MachineStudio.Common.Notifications;
using Tango.Settings;
using Tango.SharedUI;
@@ -67,7 +68,18 @@ namespace Tango.MachineStudio.UI.ViewModels
{
var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
_scanner = new ExternalBridgeScanner();
+
_scanner.SignalRConfiguration.Enabled = settings.EnableExternalBridgeSignalR;
+
+ var buildProvider = TangoIOC.Default.GetInstance<IBuildProvider>();
+
+ if (buildProvider.BuildType == MSBuildType.Lite)
+ {
+ _scanner.SignalRConfiguration.Enabled = false;
+ var authProvider = TangoIOC.Default.GetInstance<IAuthenticationProvider>();
+ _scanner.KnownMachines = new List<BL.Entities.Machine>() { authProvider.Machine };
+ }
+
if (App.StartupArgs.Contains("-webDebug"))
{
_scanner.SignalRConfiguration.Address = "http://localhost:1111/"; //settings.DeploymentSlot.ToAddress();
@@ -115,10 +127,12 @@ namespace Tango.MachineStudio.UI.ViewModels
try
{
+ var buildProvider = TangoIOC.Default.GetInstance<IBuildProvider>();
+
_scanner.AvailableMachines.Clear();
- _scanner.SignalRConfiguration.Enabled = !TangoIOC.Default.GetInstance<IAuthenticationProvider>().CurrentUser.PreventRemoteMachineAccess;
+ _scanner.SignalRConfiguration.Enabled = !TangoIOC.Default.GetInstance<IAuthenticationProvider>().CurrentUser.PreventRemoteMachineAccess && buildProvider.BuildType == MSBuildType.Default;
- if (SettingsManager.Default.GetOrCreate<MachineStudioSettings>().UseExternalBridgeEmulator)
+ if (SettingsManager.Default.GetOrCreate<MachineStudioSettings>().UseExternalBridgeEmulator && buildProvider.BuildType == MSBuildType.Default)
{
if (_emulator != null)
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
index 5ba726700..c4ee5a4b1 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/ViewModels/MainViewVM.cs
@@ -21,6 +21,7 @@ using Tango.Integration.ExternalBridge;
using Tango.Logging;
using Tango.MachineStudio.Common;
using Tango.MachineStudio.Common.Authentication;
+using Tango.MachineStudio.Common.Buid;
using Tango.MachineStudio.Common.Diagnostics;
using Tango.MachineStudio.Common.EventLogging;
using Tango.MachineStudio.Common.Messages;
@@ -61,6 +62,7 @@ namespace Tango.MachineStudio.UI.ViewModels
private IExternalBridgeClient _reconnectionMachine;
private MachineLoginViewVM _reconnectionMachineConfig;
private bool _lastUploadHardwareConfigLocal;
+ private IBuildProvider _buildProvider;
/// <summary>
/// Gets or sets the current loaded module.
@@ -293,7 +295,8 @@ namespace Tango.MachineStudio.UI.ViewModels
IDiagnosticsFrameProvider frameProvider,
ISpeechProvider speechProvider,
TeamFoundationServiceExtendedClient tfs,
- MachineStudioWebClient machineStudioWebClient) : base()
+ MachineStudioWebClient machineStudioWebClient,
+ IBuildProvider buildProvider) : base()
{
_machineStudioWebClient = machineStudioWebClient;
TFSClient = tfs;
@@ -305,6 +308,7 @@ namespace Tango.MachineStudio.UI.ViewModels
ApplicationManager = applicationManager;
DiagnosticsFrameProvider = frameProvider;
SpeechProvider = speechProvider;
+ _buildProvider = buildProvider;
_settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
@@ -378,6 +382,8 @@ namespace Tango.MachineStudio.UI.ViewModels
private void UpdateCheckThreadMethod()
{
+ if (_buildProvider.BuildType == MSBuildType.Lite) return; //Manual Update: TODO: Implement update through machine service
+
while (!DisableCheckForUpdates)
{
Thread.Sleep(TimeSpan.FromMinutes(0.2));
@@ -495,13 +501,20 @@ namespace Tango.MachineStudio.UI.ViewModels
}
else
{
- _notificationProvider.ShowModalDialog<MachineSerialViewVM>(async (vm) =>
+ if (_buildProvider.BuildType == MSBuildType.Lite)
+ {
+ await ConnectToMachineLocal(x.SelectedMachine, AuthenticationProvider.Machine, x.UploadHardwareConfiguration);
+ }
+ else
{
- if (vm.SelectedMachine != null)
+ _notificationProvider.ShowModalDialog<MachineSerialViewVM>(async (vm) =>
{
- await ConnectToMachineLocal(x.SelectedMachine, vm.SelectedMachine, x.UploadHardwareConfiguration);
- }
- });
+ if (vm.SelectedMachine != null)
+ {
+ await ConnectToMachineLocal(x.SelectedMachine, vm.SelectedMachine, x.UploadHardwareConfiguration);
+ }
+ });
+ }
}
base.InvalidateRelayCommands();
@@ -979,9 +992,21 @@ namespace Tango.MachineStudio.UI.ViewModels
}
}
- if (settings.LastMainModuleName != null)
+ if (_buildProvider.BuildType == MSBuildType.Default)
+ {
+ if (settings.LastMainModuleName != null)
+ {
+ var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName);
+
+ if (m != null)
+ {
+ StartModule(m);
+ }
+ }
+ }
+ else
{
- var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == settings.LastMainModuleName);
+ var m = StudioModuleLoader.UserModules.SingleOrDefault(x => x.Name == "Research");
if (m != null)
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
index 14fcc3a37..6643edbb7 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoadingView.xaml
@@ -5,12 +5,15 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters;assembly=Tango.MachineStudio.Common"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1280" Cursor="Wait" DataContext="{Binding LoadingViewVM, Source={StaticResource Locator}}" Background="Transparent">
<UserControl.Resources>
<converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
</UserControl.Resources>
<Grid>
@@ -19,6 +22,7 @@
<Image Source="{StaticResource MachineBig}" RenderOptions.BitmapScalingMode="Fant" Width="130"></Image>
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="70" Foreground="{StaticResource AccentColorBrush}">Machine Studio</TextBlock>
+ <TextBlock Visibility="{Binding Converter={StaticResource IsLiteToVisibilityConverter}}" Foreground="{StaticResource BlackForegroundBrush}" VerticalAlignment="Bottom" Margin="5 0 0 20">LITE</TextBlock>
</StackPanel>
<TextBlock HorizontalAlignment="Right" FontSize="18" Margin="0 0 -50 0" Foreground="{StaticResource AccentColorBrush}">Twine Solutions</TextBlock>
<mahapps:ProgressRing Margin="20 60 20 40" Width="80" Height="80" IsActive="{Binding IsLoading}"></mahapps:ProgressRing>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
index 9a3b3405e..c3ee5cf49 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/LoginView.xaml
@@ -10,6 +10,7 @@
xmlns:automation="clr-namespace:Tango.MachineStudio.Common.Automation;assembly=Tango.MachineStudio.Common"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:helpers="clr-namespace:Tango.SharedUI.Helpers;assembly=Tango.SharedUI"
+ xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters;assembly=Tango.MachineStudio.Common"
xmlns:common="clr-namespace:Tango.MachineStudio.Common;assembly=Tango.MachineStudio.Common"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
@@ -20,6 +21,8 @@
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
</UserControl.Resources>
@@ -44,17 +47,20 @@
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="40">
<Image Source="{StaticResource MachineBig}" RenderOptions.BitmapScalingMode="Fant" Width="100"></Image>
<TextBlock Margin="20 0 0 0" VerticalAlignment="Center" FontSize="70" Foreground="{StaticResource AccentColorBrush}">Machine Studio</TextBlock>
+ <TextBlock Visibility="{Binding Converter={StaticResource IsLiteToVisibilityConverter}}" Foreground="{StaticResource BlackForegroundBrush}" VerticalAlignment="Bottom" Margin="5 0 0 20">LITE</TextBlock>
</StackPanel>
<Grid>
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="-600 110 0 0" Visibility="{Binding ShowLoggingDetails,Converter={StaticResource BooleanToVisibilityConverter}}">
- <RadioButton ToolTip="Login using your an active directory account" IsChecked="{Binding IsActiveDirectory}" FontSize="16" VerticalContentAlignment="Center" Padding="10 0 0 0">
- <Image Source="/Images/active_directory.png" Stretch="Uniform" Height="80" RenderOptions.BitmapScalingMode="Fant" />
- </RadioButton>
- <RadioButton ToolTip="Login using a standard Machine Studio account" IsChecked="{Binding IsStandardUser}" FontSize="16" Margin="0 20 0 0" VerticalContentAlignment="Center" Padding="10 0 0 0">
- <Image Source="/Images/machinestudio_login.png" Stretch="Uniform" Height="55" RenderOptions.BitmapScalingMode="Fant" />
- </RadioButton>
- </StackPanel>
+ <Border Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}">
+ <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="-600 110 0 0" Visibility="{Binding ShowLoggingDetails,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <RadioButton ToolTip="Login using your an active directory account" IsChecked="{Binding IsActiveDirectory}" FontSize="16" VerticalContentAlignment="Center" Padding="10 0 0 0">
+ <Image Source="/Images/active_directory.png" Stretch="Uniform" Height="80" RenderOptions.BitmapScalingMode="Fant" />
+ </RadioButton>
+ <RadioButton ToolTip="Login using a standard Machine Studio account" IsChecked="{Binding IsStandardUser}" FontSize="16" Margin="0 20 0 0" VerticalContentAlignment="Center" Padding="10 0 0 0">
+ <Image Source="/Images/machinestudio_login.png" Stretch="Uniform" Height="55" RenderOptions.BitmapScalingMode="Fant" />
+ </RadioButton>
+ </StackPanel>
+ </Border>
<DockPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="320" Margin="0 120 0 0" Height="510">
<Grid DockPanel.Dock="Bottom" Margin="25 20 0 0" >
@@ -87,7 +93,7 @@
<Grid>
<StackPanel Visibility="{Binding ShowLoggingDetails,Converter={StaticResource BooleanToVisibilityConverter}}">
- <TextBlock HorizontalAlignment="Center" FontSize="24">Login to your account</TextBlock>
+
<Image Source="/Images/login.png" RenderOptions.BitmapScalingMode="Fant" Width="100" Margin="0 20 0 0"></Image>
<DockPanel Margin="0 20 0 0">
<materialDesign:PackIcon Margin="0 0 0 0" Width="20" Height="20" VerticalAlignment="Top" Foreground="{Binding ElementName=txtEmail, Path=BorderBrush}" Kind="EmailOutline" />
@@ -97,7 +103,7 @@
<Setter Property="materialDesign:HintAssist.Hint" Value="Active Directory Email"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsStandardUser}" Value="True">
- <Setter Property="materialDesign:HintAssist.Hint" Value="Machine Studio Email"></Setter>
+ <Setter Property="materialDesign:HintAssist.Hint" Value="Email"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
@@ -108,9 +114,13 @@
<materialDesign:PackIcon Margin="0 0 0 0" Width="20" Height="20" VerticalAlignment="Top" Foreground="{Binding ElementName=txtPass, Path=BorderBrush}" Kind="Key" />
<PasswordBox x:Name="txtPass" helpers:PasswordHelper.Attach="True" helpers:PasswordHelper.Password="{Binding Password,Mode=TwoWay}" Margin="5 0 0 0" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="Password" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" FontSize="20" Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" AutomationProperties.IsRequiredForForm="True" />
</DockPanel>
+ <DockPanel Margin="0 20 0 0" Visibility="{Binding Converter={StaticResource IsLiteToVisibilityConverter}}">
+ <materialDesign:PackIcon Margin="0 0 0 0" Width="20" Height="20" VerticalAlignment="Top" Foreground="{Binding ElementName=txtMachine, Path=BorderBrush}" Kind="Barcode" />
+ <TextBox x:Name="txtMachine" Text="{Binding SerialNumber}" Margin="5 0 0 0" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="Machine Serial Number" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" FontSize="20" AutomationProperties.IsRequiredForForm="True" />
+ </DockPanel>
<DockPanel Margin="0 40 0 0" IsEnabled="{Binding EnableSlotSelection}">
<materialDesign:PackIcon Margin="0 0 0 0" Width="20" Height="20" VerticalAlignment="Top" Foreground="{Binding ElementName=combo, Path=BorderBrush}" Kind="Settings" />
- <ComboBox x:Name="combo" ItemsSource="{Binding Source={x:Type web:DeploymentSlot},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding DeploymentSlot}" SelectedValuePath="Value" DisplayMemberPath="DisplayName" Margin="5 0 0 0" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="Environment" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" FontSize="20" />
+ <ComboBox x:Name="combo" ItemsSource="{Binding Environments}" SelectedItem="{Binding DeploymentSlot}" Margin="5 0 0 0" materialDesign:HintAssist.FloatingScale="0.50" materialDesign:HintAssist.Hint="Environment" materialDesign:TextFieldAssist.TextBoxViewMargin="1 0 1 0" FontSize="20" />
</DockPanel>
<TextBlock Visibility="{Binding EnableSlotSelection,Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin="25 0 0 0" FontSize="10" Foreground="Gray">Environment selection requires restarting the application</TextBlock>
<CheckBox Margin="25 20 0 0" IsChecked="{Binding RememberMe}">Remember me</CheckBox>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
index 59b9fe67f..e4758a311 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MachineConnectionView.xaml
@@ -9,6 +9,7 @@
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:emulations="clr-namespace:Tango.Emulations.ExternalBridge;assembly=Tango.Emulations"
xmlns:controls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
+ xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters;assembly=Tango.MachineStudio.Common"
xmlns:local="clr-namespace:Tango.MachineStudio.UI.Views"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="400" Width="700" Height="500" Background="{StaticResource Dialog.Background}" DataContext="{Binding MachineConnectionViewVM, Source={StaticResource Locator}}" Foreground="{StaticResource MainWindow.Foreground}">
@@ -17,6 +18,7 @@
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"></converters:BooleanToVisibilityConverter>
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter"></converters:BooleanToVisibilityInverseConverter>
<converters:BooleanInverseConverter x:Key="BooleanInverseConverter"></converters:BooleanInverseConverter>
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
</UserControl.Resources>
<Grid>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
index ea6e93412..e6bfbcca1 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml
@@ -29,6 +29,8 @@
<commonConverters:PermissionToVisibilityConverter x:Key="PermissionToVisibilityConverter" />
<converters:VersionToShortVersionConverter x:Key="VersionToShortVersionConverter" />
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
</UserControl.Resources>
<Grid>
@@ -67,7 +69,7 @@
IsChecked="{Binding Source={x:Reference MenuToggleButton}, Path=IsChecked, Mode=TwoWay}" />
</Grid>
<StackPanel Margin="0 16 0 0">
-
+
</StackPanel>
<StackPanel Margin="10 10 0 0">
<TextBlock Foreground="{StaticResource borderBrush}" FontSize="16" FontWeight="Bold" FontStyle="Italic">MODULES</TextBlock>
@@ -128,7 +130,8 @@
<ToggleButton VerticalAlignment="Center" Style="{StaticResource MaterialDesignHamburgerToggleButton}" IsChecked="{Binding IsMenuOpened}"
x:Name="MenuToggleButton"/>
- <StackPanel Margin="10 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
+ <TextBlock VerticalAlignment="Center" Visibility="{Binding Converter={StaticResource IsLiteToVisibilityConverter}}" Margin="10 0 0 0" Text="{Binding AuthenticationProvider.Machine.SerialNumber}" FontSize="{StaticResource LargeFontSize}" />
+ <StackPanel Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Margin="10 0 0 0" Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
<Image Source="/Images/login_white.png" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Width="50" Height="50"></Image>
<StackPanel Margin="0 5 0 0">
<TextBlock FontSize="16" TextTrimming="CharacterEllipsis" MaxWidth="170" FontStyle="Italic" FontWeight="Bold" Margin="10 0 0 0" VerticalAlignment="Center" Text="{Binding AuthenticationProvider.CurrentUser.Contact.FullName}"></TextBlock>
@@ -154,7 +157,7 @@
</StackPanel>
</StackPanel>
</StackPanel>
- <materialDesign:PopupBox DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False" >
+ <materialDesign:PopupBox Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" DockPanel.Dock="Right" PlacementMode="BottomAndAlignRightEdges" StaysOpen="False" >
<StackPanel>
<Button Command="{Binding ConnectCommand}">
<StackPanel Orientation="Horizontal">
@@ -263,6 +266,7 @@
<Image Source="{StaticResource MachineSmall}" RenderOptions.BitmapScalingMode="Fant"></Image>
<TextBlock VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36" Text="Machine Studio">
</TextBlock>
+ <TextBlock Visibility="{Binding Converter={StaticResource IsLiteToVisibilityConverter}}" Foreground="{StaticResource AccentColorBrush}" VerticalAlignment="Bottom" Margin="5 0 0 20">LITE</TextBlock>
</StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Height="60" HorizontalAlignment="Center">
<StackPanel.Style>
@@ -474,7 +478,7 @@
</Image>
</Button>
- <Button Cursor="Hand" Command="{Binding ReportIssueCommand}" IsEnabled="{Binding TFSClient.IsInitialized}">
+ <Button Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Cursor="Hand" Command="{Binding ReportIssueCommand}" IsEnabled="{Binding TFSClient.IsInitialized}">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource emptyButton}">
<Setter Property="ToolTip" Value="Report issue"></Setter>
@@ -489,6 +493,7 @@
</Button.Style>
<Image Margin="10 0 0 0" Source="/Images/bug.png" Width="24" RenderOptions.BitmapScalingMode="Fant" />
</Button>
+ <Grid Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}">
<Button Cursor="Hand" Command="{Binding OpenResolvedBugsCommand}">
<Button.Style>
<Style TargetType="Button" BasedOn="{StaticResource emptyButton}">
@@ -521,6 +526,7 @@
</Button.ToolTip>
<Image Margin="10 0 0 0" Source="/Images/bug-resolved.png" Width="24" RenderOptions.BitmapScalingMode="Fant" />
</Button>
+ </Grid>
</StackPanel>
</Grid>
</Grid>
@@ -538,14 +544,14 @@
<controls:NavigationControl x:Name="NavigationControl" TransitionAlwaysFades="True" TransitionType="Zoom">
<Grid controls:NavigationControl.NavigationName="Home">
<Grid.RowDefinitions>
- <RowDefinition Height="150"/>
+ <RowDefinition Height="0"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid>
- <StackPanel Margin="30 20" HorizontalAlignment="Left" TextElement.Foreground="#9A9A9A">
+ <!--<StackPanel Margin="30 20" HorizontalAlignment="Left" TextElement.Foreground="#9A9A9A">
<TextBlock FontSize="35">Welcome to Machine Studio</TextBlock>
<TextBlock HorizontalAlignment="Left" Margin="350 5 0 0" FontStyle="Italic" FontSize="16">The below modules are displayed according to your user roles and permissions.</TextBlock>
- </StackPanel>
+ </StackPanel>-->
</Grid>
<Grid Grid.Row="2">
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
index eb76bf4ec..40956a5a6 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Views/MainView.xaml.cs
@@ -28,6 +28,7 @@ using Tango.Logging;
using static Tango.SharedUI.Controls.NavigationControl;
using Tango.Core.DI;
using Tango.MachineStudio.Common.StudioApplication;
+using Tango.MachineStudio.Common.Buid;
namespace Tango.MachineStudio.UI.Views
{
@@ -57,6 +58,7 @@ namespace Tango.MachineStudio.UI.Views
LogManager.Default.Log("Loading modules views...");
var item = TangoIOC.Default.GetInstance<INotificationProvider>().PushTaskItem("Loading Modules...");
+ var buildProvider = TangoIOC.Default.GetInstance<IBuildProvider>();
var modules = _loader.UserModules.ToList();
@@ -83,14 +85,16 @@ namespace Tango.MachineStudio.UI.Views
_loader.UserModules.Add(module);
});
- UIHelper.DoEvents();
-
- Thread.Sleep(100);
+ //if (buildProvider.BuildType != MSBuildType.Lite)
+ //{
+ UIHelper.DoEvents();
+ Thread.Sleep(100);
+ //}
}
item.Pop();
- ThreadsHelper.InvokeUI(() =>
+ ThreadsHelper.InvokeUI(() =>
{
TangoIOC.Default.GetInstance<IStudioApplicationManager>().NotifyApplicationReady();
});
@@ -103,3 +107,4 @@ namespace Tango.MachineStudio.UI.Views
}
}
}
+
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/lite.ico b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/lite.ico
new file mode 100644
index 000000000..76d4332fe
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/lite.ico
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/procedures_dde.ico b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/procedures_dde.ico
new file mode 100644
index 000000000..76d4332fe
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/procedures_dde.ico
Binary files differ