aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Scripting/Tango.Scripting.Editors/Highlighting/IHighlightingDefinition.cs
blob: 0b42cd426cd5316841b00ddaddd8eb62da235320 (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
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;
using System.Collections.Generic;
using System.ComponentModel;

namespace Tango.Scripting.Editors.Highlighting
{
	/// <summary>
	/// A highlighting definition.
	/// </summary>
	[TypeConverter(typeof(HighlightingDefinitionTypeConverter))]
	public interface IHighlightingDefinition
	{
		/// <summary>
		/// Gets the name of the highlighting definition.
		/// </summary>
		string Name { get; }
		
		/// <summary>
		/// Gets the main rule set.
		/// </summary>
		HighlightingRuleSet MainRuleSet { get; }
		
		/// <summary>
		/// Gets a rule set by name.
		/// </summary>
		/// <returns>The rule set, or null if it is not found.</returns>
		HighlightingRuleSet GetNamedRuleSet(string name);
		
		/// <summary>
		/// Gets a named highlighting color.
		/// </summary>
		/// <returns>The highlighting color, or null if it is not found.</returns>
		HighlightingColor GetNamedColor(string name);
		
		/// <summary>
		/// Gets the list of named highlighting colors.
		/// </summary>
		IEnumerable<HighlightingColor> NamedHighlightingColors { get; }
	}
	
	/// <summary>
	/// Extension of IHighlightingDefinition to avoid breaking changes in the API.
	/// </summary>
	public interface IHighlightingDefinition2 : IHighlightingDefinition
	{
		/// <summary>
		/// Gets the list of properties.
		/// </summary>
		IDictionary<string, string> Properties { get; }
	}
}
//------------------------------------------------------------------------------
// <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;
using System.ComponentModel;
using Tango.Core.CustomAttributes;

namespace Tango.BL.Entities
{
    [Table("JOBS")]
    public abstract class JobBase : ObservableEntity<Job>
    {

        public event EventHandler<DateTime> CreationDateChanged;

        public event EventHandler<Nullable<DateTime>> LastRunChanged;

        public event EventHandler<String> NameChanged;

        public event EventHandler<String> DescriptionChanged;

        public event EventHandler<Double> InterSegmentLengthChanged;

        public event EventHandler<Boolean> EnableInterSegmentChanged;

        public event EventHandler<Boolean> EnableLubricationChanged;

        public event EventHandler<Int32> JobIndexChanged;

        public event EventHandler<Int32> EstimatedDurationMiliChanged;

        public event EventHandler<Boolean> HasEmbroideryFileChanged;

        public event EventHandler<Byte[]> EmbroideryFileDataChanged;

        public event EventHandler<String> EmbroideryFileNameChanged;

        public event EventHandler<Byte[]> EmbroideryJpegChanged;

        public event EventHandler<Int32> StatusChanged;

        public event EventHandler<Int32> NumberOfUnitsChanged;

        public event EventHandler<Int32> TypeChanged;

        public event EventHandler<Int32> SpoolsDistributionChanged;

        public event EventHandler<Int32> NumberOfHeadsChanged;

        public event EventHandler<Int32> SampleUnitsOrMetersChanged;

        public event EventHandler<Int32> FineTuningStatusChanged;

        public event EventHandler<Nullable<DateTime>> FineTuningApproveDateChanged;

        public event EventHandler<Int32> SampleDyeStatusChanged;

        public event EventHandler<Nullable<DateTime>> SampleDyeApproveDateChanged;

        public event EventHandler<Int32> EditingStateChanged;

        public event EventHandler<Double> LengthPercentageFactorChanged;

        public event EventHandler<Boolean> IsSynchronizedChanged;

        public event EventHandler<Int32> SourceChanged;

        public event EventHandler<ColorCatalog> ColorCatalogChanged;

        public event EventHandler<ColorSpace> ColorSpaceChanged;

        public event EventHandler<Customer> CustomerChanged;

        public event EventHandler<Machine> MachineChanged;

        public event EventHandler<Rml> RmlChanged;

        public event EventHandler<SpoolType> SpoolTypeChanged;

        public event EventHandler<User> UserChanged;

        public event EventHandler<WindingMethod> WindingMethodChanged;

        public event EventHandler<SynchronizedObservableCollection<Segment>> SegmentsChanged;

        protected DateTime _creationdate;

        /// <summary>
        /// Gets or sets the jobbase creation date.
        /// </summary>

        [Column("CREATION_DATE")]

        public  DateTime CreationDate
        {
            get 
            {
                return _creationdate; 
            }

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

                    OnCreationDateChanged(value);

                }
            }
        }

        protected Nullable<DateTime> _lastrun;

        /// <summary>
        /// Gets or sets the jobbase last run.
        /// </summary>

        [Column("LAST_RUN")]

        public  Nullable<DateTime> LastRun
        {
            get 
            {
                return _lastrun; 
            }

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

                    OnLastRunChanged(value);

                }
            }
        }

        protected String _machineguid;

        /// <summary>
        /// Gets or sets the jobbase machine guid.
        /// </summary>

        [Column("MACHINE_GUID")]
        [ForeignKey("Machine")]

        public  String MachineGuid
        {
            get 
            {
                return _machineguid; 
            }

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

                }
            }
        }

        protected String _userguid;

        /// <summary>
        /// Gets or sets the jobbase user guid.
        /// </summary>

        [Column("USER_GUID")]
        [ForeignKey("User")]

        public  String UserGuid
        {
            get 
            {
                return _userguid; 
            }

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

                }
            }
        }

        protected String _rmlguid;

        /// <summary>
        /// Gets or sets the jobbase rml guid.
        /// </summary>

        [Column("RML_GUID")]
        [ForeignKey("Rml")]

        public  String RmlGuid
        {
            get 
            {
                return _rmlguid; 
            }

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

                }
            }
        }

        protected String _windingmethodguid;

        /// <summary>
        /// Gets or sets the jobbase winding method guid.
        /// </summary>

        [Column("WINDING_METHOD_GUID")]
        [ForeignKey("WindingMethod")]

        public  String WindingMethodGuid
        {
            get 
            {
                return _windingmethodguid; 
            }

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

                }
            }
        }

        protected String _spooltypeguid;

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

        [Column("SPOOL_TYPE_GUID")]
        [ForeignKey("SpoolType")]

        public  String SpoolTypeGuid
        {
            get 
            {
                return _spooltypeguid; 
            }

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

                }
            }
        }

        protected String _name;

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

        [Column("NAME")]

        public  String Name
        {
            get 
            {
                return _name; 
            }

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

                    OnNameChanged(value);

                }
            }
        }

        protected String _description;

        /// <summary>
        /// Gets or sets the jobbase description.
        /// </summary>

        [Column("DESCRIPTION")]

        public  String Description
        {
            get 
            {
                return _description; 
            }

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

                    OnDescriptionChanged(value);

                }
            }
        }

        protected Double _intersegmentlength;

        /// <summary>
        /// Gets or sets the jobbase inter segment length.
        /// </summary>

        [Column("INTER_SEGMENT_LENGTH")]

        public  Double InterSegmentLength
        {
            get 
            {
                return _intersegmentlength; 
            }

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

                    OnInterSegmentLengthChanged(value);

                }
            }
        }

        protected Boolean _enableintersegment;

        /// <summary>
        /// Gets or sets the jobbase enable inter segment.
        /// </summary>

        [Column("ENABLE_INTER_SEGMENT")]

        public  Boolean EnableInterSegment
        {
            get 
            {
                return _enableintersegment; 
            }

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

                    OnEnableInterSegmentChanged(value);

                }
            }
        }

        protected Boolean _enablelubrication;

        /// <summary>
        /// Gets or sets the jobbase enable lubrication.
        /// </summary>

        [Column("ENABLE_LUBRICATION")]

        public  Boolean EnableLubrication
        {
            get 
            {
                return _enablelubrication; 
            }

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

                    OnEnableLubricationChanged(value);

                }
            }
        }

        protected Int32 _jobindex;

        /// <summary>
        /// Gets or sets the jobbase job index.
        /// </summary>

        [Column("JOB_INDEX")]

        public  Int32 JobIndex
        {
            get 
            {
                return _jobindex; 
            }

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

                    OnJobIndexChanged(value);

                }
            }
        }

        protected Int32 _estimateddurationmili;

        /// <summary>
        /// Gets or sets the jobbase estimated duration mili.
        /// </summary>

        [Column("ESTIMATED_DURATION_MILI")]

        public  Int32 EstimatedDurationMili
        {
            get 
            {
                return _estimateddurationmili; 
            }

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

                    OnEstimatedDurationMiliChanged(value);

                }
            }
        }

        protected Boolean _hasembroideryfile;

        /// <summary>
        /// Gets or sets the jobbase has embroidery file.
        /// </summary>

        [Column("HAS_EMBROIDERY_FILE")]

        public  Boolean HasEmbroideryFile
        {
            get 
            {
                return _hasembroideryfile; 
            }

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

                    OnHasEmbroideryFileChanged(value);

                }
            }
        }

        protected Byte[] _embroideryfiledata;

        /// <summary>
        /// Gets or sets the jobbase embroidery file data.
        /// </summary>

        [Column("EMBROIDERY_FILE_DATA")]

        public  Byte[] EmbroideryFileData
        {
            get 
            {
                return _embroideryfiledata; 
            }

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

                    OnEmbroideryFileDataChanged(value);

                }
            }
        }

        protected String _embroideryfilename;

        /// <summary>
        /// Gets or sets the jobbase embroidery file name.
        /// </summary>

        [Column("EMBROIDERY_FILE_NAME")]

        public  String EmbroideryFileName
        {
            get 
            {
                return _embroideryfilename; 
            }

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

                    OnEmbroideryFileNameChanged(value);

                }
            }
        }

        protected Byte[] _embroideryjpeg;

        /// <summary>
        /// Gets or sets the jobbase embroidery jpeg.
        /// </summary>

        [Column("EMBROIDERY_JPEG")]

        public  Byte[] EmbroideryJpeg
        {
            get 
            {
                return _embroideryjpeg; 
            }

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

                    OnEmbroideryJpegChanged(value);

                }
            }
        }

        protected Int32 _status;

        /// <summary>
        /// 0 = Draft
        /// 1 = Completed
        /// 2 = Disrupted
        /// 3 = Aborted
        /// </summary>

        [Column("STATUS")]

        public  Int32 Status
        {
            get 
            {
                return _status; 
            }

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

                    OnStatusChanged(value);

                }
            }
        }

        protected String _colorspaceguid;

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

        [Column("COLOR_SPACE_GUID")]
        [ForeignKey("ColorSpace")]

        public  String ColorSpaceGuid
        {
            get 
            {
                return _colorspaceguid; 
            }

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

                }
            }
        }

        protected String _colorcatalogguid;

        /// <summary>
        /// Gets or sets the jobbase color catalog guid.
        /// </summary>

        [Column("COLOR_CATALOG_GUID")]
        [ForeignKey("ColorCatalog")]

        public  String ColorCatalogGuid
        {
            get 
            {
                return _colorcatalogguid; 
            }

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

                }
            }
        }

        protected Int32 _numberofunits;

        /// <summary>
        /// Gets or sets the jobbase number of units.
        /// </summary>

        [Column("NUMBER_OF_UNITS")]

        public  Int32 NumberOfUnits
        {
            get 
            {
                return _numberofunits; 
            }

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

                    OnNumberOfUnitsChanged(value);

                }
            }
        }

        protected Int32 _type;

        /// <summary>
        /// 0 = Sewing
        /// 1 = Embroidery
        /// </summary>

        [Column("TYPE")]

        public  Int32 Type
        {
            get 
            {
                return _type; 
            }

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

                    OnTypeChanged(value);

                }
            }
        }

        protected String _customerguid;

        /// <summary>
        /// Gets or sets the jobbase customer guid.
        /// </summary>

        [Column("CUSTOMER_GUID")]
        [ForeignKey("Customer")]

        public  String CustomerGuid
        {
            get 
            {
                return _customerguid; 
            }

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

                }
            }
        }

        protected Int32 _spoolsdistribution;

        /// <summary>
        /// 0 = All segments per spool
        /// 1 = One segments per spool
        /// </summary>

        [Column("SPOOLS_DISTRIBUTION")]

        public  Int32 SpoolsDistribution
        {
            get 
            {
                return _spoolsdistribution; 
            }

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

                    OnSpoolsDistributionChanged(value);

                }
            }
        }

        protected Int32 _numberofheads;

        /// <summary>
        /// Gets or sets the jobbase number of heads.
        /// </summary>

        [Column("NUMBER_OF_HEADS")]

        public  Int32 NumberOfHeads
        {
            get 
            {
                return _numberofheads; 
            }

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

                    OnNumberOfHeadsChanged(value);

                }
            }
        }

        protected Int32 _sampleunitsormeters;

        /// <summary>
        /// Gets or sets the jobbase sample units or meters.
        /// </summary>

        [Column("SAMPLE_UNITS_OR_METERS")]

        public  Int32 SampleUnitsOrMeters
        {
            get 
            {
                return _sampleunitsormeters; 
            }

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

                    OnSampleUnitsOrMetersChanged(value);

                }
            }
        }

        protected Int32 _finetuningstatus;

        /// <summary>
        /// 0 = Unspecified
        /// 1 = PendingApproval
        /// 2 = Approved
        /// </summary>

        [Column("FINE_TUNING_STATUS")]

        public  Int32 FineTuningStatus
        {
            get 
            {
                return _finetuningstatus; 
            }

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

                    OnFineTuningStatusChanged(value);

                }
            }
        }

        protected Nullable<DateTime> _finetuningapprovedate;

        /// <summary>
        /// Gets or sets the jobbase fine tuning approve date.
        /// </summary>

        [Column("FINE_TUNING_APPROVE_DATE")]

        public  Nullable<DateTime> FineTuningApproveDate
        {
            get 
            {
                return _finetuningapprovedate; 
            }

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

                    OnFineTuningApproveDateChanged(value);

                }
            }
        }

        protected Int32 _sampledyestatus;

        /// <summary>
        /// 0 = Unspecified
        /// 1 = PendingApproval
        /// 2 = Approved
        /// </summary>

        [Column("SAMPLE_DYE_STATUS")]

        public  Int32 SampleDyeStatus
        {
            get 
            {
                return _sampledyestatus; 
            }

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

                    OnSampleDyeStatusChanged(value);

                }
            }
        }

        protected Nullable<DateTime> _sampledyeapprovedate;

        /// <summary>
        /// Gets or sets the jobbase sample dye approve date.
        /// </summary>

        [Column("SAMPLE_DYE_APPROVE_DATE")]

        public  Nullable<DateTime> SampleDyeApproveDate
        {
            get 
            {
                return _sampledyeapprovedate; 
            }

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

                    OnSampleDyeApproveDateChanged(value);

                }
            }
        }

        protected Int32 _editingstate;

        /// <summary>
        /// 0 = Default
        /// 1 = SampleDye
        /// 2 = FineTuning
        /// </summary>

        [Column("EDITING_STATE")]

        public  Int32 EditingState
        {
            get 
            {
                return _editingstate; 
            }

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

                    OnEditingStateChanged(value);

                }
            }
        }

        protected Double _lengthpercentagefactor;

        /// <summary>
        /// Gets or sets the jobbase length percentage factor.
        /// </summary>

        [Column("LENGTH_PERCENTAGE_FACTOR")]

        public  Double LengthPercentageFactor
        {
            get 
            {
                return _lengthpercentagefactor; 
            }

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

                    OnLengthPercentageFactorChanged(value);

                }
            }
        }

        protected Boolean _issynchronized;

        /// <summary>
        /// Gets or sets the jobbase is synchronized.
        /// </summary>

        [Column("IS_SYNCHRONIZED")]

        public  Boolean IsSynchronized
        {
            get 
            {
                return _issynchronized; 
            }

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

                    OnIsSynchronizedChanged(value);

                }
            }
        }

        protected Int32 _source;

        /// <summary>
        /// 0 = Remote
        /// 1 = Local
        /// </summary>

        [Column("SOURCE")]

        public  Int32 Source
        {
            get 
            {
                return _source; 
            }

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

                    OnSourceChanged(value);

                }
            }
        }

        protected ColorCatalog _colorcatalog;

        /// <summary>
        /// Gets or sets the jobbase color catalogs.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual ColorCatalog ColorCatalog
        {
            get 
            {
                return _colorcatalog; 
            }

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

                    if (ColorCatalog != null)
                    {
                        ColorCatalogGuid = ColorCatalog.Guid;
                    }

                    OnColorCatalogChanged(value);

                }
            }
        }

        protected ColorSpace _colorspace;

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

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

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

                    if (ColorSpace != null)
                    {
                        ColorSpaceGuid = ColorSpace.Guid;
                    }

                    OnColorSpaceChanged(value);

                }
            }
        }

        protected Customer _customer;

        /// <summary>
        /// Gets or sets the jobbase customer.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Customer Customer
        {
            get 
            {
                return _customer; 
            }

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

                    if (Customer != null)
                    {
                        CustomerGuid = Customer.Guid;
                    }

                    OnCustomerChanged(value);

                }
            }
        }

        protected Machine _machine;

        /// <summary>
        /// Gets or sets the jobbase machine.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual Machine Machine
        {
            get 
            {
                return _machine; 
            }

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

                    if (Machine != null)
                    {
                        MachineGuid = Machine.Guid;
                    }

                    OnMachineChanged(value);

                }
            }
        }

        protected Rml _rml;

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

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

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

                    if (Rml != null)
                    {
                        RmlGuid = Rml.Guid;
                    }

                    OnRmlChanged(value);

                }
            }
        }

        protected SpoolType _spooltype;

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

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

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

                    if (SpoolType != null)
                    {
                        SpoolTypeGuid = SpoolType.Guid;
                    }

                    OnSpoolTypeChanged(value);

                }
            }
        }

        protected User _user;

        /// <summary>
        /// Gets or sets the jobbase user.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual User User
        {
            get 
            {
                return _user; 
            }

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

                    if (User != null)
                    {
                        UserGuid = User.Guid;
                    }

                    OnUserChanged(value);

                }
            }
        }

        protected WindingMethod _windingmethod;

        /// <summary>
        /// Gets or sets the jobbase winding methods.
        /// </summary>

        [XmlIgnore]
        [JsonIgnore]
        public virtual WindingMethod WindingMethod
        {
            get 
            {
                return _windingmethod; 
            }

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

                    if (WindingMethod != null)
                    {
                        WindingMethodGuid = WindingMethod.Guid;
                    }

                    OnWindingMethodChanged(value);

                }
            }
        }

        protected SynchronizedObservableCollection<Segment> _segments;

        /// <summary>
        /// Gets or sets the jobbase segments.
        /// </summary>

        public virtual SynchronizedObservableCollection<Segment> Segments
        {
            get 
            {
                return _segments; 
            }

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

                    OnSegmentsChanged(value);

                }
            }
        }

        /// <summary>
        /// Called when the CreationDate has changed.
        /// </summary>
        protected virtual void OnCreationDateChanged(DateTime creationdate)
        {
            CreationDateChanged?.Invoke(this, creationdate);
            RaisePropertyChanged(nameof(CreationDate));
        }

        /// <summary>
        /// Called when the LastRun has changed.
        /// </summary>
        protected virtual void OnLastRunChanged(Nullable<DateTime> lastrun)
        {
            LastRunChanged?.Invoke(this, lastrun);
            RaisePropertyChanged(nameof(LastRun));
        }

        /// <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 Description has changed.
        /// </summary>
        protected virtual void OnDescriptionChanged(String description)
        {
            DescriptionChanged?.Invoke(this, description);
            RaisePropertyChanged(nameof(Description));
        }

        /// <summary>
        /// Called when the InterSegmentLength has changed.
        /// </summary>
        protected virtual void OnInterSegmentLengthChanged(Double intersegmentlength)
        {
            InterSegmentLengthChanged?.Invoke(this, intersegmentlength);
            RaisePropertyChanged(nameof(InterSegmentLength));
        }

        /// <summary>
        /// Called when the EnableInterSegment has changed.
        /// </summary>
        protected virtual void OnEnableInterSegmentChanged(Boolean enableintersegment)
        {
            EnableInterSegmentChanged?.Invoke(this, enableintersegment);
            RaisePropertyChanged(nameof(EnableInterSegment));
        }

        /// <summary>
        /// Called when the EnableLubrication has changed.
        /// </summary>
        protected virtual void OnEnableLubricationChanged(Boolean enablelubrication)
        {
            EnableLubricationChanged?.Invoke(this, enablelubrication);
            RaisePropertyChanged(nameof(EnableLubrication));
        }

        /// <summary>
        /// Called when the JobIndex has changed.
        /// </summary>
        protected virtual void OnJobIndexChanged(Int32 jobindex)
        {
            JobIndexChanged?.Invoke(this, jobindex);
            RaisePropertyChanged(nameof(JobIndex));
        }

        /// <summary>
        /// Called when the EstimatedDurationMili has changed.
        /// </summary>
        protected virtual void OnEstimatedDurationMiliChanged(Int32 estimateddurationmili)
        {
            EstimatedDurationMiliChanged?.Invoke(this, estimateddurationmili);
            RaisePropertyChanged(nameof(EstimatedDurationMili));
        }

        /// <summary>
        /// Called when the HasEmbroideryFile has changed.
        /// </summary>
        protected virtual void OnHasEmbroideryFileChanged(Boolean hasembroideryfile)
        {
            HasEmbroideryFileChanged?.Invoke(this, hasembroideryfile);
            RaisePropertyChanged(nameof(HasEmbroideryFile));
        }

        /// <summary>
        /// Called when the EmbroideryFileData has changed.
        /// </summary>
        protected virtual void OnEmbroideryFileDataChanged(Byte[] embroideryfiledata)
        {
            EmbroideryFileDataChanged?.Invoke(this, embroideryfiledata);
            RaisePropertyChanged(nameof(EmbroideryFileData));
        }

        /// <summary>
        /// Called when the EmbroideryFileName has changed.
        /// </summary>
        protected virtual void OnEmbroideryFileNameChanged(String embroideryfilename)
        {
            EmbroideryFileNameChanged?.Invoke(this, embroideryfilename);
            RaisePropertyChanged(nameof(EmbroideryFileName));
        }

        /// <summary>
        /// Called when the EmbroideryJpeg has changed.
        /// </summary>
        protected virtual void OnEmbroideryJpegChanged(Byte[] embroideryjpeg)
        {
            EmbroideryJpegChanged?.Invoke(this, embroideryjpeg);
            RaisePropertyChanged(nameof(EmbroideryJpeg));
        }

        /// <summary>
        /// Called when the Status has changed.
        /// </summary>
        protected virtual void OnStatusChanged(Int32 status)
        {
            StatusChanged?.Invoke(this, status);
            RaisePropertyChanged(nameof(Status));
        }

        /// <summary>
        /// Called when the NumberOfUnits has changed.
        /// </summary>
        protected virtual void OnNumberOfUnitsChanged(Int32 numberofunits)
        {
            NumberOfUnitsChanged?.Invoke(this, numberofunits);
            RaisePropertyChanged(nameof(NumberOfUnits));
        }

        /// <summary>
        /// Called when the Type has changed.
        /// </summary>
        protected virtual void OnTypeChanged(Int32 type)
        {
            TypeChanged?.Invoke(this, type);
            RaisePropertyChanged(nameof(Type));
        }

        /// <summary>
        /// Called when the SpoolsDistribution has changed.
        /// </summary>
        protected virtual void OnSpoolsDistributionChanged(Int32 spoolsdistribution)
        {
            SpoolsDistributionChanged?.Invoke(this, spoolsdistribution);
            RaisePropertyChanged(nameof(SpoolsDistribution));
        }

        /// <summary>
        /// Called when the NumberOfHeads has changed.
        /// </summary>
        protected virtual void OnNumberOfHeadsChanged(Int32 numberofheads)
        {
            NumberOfHeadsChanged?.Invoke(this, numberofheads);
            RaisePropertyChanged(nameof(NumberOfHeads));
        }

        /// <summary>
        /// Called when the SampleUnitsOrMeters has changed.
        /// </summary>
        protected virtual void OnSampleUnitsOrMetersChanged(Int32 sampleunitsormeters)
        {
            SampleUnitsOrMetersChanged?.Invoke(this, sampleunitsormeters);
            RaisePropertyChanged(nameof(SampleUnitsOrMeters));
        }

        /// <summary>
        /// Called when the FineTuningStatus has changed.
        /// </summary>
        protected virtual void OnFineTuningStatusChanged(Int32 finetuningstatus)
        {
            FineTuningStatusChanged?.Invoke(this, finetuningstatus);
            RaisePropertyChanged(nameof(FineTuningStatus));
        }

        /// <summary>
        /// Called when the FineTuningApproveDate has changed.
        /// </summary>
        protected virtual void OnFineTuningApproveDateChanged(Nullable<DateTime> finetuningapprovedate)
        {
            FineTuningApproveDateChanged?.Invoke(this, finetuningapprovedate);
            RaisePropertyChanged(nameof(FineTuningApproveDate));
        }

        /// <summary>
        /// Called when the SampleDyeStatus has changed.
        /// </summary>
        protected virtual void OnSampleDyeStatusChanged(Int32 sampledyestatus)
        {
            SampleDyeStatusChanged?.Invoke(this, sampledyestatus);
            RaisePropertyChanged(nameof(SampleDyeStatus));
        }

        /// <summary>
        /// Called when the SampleDyeApproveDate has changed.
        /// </summary>
        protected virtual void OnSampleDyeApproveDateChanged(Nullable<DateTime> sampledyeapprovedate)
        {
            SampleDyeApproveDateChanged?.Invoke(this, sampledyeapprovedate);
            RaisePropertyChanged(nameof(SampleDyeApproveDate));
        }

        /// <summary>
        /// Called when the EditingState has changed.
        /// </summary>
        protected virtual void OnEditingStateChanged(Int32 editingstate)
        {
            EditingStateChanged?.Invoke(this, editingstate);
            RaisePropertyChanged(nameof(EditingState));
        }

        /// <summary>
        /// Called when the LengthPercentageFactor has changed.
        /// </summary>
        protected virtual void OnLengthPercentageFactorChanged(Double lengthpercentagefactor)
        {
            LengthPercentageFactorChanged?.Invoke(this, lengthpercentagefactor);
            RaisePropertyChanged(nameof(LengthPercentageFactor));
        }

        /// <summary>
        /// Called when the IsSynchronized has changed.
        /// </summary>
        protected virtual void OnIsSynchronizedChanged(Boolean issynchronized)
        {
            IsSynchronizedChanged?.Invoke(this, issynchronized);
            RaisePropertyChanged(nameof(IsSynchronized));
        }

        /// <summary>
        /// Called when the Source has changed.
        /// </summary>
        protected virtual void OnSourceChanged(Int32 source)
        {
            SourceChanged?.Invoke(this, source);
            RaisePropertyChanged(nameof(Source));
        }

        /// <summary>
        /// Called when the ColorCatalog has changed.
        /// </summary>
        protected virtual void OnColorCatalogChanged(ColorCatalog colorcatalog)
        {
            ColorCatalogChanged?.Invoke(this, colorcatalog);
            RaisePropertyChanged(nameof(ColorCatalog));
        }

        /// <summary>
        /// Called when the ColorSpace has changed.
        /// </summary>
        protected virtual void OnColorSpaceChanged(ColorSpace colorspace)
        {
            ColorSpaceChanged?.Invoke(this, colorspace);
            RaisePropertyChanged(nameof(ColorSpace));
        }

        /// <summary>
        /// Called when the Customer has changed.
        /// </summary>
        protected virtual void OnCustomerChanged(Customer customer)
        {
            CustomerChanged?.Invoke(this, customer);
            RaisePropertyChanged(nameof(Customer));
        }

        /// <summary>
        /// Called when the Machine has changed.
        /// </summary>
        protected virtual void OnMachineChanged(Machine machine)
        {
            MachineChanged?.Invoke(this, machine);
            RaisePropertyChanged(nameof(Machine));
        }

        /// <summary>
        /// Called when the Rml has changed.
        /// </summary>
        protected virtual void OnRmlChanged(Rml rml)
        {
            RmlChanged?.Invoke(this, rml);
            RaisePropertyChanged(nameof(Rml));
        }

        /// <summary>
        /// Called when the SpoolType has changed.
        /// </summary>
        protected virtual void OnSpoolTypeChanged(SpoolType spooltype)
        {
            SpoolTypeChanged?.Invoke(this, spooltype);
            RaisePropertyChanged(nameof(SpoolType));
        }

        /// <summary>
        /// Called when the User has changed.
        /// </summary>
        protected virtual void OnUserChanged(User user)
        {
            UserChanged?.Invoke(this, user);
            RaisePropertyChanged(nameof(User));
        }

        /// <summary>
        /// Called when the WindingMethod has changed.
        /// </summary>
        protected virtual void OnWindingMethodChanged(WindingMethod windingmethod)
        {
            WindingMethodChanged?.Invoke(this, windingmethod);
            RaisePropertyChanged(nameof(WindingMethod));
        }

        /// <summary>
        /// Called when the Segments has changed.
        /// </summary>
        protected virtual void OnSegmentsChanged(SynchronizedObservableCollection<Segment> segments)
        {
            SegmentsChanged?.Invoke(this, segments);
            RaisePropertyChanged(nameof(Segments));
        }

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

            Segments = new SynchronizedObservableCollection<Segment>();

        }
    }
}