diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-29 18:45:10 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-01-29 18:45:10 +0200 |
| commit | 5cda8b0a3ab579dd6f33b1cb19a1d295dc661d28 (patch) | |
| tree | ef9408ca50840d407f3c62bbcd19147739fde145 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels | |
| parent | 7e8ff4c3ca798d426eb6f381c5312a747f1bb800 (diff) | |
| download | Tango-5cda8b0a3ab579dd6f33b1cb19a1d295dc661d28.tar.gz Tango-5cda8b0a3ab579dd6f33b1cb19a1d295dc661d28.zip | |
Added gradient display of color Brush Stops.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 24 |
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> |
