Example #1
0
 protected Pin(string name, string description, ILocatedDrawable owner)
 {
     if (string.IsNullOrWhiteSpace(name))
     {
         throw new ArgumentNullException(nameof(name));
     }
     Name        = name;
     Description = description ?? throw new ArgumentNullException(nameof(description));
     Owner       = owner ?? throw new ArgumentNullException(nameof(name));
     X           = $"{Owner.Name}[{Name}].x";
     Y           = $"{Owner.Name}[{Name}].y";
 }
Example #2
0
 /// <summary>
 /// Creates a loose pin. This means that any constrains need to be applied manually!
 /// </summary>
 /// <param name="name">The name of the pin.</param>
 /// <param name="description">The pin description.</param>
 /// <param name="owner">The owner of the pin.</param>
 public LoosePin(string name, string description, ILocatedDrawable owner)
     : base(name, description, owner)
 {
 }
Example #3
0
 public FixedPin(string name, string description, ILocatedDrawable owner, ILocatedPresence origin, Vector2 offset)
     : base(name, description, owner)
 {
     Offset  = offset;
     _origin = origin;
 }
Example #4
0
 public FixedPin(string name, string description, ILocatedDrawable owner, Vector2 offset)
     : this(name, description, owner, owner, offset)
 {
 }