aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-02-28 16:29:45 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-02-28 16:29:45 +0200
commit9823b433c62ed173671923c32ccccadc1d06c0bd (patch)
tree3b64f95e9362c0e25a235f63ca5bbb0232a44b57 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
parent3e725887814383f6f18b1e6e951e1322104ebd1c (diff)
downloadTango-9823b433c62ed173671923c32ccccadc1d06c0bd.tar.gz
Tango-9823b433c62ed173671923c32ccccadc1d06c0bd.zip
Lots of work !!!
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/thread.pngbin0 -> 2540 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Tango.MachineStudio.Developer.csproj3
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml29
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
new file mode 100644
index 000000000..aa5a46140
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Images/thread.png
Binary files differ
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>