aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs22
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Properties/AssemblyInfo.cs2
2 files changed, 20 insertions, 4 deletions
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 4d8ec954e..e03c64a54 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
@@ -1307,6 +1307,8 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// </summary>
private async void StartJob(Func<Job, JobHandler> resumeFunc = null)
{
+ SettingsManager.Default.Save();
+
LogManager.Log(String.Format("Starting job {0}...", ActiveJob.Name));
if (MachineOperator == null || MachineOperator.State != TransportComponentState.Connected)
{
@@ -1766,6 +1768,11 @@ namespace Tango.MachineStudio.Developer.ViewModels
InvalidateRelayCommands();
_disable_gamut_check = false;
+
+ _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null;
+ _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null;
+
+ _settings.Save();
});
SegmentsCollectionView = CollectionViewSource.GetDefaultView(ActiveJob.Segments);
@@ -2003,6 +2010,11 @@ namespace Tango.MachineStudio.Developer.ViewModels
SelectedSegments.ToList().ForEach(x =>
{
+ if (ActiveJob.Segments.Count == 1)
+ {
+ _notification.ShowInfo("A job must contain at least one segment.");
+ return;
+ }
ActiveJob.Segments.Remove(x);
x.DefferedDelete(_activeJobDbContext);
});
@@ -2130,12 +2142,17 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
if (SelectedBrushStop != null && SelectedSegment != null)
{
- if (_notification.ShowQuestion("Are you sure you want to delete the selected colors?"))
+ if (_notification.ShowQuestion("Are you sure you want to delete the selected brush stops?"))
{
LogManager.Log(String.Format("Removing {0} brush stops...", SelectedBrushStops.Count));
SelectedBrushStops.ToList().ForEach(x =>
{
+ if (SelectedSegment.BrushStops.Count == 1)
+ {
+ _notification.ShowInfo("A job segment must contain at least one brush stop.");
+ return;
+ }
SelectedSegment.BrushStops.Remove(x);
x.DefferedDelete(_activeJobDbContext);
});
@@ -2422,8 +2439,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
public override void OnShuttingDown()
{
- _settings.LastSelectedMachineGuid = SelectedMachine != null ? SelectedMachine.Guid : null;
- _settings.LastSelectedJobGuid = SelectedMachineJob != null ? SelectedMachineJob.Guid : null;
+
}
#endregion
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 eff1f2521..e50641d8d 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("4.0.11.0")]
+[assembly: AssemblyVersion("4.0.12.0")]
[assembly: ComVisible(false)] \ No newline at end of file