aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-21 11:27:26 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-21 11:27:26 +0200
commitfc6bdc8ec79ccb6b45b80a8608a6f3d360244fa4 (patch)
tree69aefa066f6cc3e5d74e85041d3479a676674e6d
parenta536bbb725c8e242d0203ca1253da44371b10435 (diff)
downloadTango-fc6bdc8ec79ccb6b45b80a8608a6f3d360244fa4.tar.gz
Tango-fc6bdc8ec79ccb6b45b80a8608a6f3d360244fa4.zip
Added component type name in hardware versions module.
-rw-r--r--Software/DB/Tango.mdfbin75497472 -> 75497472 bytes
-rw-r--r--Software/DB/Tango_log.ldfbin15400960 -> 15400960 bytes
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs40
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml7
4 files changed, 46 insertions, 1 deletions
diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf
index f09565878..775d76141 100644
--- a/Software/DB/Tango.mdf
+++ b/Software/DB/Tango.mdf
Binary files differ
diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf
index e5f0eb0f0..2907879e7 100644
--- a/Software/DB/Tango_log.ldf
+++ b/Software/DB/Tango_log.ldf
Binary files differ
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
index c46b1dec1..5e087cd02 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs
@@ -43,6 +43,46 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
{
_selectedHardwareObject = value;
RaisePropertyChangedAuto();
+ RaisePropertyChanged(nameof(SelectedHardwareObjectTypeName));
+ }
+ }
+
+ public String SelectedHardwareObjectTypeName
+ {
+ get
+ {
+ String name = String.Empty;
+
+ if (SelectedHardwareObject is HardwareMotor)
+ {
+ name = (SelectedHardwareObject as HardwareMotor).HardwareMotorType.Description;
+ }
+ else if (SelectedHardwareObject is HardwareDancer)
+ {
+ name = (SelectedHardwareObject as HardwareDancer).HardwareDancerType.Description;
+ }
+ else if (SelectedHardwareObject is HardwareBlower)
+ {
+ name = (SelectedHardwareObject as HardwareBlower).HardwareBlowerType.Description;
+ }
+ else if (SelectedHardwareObject is HardwareBreakSensor)
+ {
+ name = (SelectedHardwareObject as HardwareBreakSensor).HardwareBreakSensorType.Description;
+ }
+ else if (SelectedHardwareObject is HardwarePidControl)
+ {
+ name = (SelectedHardwareObject as HardwarePidControl).HardwarePidControlType.Description;
+ }
+ else if (SelectedHardwareObject is HardwareSpeedSensor)
+ {
+ name = (SelectedHardwareObject as HardwareSpeedSensor).HardwareSpeedSensorType.Description;
+ }
+ else if (SelectedHardwareObject is HardwareWinder)
+ {
+ name = (SelectedHardwareObject as HardwareWinder).HardwareWinderType.Description;
+ }
+
+ return name;
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
index 293b947f0..121e6e45c 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml
@@ -371,7 +371,12 @@
<materialDesign:Card Margin="5,10,5,0" Background="{DynamicResource MaterialDesignBackground}">
<StackPanel>
<Grid>
- <Expander HorizontalAlignment="Stretch" Header="Component Properties" IsExpanded="True">
+ <Expander HorizontalAlignment="Stretch" IsExpanded="True">
+ <Expander.Header>
+ <TextBlock FontSize="18" Foreground="#595959" FontWeight="Bold" FontStyle="Italic">
+ <Run Text="{Binding SelectedHardwareObjectTypeName,Mode=OneWay}"></Run>
+ </TextBlock>
+ </Expander.Header>
<StackPanel>
<editors:ParameterizedEditor ParameterizedObject="{Binding SelectedHardwareObject}" Padding="10">
<editors:ParameterizedEditor.ItemsPanel>