aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs
blob: d4a915a66f9f69f0947bdbc06f30f3ebf5b78b03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
using System;
using System.IO;

namespace Tango.AnimatedGif.Decoding
{
    internal class GifLogicalScreenDescriptor
    {
        public int Width { get; private set; }
        public int Height { get; private set; }
        public bool HasGlobalColorTable { get; private set; }
        public int ColorResolution { get; private set; }
        public bool IsGlobalColorTableSorted { get; private set; }
        public int GlobalColorTableSize { get; private set; }
        public int BackgroundColorIndex { get; private set; }
        public double PixelAspectRatio { get; private set; }

        internal static GifLogicalScreenDescriptor ReadLogicalScreenDescriptor(Stream stream)
        {
            var descriptor = new GifLogicalScreenDescriptor();
            descriptor.Read(stream);
            return descriptor;
        }

        private void Read(Stream stream)
        {
            byte[] bytes = new byte[7];
            stream.ReadAll(bytes, 0, bytes.Length);

            Width = BitConverter.ToUInt16(bytes, 0);
            Height = BitConverter.ToUInt16(bytes, 2);
            byte packedFields = bytes[4];
            HasGlobalColorTable = (packedFields & 0x80) != 0;
            ColorResolution = ((packedFields & 0x70) >> 4) + 1;
            IsGlobalColorTableSorted = (packedFields & 0x08) != 0;
            GlobalColorTableSize = 1 << ((packedFields & 0x07) + 1);
            BackgroundColorIndex = bytes[5];
            PixelAspectRatio =
                bytes[5] == 0
                    ? 0.0
                    : (15 + bytes[5]) / 64.0;
        }
    }
}
#n553'>553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Tango Observables Generator
// 
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Xml.Serialization;
using Newtonsoft.Json;
using System.Linq;
using Tango.DAL.Remote.DB;
using Tango.Core;

namespace Tango.BL.Entities
{
    [Table("MACHINES")]
    public abstract class MachineBase : ObservableEntity<Machine>
    {

        public event EventHandler<String> SerialNumberChanged;

        public event EventHandler<String> NameChanged;

        public event EventHandler<DateTime> ProductionDateChanged;

        public event EventHandler<String> TargetJobTypesChanged;

        public event EventHandler<String> TargetColorSpaceCodesChanged;

        public event EventHandler<Double> DefaultSegmentLengthChanged;

        public event EventHandler<String> OsKeyChanged;

        public event EventHandler<Boolean> AutoLoginChanged;

        public event EventHandler<Boolean> AutoCheckForUpdatesChanged;

        public event EventHandler<Boolean> SetupActivationChanged;

        public event EventHandler<Boolean> SetupRemoteAssistanceChanged;

        public event EventHandler<Boolean> SetupUwfChanged;

        public event EventHandler<Boolean> SetupFirmwareChanged;

        public event EventHandler<Boolean> SetupFpgaChanged;

        public event EventHandler<Boolean> IsDemoChanged;

        public event EventHandler<SynchronizedObservableCollection<Cat>> CatsChanged;

        public event EventHandler<ColorSpace> DefaultColorSpaceChanged;

        public event EventHandler<Configuration> ConfigurationChanged;

        public event EventHandler<SynchronizedObservableCollection<Job>> JobsChanged;

        public event EventHandler<MachineVersion> MachineVersionChanged;

        public event EventHandler<SynchronizedObservableCollection<MachinesEvent>> MachinesEventsChanged;

        public event EventHandler<Organization> OrganizationChanged;

        public event EventHandler<Rml> DefaultRmlChanged;

        public event EventHandler<SpoolType> DefaultSpoolTypeChanged;

        public event EventHandler<SynchronizedObservableCollection<Spool>> SpoolsChanged;

        protected String _serialnumber;

        /// <summary>
        /// Gets or sets the machinebase serial number.
        /// </summary>

        [Column("SERIAL_NUMBER")]

        public  String SerialNumber
        {
            get 
            {
                return _serialnumber; 
            }

            set 
            {
                if (_serialnumber != value)
                {
                    _serialnumber = value;

                    OnSerialNumberChanged(value);

                }
            }
        }

        protected String _name;

        /// <summary>
        /// Gets or sets the machinebase name.
        /// </summary>

        [Column("NAME")]

