public void SavePositionAndSize(Form form) { if (form == null) { return; } bool found = false; PositionAndSize pAndS = new PositionAndSize(); foreach (PositionAndSize ps in _positionsAndSizes) { if (ps.Name == form.Name) { found = true; pAndS = ps; break; } } pAndS.Left = form.Left; pAndS.Top = form.Top; pAndS.Size = form.Size; if (!found) { pAndS.Name = form.Name; _positionsAndSizes.Add(pAndS); } }
public void SavePositionAndSize(Form form) { if (form == null) return; bool found = false; PositionAndSize pAndS = new PositionAndSize(); foreach (PositionAndSize ps in _positionsAndSizes) { if (ps.Name == form.Name) { found = true; pAndS = ps; break; } } pAndS.Left = form.Left; pAndS.Top = form.Top; pAndS.Size = form.Size; if (!found) { pAndS.Name = form.Name; _positionsAndSizes.Add(pAndS); } }
public void AddPositionAndSize(PositionAndSize pAndS) { _positionsAndSizes.Add(pAndS); }