From b8358b92b56ef5c17636aec6a0cf48186528ea23 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 12 May 2021 16:10:34 +0300 Subject: MS tech board custom name. --- .../TechItems/TechItem.cs | 31 ++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs index f59107ca2..95b36eb70 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TechItem.cs @@ -104,6 +104,16 @@ namespace Tango.MachineStudio.Technician.TechItems set { _name = value; RaisePropertyChanged(nameof(Name)); } } + private String _customName; + /// + /// Gets or sets the name of the custom. + /// + public String CustomName + { + get { return _customName; } + set { _customName = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(TechNameFinal)); } + } + private double _left; /// /// Item Left. @@ -154,7 +164,7 @@ namespace Tango.MachineStudio.Technician.TechItems set { _angle = value; RaisePropertyChanged(nameof(Angle)); } } - + private String _techName; /// /// Gets or sets the tech item name. @@ -163,7 +173,24 @@ namespace Tango.MachineStudio.Technician.TechItems public String TechName { get { return _techName; } - set { _techName = value; RaisePropertyChangedAuto(); } + set { _techName = value; RaisePropertyChangedAuto(); RaisePropertyChanged(nameof(TechNameFinal)); } + } + + private String _techNameFinal; + public String TechNameFinal + { + get + { + if (CustomName.IsNotNullOrEmpty()) + { + return CustomName; + } + else + { + return _techName; + } + } + set { _techNameFinal = value; } } /// -- cgit v1.3.1