        public  String Name
        {
            get 
            {
                return _name; 
            }

            set 
            {
                if (_name != value)
                {
                    _name = value;

                    OnNameChanged(value);

                }
            }
        }

        protected DateTime _productiondate;

        /// <summary>
        /// Gets or sets the machinebase production date.
        /// </summary>

        [Column("PRODUCTION_DATE")]

        public  DateTime ProductionDate
        {
            get 
            {
                return _productiondate; 
            }

            set 
            {
                if (_productiondate != value)
                {
                    _productiondate = value;

                    OnProductionDateChanged(value);

                }
            }
        }

        protected String _organizationguid;

        /// <summary>
        /// Gets or sets the machinebase organization guid.
        /// </summary>

        [Column("ORGANIZATION_GUID")]
        [ForeignKey("Organization")]

        public  String OrganizationGuid
        {
            get 
            {
                return _organizationguid; 
            }

            set 
            {
                if (_organizationguid != value)
                {
                    _organizationguid = value;

                }
            }
        }

        protected String _machineversionguid;

        /// <summary>
        /// Gets or sets the machinebase machine version guid.
        /// </summary>

        [Column("MACHINE_VERSION_GUID")]
        [ForeignKey("MachineVersion")]

        public  String MachineVersionGuid
        {
            get 
            {
                return _machineversionguid; 
            }

            set 
            {
                if (_machineversionguid != value)
                {
                    _machineversionguid = value;

                }
            }
        }

        protected String _configurationguid;

        /// <summary>
        /// Gets or sets the machinebase configuration guid.
        /// </summary>

        [Column("CONFIGURATION_GUID")]
        [ForeignKey("Configuration")]

        public  String ConfigurationGuid
        {
            get 
            {
                return _configurationguid; 
            }

            set 
            {
                if (_configurationguid != value)
                {
                    _configurationguid = value;

                }
            }
        }

        protected String _defaultrmlguid;

        /// <summary>
        /// Gets or sets the machinebase default rml guid.
        /// </summary>

        [Column("DEFAULT_RML_GUID")]
        [ForeignKey("DefaultRml")]

        public  String DefaultRmlGuid
        {
            get 
            {
                return _defaultrmlguid; 
            }

            set 
            {
                if (_defaultrmlguid != value)
                {
                    _defaultrmlguid = value;

                }
            }
        }

        protected String _loadedrmlguid;

        /// <summary>
        /// Gets or sets the machinebase loaded rml guid.
        /// </summary>

        [Column("LOADED_RML_GUID")]

        public  String LoadedRmlGuid
        {
            get 
            {
                return _loadedrmlguid; 
            }

            set 
            {
                if (_loadedrmlguid != value)
                {
                    _loadedrmlguid = value;

                }
            }
        }

        protected String _targetjobtypes;

        /// <summary>
        /// Gets or sets the machinebase target job types.
        /// </summary>

        [Column("TARGET_JOB_TYPES")]

        public  String TargetJobTypes
        {
            get 
            {
                return _targetjobtypes; 
            }

            set 
            {
                if (_targetjobtypes != value)
                {
                    _targetjobtypes = value;

                    OnTargetJobTypesChanged(value);

                }
            }
        }

        protected String _targetcolorspacecodes;

        /// <summary>
        /// Gets or sets the machinebase target color space codes.
        /// </summary>

        [Column("TARGET_COLOR_SPACE_CODES")]

        public  String TargetColorSpaceCodes
        {
            get 
            {
                return _targetcolorspacecodes; 
            }

            set 
            {
                if (_targetcolorspacecodes != value)
                {
                    _targetcolorspacecodes = value;

                    OnTargetColorSpaceCodesChanged(value);

                }
            }
        }

        protected String _defaultcolorspaceguid;

        /// <summary>
        /// Gets or sets the machinebase default color space guid.
        /// </summary>

        [Column("DEFAULT_COLOR_SPACE_GUID")]
        [ForeignKey("DefaultColorSpace")]

        public  String DefaultColorSpaceGuid
        {
            get 
            {
                return _defaultcolorspaceguid; 
            }

            set 
            {
                if (_defaultcolorspaceguid != value)
                {
                    _defaultcolorspaceguid = value;

                }
            }
        }

        protected Double _defaultsegmentlength;

        /// <summary>
        /// Gets or sets the machinebase default segment length.
        /// </summary>

