/// <summary> /// Default ctor /// </summary> public Module() { blocks = new BlockSet(this); blockGroups = new BlockGroupSet(this); junctions = new JunctionSet(this); routes = new RouteSet(this); edges = new EdgeSet(this); sensors = new SensorSet(this); signals = new SignalSet(this); outputs = new OutputSet(this); }
public IList <Point> SetGroupToField(params Nomino[] groups) { List <Point> Result = new List <Point>(); lock (this) { lock (ActiveBlockGroups) { LastSetGroup = DateTime.Now; foreach (var bg in groups) { Debug.Print("Setting Nomino to Field:" + bg.ToString()); foreach (var groupblock in bg) { int RowPos = groupblock.Y + bg.Y; int ColPos = groupblock.X + bg.X; //Investigate: is this resetting the Rotation? //is it losing it's owner or something? Dr.Mario theme gets confused when setting a block to the field. if (FieldContents[RowPos][ColPos] == null) { FieldContents[RowPos][ColPos] = groupblock.Block; Result.Add(new Point(ColPos, RowPos)); } else { } } if (ActiveBlockGroups.Contains(bg)) { RemoveBlockGroup(bg); } } BlockGroupSet?.Invoke(this, new BlockGroupSetEventArgs(groups)); HasChanged = true; } } return(Result); }