| 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 33 30 39 37 39 34 | !<arch>./...............14309794 |
| 0020 | 33 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20 33 38 38 20 20 20 20 20 | 30..............0.......388..... |
| 0040 | 20 20 60 0a 00 00 00 0f 00 00 03 92 00 00 05 c0 00 00 06 f8 00 00 08 c4 00 00 08 c4 00 00 0a 14 | ..`............................. |
| 0060 | 00 00 0a 14 00 00 0a 82 00 00 0a 82 00 00 09 a8 00 00 09 a8 00 00 09 32 00 00 09 32 00 00 08 54 | .......................2...2...T |
| 0080 | 00 00 08 54 5f 5f 49 4d 50 4f 52 54 5f 44 45 53 43 52 49 50 54 4f 52 5f 6c 6d 75 73 62 64 6c 6c | ...T__IMPORT_DESCRIPTOR_lmusbdll |
| 00a0 | 00 5f 5f 4e 55 4c 4c 5f 49 4d 50 4f 52 54 5f 44 45 53 43 52 49 50 54 4f 52 00 7f 6c 6d 75 73 62 | .__NULL_IMPORT_DESCRIPTOR..lmusb |
| 00c0 | 64 6c 6c 5f 4e 55 4c 4c 5f 54 48 55 4e 4b 5f 44 41 54 41 00 49 6e 69 74 69 61 6c 69 7a 65 44 65 | dll_NULL_THUNK_DATA.InitializeDe |
| 00e0 | 76 69 63 65 00 5f 5f 69 6d 70 5f 49 6e 69 74 69 61 6c 69 7a 65 44 65 76 69 63 65 00 54 65 72 6d | vice.__imp_InitializeDevice.Term |
| 0100 | 69 6e 61 74 65 44 65 76 69 63 65 00 5f 5f 69 6d 70 5f 54 65 72 6d 69 6e 61 74 65 44 65 76 69 63 | inateDevice.__imp_TerminateDevic |
| 0120 | 65 00 57 72 69 74 65 55 53 42 50 61 63 6b 65 74 00 5f 5f 69 6d 70 5f 57 72 69 74 65 55 53 42 50 | e.WriteUSBPacket.__imp_WriteUSBP |
| 0140 | 61 63 6b 65 74 00 52 65 61 64 55 53 42 50 61 63 6b 65 74 00 5f 5f 69 6d 70 5f 52 65 61 64 55 53 | acket.ReadUSBPacket.__imp_ReadUS |
| 0160 | 42 50 61 63 6b 65 74 00 49 6e 69 74 69 61 6c 69 7a 65 44 65 76 69 63 65 42 79 49 6e 64 65 78 00 | BPacket.InitializeDeviceByIndex. |
| 0180 | 5f 5f 69 6d 70 5f 49 6e 69 74 69 61 6c 69 7a 65 44 65 76 69 63 65 42 79 49 6e 64 65 78 00 45 6e | __imp_InitializeDeviceByIndex.En |
| 01a0 | 64 70 6f 69 6e 74 30 54 72 61 6e 73 66 65 72 00 5f 5f 69 6d 70 5f 45 6e 64 70 6f 69 6e 74 30 54 | dpoint0Transfer.__imp_Endpoint0T |
| 01c0 | 72 61 6e 73 66 65 72 00 2f 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 31 34 33 30 39 37 39 34 | ransfer./...............14309794 |
| 01e0 | 33 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20 33 39 38 20 20 20 20 20 | 30..............0.......398..... |
| 0200 | 20 20 60 0a 09 00 00 00 92 03 00 00 c0 05 00 00 f8 06 00 00 c4 08 00 00 14 0a 00 00 82 0a 00 00 | ..`............................. |
| 0220 | a8 09 00 00 32 09 00 00 54 08 00 00 0f 00 00 00 09 00 04 00 08 00 07 00 05 00 06 00 01 00 02 00 | ....2...T....................... |
| 0240 | 09 00 04 00 08 00 07 00 05 00 06 00 03 00 45 6e 64 70 6f 69 6e 74 30 54 72 61 6e 73 66 65 72 00 | ..............Endpoint0Transfer. |
| 0260 | 49 6e 69 74 69 61 6c 69 7a 65 44 65 76 69 63 65 00 49 6e 69 74 69 61 6c 69 7a 65 44 65 76 69 63 | InitializeDevice.InitializeDevic |
| 0280 | 65 42 79 49 6e 64 65 78 00 52 65 61 64 55 53 42 50 61 63 6b 65 74 00 54 65 72 6d 69 6e 61 74 65 | eByIndex.ReadUSBPacket.Terminate |
| 02a0 | 44 65 76 69 63 65 00 57 72 69 74 65 55 53 42 50 61 63 6b 65 74 00 5f 5f 49 4d 50 4f 52 54 5f 44 | Device.WriteUSBPacket.__IMPORT_D |
| 02c0 | 45 53 43 52 49 50 54 4f 52 5f 6c 6d 75 73 62 64 6c 6c 00 5f 5f 4e 55 4c 4c 5f 49 4d 50 4f 52 54 | ESCRIPTOR_lmusbdll.__NULL_IMPORT |
| 02e0 | 5f 44 45 53 43 52 49 50 54 4f 52 00 5f 5f 69 6d 70 5f 45 6e 64 70 6f 69 6e 74 30 54 72 61 6e 73 | _DESCRIPTOR.__imp_Endpoint0Trans |
| 0300 | 66 65 72 00 5f 5f 69 6d 70 5f 49 6e 69 74 69 61 6c 69 7a 65 44 65 76 69 63 65 00 5f 5f 69 6d 70 | fer.__imp_InitializeDevice.__imp |
| 0320 | 5f 49 6e 69 74 69 61 6c 69 7a 65 44 65 76 69 63 65 42 79 49 6e 64 65 78 00 5f 5f 69 6d 70 5f 52 | _InitializeDeviceByIndex.__imp_R |
| 0340 | 65 61 64 55 53 42 50 61 63 6b 65 74 00 5f 5f 69 6d 70 5f 54 65 72 6d 69 6e 61 74 65 44 65 76 69 | eadUSBPacket.__imp_TerminateDevi |
| 0360 | 63 65 00 5f 5f 69 6d 70 5f 57 72 69 74 65 55 53 42 50 61 63 6b 65 74 00 7f 6c 6d 75 73 62 64 6c | ce.__imp_WriteUSBPacket..lmusbdl |
| 0380 | 6c 5f 4e 55 4c 4c 5f 54 48 55 4e 4b 5f 44 41 54 41 00 6c 6d 75 73 62 64 6c 6c 2e 64 6c 6c 2f 20 | l_NULL_THUNK_DATA.lmusbdll.dll/. |
| 03a0 | 20 20 31 34 33 30 39 37 39 34 33 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 30 20 20 20 20 20 | ..1430979430..............0..... |
| 03c0 | 20 20 34 39 38 20 20 20 20 20 20 20 60 0a 64 86 03 00 66 03 4b 55 0e 01 00 00 08 00 00 00 00 00 | ..498.......`.d...f.KU.......... |
| 03e0 | 00 00 2e 64 65 62 75 67 24 53 00 00 00 00 00 00 00 00 42 00 00 00 8c 00 00 00 00 00 00 00 00 00 | ...debug$S........B............. |
| 0400 | 00 00 00 00 00 00 40 00 10 42 2e 69 64 61 74 61 24 32 00 00 00 00 00 00 00 00 14 00 00 00 ce 00 | ......@..B.idata$2.............. |
| 0420 | 00 00 e2 00 00 00 00 00 00 00 03 00 00 00 40 00 30 c0 2e 69 64 61 74 61 24 36 00 00 00 00 00 00 | ..............@.0..idata$6...... |
| 0440 | 00 00 0e 00 00 00 00 01 00 00 e2 00 00 00 00 00 00 00 00 00 00 00 40 00 20 c0 02 00 00 00 13 00 | ......................@......... |
| 0460 | 09 00 00 00 00 00 0c 6c 6d 75 73 62 64 6c 6c 2e 64 6c 6c 27 00 13 10 07 00 00 00 d0 00 00 00 00 | .......lmusbdll.dll'............ |
| 0480 | 00 00 00 09 00 00 00 1e 52 12 4d 69 63 72 6f 73 6f 66 74 20 28 52 29 20 4c 49 4e 4b 00 00 00 00 | ........R.Microsoft.(R).LINK.... |
| 04a0 | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0c 00 00 00 03 00 00 00 03 00 00 00 00 00 04 00 | ................................ |
| 04c0 | 00 00 03 00 10 00 00 00 05 00 00 00 03 00 6c 6d 75 73 62 64 6c 6c 2e 64 6c 6c 00 00 40 63 6f 6d | ..............lmusbdll.dll..@com |
| 04e0 | 70 2e 69 64 1e 52 93 00 ff ff 00 00 03 00 00 00 00 00 04 00 00 00 00 00 00 00 02 00 00 00 02 00 | p.id.R.......................... |
| 0500 | 2e 69 64 61 74 61 24 32 40 00 00 c0 02 00 00 00 68 00 2e 69 64 61 74 61 24 36 00 00 00 00 03 00 | .idata$2@.......h..idata$6...... |
| 0520 | 00 00 03 00 2e 69 64 61 74 61 24 34 40 00 00 c0 00 00 00 00 68 00 2e 69 64 61 74 61 24 35 40 00 | .....idata$4@.......h..idata$5@. |
| 0540 | 00 c0 00 00 00 00 68 00 00 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 02 00 00 00 00 00 3a 00 | ......h.....!.................:. |
| 0560 | 00 00 00 00 00 00 00 00 00 00 02 00 54 00 00 00 5f 5f 49 4d 50 4f 52 54 5f 44 45 53 43 52 49 50 | ............T...__IMPORT_DESCRIP |
| 0580 | 54 4f 52 5f 6c 6d 75 73 62 64 6c 6c 00 5f 5f 4e 55 4c 4c 5f 49 4d 50 4f 52 54 5f 44 45 53 43 52 | TOusing 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);
}
}
}
|