diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-26 20:09:38 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-08-26 20:09:38 +0300 |
| commit | 7d7281f91edfb2d0e7d0e92bd282403f0426f94d (patch) | |
| tree | 4672bd653c0abdb6612032a819f670993a31a17a /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems | |
| parent | f98cac2d6e331eaf62167d63524134d53db921ef (diff) | |
| download | Tango-7d7281f91edfb2d0e7d0e92bd282403f0426f94d.tar.gz Tango-7d7281f91edfb2d0e7d0e92bd282403f0426f94d.zip | |
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.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Technician/TechItems')
3 files changed, 55 insertions, 1 deletions
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 { /// <summary> 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(); } + } + + /// <summary> + /// Initializes a new instance of the <see cref="MeterItem"/> class. + /// </summary> + public TextItem() : base() + { + Name = "Static Text"; + Description = "Static Text"; + Text = "Static Text"; + Image = ResourceHelper.GetImageFromResources("Images/text.png"); + Color = Colors.DodgerBlue; + } + + /// <summary> + /// Initializes a new instance of the <see cref="TextItem"/> class. + /// </summary> + /// <param name="obj">The object.</param> + public TextItem(Object obj) : this() + { + + } + + public override TechItem Clone() + { + TextItem cloned = base.Clone() as TextItem; + cloned.Text = Text; + return cloned; + } + } +} |
