public FocusGridModel(FocusGridModel model) { SetupCommons(); //Transfer data UniqueID = Guid.NewGuid(); visibleName = model.visibleName; tag = model.tag; additionnalMods = model.additionnalMods; foreach (FocusModel focus in model.FociList) { FociList.Add(new FocusModel(focus)); } //Rerun to create sets foreach (FocusModel focus in FociList) { focus.RepairSets(model.FociList.FirstOrDefault(f => f.UniqueName == focus.UniqueName), FociList.ToList()); } //Create the remaining stuff FociList.CollectionChanged += FociList_CollectionChanged; //Min Row & column Count EditGridDefinition(); }
public FocusGridModel(FociGridContainer container) { SetupCommons(); //Transfer data UniqueID = container.IdentifierID; visibleName = container.ContainerID; tag = container.TAG; additionnalMods = container.AdditionnalMods; foreach (Focus focus in container.FociList) { FociList.Add(new FocusModel(focus)); } //Rerun to create sets foreach (FocusModel model in FociList) { model.RepairSets( container.FociList.FirstOrDefault(f => f.UniqueName == model.UniqueName), FociList.ToList()); } //Create the remaining stuff FociList.CollectionChanged += FociList_CollectionChanged; //Min Row & column Count EditGridDefinition(); }