Changeset 242 for Docking/CoolDocking
- Timestamp:
- May 11, 2011, 3:47:47 PM (14 years ago)
- Location:
- Docking/CoolDocking
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCDClient.pas
r198 r242 110 110 UseDockManager := True; 111 111 DockManager := TCDManagerRegions.Create(TWinControl(AOwner)); 112 //FormStyle := fsStayOnTop; 112 113 end; 113 114 end; -
Docking/CoolDocking/UCDLayout.pas
r218 r242 60 60 procedure LoadFromFile(FileName: string); 61 61 procedure SaveToFile(FileName: string); 62 procedure LoadFromString(Value: string); 63 function SaveToString: string; 62 64 procedure PopulateStringList(List: TStrings); 63 65 function FindByName(Name: string): TCDLayout; … … 198 200 Stream.Size := 0; 199 201 SaveToStream(Stream); 202 finally 203 Stream.Free; 204 end; 205 end; 206 207 procedure TCDLayoutList.LoadFromString(Value: string); 208 var 209 Stream: TMemoryStream; 210 begin 211 if Length(Value) > 0 then 212 try 213 Stream := TMemoryStream.Create; 214 Stream.WriteBuffer(Value[1], Length(Value)); 215 Stream.Position := 0; 216 LoadFromStream(Stream); 217 finally 218 Stream.Free; 219 end; 220 end; 221 222 function TCDLayoutList.SaveToString: string; 223 var 224 Stream: TMemoryStream; 225 begin 226 Result := ''; 227 try 228 Stream := TMemoryStream.Create; 229 Stream.Size := 0; 230 SaveToStream(Stream); 231 if Stream.Size > 0 then begin 232 SetLength(Result, Stream.Size); 233 Stream.Position := 0; 234 Stream.ReadBuffer(Result[1], Stream.Size); 235 end; 200 236 finally 201 237 Stream.Free;
Note:
See TracChangeset
for help on using the changeset viewer.