예제 #1
0
 /// <summary>
 /// Default Ware constructor.
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="amount">The unit amount of the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public Ware(string name, string id, int amount, WarePublisher warePublisher)
 {
     this.name   = name;
     this.id     = id;
     this.amount = amount;
     warePublisher.RaiseAddEvent       += AddAmountEventHandler;
     warePublisher.RaiseRemoveEvent    += RemoveAmountEvnetHandler;
     warePublisher.RaiseGetTypeEvent   += GetTypeEventHandler;
     warePublisher.RaiseAlterWareEvent += AlterWareEventHandler;
 }
 /// <summary>
 /// Constructor for a combustible liquid. Information of the ware is not set.
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="amount">The amount of the ware.</param>
 /// <param name="minTemp">The minimum temperature of the ware.</param>
 /// <param name="boilingPoint">The maximum temperature of the ware.</param>
 /// <param name="category">The danger category of the ware.</param>
 /// <param name="flashPoint">The flashpoint of the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public CombustibleLiquid(string name, string id, int amount, double minTemp, byte category, float boilingPoint, float[] flashPoint, WarePublisher warePublisher) : base(name, id, amount, minTemp, boilingPoint, warePublisher)
 {
     this.category   = category;
     this.flashPoint = flashPoint;
 }
 /// <summary>
 /// Sets all variables that are inheriented from Liquid
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="amount">The amount of the ware.</param>
 /// <param name="information">Information about the ware.</param>
 /// <param name="minTemp">The minimum temperature of the ware.</param>
 /// <param name="boilingPoint">The maximum temperature of the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public CombustibleLiquid(string name, string id, int amount, string information, double minTemp, float boilingPoint, WarePublisher warePublisher) : base(name, id, amount, information, minTemp, boilingPoint, warePublisher)
 {
     category   = null;
     flashPoint = null;
 }
 /// <summary>
 /// Most basic constructor, derived from Ware. Category, boilingPoint, information, and flashPoint need to be given after.
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="amount">The amount of the ware.</param>
 /// <param name="warePublisher"The event publisher class.></param>
 public CombustibleLiquid(string name, string id, int amount, WarePublisher warePublisher) : base(name, id, amount, warePublisher)
 {
     category     = null;
     boilingPoint = null;
     flashPoint   = null;
 }
예제 #5
0
 //have attributes for constructors, if Type does not contain a way to find them
 /// <summary>
 /// Default Ware consturctor with product information added.
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="information">Information about the ware.</param>
 /// <param name="amount">The unit amount of the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public Ware(string name, string id, int amount, string information, WarePublisher warePublisher) : this(name, id, amount, warePublisher)
 {
     this.information = information;
 }
 /// <summary>
 /// Default electronic consturctor with product information added.
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="information">Information about the ware.</param>
 /// <param name="amount">The unit amount of the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public Electronic(string name, string id, int amount, string information, WarePublisher warePublisher) : base(name, id, amount, information, warePublisher)
 {
 }
예제 #7
0
 /// <summary>
 /// Constructor taht sets all variables.
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="amount">The unit amount of the ware.</param>
 /// <param name="information">Information about the ware.</param>
 /// <param name="minTemp">The minimum temperature of the ware.</param>
 /// <param name="boilingPoint">The boiling point of the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public Liquid(string name, string id, int amount, string information, double minTemp, float?boilingPoint, WarePublisher warePublisher) : base(name, id, amount, information, warePublisher)
 {
     this.minTemp      = minTemp;
     this.boilingPoint = boilingPoint;
 }
예제 #8
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="amount">The unit amount of the ware.</param>
 /// <param name="information">Information about the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public Liquid(string name, string id, int amount, string information, WarePublisher warePublisher) : base(name, id, amount, information, warePublisher)
 {
 }
예제 #9
0
 /// <summary>
 /// The basic liquid consturctor
 /// </summary>
 /// <param name="name">The name of the ware.</param>
 /// <param name="id">The ID of the ware.</param>
 /// <param name="amount">The unit amount of the ware.</param>
 /// <param name="warePublisher">The event publisher class.</param>
 public Liquid(string name, string id, int amount, WarePublisher warePublisher) : base(name, id, amount, warePublisher)
 {
 }