| ofs | hex dump | ascii |
|---|
| 0000 | 21 3c 61 72 63 68 3e 0a 2f 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 34 38 35 30 32 35 33 | !<arch>./...............14850253 |
| 0020 | 34 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20 33 35 32 36 20 20 20 20 | 44..............0.......3526.... |
| 0040 | 20 20 60 0a 00 00 00 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 | ..`....0...0...0...0...0...0...0 |
| 0060 | 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 | ...0...0...0...0...0...0...0...0 |
| 0080 | 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 | ...0...0...0...0...0...0...0...0 |
| 00a0 | 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 | ...0...0...0...0...0...0...0...0 |
| 00c0 | 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 | ...0...0...0...0...0...0...0...0 |
| 00e0 | 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 00 00 1c 30 | ...0...0...0...0...0...0...0...0 |
| 0100 | 00 00 1c 30 00 00 1c 30 3f 3f 24 3f 36 55 3f 24 63 68 61 72 5f 74 72 61 69 74 73 40 44 40 73 74 | ...0...0??$?6U?$char_traits@D@st |
| 0120 | 64 40 40 40 73 74 64 40 40 59 41 41 41 56 3f 24 62 61 73 69 63 5f 6f 73 74 72 65 61 6d 40 44 55 | d@@@std@@YAAAV?$basic_ostream@DU |
| 0140 | 3f 24 63 68 61 72 5f 74 72 61 69 74 73 40 44 40 73 74 64 40 40 40 30 40 41 41 56 31 30 40 50 42 | ?$char_traits@D@std@@@0@AAV10@PB |
| 0160 | 44 40 5a 00 3f 3f 24 41 70 70 65 6e 64 44 61 74 61 40 45 24 30 41 40 40 3f 24 42 75 66 66 65 72 | D@Z.??$AppendData@E$0A@@?$Buffer |
| 0180 | 54 40 45 40 72 74 63 40 40 51 41 45 58 50 42 45 49 40 5a 00 3f 3f 24 5f 55 6e 69 6e 69 74 69 61 | T@E@rtc@@QAEXPBEI@Z.??$_Uninitia |
| 01a0 | 6c 69 7a 65 64 5f 6d 6f 76 65 5f 61 6c 5f 75 6e 63 68 65 63 6b 65 64 31 40 50 41 55 45 6e 63 6f | lized_move_al_unchecked1@PAUEnco |
| 01c0 | 64 65 64 49 6e 66 6f 4c 65 61 66 40 41 75 64 69 6f 45 6e 63 6f 64 65 72 40 77 65 62 72 74 63 40 | dedInfoLeaf@AudioEncoder@webrtc@ |
| 01e0 | 40 50 41 55 31 32 33 40 56 3f 24 61 6c 6c 6f 63 61 74 6f 72 40 55 45 6e 63 6f 64 65 64 49 6e 66 | @PAU123@V?$allocator@UEncodedInf |
| 0200 | 6f 4c 65 61 66 40 41 75 64 69 6f 45 6e 63 6f 64 65 72 40 77 65 62 72 74 63 40 40 40 73 74 64 40 | oLeaf@AudioEncoder@webrtc@@@std@ |
| 0220 | 40 40 73 74 64 40 40 59 41 50 41 55 45 6e 63 6f 64 65 64 49 6e 66 6f 4c 65 61 66 40 41 75 64 69 | @@std@@YAPAUEncodedInfoLeaf@Audi |
| 0240 | 6f 45 6e 63 6f 64 65 72 40 77 65 62 72 74 63 40 40 50 41 55 31 32 33 40 30 30 41 41 55 3f 24 5f | oEncoder@webrtc@@PAU123@00AAU?$_ |
| 0260 | 57 72 61 70 5f 61 6c 6c 6f 63 40 56 3f 24 61 6c 6c 6f 63 61 74 6f 72 40 55 45 6e 63 6f 64 65 64 | Wrap_alloc@V?$allocator@UEncoded |
| 0280 | 49 6e 66 6f 4c 65 61 66 40 41 75 64 69 6f 45 6e 63 6f 64 65 72 40 77 65 62 72 74 63 40 40 40 73 | InfoLeaf@AudioEncoder@webrtc@@@s |
| 02a0 | 74 64 40 40 40 30 40 55 5f 47 65 6e 65 72 61 6c 5f 70 74 72 5f 69 74 65 72 61 74 6f 72 5f 74 61 | td@@@0@U_General_ptr_iterator_ta |
| 02c0 | 67 40 30 40 55 5f 41 6e 79 5f 74 61 67 40 30 40 40 5a 00 3f 3f 24 65 6e 64 6c 40 44 55 3f 24 63 | g@0@U_Any_tag@0@@Z.??$endl@DU?$c |
| 02e0 | 68 61 72 5f 74 72 61 69 74 73 40 44 40 73 74 64 40 40 40 73 74 64 40 40 59 41 41 41 56 3f 24 62 | har_traits@D@std@@@std@@YAAAV?$b |
| 0300 | 61 73 69 63 5f 6f 73 74 72 65 61 6d 40 44 55 3f 24 63 68 61 72 5f 74 72 61 69 74 73 40 44 40 73 | asic_ostream@DU?$char_traits@D@s |
| 0320 | 74 64 40 40 40 30 40 41 41 56 31 30 40 40 5a 00 3f 3f 30 3f 24 4f 70 74 69 6f 6e 61 6c 40 5f 4a | td@@@0@AAV10@@Z.??0?$Optional@_J |
| 0340 | 40 72 74 63 40 40 51 41 45 40 41 42 56 30 31 40 40 5a 00 3f 3f 30 41 75 64 69 6f 45 6e 63 6f 64 | @rtc@@QAE@ABV01@@Z.??0AudioEncod |
| 0360 | 65 72 43 6f 70 79 52 65 64 40 77 65 62 72 74 63 40 40 51 41 45 40 24 24 51 41 55 43 6f 6e 66 69 | erCopyRed@webrtc@@QAE@$$QAUConfi |
| 0380 | 67 40 30 31 40 40 5a 00 3f 3f 30 43 6f 6e 66 69 67 40 41 75 64 69 6f 45 6e 63 6f 64 65 72 43 6f | g@01@@Z.??0Config@AudioEncoderCo |
| 03a0 | 70 79 52 65 64 40 77 65 62 72 74 63 40 40 51 41 45 40 24 24 51 41 55 30 31 32 40 40 5a 00 3f 3f | pyRed@webrtc@@QAE@$$QAU012@@Z.?? |
| 03c0 | 30 43 6f 6e 66 69 67 40 41 75 64 69 6f 45 6e 63 6f 64 65 72 43 6f 70 79 52 65 64 40 77 65 62 72 | 0Config@AudioEncoderCopyRed@webr |
| 03e0 | 74 63 40 40 51 41 45 40 58 5a 00 3f 3f 30 5f 53 65 6e 74 72 79 5f 62 61 73 65 40 3f 24 62 61 73 | tc@@QAE@XZ.??0_Sentry_base@?$bas |
| 0400 | 69 63 5f 6f 73 74 72 65 61 6d 40 44 55 3f 24 63 68 61 72 5f 74 72 61 69 74 73 40 44 40 73 74 64 | ic_ostream@DU?$char_traits@D@std |
| 0420 | 40 40 40 73 74 64 40 40 51 41 45 40 41 41 56 31 32 40 40 5a 00 3f 3f 30 73 65 6e 74 72 79 40 3f | @@@std@@QAE@AAV12@@Z.??0sentry@? |
| 0440 | 24 62 61 73 69 63 5f 6f 73 74 72 65 61 6d 40 44 55 3f 24 63 68 61 72 5f 74 72 61 69 74 73 40 44 | $basic_ostream@DU?$char_traits@D |
| 0460 | 40 73 74 64 40 40 40 73 74 64 40 40 51 41 45 40 41 41 56 31 32 40 40 5a 00 3f 3f 31 41 75 64 69 | @std@@@std@@QAE@AAV12@@Z.??1Audi |
| 0480 | 6f 45 6e 63 6f 64 65 72 40 77 65 62 72 74 63 40 40 55 41 45 40 58 5a 00 3f 3f 31 41 75 64 69 6f | oEncoder@webrtc@@UAE@XZ.??1Audio |
| 04a0 | 45 6e 63 6f 64 65 72 43 6f 70 79 52 65 64 40 77 65 62 72 74 63 40 40 55 41 45 40 58 5a 00 3f 3f | EncoderCopyRed@webrtc@@UAE@XZ.?? |
| 04c0 | 31 43 6f 6e 66 69 67 40 41 75 64 69 6f 45 6e 63 6f 64 65 72 43 6f 70 79 52 65 64 40 77 65 62 72 | 1Config@AudioEncoderCopyRed@webr |
| 04e0 | 74 63 40 40 51 41 45 40 58 5a 00 3f 3f 34 3f 24 75 6e 69 71 75 65 5f 70 74 72 40 24 24 42 59 30 | tc@@QAE@XZ.??4?$unique_ptr@$$BY0 |
| 0500 | 41 40 45 55 3f 24 64 65 66 61 75 6c 74 5f 64 65 6c 65 74 65 40 24 24 42 59 30 41 40 45 40 73 74 | A@EU?$default_delete@$$BY0A@E@st |
| 0520 | 64 40 40 40 73 74 64 40 40 51 41 45 41 41 56 30 31 40 24 24 51 41 56 30 31 40 40 5a 00 3f 3f 5f | d@@@std@@QAEAAV01@$$QAV01@@Z.??_ |
| 0540 | 37 41 75 64 69 6f 45 6e 63 6f 64 65 72 40 77 65 62 72 74 63 40 40 36 42 40 00 3f 3f 5f 37 41 75 | 7AudioEncoder@webrtc@@6B@.??_7Au |
| 0560 | 64 69 6f 45 6e 63 6f 64 65 72 43 6f 70 79 52 65 64 40 77 65 62 72 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Xml.Serialization;
using Tango.Core;
using Tango.Core.Helpers;
using Tango.BL.Entities;
using System.Reflection;
using Tango.BL;
namespace Tango.MachineStudio.Technician.TechItems
{
/// <summary>
/// Represents a tech item base class.
/// </summary>
/// <seealso cref="Tango.Core.ExtendedObject" />
[XmlInclude(typeof(DispenserItem))]
[XmlInclude(typeof(DigitalOutItem))]
[XmlInclude(typeof(MeterItem))]
[XmlInclude(typeof(MonitorItem))]
[XmlInclude(typeof(MotorItem))]
[XmlInclude(typeof(MultiGraphItem))]
[XmlInclude(typeof(SingleGraphItem))]
[XmlInclude(typeof(ThreadMotionItem))]
[XmlInclude(typeof(MotorGroupItem))]
[XmlInclude(typeof(DigitalInItem))]
[XmlInclude(typeof(ControllerItem))]
[XmlInclude(typeof(PidItem))]
[XmlInclude(typeof(WinderItem))]
[XmlInclude(typeof(DancerItem))]
[XmlInclude(typeof(SpeedSensorItem))]
[XmlInclude(typeof(BlowerItem))]
[XmlInclude(typeof(BreakSensorItem))]
[XmlInclude(typeof(ProcessParametersItem))]
[XmlInclude(typeof(JobRunnerItem))]
[XmlInclude(typeof(TextItem))]
[XmlInclude(typeof(HeaterItem))]
[XmlInclude(typeof(MonitorRecorderItem))]
[XmlInclude(typeof(ValveItem))]
public abstract class TechItem : ExtendedObject
{
/// <summary>
/// Initializes a new instance of the <see cref="TechItem"/> class.
/// </summary>
public TechItem()
{
ID = Guid.NewGuid().ToString();
Name = "Untitled";
Adapter = ObservablesStaticCollections.Instance;
_color = Colors.DodgerBlue;
}
private String _description;
/// <summary>
/// Gets or sets the description.
/// </summary>
[XmlIgnore]
public String Description
{
get { return _description; }
set { _description = value; RaisePropertyChangedAuto(); }
}
private BitmapSource _image;
/// <summary>
/// Gets or sets the image.
/// </summary>
[XmlIgnore]
public BitmapSource Image
{
get { return _image; }
set { _image = value; RaisePropertyChangedAuto(); }
}
/// <summary>
/// Gets or sets the db adapter.
/// </summary>
[XmlIgnore]
public ObservablesStaticCollections Adapter { get; set; }
private String _id;
/// <summary>
/// Unique Item ID.
/// </summary>
public String ID
{
get { return _id; }
set { _id = value; RaisePropertyChanged(nameof(ID)); }
}
private String _name;
/// <summary>
/// item Name.
/// </summary>
[XmlIgnore]
public String Name
{
get { return _name; }
set { _name = value; RaisePropertyChanged(nameof(Name)); }
}
private double _left;
/// <summary>
/// Item Left.
/// </summary>
public double Left
{
get { return _left; }
set { _left = value; RaisePropertyChanged(nameof(Left)); }
}
private double _top;
/// <summary>
/// Item Top.
/// </summary>
public double Top
{
get { return _top; }
set { _top = value; RaisePropertyChanged(nameof(Top)); }
}
private double _width;
/// <summary>
/// Item Width.
/// </summary>
public double Width
{
get { return _width; }
set { _width = value; RaisePropertyChanged(nameof(Width)); }
}
private double _height;
/// <summary>
/// Item Height.
/// </summary>
public double Height
{
get { return _height; }
set { _height = value; RaisePropertyChanged(nameof(Height)); }
}
private double _angle;
/// <summary>
/// Item Angle.
/// </summary>
public double Angle
{
get { return _angle; }
set { _angle = value; RaisePropertyChanged(nameof(Angle)); }
}
private String _techName;
/// <summary>
/// Gets or sets the tech item name.
/// </summary>
[XmlIgnore]
public String TechName
{
get { return _techName; }
set { _techName = value; RaisePropertyChangedAuto(); }
}
/// <summary>
/// Gets or sets the db tech item guid.
/// </summary>
public String ItemGuid { get; set; }
private Color _color;
/// <summary>
/// Gets or sets the item color.
/// </summary>
[XmlIgnore]
public Color Color
{
get { return _color; }
set
{
_color = value;
RaisePropertyChanged(nameof(Color));
_colorNumber = ColorHelper.ColorToInteger(value);
}
}
private int _colorNumber;
/// <summary>
/// Gets or sets the color number (for XML serialization).
/// </summary>
public int ColorNumber
{
get { return _colorNumber; }
set
{
_colorNumber = value;
_color = ColorHelper.IntegerToColor(value);
_color.A = 255;
RaisePropertyChanged(nameof(Color));
}
}
/// <summary>
/// Clones this instance.
/// </summary>
/// <returns></returns>
public virtual TechItem Clone()
{
TechItem cloned = Activator.CreateInstance(this.GetType()) as TechItem;
cloned.Left = Left;
cloned.Top = Top;
cloned.Width = Width;
cloned.Height = Height;
cloned.Angle = Angle;
cloned.Color = Color;
return cloned;
}
/// <summary>
/// Gets the available tech items.
/// </summary>
/// <returns></returns>
public static List<TechItem> GetAvailableTechItems()
{
List<TechItem> items = new List<TechItem>();
foreach (var type in typeof(TechItem).Assembly.GetTypes().Where(x => typeof(TechItem).IsAssignableFrom(x) && !x.IsAbstract).OrderBy(x => x.GetCustomAttribute<TechItemAttribute>().Index))
{
items.Add(Activator.CreateInstance(type) as TechItem);
}
return items;
}
/// <summary>
/// Sets the bounds.
/// </summary>
/// <param name="bounds">The bounds.</param>
public void SetBounds(Rect bounds)
{
Left = bounds.Left;
Top = bounds.Top;
Width = bounds.Width;
Height = bounds.Height;
}
/// <summary>
/// Gets the bounds.
/// </summary>
/// <returns></returns>
public Rect GetBounds()
{
return new Rect(Left, Top, Width, Height);
}
}
}
|