From 7d7281f91edfb2d0e7d0e92bd282403f0426f94d Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 26 Aug 2018 20:09:38 +0300 Subject: Added new colorized static text widget to tech board. Added option to go back to job/jobs from running job view. Fixed issue with bug reporting. Fixed other bugs. --- .../TechItems/DispenserItem.cs | 6 ++- .../TechItems/TechItem.cs | 1 + .../TechItems/TextItem.cs | 49 ++++++++++++++++++++++ 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs index 7945c5b73..d3cd9622f 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/DispenserItem.cs @@ -63,7 +63,11 @@ namespace Tango.MachineStudio.Technician.TechItems if (_techDispenser != null) { DispenserType = DispenserTypes.SingleOrDefault(x => x.Code == int.Parse(_techDispenser.Name.Replace("Dispenser", "")) - 1); - DisplayName = _techDispenser.Description; + + if (String.IsNullOrEmpty(DisplayName)) + { + DisplayName = _techDispenser.Description; + } } } } 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 b6ebf2857..04b6c1fab 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 @@ -38,6 +38,7 @@ namespace Tango.MachineStudio.Technician.TechItems [XmlInclude(typeof(BreakSensorItem))] [XmlInclude(typeof(ProcessParametersItem))] [XmlInclude(typeof(JobRunnerItem))] + [XmlInclude(typeof(TextItem))] public abstract class TechItem : ExtendedObject { /// diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs new file mode 100644 index 000000000..939809504 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems/TextItem.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.Technician.TechItems +{ + [TechItem(25)] + public class TextItem : TechItem + { + private String _text; + public String Text + { + get { return _text; } + set { _text = value; RaisePropertyChangedAuto(); } + } + + /// + /// Initializes a new instance of the class. + /// + public TextItem() : base() + { + Name = "Static Text"; + Description = "Static Text"; + Text = "Static Text"; + Image = ResourceHelper.GetImageFromResources("Images/text.png"); + Color = Colors.DodgerBlue; + } + + /// + /// Initializes a new instance of the class. + /// + /// The object. + public TextItem(Object obj) : this() + { + + } + + public override TechItem Clone() + { + TextItem cloned = base.Clone() as TextItem; + cloned.Text = Text; + return cloned; + } + } +} -- cgit v1.3.1