private void ProcessActuallWorkingStatus(WorkingStatus Stat) { NameForThisCollection = Stat.NameForThisCollection; foreach (AssignedPicture OrgEintrag in Stat.AssignedPictures) { foreach (InformationenSource TargetEntry in InformationenSourcen) { if (TargetEntry.OrganisationToProcess.Id != OrgEintrag.OrganisationenID) continue; foreach (String BildName in OrgEintrag.AssignedBildNamen) { BildDaten AssignedBildDaten = GetBildVonBildName(BildName); if (AssignedBildDaten != null) { TargetEntry.ConnectedBildDaten.Add(AssignedBildDaten); AssignedBildDaten.Parent = TargetEntry; if (InputBilder.Contains(AssignedBildDaten)) InputBilder.Remove(AssignedBildDaten); WMB.Basics.DoEvents(); } } } } List<BildDaten> EntriesToRemove = new List<BildDaten>(); foreach (BildDaten Bild in InputBilder) { if (!Stat.NamesOfActiveInputBilder.Contains( Bild.BildName)) { EntriesToRemove.Add(Bild); } } foreach (BildDaten EntryToRemove in EntriesToRemove) { if (InputBilder.Contains(EntryToRemove)) InputBilder.Remove(EntryToRemove); WMB.Basics.DoEvents(); } }
private void CollectActuallWorkingStatus(WorkingStatus Stat) { Stat.NameForThisCollection = NameForThisCollection; Stat.NamesOfActiveInputBilder.Clear(); foreach (BildDaten Bild in InputBilder) Stat.NamesOfActiveInputBilder.Add(Bild.BildName); Stat.AssignedPictures.Clear(); foreach (InformationenSource TargetEntry in InformationenSourcen) { AssignedPicture AssignEntry = new AssignedPicture(); AssignEntry.OrganisationenID = TargetEntry.OrganisationToProcess.Id; foreach (BildDaten Bild in TargetEntry.ConnectedBildDaten) { AssignEntry.AssignedBildNamen.Add(Bild.BildName); } Stat.AssignedPictures.Add(AssignEntry); } }
public bool LoadStoredStatus() { ActuallWorkingStatus = WorkingStatus.LoadFromSaveStore(); if (ActuallWorkingStatus == null) { return false; } ProcessActuallWorkingStatus(ActuallWorkingStatus); WMB.Basics.DoEvents(); return true; }