diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
4 files changed, 44 insertions, 1 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/thread.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/thread.png Binary files differnew file mode 100644 index 000000000..aa5a46140 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/thread.png diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj index 2d20b789c..2efcabb4b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj @@ -310,5 +310,8 @@ <ItemGroup> <Folder Include="Controls\" /> </ItemGroup> + <ItemGroup> + <Resource Include="Images\thread.png" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index 500f847ed..58d8de558 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -87,6 +87,17 @@ namespace Tango.MachineStudio.Developer.ViewModels set { _windingMethods = value; RaisePropertyChangedAuto(); } } + private ObservableCollection<SpoolType> _spoolTypes; + /// <summary> + /// Gets or sets the spool types. + /// </summary> + public ObservableCollection<SpoolType> SpoolTypes + { + get { return _spoolTypes; } + set { _spoolTypes = value; RaisePropertyChangedAuto(); } + } + + /// <summary> /// Gets or sets the application manager. /// </summary> @@ -1127,6 +1138,7 @@ namespace Tango.MachineStudio.Developer.ViewModels ColorSpaces = _activeJobDbContext.ColorSpaces.ToObservableCollection(); Rmls = _activeJobDbContext.Rmls.ToObservableCollection(); WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection(); + SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); LogManager.Log("Setting active job..."); _activeJob = _activeJobDbContext.Jobs.SingleOrDefault(x => x.Guid == SelectedMachineJob.Guid); @@ -1387,6 +1399,7 @@ namespace Tango.MachineStudio.Developer.ViewModels newJob.User = _authentication.CurrentUser; newJob.Rml = _machineDbContext.Rmls.FirstOrDefault(); newJob.WindingMethod = _machineDbContext.WindingMethods.FirstOrDefault(); + newJob.SpoolType = _machineDbContext.SpoolTypes.FirstOrDefault(); newJob.Machine = SelectedMachine; SelectedMachine.Jobs.Add(newJob); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index e9867d202..6a5c8ddb8 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -347,7 +347,7 @@ </StackPanel> </Grid> - <StackPanel Orientation="Horizontal" Margin="10 20 0 0" MaxWidth="1000" HorizontalAlignment="Left"> + <StackPanel Orientation="Horizontal" Margin="10 20 0 0" MaxWidth="1160" HorizontalAlignment="Left"> <Border Style="{StaticResource JobFieldBorder}"> <StackPanel Margin="5" Width="140"> <StackPanel Orientation="Horizontal"> @@ -369,6 +369,33 @@ </Border> <Border Style="{StaticResource JobFieldBorder}"> + <StackPanel Margin="10 5 5 5" Width="140"> + <StackPanel Orientation="Horizontal"> + <Image Source="../Images/thread.png" Width="32"></Image> + <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Spool</TextBlock> + </StackPanel> + <ComboBox Width="90" HorizontalAlignment="Left" ItemsSource="{Binding SpoolTypes}" SelectedItem="{Binding ActiveJob.SpoolType}" > + <ComboBox.ToolTip> + <TextBlock> + <Run Text="{Binding ActiveJob.SpoolType.Name}"></Run> + <Run FontSize="9" Foreground="#D9D9D9" Text="{Binding ActiveJob.SpoolType.Length}"></Run> + <Run FontSize="9" Foreground="#DEDEDE" Text="m"></Run> + </TextBlock> + </ComboBox.ToolTip> + <ComboBox.ItemTemplate> + <DataTemplate> + <TextBlock TextTrimming="CharacterEllipsis"> + <Run Text="{Binding Name}"></Run> + <Run FontSize="9" Foreground="Gray" Text="{Binding Length}"></Run> + <Run FontSize="9" Foreground="Gray" Text="m"></Run> + </TextBlock> + </DataTemplate> + </ComboBox.ItemTemplate> + </ComboBox> + </StackPanel> + </Border> + + <Border Style="{StaticResource JobFieldBorder}"> <StackPanel Margin="20 5 5 5" Width="140"> <StackPanel Orientation="Horizontal"> <Image Source="../Images/inter-segment.png" Width="32"></Image> |
