aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2019-05-02 10:52:59 +0300
committerShlomo Hecht <shlomo@twine-s.com>2019-05-02 10:52:59 +0300
commit9922d0232fc0c6e3f28a53d39c356f24abe90e9c (patch)
tree6ee0c904bd1d002e97519aa69cf43b9545ec5bec /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
parent19cb69d95d52a2ca5a193c63b4ddd3a898a8305e (diff)
parent702be0f8634c3012a1a5e833eeadd37bc7d06181 (diff)
downloadTango-9922d0232fc0c6e3f28a53d39c356f24abe90e9c.tar.gz
Tango-9922d0232fc0c6e3f28a53d39c356f24abe90e9c.zip
merge TPF
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs36
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml8
2 files changed, 33 insertions, 11 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..4ce8ab39d 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
@@ -1081,13 +1081,13 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
_speech.SpeakError(events.Last().EventType.Name);
- if (events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.StopJob)))
- {
- if (JobHandler != null)
- {
- InvokeUI(StopJob);
- }
- }
+ //if (events.ToList().Exists(x => x.Actions.Contains(BL.Enumerations.EventTypeActions.StopJob)))
+ //{
+ // if (JobHandler != null)
+ // {
+ // InvokeUI(StopJob);
+ // }
+ //}
}
}
@@ -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/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml
index dbe0d835b..d0f0c2af6 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/RunningJobView.xaml
@@ -194,7 +194,13 @@
<DataGridTextColumn SortDirection="Descending" Header="DATE TIME" Binding="{Binding DateTime,Converter={StaticResource DateTimeUTCToStringConverter},ConverterParameter='MM/dd/yyyy HH:mm:ss.fff'}" />
<DataGridTextColumn Header="GROUP" Binding="{Binding EventType.Group}" />
<DataGridTextColumn Header="EVENT" Binding="{Binding EventType.Title}" />
- <DataGridTextColumn Header="MESSAGE" Width="1*" Binding="{Binding Description,Converter={StaticResource StringToEllipsisConverter},ConverterParameter=100}" />
+ <DataGridTemplateColumn Header="MESSAGE" Width="1*">
+ <DataGridTemplateColumn.CellTemplate>
+ <DataTemplate>
+ <TextBlock Height="20" Text="{Binding Description,Converter={StaticResource StringToEllipsisConverter},ConverterParameter=100}" TextWrapping="NoWrap"></TextBlock>
+ </DataTemplate>
+ </DataGridTemplateColumn.CellTemplate>
+ </DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
</Grid>