aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs24
1 files changed, 19 insertions, 5 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 4e3b4ec13..a3be7a2d6 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
@@ -37,7 +37,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
/// </summary>
public ObservablesEntitiesAdapter Adapter { get; set; }
- private Machine _selectedMachine;
+ protected Machine _selectedMachine;
/// <summary>
/// Gets or sets the selected machine.
/// </summary>
@@ -90,6 +90,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
}
private ProcessParametersTablesGroup _selectedGroupHistory;
+
/// <summary>
/// Gets or sets the selected process parameters tables group history.
/// </summary>
@@ -348,9 +349,12 @@ namespace Tango.MachineStudio.Developer.ViewModels
private void SetSegmentBrushStopsInkVolumes(Segment segment)
{
- foreach (var stop in segment.BrushStops)
+ if (!DesignMode)
{
- stop.SetInkVolumes(SelectedMachine.Configuration);
+ foreach (var stop in segment.BrushStops)
+ {
+ stop.SetInkVolumes(SelectedMachine.Configuration);
+ }
}
}
@@ -470,7 +474,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
if (SelectedJob != null)
{
Segment seg = new Segment();
- seg.Name = "New Seg";
+ seg.Name = "Untitled Segment";
SelectedJob.Segments.Add(seg);
}
}
@@ -496,7 +500,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
SelectedMachine.Jobs.Add(new Job()
{
- Name = "New Job",
+ Name = "Untitled Job",
CreationDate = DateTime.UtcNow,
});
}
@@ -583,6 +587,16 @@ namespace Tango.MachineStudio.Developer.ViewModels
}
/// <summary>
+ /// Switch the brush stop position in the segment.
+ /// </summary>
+ /// <param name="draggedStop">The dragged stop.</param>
+ /// <param name="droppedStop">The dropped stop.</param>
+ public void OnDropBrushStop(BrushStop draggedStop, BrushStop droppedStop)
+ {
+ SelectedSegment.BrushStops.Swap(draggedStop, droppedStop);
+ }
+
+ /// <summary>
/// Removes the graph.
/// </summary>
/// <param name="graph">The graph.</param>