aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-11-25 10:44:37 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-11-25 10:44:37 +0200
commitbeff6af103bb0ae9b9147a907c6567bdb33abd00 (patch)
tree375eefd654c25f3b68c0cf5b3612df844a140d8e /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner
parent57f20269fbb4c591aa73c9f5e50118310cc4892e (diff)
parentdff24e56a8906b8c9b355cf407f25f4b793beafe (diff)
downloadTango-beff6af103bb0ae9b9147a907c6567bdb33abd00.tar.gz
Tango-beff6af103bb0ae9b9147a907c6567bdb33abd00.zip
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/ViewModels/MainViewVM.cs44
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.HardwareDesigner/Views/MainView.xaml7
2 files changed, 49 insertions, 2 deletions
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..73ba02435 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;
}
}
@@ -94,7 +134,9 @@ namespace Tango.MachineStudio.HardwareDesigner.ViewModels
(prop) =>
!prop.PropertyType.IsEnum
&&
- !prop.Name.ToLower().Contains("guid"));
+ prop.Name.ToLower() != "guid"
+ &&
+ prop.Name.ToLower() != "id");
}
private void CreateDefaultView()
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>