aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
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
parent22ddd9e0b6efe5aef685c7fc9886e3d93cb350c0 (diff)
downloadTango-72fc39f873de467c1431d928bce4d39442205691.tar.gz
Tango-72fc39f873de467c1431d928bce4d39442205691.zip
MS LITE
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs75
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml9
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml14
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.pngbin315399 -> 44355 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs61
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml16
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BreakSensorItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs4
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/JobRunnerItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ProcessParametersItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SpeedSensorItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs6
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs5
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ValveItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml7
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Authentication/IAuthenticationProvider.cs4
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/AutoComplete/MachinesProvider.cs1
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/IBuildProvider.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/MSBuildType.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityConverter.cs35
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityInverseConverter.cs35
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.pngbin43275 -> 230871 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.pngbin16963 -> 230871 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs7
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Speech/LiteSpeechProvider.cs23
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj22
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml3
-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
70 files changed, 636 insertions, 184 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
index b7a254a03..0bb9033a8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj
@@ -300,18 +300,6 @@
<Project>{cb0b0aa2-bb24-4bca-a720-45e397684e12}</Project>
<Name>Tango.MachineStudio.Common</Name>
</ProjectReference>
- <ProjectReference Include="..\Tango.MachineStudio.DataCapture\Tango.MachineStudio.DataCapture.csproj">
- <Project>{fc337a7f-1214-41d8-9992-78092a3b961e}</Project>
- <Name>Tango.MachineStudio.DataCapture</Name>
- </ProjectReference>
- <ProjectReference Include="..\Tango.MachineStudio.Logging\Tango.MachineStudio.Logging.csproj">
- <Project>{1674f726-0e66-414f-b9fd-c6f20d7f07c7}</Project>
- <Name>Tango.MachineStudio.Logging</Name>
- </ProjectReference>
- <ProjectReference Include="..\Tango.MachineStudio.MachineDesigner\Tango.MachineStudio.MachineDesigner.csproj">
- <Project>{d0ce8122-077d-42a2-9490-028ae4769b52}</Project>
- <Name>Tango.MachineStudio.MachineDesigner</Name>
- </ProjectReference>
</ItemGroup>
<ItemGroup>
<Resource Include="Images\rgb.png" />
@@ -393,7 +381,7 @@
<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" />
+ <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/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index ab74433a6..36beab19a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -38,8 +38,6 @@ using System.Threading;
using Tango.SharedUI.Helpers;
using Tango.Core.DI;
using Tango.MachineStudio.Common;
-using Tango.MachineStudio.Logging.ViewModels;
-using Tango.MachineStudio.Logging.Views;
using Tango.AutoComplete.Editors;
using System.Data.Entity;
using System.Runtime.ExceptionServices;
@@ -53,6 +51,7 @@ using Microsoft.WindowsAPICodePack.Dialogs;
using Tango.BL.Enumerations;
using Tango.BL.DTO;
using Tango.BL.ActionLogs;
+using Tango.MachineStudio.Common.Buid;
namespace Tango.MachineStudio.Developer.ViewModels
{
@@ -68,6 +67,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
private const string EMB_FORMATS_IMPORT = "Embroidery Files|*.pes;*.hus;*.dst";
private INotificationProvider _notification;
+ private IBuildProvider _buildProvider;
private TimeSpan _runningJobEstimatedDuration;
private DeveloperNavigationManager _navigation;
private INavigationManager _msNavigation;
@@ -76,7 +76,6 @@ namespace Tango.MachineStudio.Developer.ViewModels
private ObservablesContext _activeJobDbContext;
private IEventLogger _eventLogger;
private ISpeechProvider _speech;
- private DataCapture.ViewModels.MainViewVM _dataCaptureVM;
private bool _isRecording;
private DeveloperModuleSettings _settings;
private Thread _colorConversionThread;
@@ -769,7 +768,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// </summary>
/// <param name="applicationManager">The application manager.</param>
/// <param name="notificationProvider">The notification provider.</param>
- public MainViewVM(IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider diagnosticsFrameProvider, IVideoCaptureProvider videoCaptureProvider, DeveloperNavigationManager navigation, INavigationManager navigationManager, IAuthenticationProvider authentication, IEventLogger eventLogger, ISpeechProvider speech, IActionLogManager actionLogManager)
+ public MainViewVM(IBuildProvider buildProvider, IStudioApplicationManager applicationManager, INotificationProvider notificationProvider, IDiagnosticsFrameProvider diagnosticsFrameProvider, IVideoCaptureProvider videoCaptureProvider, DeveloperNavigationManager navigation, INavigationManager navigationManager, IAuthenticationProvider authentication, IEventLogger eventLogger, ISpeechProvider speech, IActionLogManager actionLogManager)
{
_converter = new DefaultColorConverter();
@@ -781,6 +780,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
AuthenticationProvider = authentication;
_actionLogManager = actionLogManager;
+ _buildProvider = buildProvider;
_notification = notificationProvider;
_speech = speech;
_navigation = navigation;
@@ -791,11 +791,11 @@ namespace Tango.MachineStudio.Developer.ViewModels
LogManager.Log("Initializing relay commands...");
- TangoIOC.Default.GetInstanceWhenAvailable<DataCapture.ViewModels.MainViewVM>((vm) =>
- {
- _dataCaptureVM = vm;
- _dataCaptureVM.RelayCommandsInvalidated += (_, __) => StartJobAndRecordCommand.RaiseCanExecuteChanged();
- });
+ //TangoIOC.Default.GetInstanceWhenAvailable<DataCapture.ViewModels.MainViewVM>((vm) =>
+ //{
+ // _dataCaptureVM = vm;
+ // _dataCaptureVM.RelayCommandsInvalidated += (_, __) => StartJobAndRecordCommand.RaiseCanExecuteChanged();
+ //});
//Initialize Commands...
EditMachineCommand = new RelayCommand(EditMachine, () => SelectedMachine != null && CanWork);
@@ -811,7 +811,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
SaveJobCommand = new RelayCommand(SaveActiveJob, () => SelectedMachine != null && CanWork);
DiscardJobCommand = new RelayCommand(BackToJobs, () => SelectedMachine != null && CanWork);
StartJobCommand = new RelayCommand(() => StartJob(), () => ActiveJob != null && CanWork && !IsJobRunning && MachineOperator != null);
- StartJobAndRecordCommand = new RelayCommand(StartJobAndRecord, () => _dataCaptureVM != null && !_dataCaptureVM.Recorder.IsRecording && !_dataCaptureVM.Player.IsPlaying && ActiveJob != null && !IsJobRunning && MachineOperator != null && CanWork);
+ //StartJobAndRecordCommand = new RelayCommand(StartJobAndRecord, () => _dataCaptureVM != null && !_dataCaptureVM.Recorder.IsRecording && !_dataCaptureVM.Player.IsPlaying && ActiveJob != null && !IsJobRunning && MachineOperator != null && CanWork);
StopJobCommand = new RelayCommand(StopJob, () => IsJobRunning && CanWork);
CloseJobCompletionStatusCommand = new RelayCommand(CloseJobCompletionStatusBar);
LoadJobCommand = new RelayCommand(() => LoadSelectedJob(), () => SelectedMachineJob != null && CanWork);
@@ -856,7 +856,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
Settings = SettingsManager.Default.GetOrCreate<DeveloperModuleSettings>();
- Settings.PropertyChanged += (x, e) =>
+ Settings.PropertyChanged += (x, e) =>
{
if (e.PropertyName == nameof(Settings.UsePreferredLiquidVolumeIndex))
{
@@ -872,10 +872,17 @@ namespace Tango.MachineStudio.Developer.ViewModels
LogManager.Log("Initializing machine Db context...");
_machineDbContext = ObservablesContext.CreateDefault();
- if (_settings.LastSelectedMachineGuid != null)
+ if (_buildProvider.BuildType == MSBuildType.Lite)
{
- LogManager.Log("Setting last selected machine from settings...");
- SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == _settings.LastSelectedMachineGuid);
+ SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == AuthenticationProvider.Machine.Guid);
+ }
+ else
+ {
+ if (_settings.LastSelectedMachineGuid != null)
+ {
+ LogManager.Log("Setting last selected machine from settings...");
+ SelectedMachine = _machineDbContext.Machines.SingleOrDefault(x => x.Guid == _settings.LastSelectedMachineGuid);
+ }
}
if (_settings.LastSelectedJobGuid != null && SelectedMachine != null)
@@ -1352,17 +1359,17 @@ namespace Tango.MachineStudio.Developer.ViewModels
private void OnSelectedJobEventChanged()
{
- if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.APPLICATION_STARTED && !_dialog_shown)
- {
- _dialog_shown = true;
- _notification.ShowModalDialog<EventDetailsViewVM, EventDetailsView>(new EventDetailsViewVM(SelectedJobEvent), (x) =>
- {
+ //if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.APPLICATION_STARTED && !_dialog_shown)
+ //{
+ // _dialog_shown = true;
+ // _notification.ShowModalDialog<EventDetailsViewVM, EventDetailsView>(new EventDetailsViewVM(SelectedJobEvent), (x) =>
+ // {
- }, () =>
- {
- _dialog_shown = false;
- });
- }
+ // }, () =>
+ // {
+ // _dialog_shown = false;
+ // });
+ //}
}
/// <summary>
@@ -1588,9 +1595,9 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// </summary>
private void StartJobAndRecord()
{
- _isRecording = true;
- _dataCaptureVM.StartDiagnosticsRecording();
- StartJob();
+ //_isRecording = true;
+ //_dataCaptureVM.StartDiagnosticsRecording();
+ //StartJob();
}
/// <summary>
@@ -1598,11 +1605,11 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// </summary>
private void StopRecordingIfInProgress()
{
- if (_isRecording)
- {
- _isRecording = false;
- InvokeUI(() => _dataCaptureVM.StopRecorderOrPlayer());
- }
+ //if (_isRecording)
+ //{
+ // _isRecording = false;
+ // InvokeUI(() => _dataCaptureVM.StopRecorderOrPlayer());
+ //}
}
private void BackToJob()
@@ -1901,9 +1908,9 @@ namespace Tango.MachineStudio.Developer.ViewModels
//var processParamsGroups = _activeJobDbContext.ProcessParametersTablesGroups.ToList();
//var processParams = _activeJobDbContext.ProcessParametersTables.ToList();
- ColorSpaces = _activeJobDbContext.ColorSpaces.ToObservableCollection();
+ ColorSpaces = _activeJobDbContext.ColorSpaces.ToList().Where(x => x.Space == BL.Enumerations.ColorSpaces.Volume || x.Space == BL.Enumerations.ColorSpaces.LAB || x.Space == BL.Enumerations.ColorSpaces.RGB).ToObservableCollection();
- Rmls = _activeJobDbContext.Rmls.Where(x => x.MachineType == SelectedMachine.MachineType || x.MachineType == null).ToList().OrderBy(i => i.FinalName).ToObservableCollection();
+ Rmls = _activeJobDbContext.Rmls.Where(x => x.CreatedByOrganizationGuid == AuthenticationProvider.CurrentUser.Organization.Guid || _buildProvider.BuildType == MSBuildType.Default).Where(x => x.MachineType == SelectedMachine.MachineType || x.MachineType == null).ToList().OrderBy(i => i.FinalName).ToObservableCollection();
WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection();
SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection();
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
index 45c2d54cb..c326e5be2 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml
@@ -16,7 +16,6 @@
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:commonControls="clr-namespace:Tango.MachineStudio.Common.Controls;assembly=Tango.MachineStudio.Common"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
- xmlns:designer="clr-namespace:Tango.MachineStudio.MachineDesigner.Views;assembly=Tango.MachineStudio.MachineDesigner"
xmlns:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
xmlns:localConverters="clr-namespace:Tango.MachineStudio.Developer.Converters"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
@@ -692,7 +691,7 @@
</StackPanel>
</Border>
- <Border Style="{StaticResource JobFieldBorder}" Height="82" Width="200" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
+ <!--<Border Style="{StaticResource JobFieldBorder}" Height="82" Width="200" Visibility="{Binding IsSideBarOpened,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
<StackPanel Width="200">
<StackPanel Orientation="Horizontal" Margin="10 0 0 0">
<Image Source="../Images/description.png" Width="32"></Image>
@@ -703,7 +702,7 @@
<TextBox Padding="5 0 0 0" FontStyle="Italic" Background="Transparent" Style="{x:Null}" BorderThickness="0" Margin="5" Height="40" Text="{Binding ActiveJob.Description}" VerticalAlignment="Stretch" materialDesign:HintAssist.Hint="Enter description" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto"></TextBox>
</Border>
</StackPanel>
- </Border>
+ </Border>-->
</StackPanel>
@@ -1312,9 +1311,9 @@
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="18" Foreground="{StaticResource WhiteTextBrush}">START JOB</TextBlock>
</StackPanel>
</Button>
- <Button Height="60" Width="60" Margin="-60 0 0 0" Padding="0" Command="{Binding StartJobAndRecordCommand}" Click="OnJobStartClick" ToolTip="Start Job and Record">
+ <!--<Button Height="60" Width="60" Margin="-60 0 0 0" Padding="0" Command="{Binding StartJobAndRecordCommand}" Click="OnJobStartClick" ToolTip="Start Job and Record">
<materialDesign:PackIcon VerticalAlignment="Center" Width="38" Height="38" Kind="Record" Foreground="{StaticResource RedBrush200}" />
- </Button>
+ </Button>-->
</StackPanel>
<Button Command="{Binding ToRunningJobCommand}" Width="280" Height="60" Visibility="{Binding IsJobRunning,Converter={StaticResource BooleanToVisibilityConverter}}">
<StackPanel Orientation="Horizontal">
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
index ce632539e..ae2bc5cd7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/MachineJobSelectionView.xaml
@@ -4,7 +4,6 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:global="clr-namespace:Tango.MachineStudio.Developer"
- xmlns:designer="clr-namespace:Tango.MachineStudio.MachineDesigner.Views;assembly=Tango.MachineStudio.MachineDesigner"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete"
xmlns:automation="clr-namespace:Tango.MachineStudio.Common.Automation;assembly=Tango.MachineStudio.Common"
@@ -15,6 +14,7 @@
xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:commonControls="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.Developer.Views"
mc:Ignorable="d"
x:Name="control" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
@@ -26,6 +26,8 @@
<converters:GreaterThanToBooleanConverter x:Key="GreaterThanToBooleanConverter" />
<converters:MathOperatorConverter x:Key="MathOperatorConverter" />
<converters:BooleanInverseConverter x:Key="BooleanInverseConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
</UserControl.Resources>
<Grid IsEnabled="{Binding IsFree}">
@@ -37,13 +39,13 @@
<Grid Background="{StaticResource TransparentBackgroundBrush400}">
<StackPanel>
- <TextBlock Margin="40 20" FontSize="30" FontWeight="SemiBold" FontStyle="Italic">TARGET MACHINE</TextBlock>
+ <TextBlock Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Margin="40 20" FontSize="30" FontWeight="SemiBold" FontStyle="Italic">TARGET MACHINE</TextBlock>
<DockPanel Margin="40 0 40 0" IsEnabled="{Binding CanWork}">
- <Button Command="{Binding ReloadMachinesCommand}" DockPanel.Dock="Right" ToolTip="Reload" Foreground="{StaticResource GrayBrush280}" Margin="20 0 0 0" Padding="0" Width="40" Height="Auto" Style="{StaticResource MaterialDesignFlatButton}">
+ <Button Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Command="{Binding ReloadMachinesCommand}" DockPanel.Dock="Right" ToolTip="Reload" Foreground="{StaticResource GrayBrush280}" Margin="20 0 0 0" Padding="0" Width="40" Height="Auto" Style="{StaticResource MaterialDesignFlatButton}">
<materialDesign:PackIcon Kind="Refresh" Width="24" Height="24" />
</Button>
- <autoComplete:AutoCompleteTextBox Provider="{Binding MachinesProvider}" LoadingContent="Loading..." FontSize="20" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" materialDesign:HintAssist.Hint="Serial Number" DisplayMember="SerialNumber">
+ <autoComplete:AutoCompleteTextBox Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Provider="{Binding MachinesProvider}" LoadingContent="Loading..." FontSize="20" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" materialDesign:HintAssist.Hint="Serial Number" DisplayMember="SerialNumber">
<autoComplete:AutoCompleteTextBox.ItemTemplate>
<DataTemplate>
<StackPanel>
@@ -54,7 +56,7 @@
</autoComplete:AutoCompleteTextBox.ItemTemplate>
</autoComplete:AutoCompleteTextBox>
</DockPanel>
- <designer:MachineView Width="600" IsHitTestVisible="False" Margin="0 40 0 0" DataContext="{Binding SelectedMachine}" />
+ <commonControls:MachineView Width="600" IsHitTestVisible="False" Margin="0 40 0 0" DataContext="{Binding SelectedMachine}" />
</StackPanel>
</Grid>
@@ -260,7 +262,7 @@
</Grid>
</DockPanel>
- <StackPanel Margin="20 0 0 -100" VerticalAlignment="Bottom" HorizontalAlignment="Left" Orientation="Horizontal">
+ <StackPanel Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Margin="20 0 0 -100" VerticalAlignment="Bottom" HorizontalAlignment="Left" Orientation="Horizontal">
<Button Command="{Binding ImportJobFileCommand}" Foreground="{StaticResource BlackForegroundBrush}" FontSize="16" Style="{StaticResource emptyButton}" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="FileImport" VerticalAlignment="Center" Width="30" Height="30" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png
index 86eb0b335..6d7c680ec 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Images/threads.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs
index c2245bcb2..74bebef45 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs
@@ -47,6 +47,8 @@ namespace Tango.MachineStudio.RML.Models
public MachineTypes? MachineType { get; set; }
+ public double DefaultLiquidFactor { get; set; }
+
public RmlModel()
{
DyeingSpeed = "-";
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
index 2fcb87c59..a8ec6a9ff 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs
@@ -30,6 +30,7 @@ using Tango.ColorConversion;
using Tango.CSV;
using Tango.Core;
using Tango.SharedUI.Helpers;
+using Tango.MachineStudio.Common.Buid;
namespace Tango.MachineStudio.RML.ViewModels
{
@@ -39,6 +40,7 @@ namespace Tango.MachineStudio.RML.ViewModels
private IAuthenticationProvider _authentication;
private IActionLogManager _actionLogManager;
private RmlDTO _rmlBeforeSave;
+ private IBuildProvider _buildProvider;
private ObservablesContext _active_context;
@@ -320,8 +322,9 @@ namespace Tango.MachineStudio.RML.ViewModels
#endregion
- public MainViewVM(INotificationProvider notificationProvider, IAuthenticationProvider authentication, IActionLogManager actionLogManager)
+ public MainViewVM(IBuildProvider buildProvider, INotificationProvider notificationProvider, IAuthenticationProvider authentication, IActionLogManager actionLogManager)
{
+ _buildProvider = buildProvider;
_notification = notificationProvider;
_authentication = authentication;
_actionLogManager = actionLogManager;
@@ -362,7 +365,7 @@ namespace Tango.MachineStudio.RML.ViewModels
public override void OnApplicationReady()
{
-
+
}
private async Task LoadRmls()
@@ -375,8 +378,7 @@ namespace Tango.MachineStudio.RML.ViewModels
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
-
- var rmls = await db.Rmls.Where(x => x.Name.ToLower().Contains(filter) || x.DisplayName.ToLower().Contains(filter))
+ var rmls = await db.Rmls.Where(x => x.CreatedByOrganizationGuid == _authentication.CurrentUser.Organization.Guid || _buildProvider.BuildType == MSBuildType.Default).Where(x => x.Name.ToLower().Contains(filter) || x.DisplayName.ToLower().Contains(filter))
.Include(x => x.Cct.FileName)
.Include(x => x.LiquidTypesRmls)
.Include(x => x.LiquidTypesRmls.Select(y => y.LiquidType))
@@ -395,11 +397,12 @@ namespace Tango.MachineStudio.RML.ViewModels
x.HeadType,
x.LastUpdated,
x.MachineType,
+ x.DefaultLiquidFactor,
BtsrApplicationType = x.BtsrApplicationType != null ? x.BtsrApplicationType.Name : String.Empty,
BtsrYarnType = x.BtsrYarnType != null ? x.BtsrYarnType.Name : String.Empty,
- //LiquidTypesRmls = x.LiquidTypesRmls,
- //LiquidTypes = x.LiquidTypesRmls.Select(y => y.LiquidType),
- ProcessParametersTables = x.ProcessParametersTablesGroups
+ //LiquidTypesRmls = x.LiquidTypesRmls,
+ //LiquidTypes = x.LiquidTypesRmls.Select(y => y.LiquidType),
+ ProcessParametersTables = x.ProcessParametersTablesGroups
}).ToListAsync();
@@ -446,6 +449,7 @@ namespace Tango.MachineStudio.RML.ViewModels
model.HeadType = (HeadTypes)rml.HeadType;
model.Btsr = (String.IsNullOrEmpty(rml.BtsrApplicationType) ? "N/A" : rml.BtsrApplicationType) + ", " + (String.IsNullOrEmpty(rml.BtsrYarnType) ? "N/A" : rml.BtsrYarnType);
model.MachineType = (MachineTypes?)rml.MachineType;
+ model.DefaultLiquidFactor = rml.DefaultLiquidFactor;
if (tableZone1 != null)
{
@@ -570,7 +574,7 @@ namespace Tango.MachineStudio.RML.ViewModels
ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault();
- var tables= ActiveRML.ProcessParametersTablesGroups.ToList();
+ var tables = ActiveRML.ProcessParametersTablesGroups.ToList();
var zone1 = tables[0].ProcessParametersTables;
/*
* */
@@ -760,6 +764,16 @@ namespace Tango.MachineStudio.RML.ViewModels
rml.QualificationDate = DateTime.UtcNow;
rml.Manufacturer = "Twine";
rml.DefaultLiquidFactor = 140;
+ rml.ColorConversionVersion = 6;
+ rml.CreatedByUserGuid = _authentication.CurrentUser.Guid;
+ rml.CreatedByOrganizationGuid = _authentication.CurrentUser.Organization.Guid;
+ rml.VMax = 5;
+ rml.UseLightInks = true;
+
+ if (_buildProvider.BuildType == MSBuildType.Lite)
+ {
+ rml.ForMachineType = _authentication.Machine.Type;
+ }
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
@@ -787,13 +801,28 @@ namespace Tango.MachineStudio.RML.ViewModels
group.Active = true;
group.ProcessParametersTables.Add(new ProcessParametersTable()
{
- Name = "Process Table 1",
+ Name = "Zone 1",
+ });
+ group.ProcessParametersTables.Add(new ProcessParametersTable()
+ {
+ Name = "Zone 2",
});
group.Rml = rml;
_active_context.ProcessParametersTablesGroups.Add(group);
_active_context.ProcessParametersTables.Add(group.ProcessParametersTables[0]);
+ _active_context.ProcessParametersTables.Add(group.ProcessParametersTables[1]);
+
+ LiquidTypesRml lubricantRelation = new LiquidTypesRml();
+ lubricantRelation.LiquidTypeGuid = _active_context.LiquidTypes.FirstOrDefault(x => x.Code == (int)LiquidTypes.Lubricant).Guid;
+ lubricantRelation.RmlGuid = rml.Guid;
+ lubricantRelation.MaxNlPerCm = 1;
+
+ _active_context.LiquidTypesRmls.Add(lubricantRelation);
+
+ rml.CctGuid = _active_context.Ccts.OrderByDescending(x => x.LastUpdated).Take(1).Select(x => x.Guid).ToList().First();
+
_active_context.Rmls.Add(rml);
await _active_context.SaveChangesAsync();
@@ -903,6 +932,8 @@ namespace Tango.MachineStudio.RML.ViewModels
cloned.DisplayName = name;
cloned.RmlQualificationLevel = RmlQualifications.Provisional;
cloned.QualificationDate = DateTime.UtcNow;
+ cloned.CreatedByUserGuid = _authentication.CurrentUser.Guid;
+ cloned.CreatedByOrganizationGuid = _authentication.CurrentUser.Organization.Guid;
ProcessParametersTablesGroup group = new ProcessParametersTablesGroup();
group.Name = rml.GetActiveProcessGroup().Name;
@@ -1183,7 +1214,7 @@ namespace Tango.MachineStudio.RML.ViewModels
private async void ActivatedInSitesDialog()
{
- if(SelectedRML == null)
+ if (SelectedRML == null)
return;
try
@@ -1191,9 +1222,9 @@ namespace Tango.MachineStudio.RML.ViewModels
using (ObservablesContext db = ObservablesContext.CreateDefault())
{
IsFree = false;
-
- var selSites = await db.SitesRmls.OrderBy(x => x.ID).Where(y => y.RmlGuid == SelectedRML.Guid).Include(x=>x.Site).Select(x => x.Site.Name).ToListAsync();
-
+
+ var selSites = await db.SitesRmls.OrderBy(x => x.ID).Where(y => y.RmlGuid == SelectedRML.Guid).Include(x => x.Site).Select(x => x.Site.Name).ToListAsync();
+
var vm = new RmlActiveSitesDialogVM(selSites, SelectedRML.Name);
_notification.ShowModalDialog<RmlActiveSitesDialogVM, RmlActiveSitesDialog>(vm, (x) => { }, () => { });
@@ -1214,7 +1245,7 @@ namespace Tango.MachineStudio.RML.ViewModels
IsFree = true;
}
}
-
+
private async void BackToRmls()
{
View.NavigateTo(RmlNavigationView.RmlsView);
@@ -1717,7 +1748,7 @@ namespace Tango.MachineStudio.RML.ViewModels
{
var json = File.ReadAllText(file);
var rmlFile = await Rml.FromRmlFile(db, json);
-
+
db.Rmls.Add(rmlFile);
if (rmlFile.RmlsExtensions != null && rmlFile.RmlsExtensions.Count > 0)
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
index f1995283c..9d1c4a947 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml
@@ -21,7 +21,7 @@
<ItemsControl DockPanel.Dock="Top" ItemsSource="{Binding LiquidsCalibrationData}" IsEnabled="{Binding IsFree}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
- <UniformGrid Rows="1" />
+ <StackPanel Orientation="Horizontal" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
index b9e9f30c3..12571ed6e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml
@@ -158,12 +158,12 @@
<ItemsControl Width="{Binding WidthLilquidFactors, RelativeSource={RelativeSource AncestorType=UserControl}}" ItemsSource="{Binding LiquidTypesRmls}" Margin="0 10 0 0">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
- <UniformGrid IsItemsHost="True" Rows="1"></UniformGrid>
+ <StackPanel IsItemsHost="True" Orientation="Horizontal"></StackPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate DataType="{x:Type observables:LiquidTypesRml}">
- <Grid Margin="20 0 20 0" MaxWidth="230">
+ <Grid Margin="20 0 20 0" Width="200">
<Button HorizontalAlignment="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" ToolTip="Remove liquid factor" Width="30" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RemoveLiquidFactorCommand}" CommandParameter="{Binding}">
<materialDesign:PackIcon Kind="Delete" Foreground="#FF7D7D" />
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
index 7f6ebcbb6..de564c1ec 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml
@@ -123,13 +123,13 @@
</ComboBox>
<TextBlock Text="Count (den):" ></TextBlock>
- <TextBlock Text="{Binding ActiveRML.DencityCount}" Foreground="Blue" ></TextBlock>
+ <TextBlock Text="{Binding ActiveRML.DencityCount}"></TextBlock>
<TextBlock Text="Default Liquid Factor:" ></TextBlock>
- <mahapps:NumericUpDown Minimum="1" Maximum="1000" Value="{Binding ActiveRML.DefaultLiquidFactor}" Foreground="Blue" ></mahapps:NumericUpDown>
+ <mahapps:NumericUpDown Minimum="1" Maximum="1000" Value="{Binding ActiveRML.DefaultLiquidFactor}"></mahapps:NumericUpDown>
<TextBlock Text="Machine Type:" ></TextBlock>
- <ComboBox ItemsSource="{Binding Source={x:Type enumerations:MachineTypes},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.ForMachineType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName" Foreground="Blue" ></ComboBox>
+ <ComboBox ItemsSource="{Binding Source={x:Type enumerations:MachineTypes},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ActiveRML.ForMachineType}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
<!--<TextBlock Text="Fiber Shape:" ></TextBlock>
<ComboBox ItemsSource="{Binding FiberShapes}" SelectedItem="{Binding ActiveRML.FiberShape,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>-->
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
index ff341f5ed..8f75bea90 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml
@@ -10,6 +10,7 @@
xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters;assembly=Tango.MachineStudio.Common"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:local="clr-namespace:Tango.MachineStudio.RML.Views"
mc:Ignorable="d"
@@ -22,15 +23,17 @@
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" />
<converters:IsNullToVisibilityConverter x:Key="IsNullToVisibilityConverter" />
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
</UserControl.Resources>
<Grid IsEnabled="{Binding IsFree}">
<DockPanel Margin="100 50 100 50" MaxWidth="1500">
<Grid DockPanel.Dock="Top">
- <Image Source="../Images/threads.png" Width="300" Margin="10" />
+ <Image Source="../Images/threads.png" Width="250" RenderOptions.BitmapScalingMode="Fant" Margin="10" />
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="0 0 10 30">
<materialDesign:PackIcon Kind="Magnify" Width="26" Height="26"/>
- <TextBox Width="300" materialDesign:HintAssist.Hint="Search by name" Text="{Binding RMLFilter,UpdateSourceTrigger=PropertyChanged,Delay=500}"></TextBox>
+ <TextBox Width="300" materialDesign:HintAssist.Hint="Search thread by name / description" Text="{Binding RMLFilter,UpdateSourceTrigger=PropertyChanged,Delay=500}"></TextBox>
</StackPanel>
</Grid>
<Grid DockPanel.Dock="Bottom">
@@ -66,7 +69,7 @@
</StackPanel>
</Grid>
- <StackPanel Orientation="Horizontal" Margin="0 40 0 0">
+ <StackPanel Orientation="Horizontal" Margin="0 40 0 0" Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}">
<Button Command="{Binding ImportRMLFileCommand}" Foreground="{StaticResource BlackForegroundBrush}" FontSize="16" Style="{StaticResource emptyButton}" Cursor="Hand">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="FileImport" VerticalAlignment="Center" Width="30" Height="30" />
@@ -112,7 +115,7 @@
</Style>
</controls:DoubleClickDataGrid.CellStyle>
<DataGrid.Columns>
- <DataGridTemplateColumn Header="NAME" Width="220">
+ <DataGridTemplateColumn Header="NAME" Width="420">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel>
@@ -124,16 +127,19 @@
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
+ <DataGridTextColumn Header="MACHINE TYPE" Binding="{Binding MachineType,Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto" />
<DataGridTextColumn Header="Dyeing speed" Width="Auto" Binding="{Binding DyeingSpeed}"></DataGridTextColumn>
<DataGridTextColumn Header="Zone1 ink uptake" Width="Auto" Binding="{Binding Zone1InkUptake}"></DataGridTextColumn>
<DataGridTextColumn Header="Zone2 ink uptake" Width="Auto" Binding="{Binding Zone2InkUptake}"></DataGridTextColumn>
<!--<DataGridTextColumn Header="HEAD" Binding="{Binding HeadType}" Width="Auto" />-->
<!--<DataGridTextColumn Header="BTSR" Binding="{Binding Btsr}" Width="Auto" />-->
<DataGridTextColumn Header="CCT" Binding="{Binding CCT}" Width="Auto" />
+ <DataGridTextColumn Header="DEFAULT FACTOR" Binding="{Binding DefaultLiquidFactor}" Width="Auto" />
<!--<DataGridTextColumn Header="CL GR" Binding="{Binding UseGradients,Converter={StaticResource BooleanToYesNoConverter}}" Width="Auto" />-->
<!--<DataGridTextColumn Header="LIGHT INKS" Binding="{Binding UseLightInks,Converter={StaticResource BooleanToYesNoConverter}}" Width="Auto" />-->
+
+
<DataGridTextColumn Header="LAST UPDATED" Binding="{Binding LastUpdated,Converter={StaticResource DateTimeUTCToShortDateTimeConverter}}" Width="Auto" />
- <DataGridTextColumn Header="MACHINE TYPE" Binding="{Binding MachineType,Converter={StaticResource EnumToDescriptionConverter}}" Width="Auto" />
<!--<DataGridTemplateColumn Header="LIQUID FACTORS" Width="1*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs
index f581988f7..967aca679 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BlowerItem.cs
@@ -16,7 +16,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a Blower controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(16)]
+ [TechItem(16, true)]
public class BlowerItem : TechItem
{
public event EventHandler<bool> SetCommandClicked;
@@ -114,7 +114,7 @@ namespace Tango.MachineStudio.Technician.TechItems
SetCommand = new RelayCommand(() => { SetCommandClicked?.Invoke(this, _isActive); });
- ToggleActiveCommand = new RelayCommand(() =>
+ ToggleActiveCommand = new RelayCommand(() =>
{
SetCommandClicked?.Invoke(this, _isActive);
});
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BreakSensorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BreakSensorItem.cs
index 4a0d1c9c9..4b8c140f4 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BreakSensorItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/BreakSensorItem.cs
@@ -15,7 +15,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a BreakSensor controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(17)]
+ [TechItem(17, false)]
public class BreakSensorItem : TechItem
{
private static List<HardwareBreakSensor> _BreakSensorConfigurations;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs
index 2d8763f74..dcdc79d4e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ControllerItem.cs
@@ -15,7 +15,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a single component value controller and monitor.
/// </summary>
/// <seealso cref="TechItem" />
- [TechItem(10)]
+ [TechItem(10, true)]
public class ControllerItem : TechItem
{
public event EventHandler SetCommandClicked;
@@ -157,7 +157,7 @@ namespace Tango.MachineStudio.Technician.TechItems
cloned.OptimalRangeMinimum = OptimalRangeMinimum;
cloned.OptimalRangeMaximum = OptimalRangeMaximum;
cloned.IsSetToDefault = IsSetToDefault;
-
+
return cloned;
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs
index 1115c6dbf..ffcae21f0 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DancerItem.cs
@@ -16,7 +16,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a dancer controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(15)]
+ [TechItem(15, false)]
public class DancerItem : TechItem
{
private static List<HardwareDancer> _dancerConfigurations;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs
index bf06aae95..f920ae1e7 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalInItem.cs
@@ -14,7 +14,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a digital input pin item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(0)]
+ [TechItem(0, false)]
public class DigitalInItem : TechItem
{
private TechIo _techIo;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs
index 42d5afe0a..4321597d3 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DigitalOutItem.cs
@@ -14,7 +14,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a digital output pin item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(1)]
+ [TechItem(1, true)]
public class DigitalOutItem : TechItem
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs
index d3cd9622f..7fec34242 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs
@@ -15,7 +15,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a dispenser controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(8)]
+ [TechItem(8, true)]
public class DispenserItem : TechItem
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs
index d419127c5..dbea885fd 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/HeaterItem.cs
@@ -16,7 +16,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a heater controller.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(10)]
+ [TechItem(10, true)]
public class HeaterItem : TechItem
{
public event Action SetCommandClicked;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/JobRunnerItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/JobRunnerItem.cs
index 3443c008e..68a101b2f 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/JobRunnerItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/JobRunnerItem.cs
@@ -13,7 +13,7 @@ using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
{
- [TechItem(21)]
+ [TechItem(21,false)]
public class JobRunnerItem : TechItem
{
public event Action StartJob;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs
index 1eb5469d7..a42f6dace 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MeterItem.cs
@@ -15,7 +15,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents an analog style VU meter item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(3)]
+ [TechItem(3, true)]
public class MeterItem : TechItem
{
private TechMonitor _techMonitor;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
index 5c302e969..f475876f5 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorItem.cs
@@ -14,7 +14,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents an analog style integer monitor item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(2)]
+ [TechItem(2, true)]
public class MonitorItem : TechItem
{
private String _format;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs
index 321d87632..90f7a6653 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MonitorRecorderItem.cs
@@ -14,7 +14,7 @@ using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
{
- [TechItem(25)]
+ [TechItem(25, true)]
public class MonitorRecorderItem : TechItem
{
private DispatcherTimer _timer;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs
index a5288e6bc..40d071a4d 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorGroupItem.cs
@@ -17,7 +17,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a motors group item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(7)]
+ [TechItem(7, true)]
public class MotorGroupItem : TechItem
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs
index c097a0b7b..9bb7a7f19 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MotorItem.cs
@@ -16,7 +16,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a motor controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(6)]
+ [TechItem(6, true)]
public class MotorItem : TechItem
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
index 1412175a0..f514e9096 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/MultiGraphItem.cs
@@ -19,7 +19,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a multi channel real-time graph item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(5)]
+ [TechItem(5, true)]
public class MultiGraphItem : TechItem
{
private DispatcherTimer _timer;
@@ -190,7 +190,7 @@ namespace Tango.MachineStudio.Technician.TechItems
Description = "Multi channel real-time graph";
Image = ResourceHelper.GetImageFromResources("Images/multi-graph.png");
- ClearCommand = new RelayCommand(() =>
+ ClearCommand = new RelayCommand(() =>
{
if (Editor != null)
{
@@ -214,7 +214,7 @@ namespace Tango.MachineStudio.Technician.TechItems
{
if (Editor != null)
{
- var controller = Editor.InnerGraph.Controller as WpfGraphController<TimeSpanDataPoint,DoubleDataPoint>;
+ var controller = Editor.InnerGraph.Controller as WpfGraphController<TimeSpanDataPoint, DoubleDataPoint>;
controller.Range.MaximumX = new TimeSpanDataPoint(TimeSpan.FromSeconds(_duration));
controller.Range.MinimumY = new DoubleDataPoint(_min);
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs
index 70ecc1a70..95aeb929a 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/PidItem.cs
@@ -16,7 +16,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a PID controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(12)]
+ [TechItem(12, false)]
public class PidItem : TechItem
{
private static List<HardwarePidControl> _pidConfigurations;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ProcessParametersItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ProcessParametersItem.cs
index 5e6bffa82..9c1361b24 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ProcessParametersItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ProcessParametersItem.cs
@@ -18,7 +18,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a process parameters table item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(20)]
+ [TechItem(20, false)]
public class ProcessParametersItem : TechItem
{
public static ObservableCollection<ProcessParametersTable> ProcessParametersTables { get; set; }
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
index 8ccd5e718..50a95be12 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SingleGraphItem.cs
@@ -21,7 +21,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a single channel real-time graph item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(4)]
+ [TechItem(4, true)]
public class SingleGraphItem : TechItem
{
private DispatcherTimer _timer;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SpeedSensorItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SpeedSensorItem.cs
index e43a518c1..6ca947157 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SpeedSensorItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/SpeedSensorItem.cs
@@ -16,7 +16,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a SpeedSensor controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(15)]
+ [TechItem(15, false)]
public class SpeedSensorItem : TechItem
{
private static List<HardwareSpeedSensor> _SpeedSensorConfigurations;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
index 95b36eb70..d1248f914 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs
@@ -12,6 +12,8 @@ using Tango.Core.Helpers;
using Tango.BL.Entities;
using System.Reflection;
using Tango.BL;
+using Tango.Core.DI;
+using Tango.MachineStudio.Common.Buid;
namespace Tango.MachineStudio.Technician.TechItems
{
@@ -254,7 +256,9 @@ namespace Tango.MachineStudio.Technician.TechItems
{
List<TechItem> items = new List<TechItem>();
- foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract).OrderBy(x => x.GetCustomAttribute<TechItemAttribute>().Index))
+ var buildProvder = TangoIOC.Default.GetInstance<IBuildProvider>();
+
+ foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract).Where(x => x.GetCustomAttribute<TechItemAttribute>().SupportsLite || buildProvder.BuildType == MSBuildType.Default).OrderBy(x => x.GetCustomAttribute<TechItemAttribute>().Index))
{
items.Add(Activator.CreateInstance(type) as TechItem);
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs
index fafd00954..3011f5907 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItemAttribute.cs
@@ -17,13 +17,16 @@ namespace Tango.MachineStudio.Technician.TechItems
/// </summary>
public int Index { get; set; }
+ public bool SupportsLite { get; set; }
+
/// <summary>
/// Initializes a new instance of the <see cref="TechItemAttribute"/> class.
/// </summary>
/// <param name="index">The index.</param>
- public TechItemAttribute(int index)
+ public TechItemAttribute(int index, bool supportsLite)
{
Index = index;
+ SupportsLite = supportsLite;
}
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs
index 939809504..8450901a6 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs
@@ -8,7 +8,7 @@ using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
{
- [TechItem(25)]
+ [TechItem(25,true)]
public class TextItem : TechItem
{
private String _text;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs
index a5789377f..42ad80c2e 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ThreadMotionItem.cs
@@ -13,7 +13,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a thread motion controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(9)]
+ [TechItem(9, true)]
public class ThreadMotionItem : TechItem
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ValveItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ValveItem.cs
index e2f01565a..9372baaca 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ValveItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/ValveItem.cs
@@ -12,7 +12,7 @@ using Tango.SharedUI.Helpers;
namespace Tango.MachineStudio.Technician.TechItems
{
- [TechItem(10)]
+ [TechItem(10, false)]
public class ValveItem : TechItem
{
/// <summary>
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs
index 2df2d7ad7..51444dcad 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/WinderItem.cs
@@ -16,7 +16,7 @@ namespace Tango.MachineStudio.Technician.TechItems
/// Represents a winder controller item.
/// </summary>
/// <seealso cref="Tango.MachineStudio.Technician.TechItems.TechItem" />
- [TechItem(14)]
+ [TechItem(14, false)]
public class WinderItem : TechItem
{
private static List<HardwareWinder> _winderConfigurations;
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
index 06e0a59fa..e52129de4 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/Views/MachineTechView.xaml
@@ -15,6 +15,7 @@
xmlns:items="clr-namespace:Tango.MachineStudio.Technician.TechItems"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:localConverters="clr-namespace:Tango.MachineStudio.Technician.Converters"
+ xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters;assembly=Tango.MachineStudio.Common"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.Technician.Views"
mc:Ignorable="d"
@@ -24,6 +25,8 @@
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
<converters:NumberToFileSizeConverter x:Key="NumberToFileSizeConverter" />
<localConverters:SecondsToTimeSpanConverter x:Key="SecondsToTimeSpanConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
<DataTemplate x:Key="TabTemplate">
<Border IsVisibleChanged="Border_IsVisibleChanged">
@@ -231,7 +234,7 @@
</MenuItem>
</MenuItem>
<MenuItem Header="Tools">
- <MenuItem Header="Upload partial hardware configuration" Command="{Binding UploadPartialHardwareConfigurationCommand}">
+ <MenuItem Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Header="Upload partial hardware configuration" Command="{Binding UploadPartialHardwareConfigurationCommand}">
<MenuItem.Icon>
<fa:ImageAwesome Icon="Upload" Width="16" Foreground="{StaticResource MainWindow.Foreground}"/>
</MenuItem.Icon>
@@ -283,7 +286,7 @@
</Menu>
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 5 10" Height="40">
+ <StackPanel Visibility="{Binding Converter={StaticResource IsLiteToVisibilityInverseConverter}}" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0 0 5 10" Height="40">
<Button Height="Auto" Margin="0 0 10 0" FontSize="12" Command="{Binding ResetHardwareConfigurationCommand}" ToolTip="Reset all visual elements to the hardware configuration defined for the current machine">
<StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Margin="0 0 2 0" Width="24" Height="24" Kind="Refresh"/>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Authentication/IAuthenticationProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Authentication/IAuthenticationProvider.cs
index 2929ea405..9fe92ba3c 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Authentication/IAuthenticationProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Authentication/IAuthenticationProvider.cs
@@ -23,13 +23,15 @@ namespace Tango.MachineStudio.Common.Authentication
/// </summary>
User CurrentUser { get; }
+ Machine Machine { get; }
+
/// <summary>
/// Performs a user login by the specified email and password.
/// </summary>
/// <param name="email">The email.</param>
/// <param name="password">The password.</param>
/// <returns></returns>
- AuthenticationLoginResult Login(String email, String password, LoginMethod method, bool bypassVersionCheck = false, Action<String> logAction = null);
+ AuthenticationLoginResult Login(String email, String password, LoginMethod method, bool bypassVersionCheck = false, Action<String> logAction = null, String serialNumber = null);
/// <summary>
/// Logs-out the current logged-in user.
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/AutoComplete/MachinesProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/AutoComplete/MachinesProvider.cs
index ec23fefee..d5ea7264b 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/AutoComplete/MachinesProvider.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/AutoComplete/MachinesProvider.cs
@@ -7,6 +7,7 @@ using System.Threading.Tasks;
using Tango.AutoComplete.Editors;
using Tango.BL;
using Tango.BL.Entities;
+using Tango.MachineStudio.Common.Buid;
namespace Tango.MachineStudio.Common.AutoComplete
{
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/IBuildProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/IBuildProvider.cs
new file mode 100644
index 000000000..a95985418
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/IBuildProvider.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.Common.Buid
+{
+ public interface IBuildProvider
+ {
+ MSBuildType BuildType { get; }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/MSBuildType.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/MSBuildType.cs
new file mode 100644
index 000000000..dd4d5eef1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/MSBuildType.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.Common.Buid
+{
+ public enum MSBuildType
+ {
+ Default,
+ Lite
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityConverter.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityConverter.cs
new file mode 100644
index 000000000..c09ca9587
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityConverter.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+using Tango.Core.DI;
+using Tango.MachineStudio.Common.Buid;
+
+namespace Tango.MachineStudio.Common.Converters
+{
+ public class IsLiteToVisibilityConverter : IValueConverter
+ {
+ private static IBuildProvider buildProvider;
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (buildProvider == null)
+ {
+ buildProvider = TangoIOC.Default.GetInstance<IBuildProvider>();
+ }
+
+ if (buildProvider == null) return Visibility.Visible;
+
+ return buildProvider.BuildType == MSBuildType.Lite ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityInverseConverter.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityInverseConverter.cs
new file mode 100644
index 000000000..d11b28a1f
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityInverseConverter.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+using Tango.Core.DI;
+using Tango.MachineStudio.Common.Buid;
+
+namespace Tango.MachineStudio.Common.Converters
+{
+ public class IsLiteToVisibilityInverseConverter : IValueConverter
+ {
+ private static IBuildProvider buildProvider;
+
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ if (buildProvider == null)
+ {
+ buildProvider = TangoIOC.Default.GetInstance<IBuildProvider>();
+ }
+
+ if (buildProvider == null) return Visibility.Visible;
+
+ return buildProvider.BuildType == MSBuildType.Default ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png
index 116e1e9c7..9b4d8c798 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png
index 378879ce1..9b4d8c798 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Images/machine_new_small.png
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs
index 6ae71d50d..0a1fcadb6 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/MachineStudioSettings.cs
@@ -42,6 +42,8 @@ namespace Tango.MachineStudio.Common
/// </summary>
public String LastLoginPassword { get; set; }
+ public String LastLoginSerialNumber { get; set; }
+
/// <summary>
/// Gets or sets the last login method.
/// </summary>
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs
index d422df26c..7131a9c03 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Resources/SharedResourceDictionary.cs
@@ -37,7 +37,14 @@ namespace Tango.MachineStudio.Common.Resources
_sourceUri = value;
var settings = SettingsManager.Default.GetOrCreate<MachineStudioSettings>();
//add current theme
+
MachineStudioTheme wTheme = settings.Theme;
+
+#if LITE
+ wTheme = MachineStudioTheme.Dark;
+#endif
+
+
if ((wTheme == MachineStudioTheme.Dark && value.LocalPath.Contains("Light")) || (wTheme == MachineStudioTheme.Light && value.LocalPath.Contains("Dark")))
return;
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Speech/LiteSpeechProvider.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Speech/LiteSpeechProvider.cs
new file mode 100644
index 000000000..ddcc4866b
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Speech/LiteSpeechProvider.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.Common.Speech
+{
+ public class LiteSpeechProvider : ISpeechProvider
+ {
+ public bool Mute { get; set; }
+
+ public void SpeakError(string text)
+ {
+
+ }
+
+ public void SpeakInfo(string text)
+ {
+
+ }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj
index ee29aab21..e6c13ee93 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Tango.MachineStudio.Common.csproj
@@ -22,6 +22,15 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'MS_LITE_Debug|AnyCPU' ">
+ <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>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
@@ -30,6 +39,14 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'MS_LITE|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>..\..\Build\Machine Studio Lite\Release\</OutputPath>
+ <DefineConstants>TRACE;LITE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
<ItemGroup>
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
<HintPath>..\..\packages\CommandLineParser.1.9.71\lib\net45\CommandLine.dll</HintPath>
@@ -95,6 +112,8 @@
<Link>GlobalVersionInfo.cs</Link>
</Compile>
<Compile Include="Authentication\AuthenticationLoginResult.cs" />
+ <Compile Include="Buid\IBuildProvider.cs" />
+ <Compile Include="Buid\MSBuildType.cs" />
<Compile Include="Controls\MachineConnectionIcon.xaml.cs">
<DependentUpon>MachineConnectionIcon.xaml</DependentUpon>
</Compile>
@@ -102,11 +121,14 @@
<DependentUpon>MachineView.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\WpfGraphControl.cs" />
+ <Compile Include="Converters\IsLiteToVisibilityInverseConverter.cs" />
+ <Compile Include="Converters\IsLiteToVisibilityConverter.cs" />
<Compile Include="Converters\ProcessParameterToVisibilityConverter.cs" />
<Compile Include="Converters\UserRoleToBooleanConverter.cs" />
<Compile Include="Converters\UserRoleToVisibilityConverter.cs" />
<Compile Include="MachineStudioTheme.cs" />
<Compile Include="Resources\SharedResourceDictionary.cs" />
+ <Compile Include="Speech\LiteSpeechProvider.cs" />
<Compile Include="Tup\TupFileBuilder.cs" />
<Compile Include="Tup\TupFileBuilderProgressEventArgs.cs" />
<Compile Include="Web\DownloadLatestPPCVersionRequest.cs" />
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml
index 6f7cd0e32..aea6edce0 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Themes/Generic.xaml
@@ -4,10 +4,13 @@
xmlns:mahApps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:realTimeGraphX="clr-namespace:RealTimeGraphX.WPF;assembly=RealTimeGraphX.WPF"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
+ xmlns:commonConverters="clr-namespace:Tango.MachineStudio.Common.Converters"
xmlns:local="clr-namespace:Tango.MachineStudio.Common.Controls">
<converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<converters:BooleanToVisibilityInverseConverter x:Key="BooleanToVisibilityInverseConverter" />
+ <commonConverters:IsLiteToVisibilityConverter x:Key="IsLiteToVisibilityConverter" />
+ <commonConverters:IsLiteToVisibilityInverseConverter x:Key="IsLiteToVisibilityInverseConverter" />
<Style TargetType="{x:Type local:LoadingPanel}">
<Setter Property="Template">
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