        [Column("DEFAULT_SEGMENT_LENGTH")]

        public  Double DefaultSegmentLength
        {
            get 
            {
                return _defaultsegmentlength; 
            }

            set 
            {
                if (_defaultsegmentlength != value)
                {
                    _defaultsegmentlength = value;

                    OnDefaultSegmentLengthChanged(value);

                }
            }
        }

        protected String _defaultspooltypeguid;

        /// <summary>
        /// Gets or sets the machinebase default spool type guid.
        /// </summary>

        [Column("DEFAULT_SPOOL_TYPE_GUID")]
        [ForeignKey("DefaultSpoolType")]

        public  String DefaultSpoolTypeGuid
        {
            get 
            {
                return _defaultspooltypeguid; 
            }

            set 
            {
                if (_defaultspooltypeguid != value)
                {
                    _defaultspooltypeguid = value;

                }
            }
        }

        protected String _oskey;

        /// <summary>
        /// Gets or sets the machinebase os key.
        /// </summary>

        [Column("OS_KEY")]

        public  String OsKey
        {
            get 
            {
                return _oskey; 
            }

            set 
            {
                if (_oskey != value)
                {
                    _oskey = value;

                    OnOsKeyChanged(value);

                }
            }
        }

        protected Boolean _autologin;

        /// <summary>
        /// Gets or sets the machinebase auto login.
        /// </summary>

        [Column("AUTO_LOGIN")]

        public  Boolean AutoLogin
        {
            get 
            {
                return _autologin; 
            }

            set 
            {
                if (_autologin != value)
                {
                    _autologin = value;

                    OnAutoLoginChanged(value);

                }
            }
        }

        protected Boolean _autocheckforupdates;

        /// <summary>
        /// Gets or sets the machinebase auto check for updates.
        /// </summary>

        [Column("AUTO_CHECK_FOR_UPDATES")]

        public  Boolean AutoCheckForUpdates
        {
            get 
            {
                return _autocheckforupdates; 
            }

            set 
            {
                if (_autocheckforupdates != value)
                {
                    _autocheckforupdates = value;

                    OnAutoCheckForUpdatesChanged(value);

                }
            }
        }

        protected Boolean _setupactivation;

        /// <summary>
        /// Gets or sets the machinebase setup activation.
        /// </summary>

        [Column("SETUP_ACTIVATION")]

        public  Boolean SetupActivation
        {
            get 
            {
                return _setupactivation; 
            }

            set 
            {
                if (_setupactivation != value)
                {
                    _setupactivation = value;

                    OnSetupActivationChanged(value);

                }
            }
        }

        protected Boolean _setupremoteassistance;

        /// <summary>
        /// Gets or sets the machinebase setup remote assistance.
        /// </summary>

        [Column("SETUP_REMOTE_ASSISTANCE")]

        public  Boolean SetupRemoteAssistance
        {
            get 
            {
                return _setupremoteassistance; 
            }

            set 
            {
                if (_setupremoteassistance != value)
                {
                    _setupremoteassistance = value;

                    OnSetupRemoteAssistanceChanged(value);

                }
            }
        }

        protected Boolean _setupuwf;

        /// <summary>
        /// Gets or sets the machinebase setup uwf.
        /// </summary>

        [Column("SETUP_UWF")]

        public  Boolean SetupUwf
        {
            get 
            {
                return _setupuwf; 
            }

            set 
            {
                if (_setupuwf != value)
                {
                    _setupuwf = value;

                    OnSetupUwfChanged(value);

                }
            }
        }

        protected Boolean _setupfirmware;

        /// <summary>
        /// Gets or sets the machinebase setup firmware.
        /// </summary>

        [Column("SETUP_FIRMWARE")]

        public  Boolean SetupFirmware
        {
            get 
            {
                return _setupfirmware; 
            }

            set 
            {
                if (_setupfirmware != value)
                {
                    _setupfirmware = value;

                    OnSetupFirmwareChanged(value);

                }
            }
        }

        protected Boolean _setupfpga;

        /// <summary>
        /// Gets or sets the machinebase setup fpga.
        /// </summary>

        [Column("SETUP_FPGA")]

