From 72fc39f873de467c1431d928bce4d39442205691 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Sun, 19 Oct 2025 16:20:01 +0300 Subject: MS LITE --- .../Machine Studio Lite Installer.aip | 771 ++++ .../Tango.MachineStudio.Developer.csproj | 14 +- .../ViewModels/MainViewVM.cs | 75 +- .../Views/JobView.xaml | 9 +- .../Views/MachineJobSelectionView.xaml | 14 +- .../Tango.MachineStudio.RML/Images/threads.png | Bin 315399 -> 44355 bytes .../Tango.MachineStudio.RML/Models/RmlModel.cs | 2 + .../ViewModels/MainViewVM.cs | 61 +- .../Views/CalibrationDataView.xaml | 2 +- .../Views/ProcessParametersView.xaml | 4 +- .../Tango.MachineStudio.RML/Views/RmlView.xaml | 6 +- .../Tango.MachineStudio.RML/Views/RmlsView.xaml | 16 +- .../TechItems/BlowerItem.cs | 4 +- .../TechItems/BreakSensorItem.cs | 2 +- .../TechItems/ControllerItem.cs | 4 +- .../TechItems/DancerItem.cs | 2 +- .../TechItems/DigitalInItem.cs | 2 +- .../TechItems/DigitalOutItem.cs | 2 +- .../TechItems/DispenserItem.cs | 2 +- .../TechItems/HeaterItem.cs | 2 +- .../TechItems/JobRunnerItem.cs | 2 +- .../TechItems/MeterItem.cs | 2 +- .../TechItems/MonitorItem.cs | 2 +- .../TechItems/MonitorRecorderItem.cs | 2 +- .../TechItems/MotorGroupItem.cs | 2 +- .../TechItems/MotorItem.cs | 2 +- .../TechItems/MultiGraphItem.cs | 6 +- .../TechItems/PidItem.cs | 2 +- .../TechItems/ProcessParametersItem.cs | 2 +- .../TechItems/SingleGraphItem.cs | 2 +- .../TechItems/SpeedSensorItem.cs | 2 +- .../TechItems/TechItem.cs | 6 +- .../TechItems/TechItemAttribute.cs | 5 +- .../TechItems/TextItem.cs | 2 +- .../TechItems/ThreadMotionItem.cs | 2 +- .../TechItems/ValveItem.cs | 2 +- .../TechItems/WinderItem.cs | 2 +- .../Views/MachineTechView.xaml | 7 +- .../Authentication/IAuthenticationProvider.cs | 4 +- .../AutoComplete/MachinesProvider.cs | 1 + .../Buid/IBuildProvider.cs | 13 + .../Tango.MachineStudio.Common/Buid/MSBuildType.cs | 14 + .../Converters/IsLiteToVisibilityConverter.cs | 35 + .../IsLiteToVisibilityInverseConverter.cs | 35 + .../Images/machine_new.png | Bin 43275 -> 230871 bytes .../Images/machine_new_small.png | Bin 16963 -> 230871 bytes .../MachineStudioSettings.cs | 2 + .../Resources/SharedResourceDictionary.cs | 7 + .../Speech/LiteSpeechProvider.cs | 23 + .../Tango.MachineStudio.Common.csproj | 22 + .../Tango.MachineStudio.Common/Themes/Generic.xaml | 3 + .../MachineStudio/Tango.MachineStudio.UI/App.xaml | 4 + .../DefaultAuthenticationProvider.cs | 48 +- .../Build/DefaultBuildProvider.cs | 21 + .../Images/machine-trans.png | Bin 45618 -> 230871 bytes .../Tango.MachineStudio.UI/MainWindow.xaml.cs | 12 +- .../Properties/AssemblyInfo.cs | 2 +- .../TFS/TeamFoundationServiceExtendedClient.cs | 6 +- .../Tango.MachineStudio.UI.csproj | 74 +- .../Tango.MachineStudio.UI/ViewModelLocator.cs | 16 +- .../ViewModels/LoadingViewVM.cs | 24 +- .../ViewModels/LoginViewVM.cs | 49 +- .../ViewModels/MachineConnectionViewVM.cs | 18 +- .../ViewModels/MainViewVM.cs | 41 +- .../Tango.MachineStudio.UI/Views/LoadingView.xaml | 4 + .../Tango.MachineStudio.UI/Views/LoginView.xaml | 32 +- .../Views/MachineConnectionView.xaml | 2 + .../Tango.MachineStudio.UI/Views/MainView.xaml | 20 +- .../Tango.MachineStudio.UI/Views/MainView.xaml.cs | 13 +- .../MachineStudio/Tango.MachineStudio.UI/lite.ico | Bin 0 -> 126856 bytes .../Tango.MachineStudio.UI/procedures_dde.ico | Bin 0 -> 126856 bytes Software/Visual_Studio/PPC/Tango.PPC.UI/App.config | 2 +- .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 3 +- Software/Visual_Studio/Tango.BL/DTO/RmlDTOBase.cs | 16 + .../Tango.BL/Entities/ProcessParametersTable.cs | 58 + .../Visual_Studio/Tango.BL/Entities/RmlBase.cs | 50 + .../Tango.BL/ObservablesContextExtension.cs | 4 +- .../Tango.BL/ObservablesStaticCollections.cs | 98 + .../Visual_Studio/Tango.BL/ProcessParameters.csv | 140 +- Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 2 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 6 + .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 194 +- Software/Visual_Studio/Tango.sln | 4163 ++++++++++++++++++++ .../Visual_Studio/Versioning/GlobalVersionInfo.cs | 2 +- 84 files changed, 5972 insertions(+), 357 deletions(-) create mode 100644 Software/Visual_Studio/Advanced Installer Projects/Machine Studio Lite Installer.aip create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/IBuildProvider.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Buid/MSBuildType.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityConverter.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Converters/IsLiteToVisibilityInverseConverter.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Speech/LiteSpeechProvider.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Build/DefaultBuildProvider.cs create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/lite.ico create mode 100644 Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/procedures_dde.ico (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Lite Installer.aip b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Lite Installer.aip new file mode 100644 index 000000000..362267384 --- /dev/null +++ b/Software/Visual_Studio/Advanced Installer Projects/Machine Studio Lite Installer.aip @@ -0,0 +1,771 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ {cb0b0aa2-bb24-4bca-a720-45e397684e12} Tango.MachineStudio.Common - - {fc337a7f-1214-41d8-9992-78092a3b961e} - Tango.MachineStudio.DataCapture - - - {1674f726-0e66-414f-b9fd-c6f20d7f07c7} - Tango.MachineStudio.Logging - - - {d0ce8122-077d-42a2-9490-028ae4769b52} - Tango.MachineStudio.MachineDesigner - @@ -393,7 +381,7 @@ - + \ 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 /// /// The application manager. /// The notification provider. - 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((vm) => - { - _dataCaptureVM = vm; - _dataCaptureVM.RelayCommandsInvalidated += (_, __) => StartJobAndRecordCommand.RaiseCanExecuteChanged(); - }); + //TangoIOC.Default.GetInstanceWhenAvailable((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(); - 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(new EventDetailsViewVM(SelectedJobEvent), (x) => - { + //if (SelectedJobEvent != null && SelectedJobEvent.Type != BL.Enumerations.EventTypes.APPLICATION_STARTED && !_dialog_shown) + //{ + // _dialog_shown = true; + // _notification.ShowModalDialog(new EventDetailsViewVM(SelectedJobEvent), (x) => + // { - }, () => - { - _dialog_shown = false; - }); - } + // }, () => + // { + // _dialog_shown = false; + // }); + //} } /// @@ -1588,9 +1595,9 @@ namespace Tango.MachineStudio.Developer.ViewModels /// private void StartJobAndRecord() { - _isRecording = true; - _dataCaptureVM.StartDiagnosticsRecording(); - StartJob(); + //_isRecording = true; + //_dataCaptureVM.StartDiagnosticsRecording(); + //StartJob(); } /// @@ -1598,11 +1605,11 @@ namespace Tango.MachineStudio.Developer.ViewModels /// 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 @@ - + @@ -1312,9 +1311,9 @@ START JOB - - + @@ -54,7 +56,7 @@ - + @@ -260,7 +262,7 @@ - +