diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-02-16 19:15:31 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-02-16 19:15:31 +0200 |
| commit | 3681ab681f02bbb7cda89de4044fd69bc9d61ab8 (patch) | |
| tree | 837fb7c294755af6d4efd551e872b527d14fc2ff /Software | |
| parent | 00eaafb1c13f72dd489edb49a0aa7f6e4c79fdb2 (diff) | |
| download | Tango-3681ab681f02bbb7cda89de4044fd69bc9d61ab8.tar.gz Tango-3681ab681f02bbb7cda89de4044fd69bc9d61ab8.zip | |
PPC. Create Segments Groups.
Diffstat (limited to 'Software')
42 files changed, 1414 insertions, 176 deletions
diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf Binary files differindex abf3e1478..b6a2e6216 100644 --- a/Software/DB/PPC/Tango.mdf +++ b/Software/DB/PPC/Tango.mdf diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf Binary files differindex be99a8e22..3a7a3f0de 100644 --- a/Software/DB/PPC/Tango_log.ldf +++ b/Software/DB/PPC/Tango_log.ldf diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf Binary files differindex 5bf9b6dd5..addc45b24 100644 --- a/Software/DB/Tango.mdf +++ b/Software/DB/Tango.mdf diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf Binary files differindex 63f5036a1..ae5de9b06 100644 --- a/Software/DB/Tango_log.ldf +++ b/Software/DB/Tango_log.ldf diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml.cs index 60a3f5039..4f18dc853 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionView.xaml.cs @@ -41,15 +41,16 @@ namespace Tango.PPC.Jobs.Dialogs private void TouchNavigationLinks_OnPreviewMouseDown(object sender, MouseButtonEventArgs e) { - if (_vm != null && _vm.SelectedBrushStop != null && true == _vm.SelectedBrushStop.IsLiquidVolumesOutOfRange) - { - var item = ItemsControl.ContainerFromElement(sender as ListBox, e.OriginalSource as DependencyObject) as ListBoxItem; - if (item != null) - { - e.Handled = true; - } - } - else if (_vm != null) + // if (_vm != null && _vm.SelectedBrushStop != null && true == _vm.SelectedBrushStop.IsLiquidVolumesOutOfRange) + // { + // var item = ItemsControl.ContainerFromElement(sender as ListBox, e.OriginalSource as DependencyObject) as ListBoxItem; + // if (item != null) + // { + // e.Handled = true; + // } + // } + // else + if (_vm != null) { var item = ItemsControl.ContainerFromElement(sender as ListBox, e.OriginalSource as DependencyObject) as ListBoxItem; if (item != null && item.DataContext is TextBlock ) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobView.xaml index bf242e98b..6f011bf4e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobView.xaml @@ -6,7 +6,7 @@ xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:local="clr-namespace:Tango.PPC.Jobs.Dialogs" mc:Ignorable="d" - Background="Transparent" d:DesignHeight="630" d:DesignWidth="560" MinWidth="380" Height="250" + Background="Transparent" d:DesignHeight="250" d:DesignWidth="380" Width="380" Height="250" d:DataContext="{d:DesignInstance Type=local:RepeatJobViewVM, IsDesignTimeCreatable=False}"> <Border BorderBrush="{StaticResource TangoMidAccentBrush}" Margin="-24" CornerRadius="40" BorderThickness="2" Background="{StaticResource TangoPrimaryBackgroundBrush}"> @@ -21,7 +21,7 @@ <touch:TouchIconButton DockPanel.Dock="Right" VerticalAlignment="Center" Height="28" Command="{Binding CloseCommand}" Icon="CloseCircleOutline" RippleBrush="{StaticResource TangoRippleDarkBrush}" Foreground="{StaticResource TangoDarkForegroundBrush}" HorizontalAlignment="Right" /> </DockPanel> - <TextBlock Grid.Row="1" Height="26" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" FontWeight="SemiBold" HorizontalAlignment="Center"> Repeat All</TextBlock> + <TextBlock Grid.Row="1" Height="26" FontSize="{StaticResource TangoMessageBoxButtonFontSize}" FontWeight="SemiBold" HorizontalAlignment="Center" Text="{Binding HeaderName}"></TextBlock> <StackPanel Margin="0 20 0 0" Grid.Row="2" Width="302" VerticalAlignment="Center" HorizontalAlignment="Center"> <touch:TouchNumericUpDownConrol Margin="0 0 0 0" Width="Auto" Value="{Binding Repeats, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Center" BorderThickness="0" MaxValue="{Binding MaxRepeations, Mode=OneWay}" MinValue="1" Style="{StaticResource TouchNumericMiddleUpDownControl}"/> diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobViewVM.cs index 4cf5d8c95..44c396798 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/RepeatJobViewVM.cs @@ -9,6 +9,16 @@ namespace Tango.PPC.Jobs.Dialogs { public class RepeatJobViewVM : DialogViewVM { + private string _headerName; + + public string HeaderName + { + get { return _headerName; } + set { _headerName = value; + RaisePropertyChangedAuto(); + } + } + private int _repeats; public int Repeats @@ -31,9 +41,10 @@ namespace Tango.PPC.Jobs.Dialogs } - public RepeatJobViewVM() + public RepeatJobViewVM(string name, int repeats) { - Repeats = 1; + HeaderName = name; + Repeats = repeats; } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Helpers/GroupSegmentTemplateSelector.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Helpers/GroupSegmentTemplateSelector.cs new file mode 100644 index 000000000..e28b920d8 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Helpers/GroupSegmentTemplateSelector.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using Tango.PPC.Jobs.Models; + +namespace Tango.PPC.Jobs.Helpers +{ + public class GroupSegmentTemplateSelector : DataTemplateSelector + { + public DataTemplate GroupSegmentsTemplate { get; set; } + + public DataTemplate SegmentTemplate { get; set; } + + public override DataTemplate SelectTemplate(object item, DependencyObject container) + { + var selectedTemplate = this.SegmentTemplate; + + var segmentModel = item as ISegmentModel; + if (segmentModel != null && segmentModel.IsGroupSegment) + { + selectedTemplate = this.GroupSegmentsTemplate; + } + + return selectedTemplate; + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ISegmentModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ISegmentModel.cs new file mode 100644 index 000000000..9bed7e849 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/ISegmentModel.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.PPC.Jobs.Models +{ + public interface ISegmentModel + { + String Name { get; set; } + double Length { get; set; } + bool IsGroupSegment { get; } + bool IsSelected { get; set; } + bool IsLast { get; set; } + Int32 SegmentIndex { get; set; } + double InterSegmentLength { get; } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs index bc6997120..3379149f6 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/JobModel.cs @@ -333,7 +333,7 @@ namespace Tango.PPC.Jobs.Models { _segments = value; RaisePropertyChangedAuto(); - //OnSegmentsChanged(value); + OnSegmentsChanged(); } } } @@ -368,6 +368,25 @@ namespace Tango.PPC.Jobs.Models } } + protected ObservableCollection<ISegmentModel> _groupingSegments; + /// <summary> + /// Gets or sets the display segments. + /// </summary> + public ObservableCollection<ISegmentModel> GroupingSegments + { + get + { + return _groupingSegments; + } + set + { + if (_groupingSegments != value) + { + _groupingSegments = value; + RaisePropertyChangedAuto(); + } + } + } private bool _selectAllSegments; public bool SelectAllSegments @@ -405,24 +424,59 @@ namespace Tango.PPC.Jobs.Models } } - - + public int LastNewGroupID { get; set; } + #endregion public JobModel(List<ColorSpace> list) { ColorSpacesList = list; - Segments = new SynchronizedObservableCollection<SegmentModel>(); + _segments = new SynchronizedObservableCollection<SegmentModel>(); + _groupingSegments = new ObservableCollection<ISegmentModel>(); SegmentsToCopy = new List<SegmentModel>(); Segments.CollectionChanged -= Segments_CollectionChanged; Segments.CollectionChanged += Segments_CollectionChanged; SelectAllSegments = false; NumberOfUnits = 1; + LastNewGroupID = 1; } #region modifications + private void OnSegmentsChanged() + { + LoadGroupingSegments(); + } + + public void LoadGroupingSegments() + { + GroupingSegments.Clear(); + var groupedList = Segments.Where(x => x.GroupID >0).Select(grp => grp.SegmentsGroupModel).Distinct().ToList();//List<SegmentsGroupModel> + Dictionary<int, SegmentsGroupModel> groupIDToSegmentsGroup = new Dictionary<int, SegmentsGroupModel>(); + foreach (var group in groupedList) + { + var groupID = group.GroupID; + groupIDToSegmentsGroup[groupID] = group; + }; + foreach (var segment in Segments) + { + if (!segment.IsGroupSegment) + { + GroupingSegments.Add(segment); + } + else + { + SegmentsGroupModel segmentsGroup; + if (groupIDToSegmentsGroup.TryGetValue(segment.GroupID, out segmentsGroup)) + { + GroupingSegments.Add(segmentsGroup); + groupIDToSegmentsGroup.Remove(segment.GroupID); + } + } + } + RaisePropertyChanged(nameof(GroupingSegments)); + } public static SegmentModel CreateInterSegment(double length) { SegmentModel segment = new SegmentModel() @@ -444,8 +498,6 @@ namespace Tango.PPC.Jobs.Models SegmentModel segment = new SegmentModel(); segment.Name = "Standard Segment"; segment.SegmentIndex = segmentIndex + 1; - - segment.Length = length; segment.Job = this; @@ -454,11 +506,12 @@ namespace Tango.PPC.Jobs.Models if(segmentIndex < Segments.Count) { Segments.Insert(segmentIndex,segment); - } else Segments.Add(segment); + LoadGroupingSegments(); + return segment; } @@ -479,7 +532,7 @@ namespace Tango.PPC.Jobs.Models OnLengthChanged(); RaisePropertyChanged(nameof(EffectiveSegments)); } - + /// <summary> /// Handles the PropertyChanged event of all job segments. /// </summary> @@ -513,6 +566,7 @@ namespace Tango.PPC.Jobs.Models RaisePropertyChanged(nameof(HasSelectedItems)); } } + /// <summary> /// Called when the <see cref="Length"/> property has been changed diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs index b65d7e156..0773abf19 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentModel.cs @@ -18,7 +18,7 @@ using Tango.PPC.Jobs.UndoRedoCommands; namespace Tango.PPC.Jobs.Models { - public class SegmentModel : ExtendedObject + public class SegmentModel : ExtendedObject, ISegmentModel { private double _lastLength; private LinearGradientBrush _brush; @@ -28,6 +28,13 @@ namespace Tango.PPC.Jobs.Models public string GUID { get; set; } + public int GroupID { + get + { + return SegmentsGroupModel == null ? -1 : SegmentsGroupModel.GroupID; + } + } + protected String _name; /// <summary> /// Gets or sets the SegmentModel name. @@ -68,6 +75,15 @@ namespace Tango.PPC.Jobs.Models } } } + + public bool IsGroupSegment + { + get + { + return SegmentsGroupModel != null; + } + } + public void LengthBeforeChange(double value) { _lastLength = Length; @@ -418,6 +434,8 @@ namespace Tango.PPC.Jobs.Models } } + public SegmentsGroupModel SegmentsGroupModel { get; set; } + #endregion #region command @@ -514,7 +532,7 @@ namespace Tango.PPC.Jobs.Models cloned.BrushStops = BrushStops.Select(x => x.Clone()).ToSynchronizedObservableCollection(); cloned.SegmentIndex = SegmentIndex + 1; - + cloned.SegmentsGroupModel = SegmentsGroupModel; return cloned; } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentsGroupModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentsGroupModel.cs new file mode 100644 index 000000000..0c3863f78 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/SegmentsGroupModel.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +namespace Tango.PPC.Jobs.Models +{ + public class SegmentsGroupModel : ExtendedObject, ISegmentModel + { + #region Properties + + public ObservableCollection<SegmentModel> Segments { get; set; } + + public int GroupID{ get; set; } + + private int _repeats; + + public int Repeats + { + get { return _repeats; } + set { _repeats = value; + RaisePropertyChangedAuto(); + } + } + + private string _name; + public string Name + { + get { return _name; } + set { _name = value; + RaisePropertyChangedAuto(); + } + } + protected Double _length; + /// <summary> + /// Gets or sets the length. + /// </summary> + public Double Length + { + get + { + return Segments.Count == 0 ? 0 : Segments.ToList().Sum(x=>x.Length); + } + set + { + if (_length != value) + { + _length = value; + RaisePropertyChangedAuto(); + } + } + } + + public bool IsGroupSegment + { + get + { + return true; + } + } + + private bool _isSelected; + + public bool IsSelected + { + get { return _isSelected; } + set + { + _isSelected = value; + Segments.ToList().ForEach(x => x.IsSelected = value); + RaisePropertyChangedAuto(); + } + } + + public bool IsLast { get; set; } + public Int32 SegmentIndex { + get { + return Segments.Count == 0 ? 0 : Segments.ToList().OrderBy(x => x.SegmentIndex).Select(x => x.SegmentIndex).FirstOrDefault(); + } + set { } + } + public int FirstSegmentIndex { + get + { + return Segments.Count == 0 ? 0: Segments.ToList().Min(x => x.SegmentIndex); + } + } + + public int LastSegmentIndex { + get + { + return Segments.Count == 0 ? 0 : Segments.ToList().Max(x => x.SegmentIndex); + } + } + + public string DisplayIndexes + { + get + { + return String.Format($"(#{FirstSegmentIndex} - {LastSegmentIndex})"); + } + } + + public double InterSegmentLength + { + get + { + return Segments.Count == 0 ? 0 : Segments.ToList().Select(x => x.InterSegmentLength).FirstOrDefault(); + } + } + + #endregion + + public SegmentsGroupModel(List<SegmentModel> selectedSegments) + { + Segments = selectedSegments.ToObservableCollection(); + Repeats = 1; + } + + public SegmentsGroupModel() + { + Segments = new ObservableCollection<SegmentModel>(); + Repeats = 1; + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj index 8d90aabb2..861273ccf 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj @@ -261,6 +261,7 @@ <DependentUpon>SpoolChangeView.xaml</DependentUpon> </Compile> <Compile Include="Dialogs\SpoolChangeViewVM.cs" /> + <Compile Include="Helpers\GroupSegmentTemplateSelector.cs" /> <Compile Include="JobsV2Module.cs" /> <Compile Include="JobsModuleSettings.cs" /> <Compile Include="Messages\JobSelectedMessage.cs" /> @@ -268,8 +269,10 @@ <Compile Include="Models\BrushStopModel.cs" /> <Compile Include="Models\ColorLibrary.cs" /> <Compile Include="Models\FavoriteColor.cs" /> + <Compile Include="Models\ISegmentModel.cs" /> <Compile Include="Models\JobModel.cs" /> <Compile Include="Models\SegmentModel.cs" /> + <Compile Include="Models\SegmentsGroupModel.cs" /> <Compile Include="MyColors\MyColorsEngine.cs" /> <Compile Include="NavigationObjects\JobNavigationObject.cs" /> <Compile Include="NavigationObjects\JobSummeryNavigationObject.cs" /> @@ -296,14 +299,17 @@ <Compile Include="UndoRedoCommands\ChangeLengthCommand.cs" /> <Compile Include="UndoRedoCommands\ChangeOffsetCommand.cs" /> <Compile Include="UndoRedoCommands\CopySegmentCommand.cs" /> + <Compile Include="UndoRedoCommands\DeleteSegmentsGroupCommand.cs" /> <Compile Include="UndoRedoCommands\DuplicateSegmentCommand.cs" /> <Compile Include="UndoRedoCommands\EditBrushStopColorCommand.cs" /> <Compile Include="UndoRedoCommands\IUndoRedoCommand.cs" /> <Compile Include="UndoRedoCommands\PasteSegmentsCommand.cs" /> <Compile Include="UndoRedoCommands\RemoveSegmentCommand.cs" /> <Compile Include="UndoRedoCommands\RemoveSegmentsCommand.cs" /> + <Compile Include="UndoRedoCommands\RepeatCommand.cs" /> <Compile Include="UndoRedoCommands\ReverseCommand.cs" /> <Compile Include="UndoRedoCommands\UndoRedoManager.cs" /> + <Compile Include="UndoRedoCommands\UnGroupSegmentsCommand.cs" /> <Compile Include="ViewContracts\IJobsView.cs" /> <Compile Include="ViewContracts\IJobView.cs" /> <Compile Include="ViewModelLocator.cs" /> @@ -643,7 +649,7 @@ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs index 35d1629e0..4fb36e379 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/AddBrushStopCommand.cs @@ -61,6 +61,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands { _jobModel.Segments.Insert(_segment.SegmentIndex, _createdNewSegment); } + _jobModel.LoadGroupingSegments(); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/DeleteSegmentsGroupCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/DeleteSegmentsGroupCommand.cs new file mode 100644 index 000000000..83536825b --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/DeleteSegmentsGroupCommand.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Jobs.Models; + +namespace Tango.PPC.Jobs.UndoRedoCommands +{ + public class DeleteSegmentsGroupCommand : IUndoRedoCommand + { + private JobModel _jobModel; + private SegmentsGroupModel _segmentsGroup; + + public DeleteSegmentsGroupCommand(JobModel job, SegmentsGroupModel segmentsGroup) + { + _jobModel = job; + _segmentsGroup = segmentsGroup; + } + + public void Execute() + { + foreach (var obj in _segmentsGroup.Segments) + { + _jobModel.Segments.Remove(obj); + } + _jobModel.GroupingSegments.Remove(_segmentsGroup); + _jobModel.LoadGroupingSegments(); + } + + public void UnExecute() + { + int firstIndex = _segmentsGroup.FirstSegmentIndex; + foreach (var obj in _segmentsGroup.Segments) + { + if (_jobModel.Segments.Count < firstIndex) + _jobModel.Segments.Add(obj); + else + { + _jobModel.Segments.Insert((firstIndex-1), obj); + firstIndex++; + } + } + _jobModel.LoadGroupingSegments(); + } + + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/DuplicateSegmentCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/DuplicateSegmentCommand.cs index 24a82d2a4..cd8d46763 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/DuplicateSegmentCommand.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/DuplicateSegmentCommand.cs @@ -28,11 +28,13 @@ namespace Tango.PPC.Jobs.UndoRedoCommands { _jobModel.Segments.Insert(_copySegment.SegmentIndex-1, _copySegment); } + _jobModel.LoadGroupingSegments(); } public void UnExecute() { _jobModel.Segments.Remove(_copySegment); + _jobModel.LoadGroupingSegments(); } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/PasteSegmentsCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/PasteSegmentsCommand.cs index 4d9915449..73bcf3f22 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/PasteSegmentsCommand.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/PasteSegmentsCommand.cs @@ -45,6 +45,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands _jobModel.Segments.Insert(selctedIndex, newSegmentModel); } } + _jobModel.LoadGroupingSegments(); _jobModel.SegmentsToCopy.Clear(); } @@ -54,6 +55,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands { _jobModel.Segments.Remove(segment); } + _jobModel.LoadGroupingSegments(); } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentCommand.cs index 90ef92924..677ffc8dc 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentCommand.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentCommand.cs @@ -23,6 +23,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands public void Execute() { _jobModel.Segments.Remove(_removedSegment); + _jobModel.LoadGroupingSegments(); } public void UnExecute() @@ -33,6 +34,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands { _jobModel.Segments.Insert(_index, _removedSegment); } + _jobModel.LoadGroupingSegments(); } } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentsCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentsCommand.cs index db44f176c..0ac2a9fc6 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentsCommand.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RemoveSegmentsCommand.cs @@ -24,6 +24,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands { _jobModel.Segments.Remove(obj.Value); } + _jobModel.LoadGroupingSegments(); } public void UnExecute() @@ -37,6 +38,7 @@ namespace Tango.PPC.Jobs.UndoRedoCommands _jobModel.Segments.Insert(obj.Key, obj.Value); } } + _jobModel.LoadGroupingSegments(); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RepeatCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RepeatCommand.cs new file mode 100644 index 000000000..6ad0f95cc --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/RepeatCommand.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Jobs.Models; + +namespace Tango.PPC.Jobs.UndoRedoCommands +{ + public class RepeatCommand : IUndoRedoCommand + { + private JobModel _jobModel; + private List<SegmentModel> _selectedSegments; + + public RepeatCommand(JobModel job) + { + _jobModel = job; + + _selectedSegments = new List<SegmentModel>(); + for (int index = 0; index < _jobModel.Segments.Count; index++) + { + var segment = _jobModel.Segments[index]; + if (segment.IsSelected && false == segment.IsGroupSegment) + { + _selectedSegments.Add(segment); + } + else if (_selectedSegments.Count > 0) + { + break; + } + } + } + + public void Execute() + { + if (_selectedSegments.Count == 0) + return; + _jobModel.LastNewGroupID++; + SegmentsGroupModel group = new SegmentsGroupModel(_selectedSegments) { GroupID = _jobModel.LastNewGroupID }; + _selectedSegments.ForEach(x => { x.SegmentsGroupModel = group; x.IsSelected = false; }); + + _jobModel.LoadGroupingSegments(); + } + + public void UnExecute() + { + if (_selectedSegments.Count == 0) + return; + _selectedSegments.ForEach(x => { x.SegmentsGroupModel = null; }); + _jobModel.LastNewGroupID--; + _jobModel.LoadGroupingSegments(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/UnGroupSegmentsCommand.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/UnGroupSegmentsCommand.cs new file mode 100644 index 000000000..b42dda221 --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/UndoRedoCommands/UnGroupSegmentsCommand.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.PPC.Jobs.Models; + +namespace Tango.PPC.Jobs.UndoRedoCommands +{ + public class UnGroupSegmentsCommand : IUndoRedoCommand + { + private JobModel _jobModel; + private SegmentsGroupModel _segmentsGroupModel; + public UnGroupSegmentsCommand(JobModel jobModel, SegmentsGroupModel segmentsGroup) + { + _jobModel = jobModel; + _segmentsGroupModel = segmentsGroup; + } + public void Execute() + { + _segmentsGroupModel.Segments.ToList().ForEach(x => x.SegmentsGroupModel = null); + _jobModel.LoadGroupingSegments(); + } + + public void UnExecute() + { + _segmentsGroupModel.Segments.ToList().ForEach(x => x.SegmentsGroupModel = _segmentsGroupModel); + _jobModel.LoadGroupingSegments(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs index d00cf14fd..0ffc65fc0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobViewVM.cs @@ -237,13 +237,7 @@ namespace Tango.PPC.Jobs.ViewModels /// Gets or sets the add solid segment command. /// </summary> public RelayCommand<Int32> AddNewSegmentCommand { get; set; } - - /// <summary> - /// Gets or sets the undo last color command. - /// </summary> - public RelayCommand<SegmentModel> UndoLastColorCommand { get; set; } - - + /// <summary> /// Gets or sets the remove segment command. /// </summary> @@ -268,18 +262,12 @@ namespace Tango.PPC.Jobs.ViewModels /// Gets or sets the replace brush stop command. /// </summary> public RelayCommand<BrushStop> ReplaceBrushStopCommand { get; set; } - - /// <summary> - /// Gets or sets the twine catalog field tap command. - /// </summary> - //public RelayCommand<BrushStop> OpenCatalogCommand { get; set; } - + /// <summary> /// Gets or sets the dye command. /// </summary> public RelayCommand DyeCommand { get; set; } - - + /// <summary> /// Gets or sets the export embroidery command. /// </summary> @@ -291,26 +279,22 @@ namespace Tango.PPC.Jobs.ViewModels public RelayCommand JobModeSwitchCommand { get; set; } + public RelayCommand<SegmentsGroupModel> UngroupSegmentsCommand { get; set; } + public RelayCommand<SegmentsGroupModel> DeleteSegmentsGroupCommand { get; set; } + #endregion #region collapsed mode commands public RelayCommand InsertWhiteGapCommand { get; set; } - public RelayCommand ReverseCommand { get; set; } - public RelayCommand DeleteSegmentCommand { get; set; } - public RelayCommand RepeateSegmentCommand { get; set; } - public RelayCommand PasteCommand { get; set; } - public RelayCommand CopyCommand { get; set; } - public RelayCommand UndoCommand { get; set; } - public RelayCommand RedoCommand { get; set; } - + #endregion #region Constructors @@ -351,7 +335,6 @@ namespace Tango.PPC.Jobs.ViewModels //Initialize Commands AddNewSegmentCommand = new RelayCommand<Int32>(AddNewSegment); - UndoLastColorCommand = new RelayCommand<SegmentModel>(UndoLastColor); RemoveSegmentCommand = new RelayCommand<SegmentModel>(RemoveSegment); DuplicateSegmentCommand = new RelayCommand<SegmentModel>(DuplicateSegment); @@ -368,7 +351,9 @@ namespace Tango.PPC.Jobs.ViewModels InsertWhiteGapCommand = new RelayCommand(InsertWhiteGap); ReverseCommand = new RelayCommand(Reverse); DeleteSegmentCommand = new RelayCommand(DeleteSegments); + DeleteSegmentsGroupCommand = new RelayCommand<SegmentsGroupModel>(DeleteSegmentsGroup); RepeateSegmentCommand = new RelayCommand(RepeateSegments); + UngroupSegmentsCommand = new RelayCommand<SegmentsGroupModel>(UngroupSegments); PasteCommand = new RelayCommand(Paste); CopyCommand = new RelayCommand(Copy); UndoCommand = new RelayCommand(Undo);//(x) => { return UndoRedoManager.Instance.IsEnableUndoOperation(); } @@ -479,16 +464,16 @@ namespace Tango.PPC.Jobs.ViewModels LogManager.Log($"Job editing state = '{Job.JobEditingState}'."); - if (Job.JobEditingState == BL.Enumerations.EditingStates.SampleDye && Job.JobSampleDyeStatus == BL.Enumerations.SampleDyeStatuses.PendingApproval) - { - LogManager.Log("Directing view to display sample dye region."); - View.DisplaySampleDye(); - } - else if (Job.JobEditingState == BL.Enumerations.EditingStates.FineTuning && Job.JobFineTuningStatus == BL.Enumerations.FineTuningStatuses.PendingApproval) - { - LogManager.Log("Directing view to display fine tuning region."); - View.DisplayFineTuning(); - } + //if (Job.JobEditingState == BL.Enumerations.EditingStates.SampleDye && Job.JobSampleDyeStatus == BL.Enumerations.SampleDyeStatuses.PendingApproval) + //{ + // LogManager.Log("Directing view to display sample dye region."); + // View.DisplaySampleDye(); + //} + //else if (Job.JobEditingState == BL.Enumerations.EditingStates.FineTuning && Job.JobFineTuningStatus == BL.Enumerations.FineTuningStatuses.PendingApproval) + //{ + // LogManager.Log("Directing view to display fine tuning region."); + // View.DisplayFineTuning(); + //} IsFullMode = true; DyeCommand.RaiseCanExecuteChanged(); @@ -522,7 +507,7 @@ namespace Tango.PPC.Jobs.ViewModels User = Job.User, Machine = Job.Machine }; - + Dictionary<string, SegmentsGroupModel> guidToGroup = new Dictionary<string, SegmentsGroupModel>(); foreach (var segm in Job.Segments) { if (Job.Version == 1 && segm.BrushStops.Count > 1) @@ -565,6 +550,22 @@ namespace Tango.PPC.Jobs.ViewModels IsInterSegment = segm.IsInterSegment, Job = jobModel, }; + if(segm.SegmentsGroupGuid != null) + { + SegmentsGroupModel segmentsGroupModel; + if(guidToGroup.TryGetValue(segm.SegmentsGroupGuid, out segmentsGroupModel)) + { + segmentsGroupModel.Segments.Add(segmentModel); + segmentModel.SegmentsGroupModel = segmentsGroupModel; + } + else + { + segmentsGroupModel = new SegmentsGroupModel() { GroupID = segm.SegmentsGroup.GroupIndex, Repeats = segm.SegmentsGroup.Repeats }; + guidToGroup[segm.SegmentsGroupGuid] = segmentsGroupModel; + segmentsGroupModel.Segments.Add(segmentModel); + segmentModel.SegmentsGroupModel = segmentsGroupModel; + } + } foreach (var brushStop in segm.BrushStops) { BrushStopModel brushStopModel = new BrushStopModel(brushStop, segmentModel, Job.Version); @@ -575,14 +576,16 @@ namespace Tango.PPC.Jobs.ViewModels jobModel.Segments.Add(segmentModel); } } + jobModel.InterSegmentLength = Job.EnableInterSegment ? Job.InterSegmentLength : 0; jobModel.Segments.Last().IsLast = true; + jobModel.LoadGroupingSegments(); JobModel = jobModel; - SegmentsCollectionView = CollectionViewSource.GetDefaultView(JobModel.Segments); + //create grouping + SegmentsCollectionView = CollectionViewSource.GetDefaultView(JobModel.GroupingSegments); SegmentsCollectionView.SortDescriptions.Add(new SortDescription(nameof(SegmentModel.SegmentIndex), ListSortDirection.Ascending)); UndoRedoManager.Instance.ClearAll(); - } private void Job_NameChanged(object sender, string e) @@ -701,12 +704,10 @@ namespace Tango.PPC.Jobs.ViewModels { var maxLength = Job.SpoolType.Length; var maxRep = (maxLength == 0 ? 999 : (maxLength / JobModel.Length)); - - - var vm = await NotificationProvider.ShowDialog<RepeatJobViewVM>(new RepeatJobViewVM() + + var vm = await NotificationProvider.ShowDialog<RepeatJobViewVM>(new RepeatJobViewVM("Repeat All", JobModel.NumberOfUnits) { - MaxRepeations = (int)maxRep, - Repeats = JobModel.NumberOfUnits + MaxRepeations = (int)maxRep }); if (vm.DialogResult) @@ -805,13 +806,21 @@ namespace Tango.PPC.Jobs.ViewModels NotificationProvider.ShowError("An error occurred while trying to add a new segment."); } } - - /// <summary> - /// Undoes the last color. - /// </summary> - private void UndoLastColor(SegmentModel segment) + + private async void RepeatSegmentsGroup( SegmentsGroupModel group) { + var maxLength = 999; + var maxRep = (maxLength == 0 ? 999 : (maxLength / JobModel.Length)); + + var vm = await NotificationProvider.ShowDialog<RepeatJobViewVM>(new RepeatJobViewVM($"Edit \"Group {group.GroupID}\" Repeat", group.Repeats) + { + MaxRepeations = (int)maxRep + }); + if (vm.DialogResult) + { + JobModel.NumberOfUnits = vm.Repeats; + } } /// <summary> @@ -843,7 +852,32 @@ namespace Tango.PPC.Jobs.ViewModels } } + private async void DeleteSegmentsGroup(SegmentsGroupModel segmentsGroup) + { + if (JobModel.GroupingSegments.Count > 1) + { + try + { + if (await NotificationProvider.ShowQuestion("Are you sure you want to remove the selected group of segments?")) + { + + UndoRedoManager.Instance.InsertAndExecuteCommand(new DeleteSegmentsGroupCommand(JobModel, segmentsGroup)); + ArrangeSegmentsIndixes(); + DyeCommand.RaiseCanExecuteChanged(); + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Could not remove group of segments."); + await NotificationProvider.ShowError("An error occurred while trying to delete group of segments."); + } + } + else + { + await NotificationProvider.ShowInfo("A job must contain at least one color segment."); + } + } /// <summary> /// Duplicates the segment. /// </summary> @@ -1186,7 +1220,14 @@ namespace Tango.PPC.Jobs.ViewModels private void RepeateSegments() { + if ( (JobModel.Segments.ToList().Where(x => x.IsSelected).Count()) < 2) + return; + UndoRedoManager.Instance.InsertAndExecuteCommand(new RepeatCommand(JobModel)); + } + private void UngroupSegments(SegmentsGroupModel segmentsGroup) + { + UndoRedoManager.Instance.InsertAndExecuteCommand(new UnGroupSegmentsCommand(JobModel, segmentsGroup)); } private void Paste() @@ -1240,12 +1281,17 @@ namespace Tango.PPC.Jobs.ViewModels { _db.BrushStops.Remove(x); }); - + if(segment.SegmentsGroupGuid != null) + { + _db.SegmentsGroups.Remove(segment.SegmentsGroup); + } _db.Segments.Remove(segment); } - + Job.Segments.Clear(); - + + Dictionary<int, SegmentsGroup> groupIDToSegmentsGroupGuid = new Dictionary<int, SegmentsGroup>(); + foreach (var segment in JobModel.Segments.OrderBy(x => x.SegmentIndex).ToList()) { var dbSegment = new Segment(); @@ -1255,7 +1301,24 @@ namespace Tango.PPC.Jobs.ViewModels dbSegment.Job = Job; dbSegment.SegmentIndex = segment.SegmentIndex; dbSegment.Length = segment.Length; - + if(segment.IsGroupSegment) + { + SegmentsGroup dbSegmentsGroup; + if (false == groupIDToSegmentsGroupGuid.TryGetValue(segment.SegmentsGroupModel.GroupID, out dbSegmentsGroup)) + { + dbSegmentsGroup = new SegmentsGroup(); + dbSegmentsGroup.Guid = System.Guid.NewGuid().ToString(); + dbSegmentsGroup.Repeats = segment.SegmentsGroupModel.Repeats; + dbSegmentsGroup.GroupIndex = segment.SegmentsGroupModel.GroupID; + _db.SegmentsGroups.Add(dbSegmentsGroup); + dbSegment.SegmentsGroup = dbSegmentsGroup; + groupIDToSegmentsGroupGuid[segment.SegmentsGroupModel.GroupID] = dbSegmentsGroup; + } + else + { + dbSegment.SegmentsGroup = dbSegmentsGroup; + } + } _db.Segments.Add(dbSegment); foreach (var stop in segment.BrushStops.OrderBy(x => x.StopIndex).ToList()) diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml index 2e3884479..2f3646f9f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobView.xaml @@ -4,6 +4,8 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:vm="clr-namespace:Tango.PPC.Jobs.ViewModels" + xmlns:model="clr-namespace:Tango.PPC.Jobs.Models" + xmlns:helpers="clr-namespace:Tango.PPC.Jobs.Helpers" xmlns:fa="http://schemas.fontawesome.io/icons/" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" @@ -196,7 +198,7 @@ </UniformGrid> </DataTemplate> - <DataTemplate x:Key="Segment_Template" DataType="{x:Type entities:Segment}"> + <DataTemplate x:Key="Segment_Template" DataType="{x:Type model:SegmentModel}"> <Grid Height="380" Margin="57 15 57 0"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> @@ -401,7 +403,152 @@ </Grid> </DataTemplate> - <DataTemplate x:Key="CollapsedSegment_Template" DataType="{x:Type entities:Segment}"> + <DataTemplate x:Key="GroupSegment_Template" DataType="{x:Type model:SegmentsGroupModel}"> + <Grid Height="380" Margin="57 15 57 0"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="1*" /> + </Grid.RowDefinitions> + + <DockPanel> + <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Height="60"> + <touch:TouchButton Background="Transparent" Foreground="{StaticResource TangoPrimaryAccentBrush}" EnableDropShadow="False" Command="{Binding ElementName=view,Path=DataContext.UngroupSegmentsCommand}" CommandParameter="{Binding}"> + <TextBlock FontSize="{StaticResource TangoButtonFontSize}" TextDecorations="Underline" Text="Ungroup" /> + </touch:TouchButton> + <touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.DeleteSegmentsGroupCommand}" CommandParameter="{Binding}"> + <Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/delete_segment.png"/> + </Border> + </touch:TouchButton> + <!--<touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.DuplicateSegmentCommand}" CommandParameter="{Binding}"> + <Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/duplicate.png"/> + </Border> + </touch:TouchButton>--> + </StackPanel> + <StackPanel Grid.Row="0" DockPanel.Dock="Left"> + <StackPanel Margin="0 0 0 0" Orientation="Horizontal" > + <TextBlock FontSize="{StaticResource TangoTitleFontSize}"> + <Run>Group </Run> + <Run Text="{Binding GroupID, Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run> + <Run Text="{Binding DisplayIndexes, Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run> + </TextBlock> + <touch:TouchButton Background="Transparent" Width="Auto" EnableDropShadow="False"> + <TextBlock Margin="10 0 0 0" Foreground="{StaticResource TangoPrimaryAccentBrush}" TextDecorations="Underline"> + <Run>x</Run> + <Run Text="{Binding Repeats, Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run> + </TextBlock> + </touch:TouchButton> + </StackPanel> + <StackPanel Margin="0 0 0 0" Orientation="Horizontal"> + <controls:FastTextBlock VerticalAlignment="Bottom" DockPanel.Dock="Left" Text="Length (m):" FontSize="18"></controls:FastTextBlock> + <touch:TouchNumericTextBox Margin="20 0 0 0" Width="92" DockPanel.Dock="Right" Value="{Binding Length, UpdateSourceTrigger=LostFocus}" StringFormat="0.0" AutoCalculateJogStep="False" HasDecimalPoint="True" Minimum="1" Maximum="100000" KeyboardContainer="{Binding ElementName=Container}" FontSize="18" ValueChangedEnd="Length_ValueChanged" TextGotFocus="Length_BeforeChangeValue"/> + </StackPanel> + </StackPanel> + </DockPanel> + + <Border Grid.Row="1" x:Name="brush_border" Height="90" Margin="0 20 0 0" CornerRadius="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}"> + <Border.Clip> + <RectangleGeometry RadiusX="25" RadiusY="25"> + <RectangleGeometry.Rect> + <MultiBinding Converter="{StaticResource WidthHeightToRectConverter}"> + <Binding ElementName="brush_border" Path="ActualWidth" /> + <Binding ElementName="brush_border" Path="ActualHeight" /> + </MultiBinding> + </RectangleGeometry.Rect> + </RectangleGeometry> + </Border.Clip> + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> + <ItemsControl ClipToBounds="False" ItemsSource="{Binding Segments}" > + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <Grid.Width> + <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> + <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="DataContext.Length"></Binding> + <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding> + <Binding Path="LengthWithInterSegment"></Binding> + </MultiBinding> + </Grid.Width> + <Rectangle Fill="{Binding SegmentBrush}"></Rectangle> + </Grid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + + <Border Height="40" Width="151" Opacity="1" Background="#32787880" HorizontalAlignment="Center" CornerRadius="8" VerticalAlignment="Center"> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}"> Grouped</TextBlock> + </Border> + </Grid> + + </Border> + <Grid Grid.Row="2" x:Name="add_new_segment_gap" HorizontalAlignment="Stretch" Margin="0 30 0 0" > + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="1*"/> + <RowDefinition Height="Auto"/> + </Grid.RowDefinitions> + <Rectangle Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" /> + + <Border x:Name="gapBorder" Margin="0 0 0 0" Height="24" ClipToBounds="False" CornerRadius="10" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityConverter}}"> + <Border.Clip> + <RectangleGeometry RadiusX="10" RadiusY="10"> + <RectangleGeometry.Rect> + <MultiBinding Converter="{StaticResource WidthHeightToRectConverter}"> + <Binding ElementName="gapBorder" Path="ActualWidth" /> + <Binding ElementName="gapBorder" Path="ActualHeight" /> + </MultiBinding> + </RectangleGeometry.Rect> + </RectangleGeometry> + </Border.Clip> + <Grid> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4"> + <Run Text="{Binding InterSegmentLength, Mode=OneWay}"></Run> + <Run Text="m Gap"></Run> + </TextBlock> + <Rectangle Stroke="{StaticResource TangoGrayBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="12" RadiusY="12" /> + </Grid> + </Border> + + <DockPanel Margin="0 20 0 0" Grid.Row="1"> + <!--<Grid DockPanel.Dock="Right" Visibility="{Binding IsLast, Converter={StaticResource BooleanToVisibilityInverseConverter}}">--> + <Grid DockPanel.Dock="Right" Visibility="Collapsed"> + <touch:TouchButton x:Name="deletegap" DockPanel.Dock="Right" HorizontalAlignment="Right" VerticalAlignment="Center" Command="{Binding DeleteGapCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityConverter}}"> + <TextBlock Margin="10 2 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Center">Delete Gap</TextBlock> + </touch:TouchButton> + <touch:TouchButton x:Name="addGap" DockPanel.Dock="Right" HorizontalAlignment="Left" VerticalAlignment="Center" Command="{Binding AddGapCommand}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityInverseConverter}}"> + <StackPanel Orientation="Horizontal"> + <Border Height="35" Width="35" BorderThickness="0" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/add_gap.png"/> + </Border> + <TextBlock Margin="10 2 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Center">Add Gap</TextBlock> + </StackPanel> + </touch:TouchButton> + </Grid> + <touch:TouchButton DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Center" Command="{Binding DataContext.AddNewSegmentCommand, ElementName=listSegments}" CommandParameter="{Binding SegmentIndex}" EnableDropShadow="False" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" BorderThickness="0"> + <StackPanel Orientation="Horizontal"> + <Border Height="35" Width="35" BorderThickness="0" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/AddNewSegment.png"/> + </Border> + <TextBlock Margin="10 2 0 0" FontSize="{StaticResource TangoButtonFontSize}" VerticalAlignment="Center">Add New Segments</TextBlock> + </StackPanel> + </touch:TouchButton> + </DockPanel> + + <Rectangle Margin="0 10 0 0" Grid.Row="2" Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Bottom"/> + </Grid> + + <Rectangle Margin="0 10 0 0" Grid.Row="2" Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Bottom"/> + </Grid> + </DataTemplate> + + <DataTemplate x:Key="CollapsedSegment_Template" DataType="{x:Type model:SegmentModel}"> <Grid Height="180" Margin="57 15 57 0"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> @@ -463,6 +610,125 @@ </Grid> </DataTemplate> + <DataTemplate x:Key="CollapsedGroupSegment_Template" DataType="{x:Type model:SegmentsGroupModel}"> + <Grid Height="180" Margin="57 15 57 0"> + <Grid.RowDefinitions> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + <RowDefinition Height="Auto" /> + </Grid.RowDefinitions> + <DockPanel> + <Rectangle DockPanel.Dock="Top" Stroke="{StaticResource TangoDividerBrush}" StrokeThickness="1" VerticalAlignment="Top" Margin="0 0 0 10"/> + <StackPanel Orientation="Horizontal" DockPanel.Dock="Right" Height="40"> + <touch:TouchButton Background="Transparent" Foreground="{StaticResource TangoPrimaryAccentBrush}" EnableDropShadow="False" Command="{Binding ElementName=view,Path=DataContext.UngroupSegmentsCommand}" CommandParameter="{Binding}"> + <TextBlock FontSize="{StaticResource TangoButtonFontSize}" TextDecorations="Underline" Text="Ungroup" /> + </touch:TouchButton> + <touch:TouchButton Margin="10 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.DeleteSegmentsGroupCommand}" CommandParameter="{Binding}"> + <Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/delete_segment.png"/> + </Border> + </touch:TouchButton> + <!--<touch:TouchButton Margin="20 0 0 0" VerticalAlignment="Center" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding ElementName=view,Path=DataContext.DuplicateSegmentCommand}" CommandParameter="{Binding}"> + <Border Height="24" Width="24" BorderThickness="0" BorderBrush="{StaticResource TangoKeyboardKeyDarkBrush}" Background="Transparent" HorizontalAlignment="Left"> + <Image Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/duplicate.png"/> + </Border> + </touch:TouchButton>--> + </StackPanel> + <StackPanel DockPanel.Dock="Left"> + <StackPanel Margin="0 10 0 0" Orientation="Horizontal" > + <TextBlock FontSize="{StaticResource TangoTitleFontSize}"> + <Run>Group </Run> + <Run Text="{Binding GroupID, Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run> + <Run Text="{Binding DisplayIndexes, Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run> + </TextBlock> + <touch:TouchButton Margin="10 0 0 0" Background="Transparent" Width="Auto" EnableDropShadow="False"> + <TextBlock Foreground="{StaticResource TangoPrimaryAccentBrush}" TextDecorations="Underline"> + <Run>x</Run> + <Run Text="{Binding Repeats, Mode=OneWay,IsAsync=True,FallbackValue='0000'}"></Run> + </TextBlock> + </touch:TouchButton> + </StackPanel> + </StackPanel> + </DockPanel> + + <StackPanel Grid.Row="1" Orientation="Vertical"> + <Border Height="50" x:Name="brush_border" Margin="0 10 0 0" CornerRadius="25" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="1" BorderBrush="{StaticResource TangoGrayBrush}" ClipToBounds="False"> + <Border.Clip> + <RectangleGeometry RadiusX="25" RadiusY="25"> + <RectangleGeometry.Rect> + <MultiBinding Converter="{StaticResource WidthHeightToRectConverter}"> + <Binding ElementName="brush_border" Path="ActualWidth" /> + <Binding ElementName="brush_border" Path="ActualHeight" /> + </MultiBinding> + </RectangleGeometry.Rect> + </RectangleGeometry> + </Border.Clip> + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> + <ItemsControl ClipToBounds="False" ItemsSource="{Binding Segments}" > + <ItemsControl.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel Orientation="Horizontal" ClipToBounds="False"></StackPanel> + </ItemsPanelTemplate> + </ItemsControl.ItemsPanel> + <ItemsControl.ItemTemplate> + <DataTemplate> + <Grid> + <Grid.Width> + <MultiBinding Converter="{StaticResource SegmentLengthToWidthConverter}"> + <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="DataContext.Length"></Binding> + <Binding RelativeSource="{RelativeSource AncestorType=ItemsControl}" Path="ActualWidth"></Binding> + <Binding Path="LengthWithInterSegment"></Binding> + </MultiBinding> + </Grid.Width> + <Rectangle Fill="{Binding SegmentBrush}"></Rectangle> + </Grid> + </DataTemplate> + </ItemsControl.ItemTemplate> + </ItemsControl> + + <Border Height="28" Width="150" BorderThickness="0" BorderBrush="Transparent" Opacity="20" Background="#32787880" HorizontalAlignment="Center" CornerRadius="8" VerticalAlignment="Center"> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="{StaticResource TangoComboBoxItemFontSize}"> Grouped</TextBlock> + </Border> + + </Grid> + + </Border> + <Border x:Name="gapBorder" Margin="0 20 0 0" Height="24" ClipToBounds="False" CornerRadius="10" Visibility="{Binding EnableInterSegment, Converter={StaticResource BooleanToVisibilityConverter}}"> + <Border.Clip> + <RectangleGeometry RadiusX="10" RadiusY="10"> + <RectangleGeometry.Rect> + <MultiBinding Converter="{StaticResource WidthHeightToRectConverter}"> + <Binding ElementName="gapBorder" Path="ActualWidth" /> + <Binding ElementName="gapBorder" Path="ActualHeight" /> + </MultiBinding> + </RectangleGeometry.Rect> + </RectangleGeometry> + </Border.Clip> + <Grid> + <TextBlock FontSize="{StaticResource TangoDefaultFontSize}" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="4"> + <Run Text="5m"></Run> + <Run Text=" Gap"></Run> + </TextBlock> + <Rectangle Stroke="{StaticResource TangoGrayBrush}" StrokeThickness="1" StrokeDashArray="5 5 5 5" RadiusX="12" RadiusY="12" /> + </Grid> + </Border> + + </StackPanel> + + <Canvas Grid.Row="1" x:Name="select_canvas_segment" Width="24" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="-50 -35 0 0" > + <touch:TouchCheckBox Height="22" Width="24" Margin="20 -20 0 0" Style="{StaticResource TouchRoundCheckBox}" Canvas.Left="0" Canvas.Top="0" x:Name="selectItem" Foreground="{StaticResource TangoKeyboardKeyDarkTextBrush}" Background="Transparent" IsChecked="{Binding IsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Center"/> + </Canvas> + + </Grid> + </DataTemplate> + + <helpers:GroupSegmentTemplateSelector x:Key="GroupSegmentTemplateSelector" + GroupSegmentsTemplate="{StaticResource GroupSegment_Template}" + SegmentTemplate="{StaticResource Segment_Template}"/> + <helpers:GroupSegmentTemplateSelector x:Key="CollapsedGroupSegmentTemplateSelector" + GroupSegmentsTemplate="{StaticResource CollapsedGroupSegment_Template}" + SegmentTemplate="{StaticResource CollapsedSegment_Template}"/> + </UserControl.Resources> <Grid Background="{StaticResource TangoMidBackgroundBrush}" SnapsToDevicePixels="False"> @@ -537,7 +803,7 @@ <DropShadowEffect Opacity="0.5" ShadowDepth="6" Color="Silver" BlurRadius="10" Direction="270"/> </Border.Effect> <UniformGrid Columns="6" Rows="1" DockPanel.Dock="Left" HorizontalAlignment="Stretch" > - <touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding RepeateSegmentCommand}" IsEnabled="False"> + <touch:TouchButton Style="{StaticResource CollapsedPanelButton}" EnableDropShadow="False" Command="{Binding RepeateSegmentCommand}" IsEnabled="{Binding JobModel.HasSelectedItems, Converter={StaticResource BooleanToVisibilityConverter}}"> <StackPanel Orientation="Vertical" VerticalAlignment="Center" > <Image Width="20" Stretch="Fill" RenderOptions.BitmapScalingMode="Fant" Source="../Images/JobView/repeat.png"/> <TextBlock FontWeight="Medium" Margin="0 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoSmallFontSizeBar}" Foreground="{StaticResource TangoMidAccentBrush}">Repeat</TextBlock> @@ -626,12 +892,12 @@ <!--Border x:Name="borderDockFloat" Height="10" Margin="0 0 0 0" BorderBrush="Transparent" > <DockPanel x:Name="dockEdit" LastChildFill="False" Height="10" Width="50" HorizontalAlignment="Right" RenderTransformOrigin="0.58,2.08"/> </Border> --> - <ListBox x:Name="listSegments" Margin="10 0 10 60" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource Segment_Template}" Style="{StaticResource SegmentsListBox}" + <ListBox x:Name="listSegments" Margin="10 0 10 60" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplateSelector="{StaticResource GroupSegmentTemplateSelector}" Style="{StaticResource SegmentsListBox}" ScrollViewer.VerticalScrollBarVisibility="Visible" Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityConverter}}" /> - <ListBox x:Name="collapsedListSegments" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplate="{StaticResource CollapsedSegment_Template}" Style="{StaticResource SegmentsListBox}" + <ListBox x:Name="collapsedListSegments" ItemsSource="{Binding SegmentsCollectionView}" ItemTemplateSelector ="{StaticResource CollapsedGroupSegmentTemplateSelector}" Style="{StaticResource SegmentsListBox}" ScrollViewer.VerticalScrollBarVisibility="Visible" Visibility="{Binding IsFullMode, Converter={StaticResource BooleanToVisibilityInverseConverter}}" Margin=" 0 0 0 40"/> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> diff --git a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs index 2897604a0..0f1a868a4 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/JobBuilder.cs @@ -31,7 +31,7 @@ namespace Tango.BL.Builders { return AddStep(1, () => { - Context.Segments.Where(x => x.JobGuid == Entity.Guid).OrderBy(x => x.SegmentIndex).ToList(); + Context.Segments.Where(x => x.JobGuid == Entity.Guid).Include(x => x.SegmentsGroup).OrderBy(x => x.SegmentIndex).ToList(); }); } diff --git a/Software/Visual_Studio/Tango.BL/DTO/SegmentDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/SegmentDTOBase.cs index fba251a63..170b28539 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/SegmentDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/SegmentDTOBase.cs @@ -53,5 +53,13 @@ namespace Tango.BL.DTO get; set; } + /// <summary> + /// segments group guid + /// </summary> + public String SegmentsGroupGuid + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/SegmentsGroupDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/SegmentsGroupDTO.cs new file mode 100644 index 000000000..3e1c3d339 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/SegmentsGroupDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class SegmentsGroupDTO : SegmentsGroupDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/SegmentsGroupDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/SegmentsGroupDTOBase.cs new file mode 100644 index 000000000..adbf8a2a0 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/SegmentsGroupDTOBase.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class SegmentsGroupDTOBase : ObservableEntityDTO<SegmentsGroupDTO, SegmentsGroup> + { + + /// <summary> + /// group index + /// </summary> + public Int32 GroupIndex + { + get; set; + } + + /// <summary> + /// repeats + /// </summary> + public Int32 Repeats + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs index f98239bf3..0ded51862 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/SegmentBase.cs @@ -37,6 +37,8 @@ namespace Tango.BL.Entities public event EventHandler<Job> JobChanged; + public event EventHandler<SegmentsGroup> SegmentsGroupChanged; + protected String _name; /// <summary> @@ -144,6 +146,32 @@ namespace Tango.BL.Entities } } + protected String _segmentsgroupguid; + + /// <summary> + /// Gets or sets the segmentbase segments group guid. + /// </summary> + + [Column("SEGMENTS_GROUP_GUID")] + [ForeignKey("SegmentsGroup")] + + public String SegmentsGroupGuid + { + get + { + return _segmentsgroupguid; + } + + set + { + if (_segmentsgroupguid != value) + { + _segmentsgroupguid = value; + + } + } + } + protected SynchronizedObservableCollection<BrushStop> _brushstops; /// <summary> @@ -201,6 +229,38 @@ namespace Tango.BL.Entities } } + protected SegmentsGroup _segmentsgroup; + + /// <summary> + /// Gets or sets the segmentbase segments groups. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual SegmentsGroup SegmentsGroup + { + get + { + return _segmentsgroup; + } + + set + { + if (_segmentsgroup != value) + { + _segmentsgroup = value; + + if (SegmentsGroup != null) + { + SegmentsGroupGuid = SegmentsGroup.Guid; + } + + OnSegmentsGroupChanged(value); + + } + } + } + /// <summary> /// Called when the Name has changed. /// </summary> @@ -247,6 +307,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the SegmentsGroup has changed. + /// </summary> + protected virtual void OnSegmentsGroupChanged(SegmentsGroup segmentsgroup) + { + SegmentsGroupChanged?.Invoke(this, segmentsgroup); + RaisePropertyChanged(nameof(SegmentsGroup)); + } + + /// <summary> /// Initializes a new instance of the <see cref="SegmentBase" /> class. /// </summary> public SegmentBase() : base() diff --git a/Software/Visual_Studio/Tango.BL/Entities/SegmentsGroup.cs b/Software/Visual_Studio/Tango.BL/Entities/SegmentsGroup.cs new file mode 100644 index 000000000..9da3d36ed --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/SegmentsGroup.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class SegmentsGroup: SegmentsGroupBase + { + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/SegmentsGroupBase.cs b/Software/Visual_Studio/Tango.BL/Entities/SegmentsGroupBase.cs new file mode 100644 index 000000000..4879643f2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/SegmentsGroupBase.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("SEGMENTS_GROUPS")] + public abstract class SegmentsGroupBase : ObservableEntity<SegmentsGroup> + { + + public event EventHandler<Int32> GroupIndexChanged; + + public event EventHandler<Int32> RepeatsChanged; + + public event EventHandler<SynchronizedObservableCollection<Segment>> SegmentsChanged; + + protected Int32 _groupindex; + + /// <summary> + /// Gets or sets the segmentsgroupbase group index. + /// </summary> + + [Column("GROUP_INDEX")] + + public Int32 GroupIndex + { + get + { + return _groupindex; + } + + set + { + if (_groupindex != value) + { + _groupindex = value; + + OnGroupIndexChanged(value); + + } + } + } + + protected Int32 _repeats; + + /// <summary> + /// Gets or sets the segmentsgroupbase repeats. + /// </summary> + + [Column("REPEATS")] + + public Int32 Repeats + { + get + { + return _repeats; + } + + set + { + if (_repeats != value) + { + _repeats = value; + + OnRepeatsChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<Segment> _segments; + + /// <summary> + /// Gets or sets the segmentsgroupbase segments. + /// </summary> + + public virtual SynchronizedObservableCollection<Segment> Segments + { + get + { + return _segments; + } + + set + { + if (_segments != value) + { + _segments = value; + + OnSegmentsChanged(value); + + } + } + } + + /// <summary> + /// Called when the GroupIndex has changed. + /// </summary> + protected virtual void OnGroupIndexChanged(Int32 groupindex) + { + GroupIndexChanged?.Invoke(this, groupindex); + RaisePropertyChanged(nameof(GroupIndex)); + } + + /// <summary> + /// Called when the Repeats has changed. + /// </summary> + protected virtual void OnRepeatsChanged(Int32 repeats) + { + RepeatsChanged?.Invoke(this, repeats); + RaisePropertyChanged(nameof(Repeats)); + } + + /// <summary> + /// Called when the Segments has changed. + /// </summary> + protected virtual void OnSegmentsChanged(SynchronizedObservableCollection<Segment> segments) + { + SegmentsChanged?.Invoke(this, segments); + RaisePropertyChanged(nameof(Segments)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="SegmentsGroupBase" /> class. + /// </summary> + public SegmentsGroupBase() : base() + { + + Segments = new SynchronizedObservableCollection<Segment>(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index a799d7860..7cd312f16 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -751,6 +751,14 @@ namespace Tango.BL } /// <summary> + /// Gets or sets the SegmentsGroups. + /// </summary> + public DbSet<SegmentsGroup> SegmentsGroups + { + get; set; + } + + /// <summary> /// Gets or sets the Sites. /// </summary> public DbSet<Site> Sites diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index c15da9c18..f3e7a2a2b 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -3293,6 +3293,42 @@ namespace Tango.BL } + private ObservableCollection<SegmentsGroup> _segmentsgroups; + /// <summary> + /// Gets or sets the SegmentsGroups. + /// </summary> + public ObservableCollection<SegmentsGroup> SegmentsGroups + { + get + { + return _segmentsgroups; + } + + set + { + _segmentsgroups = value; RaisePropertyChanged(nameof(SegmentsGroups)); + } + + } + + private ICollectionView _segmentsgroupsViewSource; + /// <summary> + /// Gets or sets the SegmentsGroups View Source. + ///</summary> + public ICollectionView SegmentsGroupsViewSource + { + get + { + return _segmentsgroupsViewSource; + } + + set + { + _segmentsgroupsViewSource = value; RaisePropertyChanged(nameof(SegmentsGroupsViewSource)); + } + + } + private ObservableCollection<Site> _sites; /// <summary> /// Gets or sets the Sites. @@ -4129,6 +4165,8 @@ namespace Tango.BL SegmentsViewSource = CreateCollectionView(Segments); + SegmentsGroupsViewSource = CreateCollectionView(SegmentsGroups); + SitesViewSource = CreateCollectionView(Sites); SitesCatalogsViewSource = CreateCollectionView(SitesCatalogs); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index 8cf9ef0f2..dc43b9b2b 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -3293,6 +3293,42 @@ namespace Tango.BL } + private ObservableCollection<SegmentsGroup> _segmentsgroups; + /// <summary> + /// Gets or sets the SegmentsGroups. + /// </summary> + public ObservableCollection<SegmentsGroup> SegmentsGroups + { + get + { + return _segmentsgroups; + } + + set + { + _segmentsgroups = value; RaisePropertyChanged(nameof(SegmentsGroups)); + } + + } + + private ICollectionView _segmentsgroupsViewSource; + /// <summary> + /// Gets or sets the SegmentsGroups View Source. + ///</summary> + public ICollectionView SegmentsGroupsViewSource + { + get + { + return _segmentsgroupsViewSource; + } + + set + { + _segmentsgroupsViewSource = value; RaisePropertyChanged(nameof(SegmentsGroupsViewSource)); + } + + } + private ObservableCollection<Site> _sites; /// <summary> /// Gets or sets the Sites. @@ -4129,6 +4165,8 @@ namespace Tango.BL SegmentsViewSource = CreateCollectionView(Segments); + SegmentsGroupsViewSource = CreateCollectionView(SegmentsGroups); + SitesViewSource = CreateCollectionView(Sites); SitesCatalogsViewSource = CreateCollectionView(SitesCatalogs); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index baefab542..2500c3370 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -301,6 +301,8 @@ <Compile Include="DTO\RubbingResultDTOBase.cs" /> <Compile Include="DTO\SegmentDTO.cs" /> <Compile Include="DTO\SegmentDTOBase.cs" /> + <Compile Include="DTO\SegmentsGroupDTO.cs" /> + <Compile Include="DTO\SegmentsGroupDTOBase.cs" /> <Compile Include="DTO\SiteDTO.cs" /> <Compile Include="DTO\SiteDTOBase.cs" /> <Compile Include="DTO\SitesCatalogDTO.cs" /> @@ -468,6 +470,8 @@ <Compile Include="Entities\RubbingResult.cs" /> <Compile Include="Entities\RubbingResultBase.cs" /> <Compile Include="Entities\SegmentBase.cs" /> + <Compile Include="Entities\SegmentsGroup.cs" /> + <Compile Include="Entities\SegmentsGroupBase.cs" /> <Compile Include="Entities\Site.cs" /> <Compile Include="Entities\SiteBase.cs" /> <Compile Include="Entities\SitesCatalog.cs" /> @@ -771,7 +775,7 @@ </Target> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs index 0b51ddbda..181893358 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -116,6 +116,7 @@ namespace Tango.DAL.Remote.DB public virtual DbSet<ROLES_PERMISSIONS> ROLES_PERMISSIONS { get; set; } public virtual DbSet<RUBBING_RESULTS> RUBBING_RESULTS { get; set; } public virtual DbSet<SEGMENT> SEGMENTS { get; set; } + public virtual DbSet<SEGMENTS_GROUPS> SEGMENTS_GROUPS { get; set; } public virtual DbSet<SITE> SITES { get; set; } public virtual DbSet<SITES_CATALOGS> SITES_CATALOGS { get; set; } public virtual DbSet<SITES_RMLS> SITES_RMLS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs index d26e67908..b9a889afd 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Designer.cs @@ -1,4 +1,4 @@ -// T4 code generation is enabled for model 'C:\DATA\Development\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. +// T4 code generation is enabled for model 'C:\TFS\Tango\Software\Visual_Studio\Tango.DAL.Remote\DB\RemoteADO.edmx'. // To enable legacy code generation, change the value of the 'Code Generation Strategy' designer // property to 'Legacy ObjectContext'. This property is available in the Properties Window when the model // is open in the designer. diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 8e4a49e8f..973d3f8b5 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -1287,6 +1287,17 @@ <Property Name="JOB_GUID" Type="varchar" MaxLength="36" Nullable="false" /> <Property Name="LENGTH" Type="float" Nullable="false" /> <Property Name="SEGMENT_INDEX" Type="int" Nullable="false" /> + <Property Name="SEGMENTS_GROUP_GUID" Type="varchar" MaxLength="36" /> + </EntityType> + <EntityType Name="SEGMENTS_GROUPS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="GROUP_INDEX" Type="int" Nullable="false" /> + <Property Name="REPEATS" Type="int" Nullable="false" /> </EntityType> <EntityType Name="SITES"> <Key> @@ -2904,6 +2915,18 @@ </Dependent> </ReferentialConstraint> </Association> + <Association Name="FK_SEGMENTS_SEGMENTS_GROUPS"> + <End Role="SEGMENTS_GROUPS" Type="Self.SEGMENTS_GROUPS" Multiplicity="0..1" /> + <End Role="SEGMENTS" Type="Self.SEGMENTS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="SEGMENTS_GROUPS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="SEGMENTS"> + <PropertyRef Name="SEGMENTS_GROUP_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> <Association Name="FK_SITES_CATALOGS_COLOR_CATALOGS"> <End Role="COLOR_CATALOGS" Type="Self.COLOR_CATALOGS" Multiplicity="1"> <OnDelete Action="Cascade" /> @@ -3209,6 +3232,7 @@ <EntitySet Name="ROLES_PERMISSIONS" EntityType="Self.ROLES_PERMISSIONS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="RUBBING_RESULTS" EntityType="Self.RUBBING_RESULTS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="SEGMENTS" EntityType="Self.SEGMENTS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="SEGMENTS_GROUPS" EntityType="Self.SEGMENTS_GROUPS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="SITES" EntityType="Self.SITES" Schema="dbo" store:Type="Tables" /> <EntitySet Name="SITES_CATALOGS" EntityType="Self.SITES_CATALOGS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="SITES_RMLS" EntityType="Self.SITES_RMLS" Schema="dbo" store:Type="Tables" /> @@ -3624,6 +3648,10 @@ <End Role="JOBS" EntitySet="JOBS" /> <End Role="SEGMENTS" EntitySet="SEGMENTS" /> </AssociationSet> + <AssociationSet Name="FK_SEGMENTS_SEGMENTS_GROUPS" Association="Self.FK_SEGMENTS_SEGMENTS_GROUPS"> + <End Role="SEGMENTS_GROUPS" EntitySet="SEGMENTS_GROUPS" /> + <End Role="SEGMENTS" EntitySet="SEGMENTS" /> + </AssociationSet> <AssociationSet Name="FK_SITES_CATALOGS_COLOR_CATALOGS" Association="Self.FK_SITES_CATALOGS_COLOR_CATALOGS"> <End Role="COLOR_CATALOGS" EntitySet="COLOR_CATALOGS" /> <End Role="SITES_CATALOGS" EntitySet="SITES_CATALOGS" /> @@ -3849,6 +3877,7 @@ <EntitySet Name="ROLES_PERMISSIONS" EntityType="RemoteModel.ROLES_PERMISSIONS" /> <EntitySet Name="RUBBING_RESULTS" EntityType="RemoteModel.RUBBING_RESULTS" /> <EntitySet Name="SEGMENTS" EntityType="RemoteModel.SEGMENT" /> + <EntitySet Name="SEGMENTS_GROUPS" EntityType="RemoteModel.SEGMENTS_GROUPS" /> <EntitySet Name="SITES" EntityType="RemoteModel.SITE" /> <EntitySet Name="SITES_CATALOGS" EntityType="RemoteModel.SITES_CATALOGS" /> <EntitySet Name="SITES_RMLS" EntityType="RemoteModel.SITES_RMLS" /> @@ -4231,6 +4260,10 @@ <End Role="ROLE" EntitySet="ROLES" /> <End Role="USERS_ROLES" EntitySet="USERS_ROLES" /> </AssociationSet> + <AssociationSet Name="FK_SEGMENTS_SEGMENTS_GROUPS" Association="RemoteModel.FK_SEGMENTS_SEGMENTS_GROUPS"> + <End Role="SEGMENTS_GROUPS" EntitySet="SEGMENTS_GROUPS" /> + <End Role="SEGMENT" EntitySet="SEGMENTS" /> + </AssociationSet> <AssociationSet Name="FK_SITES_CATALOGS_SITES" Association="RemoteModel.FK_SITES_CATALOGS_SITES"> <End Role="SITE" EntitySet="SITES" /> <End Role="SITES_CATALOGS" EntitySet="SITES_CATALOGS" /> @@ -4360,7 +4393,7 @@ <NavigationProperty Name="TENSILE_RESULTS" Relationship="RemoteModel.FK_TENSILE_RESULTS_RML_EXTENSION_TEST_RESULTS" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="TENSILE_RESULTS" /> <NavigationProperty Name="MACHINE" Relationship="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_MACHINES" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="MACHINE" /> <NavigationProperty Name="RUBBING_RESULTS" Relationship="RemoteModel.FK_RUBBING_RESULTS_RML_EXTENSION_TEST_RESULTS" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="RUBBING_RESULTS" /> - </EntityType> + </EntityType> <EntityType Name="RMLS_EXTENSIONS"> <Key> <PropertyRef Name="GUID" /> @@ -6049,8 +6082,21 @@ <Property Name="JOB_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> <Property Name="LENGTH" Type="Double" Nullable="false" /> <Property Name="SEGMENT_INDEX" Type="Int32" Nullable="false" /> + <Property Name="SEGMENTS_GROUP_GUID" Type="String" MaxLength="36" FixedLength="false" Unicode="false" /> <NavigationProperty Name="BRUSH_STOPS" Relationship="RemoteModel.FK_BRUSH_STOPS_SEGMENTS" FromRole="SEGMENT" ToRole="BRUSH_STOPS" /> <NavigationProperty Name="JOB" Relationship="RemoteModel.FK_SEGMENTS_JOBS" FromRole="SEGMENT" ToRole="JOB" /> + <NavigationProperty Name="SEGMENTS_GROUPS" Relationship="RemoteModel.FK_SEGMENTS_SEGMENTS_GROUPS" FromRole="SEGMENT" ToRole="SEGMENTS_GROUPS" /> + </EntityType> + <EntityType Name="SEGMENTS_GROUPS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="GROUP_INDEX" Type="Int32" Nullable="false" /> + <Property Name="REPEATS" Type="Int32" Nullable="false" /> + <NavigationProperty Name="SEGMENTS" Relationship="RemoteModel.FK_SEGMENTS_SEGMENTS_GROUPS" FromRole="SEGMENTS_GROUPS" ToRole="SEGMENT" /> </EntityType> <EntityType Name="SITE"> <Key> @@ -7515,6 +7561,18 @@ </Dependent> </ReferentialConstraint> </Association> + <Association Name="FK_SEGMENTS_SEGMENTS_GROUPS"> + <End Type="RemoteModel.SEGMENTS_GROUPS" Role="SEGMENTS_GROUPS" Multiplicity="0..1" /> + <End Type="RemoteModel.SEGMENT" Role="SEGMENT" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="SEGMENTS_GROUPS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="SEGMENT"> + <PropertyRef Name="SEGMENTS_GROUP_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> <Association Name="FK_SITES_CATALOGS_SITES"> <End Type="RemoteModel.SITE" Role="SITE" Multiplicity="1"> <OnDelete Action="Cascade" /> @@ -9105,6 +9163,7 @@ <EntitySetMapping Name="SEGMENTS"> <EntityTypeMapping TypeName="RemoteModel.SEGMENT"> <MappingFragment StoreEntitySet="SEGMENTS"> + <ScalarProperty Name="SEGMENTS_GROUP_GUID" ColumnName="SEGMENTS_GROUP_GUID" /> <ScalarProperty Name="SEGMENT_INDEX" ColumnName="SEGMENT_INDEX" /> <ScalarProperty Name="LENGTH" ColumnName="LENGTH" /> <ScalarProperty Name="JOB_GUID" ColumnName="JOB_GUID" /> @@ -9115,6 +9174,17 @@ </MappingFragment> </EntityTypeMapping> </EntitySetMapping> + <EntitySetMapping Name="SEGMENTS_GROUPS"> + <EntityTypeMapping TypeName="RemoteModel.SEGMENTS_GROUPS"> + <MappingFragment StoreEntitySet="SEGMENTS_GROUPS"> + <ScalarProperty Name="REPEATS" ColumnName="REPEATS" /> + <ScalarProperty Name="GROUP_INDEX" ColumnName="GROUP_INDEX" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> <EntitySetMapping Name="SITES"> <EntityTypeMapping TypeName="RemoteModel.SITE"> <MappingFragment StoreEntitySet="SITES"> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index cc936cddc..af6feda16 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,97 +5,98 @@ <!-- Diagram content (shape and connector positions) --> <edmx:Diagrams> <Diagram DiagramId="f9ae01d708754bbd997add25a4bacc79" Name="Diagram1" ZoomLevel="87"> - <EntityTypeShape EntityType="RemoteModel.ACTION_LOGS" Width="1.5" PointX="11.25" PointY="36.75" /> - <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="61.25" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="90.25" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="80.125" /> - <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="69.125" /> - <EntityTypeShape EntityType="RemoteModel.BIT_TYPES" Width="1.5" PointX="11.75" PointY="6" /> - <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="15.75" PointY="18.125" /> - <EntityTypeShape EntityType="RemoteModel.BTSR_APPLICATION_TYPES" Width="1.5" PointX="0.75" PointY="34.75" /> - <EntityTypeShape EntityType="RemoteModel.BTSR_YARN_TYPES" Width="1.5" PointX="0.75" PointY="25.625" /> - <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="3" PointY="36.625" /> - <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="5.25" PointY="17.625" /> - <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="0.75" PointY="17.25" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="1.5" PointY="5.5" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_GROUPS" Width="1.5" PointX="3.75" PointY="6" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS" Width="1.5" PointX="6" PointY="4.75" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS_RECIPES" Width="1.5" PointX="8.25" PointY="16.5" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_PROCESS_INK_UPTAKE" Width="1.5" PointX="13.75" PointY="2" /> - <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="9" PointY="34.625" /> - <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="0.75" PointY="74.75" /> - <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="65.25" /> - <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="9" PointY="13.125" /> - <EntityTypeShape EntityType="RemoteModel.DATA_STORE_ITEMS" Width="1.5" PointX="5.25" PointY="61.25" /> - <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="0.75" PointY="94.125" /> - <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="3" PointY="93.5" /> - <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="87.25" /> - <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="9" PointY="40.375" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="14.375" /> - <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="22.125" /> - <EntityTypeShape EntityType="RemoteModel.FSE_VERSIONS" Width="1.5" PointX="11.25" PointY="45.5" /> - <EntityTypeShape EntityType="RemoteModel.GLOBAL_DATA_STORE_ITEMS" Width="1.5" PointX="13.75" PointY="6" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="1.5" PointY="98.625" /> + <EntityTypeShape EntityType="RemoteModel.ACTION_LOGS" Width="1.5" PointX="11.25" PointY="31.75" /> + <EntityTypeShape EntityType="RemoteModel.ADDRESS" Width="1.5" PointX="1.5" PointY="56.875" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_DISPLAY_PANEL_VERSIONS" Width="1.5" PointX="1.5" PointY="68.125" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="75.375" /> + <EntityTypeShape EntityType="RemoteModel.APPLICATION_OS_VERSIONS" Width="1.5" PointX="1.5" PointY="78.25" /> + <EntityTypeShape EntityType="RemoteModel.BIT_TYPES" Width="1.5" PointX="8.75" PointY="4.75" /> + <EntityTypeShape EntityType="RemoteModel.BRUSH_STOPS" Width="1.5" PointX="15.75" PointY="16.75" /> + <EntityTypeShape EntityType="RemoteModel.BTSR_APPLICATION_TYPES" Width="1.5" PointX="0.75" PointY="33.25" /> + <EntityTypeShape EntityType="RemoteModel.BTSR_YARN_TYPES" Width="1.5" PointX="0.75" PointY="30.125" /> + <EntityTypeShape EntityType="RemoteModel.CARTRIDGE_TYPES" Width="1.5" PointX="6" PointY="38.375" /> + <EntityTypeShape EntityType="RemoteModel.CAT" Width="1.5" PointX="8.25" PointY="20.375" /> + <EntityTypeShape EntityType="RemoteModel.CCT" Width="1.5" PointX="0.75" PointY="13" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS" Width="1.5" PointX="1.5" PointY="40.125" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_GROUPS" Width="1.5" PointX="0.75" PointY="4.625" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS" Width="1.5" PointX="3" PointY="3.375" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_CATALOGS_ITEMS_RECIPES" Width="1.5" PointX="5.25" PointY="16.25" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_PROCESS_INK_UPTAKE" Width="1.5" PointX="8.75" PointY="8.75" /> + <EntityTypeShape EntityType="RemoteModel.COLOR_SPACES" Width="1.5" PointX="9" PointY="30.5" /> + <EntityTypeShape EntityType="RemoteModel.CONFIGURATION" Width="1.5" PointX="3.75" PointY="73.75" /> + <EntityTypeShape EntityType="RemoteModel.CONTACT" Width="1.5" PointX="1.5" PointY="61" /> + <EntityTypeShape EntityType="RemoteModel.CUSTOMER" Width="1.5" PointX="9" PointY="34" /> + <EntityTypeShape EntityType="RemoteModel.DATA_STORE_ITEMS" Width="1.5" PointX="8.25" PointY="76.875" /> + <EntityTypeShape EntityType="RemoteModel.DISPENSER_TYPES" Width="1.5" PointX="3.75" PointY="41.875" /> + <EntityTypeShape EntityType="RemoteModel.DISPENSER" Width="1.5" PointX="6" PointY="41.375" /> + <EntityTypeShape EntityType="RemoteModel.EMBEDDED_FIRMWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="81.25" /> + <EntityTypeShape EntityType="RemoteModel.EVENT_TYPES" Width="1.5" PointX="9" PointY="85.75" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SHAPES" Width="1.5" PointX="0.75" PointY="20.875" /> + <EntityTypeShape EntityType="RemoteModel.FIBER_SYNTHS" Width="1.5" PointX="0.75" PointY="10.125" /> + <EntityTypeShape EntityType="RemoteModel.FSE_VERSIONS" Width="1.5" PointX="11.25" PointY="28.25" /> + <EntityTypeShape EntityType="RemoteModel.GLOBAL_DATA_STORE_ITEMS" Width="1.5" PointX="2.75" PointY="9.75" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWER_TYPES" Width="1.5" PointX="1.5" PointY="88.625" /> <EntityTypeShape EntityType="RemoteModel.HARDWARE_BLOWERS" Width="1.5" PointX="3.75" PointY="79.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="1.5" PointY="102.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="3.75" PointY="83.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="4.5" PointY="71.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="6.75" PointY="82.5" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="7.5" PointY="74.5" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="9.75" PointY="80.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="4.5" PointY="98.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="6.75" PointY="88.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="4.5" PointY="75.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="6.75" PointY="78.25" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="83" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="1.5" PointY="106.625" /> - <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="3.75" PointY="87.375" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="3" PointY="43.75" /> - <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="5.25" PointY="37.625" /> - <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="15.75" PointY="2" /> - <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="11.25" PointY="18.125" /> - <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="37.875" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="3" PointY="0.75" /> - <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="25.875" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_PROTOTYPES" Width="1.5" PointX="13.75" PointY="11" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="11.25" PointY="14.25" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="0.75" PointY="57.125" /> - <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="3" PointY="49.375" /> - <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="11.25" PointY="40.75" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="28.75" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="31.625" /> - <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="11.375" /> - <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="3" PointY="33.25" /> - <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="0.75" PointY="43.125" /> - <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="12" PointY="54" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="48.5" /> - <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="51.5" /> - <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS" Width="1.5" PointX="8.75" PointY="2.25" /> - <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" Width="1.5" PointX="11" PointY="2.5" /> - <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="16.125" /> - <EntityTypeShape EntityType="RemoteModel.RMLS_SPOOLS" Width="1.5" PointX="8.25" PointY="21.5" /> - <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="12" PointY="49.875" /> - <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="14.25" PointY="50" /> - <EntityTypeShape EntityType="RemoteModel.RUBBING_RESULTS" Width="1.5" PointX="13.75" PointY="14" /> - <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="13.5" PointY="21.875" /> - <EntityTypeShape EntityType="RemoteModel.SITE" Width="1.5" PointX="3" PointY="11.75" /> - <EntityTypeShape EntityType="RemoteModel.SITES_CATALOGS" Width="1.5" PointX="5.25" PointY="10.875" /> - <EntityTypeShape EntityType="RemoteModel.SITES_RMLS" Width="1.5" PointX="5.25" PointY="22" /> - <EntityTypeShape EntityType="RemoteModel.SITES_SPOOL_TYPES" Width="1.5" PointX="11.25" PointY="9.75" /> - <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="9" PointY="7.25" /> - <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="11.25" PointY="31.75" /> - <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="15.75" PointY="11" /> - <EntityTypeShape EntityType="RemoteModel.TANGO_UPDATES" Width="1.5" PointX="17.75" PointY="2" /> - <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="14.25" PointY="40.875" /> - <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="15.75" PointY="14" /> - <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="17.75" PointY="7" /> - <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="17.75" PointY="10" /> - <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="17.75" PointY="13" /> - <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="17.75" PointY="18" /> - <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="19.75" PointY="2" /> - <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="9" PointY="25.625" /> - <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="14.25" PointY="30" /> - <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="9" PointY="31.5" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSOR_TYPES" Width="1.5" PointX="6.5" PointY="81.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_BREAK_SENSORS" Width="1.5" PointX="8.75" PointY="71.375" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCER_TYPES" Width="1.5" PointX="6.5" PointY="61.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_DANCERS" Width="1.5" PointX="8.75" PointY="61.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTOR_TYPES" Width="1.5" PointX="8.5" PointY="91.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_MOTORS" Width="1.5" PointX="10.75" PointY="75.375" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROL_TYPES" Width="1.5" PointX="9.5" PointY="57.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_PID_CONTROLS" Width="1.5" PointX="11.75" PointY="67.75" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSOR_TYPES" Width="1.5" PointX="1.5" PointY="84.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_SPEED_SENSORS" Width="1.5" PointX="3.75" PointY="69.375" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_VERSIONS" Width="1.5" PointX="1.5" PointY="71.125" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDER_TYPES" Width="1.5" PointX="6.5" PointY="57.625" /> + <EntityTypeShape EntityType="RemoteModel.HARDWARE_WINDERS" Width="1.5" PointX="8.75" PointY="67.5" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACK_FORMULAS" Width="1.5" PointX="6" PointY="35.125" /> + <EntityTypeShape EntityType="RemoteModel.IDS_PACKS" Width="1.5" PointX="8.25" PointY="39.5" /> + <EntityTypeShape EntityType="RemoteModel.JOB_RUNS" Width="1.5" PointX="16.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.JOB" Width="1.5" PointX="11.25" PointY="16.75" /> + <EntityTypeShape EntityType="RemoteModel.LINEAR_MASS_DENSITY_UNITS" Width="1.5" PointX="0.75" PointY="24.25" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES" Width="1.5" PointX="6" PointY="5.5" /> + <EntityTypeShape EntityType="RemoteModel.LIQUID_TYPES_RMLS" Width="1.5" PointX="5.25" PointY="20.5" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_PROTOTYPES" Width="1.5" PointX="10.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_STUDIO_VERSIONS" Width="1.5" PointX="11.25" PointY="35.5" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE_VERSIONS" Width="1.5" PointX="3.75" PointY="64.875" /> + <EntityTypeShape EntityType="RemoteModel.MACHINE" Width="1.5" PointX="6" PointY="65.125" /> + <EntityTypeShape EntityType="RemoteModel.MACHINES_EVENTS" Width="1.5" PointX="11.25" PointY="48.125" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_CONDITIONS" Width="1.5" PointX="0.75" PointY="27.25" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_MATERIALS" Width="1.5" PointX="0.75" PointY="36.375" /> + <EntityTypeShape EntityType="RemoteModel.MEDIA_PURPOSES" Width="1.5" PointX="0.75" PointY="16.375" /> + <EntityTypeShape EntityType="RemoteModel.MID_TANK_TYPES" Width="1.5" PointX="6" PointY="31.625" /> + <EntityTypeShape EntityType="RemoteModel.ORGANIZATION" Width="1.5" PointX="3.75" PointY="58.875" /> + <EntityTypeShape EntityType="RemoteModel.PERMISSION" Width="1.5" PointX="12" PointY="6" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES" Width="1.5" PointX="7.5" PointY="47.25" /> + <EntityTypeShape EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" Width="1.5" PointX="5.25" PointY="50.25" /> + <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS" Width="1.5" PointX="5.75" PointY="1" /> + <EntityTypeShape EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" Width="1.5" PointX="8" PointY="1.125" /> + <EntityTypeShape EntityType="RemoteModel.RML" Width="1.5" PointX="3" PointY="14.75" /> + <EntityTypeShape EntityType="RemoteModel.RMLS_SPOOLS" Width="1.5" PointX="8.25" PointY="16.25" /> + <EntityTypeShape EntityType="RemoteModel.ROLE" Width="1.5" PointX="12" PointY="9.875" /> + <EntityTypeShape EntityType="RemoteModel.ROLES_PERMISSIONS" Width="1.5" PointX="14.25" PointY="9" /> + <EntityTypeShape EntityType="RemoteModel.RUBBING_RESULTS" Width="1.5" PointX="12.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.SEGMENT" Width="1.5" PointX="13.5" PointY="20.375" /> + <EntityTypeShape EntityType="RemoteModel.SEGMENTS_GROUPS" Width="1.5" PointX="11.25" PointY="13.875" /> + <EntityTypeShape EntityType="RemoteModel.SITE" Width="1.5" PointX="3" PointY="30.5" /> + <EntityTypeShape EntityType="RemoteModel.SITES_CATALOGS" Width="1.5" PointX="5.25" PointY="27.875" /> + <EntityTypeShape EntityType="RemoteModel.SITES_RMLS" Width="1.5" PointX="5.25" PointY="24.75" /> + <EntityTypeShape EntityType="RemoteModel.SITES_SPOOL_TYPES" Width="1.5" PointX="14.25" PointY="12.75" /> + <EntityTypeShape EntityType="RemoteModel.SPOOL_TYPES" Width="1.5" PointX="6" PointY="10.625" /> + <EntityTypeShape EntityType="RemoteModel.SPOOL" Width="1.5" PointX="11.25" PointY="40.25" /> + <EntityTypeShape EntityType="RemoteModel.sysdiagram" Width="1.5" PointX="16.75" PointY="9.75" /> + <EntityTypeShape EntityType="RemoteModel.TANGO_UPDATES" Width="1.5" PointX="17.75" PointY="12.75" /> + <EntityTypeShape EntityType="RemoteModel.TANGO_VERSIONS" Width="1.5" PointX="14.25" PointY="44.25" /> + <EntityTypeShape EntityType="RemoteModel.TECH_CONTROLLERS" Width="1.5" PointX="17.75" PointY="17.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_DISPENSERS" Width="1.5" PointX="18.75" PointY="0.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_HEATERS" Width="1.5" PointX="18.75" PointY="3.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_IOS" Width="1.5" PointX="18.75" PointY="6.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_MONITORS" Width="1.5" PointX="19.75" PointY="11.75" /> + <EntityTypeShape EntityType="RemoteModel.TECH_VALVES" Width="1.5" PointX="19.75" PointY="16.75" /> + <EntityTypeShape EntityType="RemoteModel.USER" Width="1.5" PointX="9" PointY="24.625" /> + <EntityTypeShape EntityType="RemoteModel.USERS_ROLES" Width="1.5" PointX="14.25" PointY="28" /> + <EntityTypeShape EntityType="RemoteModel.WINDING_METHODS" Width="1.5" PointX="9" PointY="12.5" /> <AssociationConnector Association="RemoteModel.FK_ACTION_LOGS_USERS" /> <AssociationConnector Association="RemoteModel.FK_ORGANIZATIONS_ADDRESSES" /> <AssociationConnector Association="RemoteModel.FK_USERS_ADDRESSES" /> @@ -182,6 +183,7 @@ <AssociationConnector Association="RemoteModel.FK_RMLS_SPOOLS_SPOOL_TYPES" /> <AssociationConnector Association="RemoteModel.FK_ROLES_PERMISSIONS_ROLES" /> <AssociationConnector Association="RemoteModel.FK_USERS_ROLES_ROLES" /> + <AssociationConnector Association="RemoteModel.FK_SEGMENTS_SEGMENTS_GROUPS" /> <AssociationConnector Association="RemoteModel.FK_SITES_CATALOGS_SITES" /> <AssociationConnector Association="RemoteModel.FK_SITES_RMLS_SITES" /> <AssociationConnector Association="RemoteModel.FK_SITES_SPOOL_TYPES_SITES" /> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENT.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENT.cs index 206092a13..e2fdfa732 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENT.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENT.cs @@ -27,9 +27,11 @@ namespace Tango.DAL.Remote.DB public string JOB_GUID { get; set; } public double LENGTH { get; set; } public int SEGMENT_INDEX { get; set; } + public string SEGMENTS_GROUP_GUID { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<BRUSH_STOPS> BRUSH_STOPS { get; set; } public virtual JOB JOB { get; set; } + public virtual SEGMENTS_GROUPS SEGMENTS_GROUPS { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENTS_GROUPS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENTS_GROUPS.cs new file mode 100644 index 000000000..9da1ce490 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/SEGMENTS_GROUPS.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class SEGMENTS_GROUPS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public SEGMENTS_GROUPS() + { + this.SEGMENTS = new HashSet<SEGMENT>(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public int GROUP_INDEX { get; set; } + public int REPEATS { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<SEGMENT> SEGMENTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj index 8a7ccc017..1a15767d6 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -315,6 +315,9 @@ <Compile Include="DB\SEGMENT.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> + <Compile Include="DB\SEGMENTS_GROUPS.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> <Compile Include="DB\SITE.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> @@ -458,7 +461,7 @@ </Target> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file |