        public  Boolean SetupFpga
        {
            get 
            {
                return _setupfpga; 
            }

            set 
            {
                if (_setupfpga != value)
                {
                    _setupfpga = value;

                    OnSetupFpgaChanged(value);

                }
            }
        }

        protected Boolean _isdemo;

        /// <summary>
        /// Gets or sets the machinebase is demo.
        /// </summary>

        [Column("IS_DEMO")]

        public  Boolean IsDemo
        {
            get 
            {
                return _isdemo; 
            }

            set 
            {
                if (_isdemo != value)
                {
                    _isdemo = value;

                    OnIsDemoChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<Cat> _cats;

        /// <summary>
        /// Gets or sets the machinebase cats.
        /// </summary>

        public virtual SynchronizedObservableCollection<Cat> Cats
        {
            get 
            {
                return _cats; 
            }

            set 
            {
                if (_cats != value)
                {
                    _cats = value;

                    OnCatsChanged(value);

                }
            }
        }

        protected ColorSpace _defaultcolorspace;

        /// <summary>
        /// Gets or sets the machinebase color spaces.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual ColorSpace DefaultColorSpace
        {
            get 
            {
                return _defaultcolorspace; 
            }

            set 
            {
                if (_defaultcolorspace != value)
                {
                    _defaultcolorspace = value;

                    if (DefaultColorSpace != null)
                    {
                        DefaultColorSpaceGuid = DefaultColorSpace.Guid;
                    }

                    OnDefaultColorSpaceChanged(value);

                }
            }
        }

        protected Configuration _configuration;

        /// <summary>
        /// Gets or sets the machinebase configuration.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Configuration Configuration
        {
            get 
            {
                return _configuration; 
            }

            set 
            {
                if (_configuration != value)
                {
                    _configuration = value;

                    if (Configuration != null)
                    {
                        ConfigurationGuid = Configuration.Guid;
                    }

                    OnConfigurationChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<Job> _jobs;

        /// <summary>
        /// Gets or sets the machinebase jobs.
        /// </summary>

        public virtual SynchronizedObservableCollection<Job> Jobs
        {
            get 
            {
                return _jobs; 
            }

            set 
            {
                if (_jobs != value)
                {
                    _jobs = value;

                    OnJobsChanged(value);

                }
            }
        }

        protected MachineVersion _machineversion;

        /// <summary>
        /// Gets or sets the machinebase machine versions.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual MachineVersion MachineVersion
        {
            get 
            {
                return _machineversion; 
            }

            set 
            {
                if (_machineversion != value)
                {
                    _machineversion = value;

                    if (MachineVersion != null)
                    {
                        MachineVersionGuid = MachineVersion.Guid;
                    }

                    OnMachineVersionChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<MachinesEvent> _machinesevents;

        /// <summary>
        /// Gets or sets the machinebase machines events.
        /// </summary>

        public virtual SynchronizedObservableCollection<MachinesEvent> MachinesEvents
        {
            get 
            {
                return _machinesevents; 
            }

            set 
            {
                if (_machinesevents != value)
                {
                    _machinesevents = value;

                    OnMachinesEventsChanged(value);

                }
            }
        }

        protected Organization _organization;

        /// <summary>
        /// Gets or sets the machinebase organization.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Organization Organization
        {
            get 
            {
                return _organization; 
            }

            set 
            {
                if (_organization != value)
                {
                    _organization = value;

                    if (Organization != null)
                    {
                        OrganizationGuid = Organization.Guid;
                    }

                    OnOrganizationChanged(value);

                }
            }
        }

        protected Rml _defaultrml;

        /// <summary>
        /// Gets or sets the machinebase rml.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Rml DefaultRml
        {
            get 
            {
                return _defaultrml; 
            }

            set 
            {
                if (_defaultrml != value)
                {
                    _defaultrml = value;

                    if (DefaultRml != null)
                    {
                        DefaultRmlGuid = DefaultRml.Guid;
                    }

                    OnDefaultRmlChanged(value);

                }
            }
        }

        protected SpoolType _defaultspooltype;

        /// <summary>
        /// Gets or sets the machinebase spool types.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual SpoolType DefaultSpoolType
        {
            get 
            {
                return _defaultspooltype; 
            }

            set 
            {
                if (_defaultspooltype != value)
                {
                    _defaultspooltype = value;

                    if (DefaultSpoolType != null)
                    {
                        DefaultSpoolTypeGuid = DefaultSpoolType.Guid;
                    }

                    OnDefaultSpoolTypeChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<Spool> _spools;

        /// <summary>
        /// Gets or sets the machinebase spools.
        /// </summary>

        public virtual SynchronizedObservableCollection<Spool> Spools
        {
            get 
            {
                return _spools; 
            }

            set 
            {
                if (_spools != value)
                {
                    _spools = value;

                    OnSpoolsChanged(value);

                }
            }
        }

        /// <summary>
        /// Called when the SerialNumber has changed.
        /// </summary>
        protected virtual void OnSerialNumberChanged(String serialnumber)
        {
            SerialNumberChanged?.Invoke(this, serialnumber);
            RaisePropertyChanged(nameof(SerialNumber));
        }

        /// <summary>
        /// Called when the Name has changed.
        /// </summary>
        protected virtual void OnNameChanged(String name)
        {
            NameChanged?.Invoke(this, name);
            RaisePropertyChanged(nameof(Name));
        }

        /// <summary>
        /// Called when the ProductionDate has changed.
        /// </summary>
        protected virtual void OnProductionDateChanged(DateTime productiondate)
        {
            ProductionDateChanged?.Invoke(this, productiondate);
            RaisePropertyChanged(nameof(ProductionDate));
        }

        /// <summary>
        /// Called when the TargetJobTypes has changed.
        /// </summary>
        protected virtual void OnTargetJobTypesChanged(String targetjobtypes)
        {
            TargetJobTypesChanged?.Invoke(this, targetjobtypes);
            RaisePropertyChanged(nameof(TargetJobTypes));
        }

        /// <summary>
        /// Called when the TargetColorSpaceCodes has changed.
        /// </summary>
        protected virtual void OnTargetColorSpaceCodesChanged(String targetcolorspacecodes)
        {
            TargetColorSpaceCodesChanged?.Invoke(this, targetcolorspacecodes);
            RaisePropertyChanged(nameof(TargetColorSpaceCodes));
        }

        /// <summary>
        /// Called when the DefaultSegmentLength has changed.
        /// </summary>
        protected virtual void OnDefaultSegmentLengthChanged(Double defaultsegmentlength)
        {
            DefaultSegmentLengthChanged?.Invoke(this, defaultsegmentlength);
            RaisePropertyChanged(nameof(DefaultSegmentLength));
        }

        /// <summary>
        /// Called when the OsKey has changed.
        /// </summary>
        protected virtual void OnOsKeyChanged(String oskey)
        {
            OsKeyChanged?.Invoke(this, oskey);
            RaisePropertyChanged(nameof(OsKey));
        }

        /// <summary>
        /// Called when the AutoLogin has changed.
        /// </summary>
        protected virtual void OnAutoLoginChanged(Boolean autologin)
        {
            AutoLoginChanged?.Invoke(this, autologin);
            RaisePropertyChanged(nameof(AutoLogin));
        }

        /// <summary>
        /// Called when the AutoCheckForUpdates has changed.
        /// </summary>
        protected virtual void OnAutoCheckForUpdatesChanged(Boolean autocheckforupdates)
        {
            AutoCheckForUpdatesChanged?.Invoke(this, autocheckforupdates);
            RaisePropertyChanged(nameof(AutoCheckForUpdates));
        }

        /// <summary>
        /// Called when the SetupActivation has changed.
        /// </summary>
        protected virtual void OnSetupActivationChanged(Boolean setupactivation)
        {
            SetupActivationChanged?.Invoke(this, setupactivation);
            RaisePropertyChanged(nameof(SetupActivation));
        }

        /// <summary>
        /// Called when the SetupRemoteAssistance has changed.
        /// </summary>
        protected virtual void OnSetupRemoteAssistanceChanged(Boolean setupremoteassistance)
        {
            SetupRemoteAssistanceChanged?.Invoke(this, setupremoteassistance);
            RaisePropertyChanged(nameof(SetupRemoteAssistance));
        }

        /// <summary>
        /// Called when the SetupUwf has changed.
        /// </summary>
        protected virtual void OnSetupUwfChanged(Boolean setupuwf)
        {
            SetupUwfChanged?.Invoke(this, setupuwf);
            RaisePropertyChanged(nameof(SetupUwf));
        }

        /// <summary>
        /// Called when the SetupFirmware has changed.
        /// </summary>
        protected virtual void OnSetupFirmwareChanged(Boolean setupfirmware)
        {
            SetupFirmwareChanged?.Invoke(this, setupfirmware);
            RaisePropertyChanged(nameof(SetupFirmware));
        }

        /// <summary>
        /// Called when the SetupFpga has changed.
        /// </summary>
        protected virtual void OnSetupFpgaChanged(Boolean setupfpga)
        {
            SetupFpgaChanged?.Invoke(this, setupfpga);
            RaisePropertyChanged(nameof(SetupFpga));
        }

        /// <summary>
        /// Called when the IsDemo has changed.
        /// </summary>
        protected virtual void OnIsDemoChanged(Boolean isdemo)
        {
            IsDemoChanged?.Invoke(this, isdemo);
            RaisePropertyChanged(nameof(IsDemo));
        }

        /// <summary>
        /// Called when the Cats has changed.
        /// </summary>
        protected virtual void OnCatsChanged(SynchronizedObservableCollection<Cat> cats)
        {
            CatsChanged?.Invoke(this, cats);
            RaisePropertyChanged(nameof(Cats));
        }

        /// <summary>
        /// Called when the DefaultColorSpace has changed.
        /// </summary>
        protected virtual void OnDefaultColorSpaceChanged(ColorSpace defaultcolorspace)
        {
            DefaultColorSpaceChanged?.Invoke(this, defaultcolorspace);
            RaisePropertyChanged(nameof(DefaultColorSpace));
        }

        /// <summary>
        /// Called when the Configuration has changed.
        /// </summary>
        protected virtual void OnConfigurationChanged(Configuration configuration)
        {
            ConfigurationChanged?.Invoke(this, configuration);
            RaisePropertyChanged(nameof(Configuration));
        }

        /// <summary>
        /// Called when the Jobs has changed.
        /// </summary>
        protected virtual void OnJobsChanged(SynchronizedObservableCollection<Job> jobs)
        {
            JobsChanged?.Invoke(this, jobs);
            RaisePropertyChanged(nameof(Jobs));
        }

        /// <summary>
        /// Called when the MachineVersion has changed.
        /// </summary>
        protected virtual void OnMachineVersionChanged(MachineVersion machineversion)
        {
            MachineVersionChanged?.Invoke(this, machineversion);
            RaisePropertyChanged(nameof(MachineVersion));
        }

        /// <summary>
        /// Called when the MachinesEvents has changed.
        /// </summary>
        protected virtual void OnMachinesEventsChanged(SynchronizedObservableCollection<MachinesEvent> machinesevents)
        {
            MachinesEventsChanged?.Invoke(this, machinesevents);
            RaisePropertyChanged(nameof(MachinesEvents));
        }

        /// <summary>
        /// Called when the Organization has changed.
        /// </summary>
        protected virtual void OnOrganizationChanged(Organization organization)
        {
            OrganizationChanged?.Invoke(this, organization);
            RaisePropertyChanged(nameof(Organization));
        }

        /// <summary>
        /// Called when the DefaultRml has changed.
        /// </summary>
        protected virtual void OnDefaultRmlChanged(Rml defaultrml)
        {
            DefaultRmlChanged?.Invoke(this, defaultrml);
            RaisePropertyChanged(nameof(DefaultRml));
        }

        /// <summary>
        /// Called when the DefaultSpoolType has changed.
        /// </summary>
        protected virtual void OnDefaultSpoolTypeChanged(SpoolType defaultspooltype)
        {
            DefaultSpoolTypeChanged?.Invoke(this, defaultspooltype);
            RaisePropertyChanged(nameof(DefaultSpoolType));
        }

        /// <summary>
        /// Called when the Spools has changed.
        /// </summary>
        protected virtual void OnSpoolsChanged(SynchronizedObservableCollection<Spool> spools)
        {
            SpoolsChanged?.Invoke(this, spools);
            RaisePropertyChanged(nameof(Spools));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MachineBase" /> class.
        /// </summary>
        public MachineBase() : base()
        {

            Cats = new SynchronizedObservableCollection<Cat>();

            Jobs = new SynchronizedObservableCollection<Job>();

            MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>();

            Spools = new SynchronizedObservableCollection<Spool>();

        }
    }
}