Changeset 181 for Docking/CoolDocking/UCoolDockCustomize.pas
- Timestamp:
- Mar 9, 2011, 10:56:47 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDockCustomize.pas
r180 r181 7 7 uses 8 8 Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, 9 ComCtrls, StdCtrls, Spin, UCoolDockLayout ;9 ComCtrls, StdCtrls, Spin, UCoolDockLayout, UCoolDockCommon; 10 10 11 11 type … … 45 45 end; 46 46 47 { TCoolDockCustomize } 48 49 TCoolDockCustomize = class(TCoolDockCustomizeBase) 50 private 51 FLayoutList: TCoolDockLayoutList; 52 Form: TCoolDockCustomizeForm; 53 procedure SetLayoutList(const AValue: TCoolDockLayoutList); 54 public 55 function Execute: Boolean; 56 constructor Create(AOwner: TComponent); override; 57 destructor Destroy; override; 58 published 59 property LayoutList: TCoolDockLayoutList read FLayoutList write SetLayoutList; 60 end; 61 62 47 63 implementation 64 65 uses 66 UCoolDocking, UCoolDockClientPanel; 48 67 49 68 resourcestring … … 115 134 end; 116 135 136 137 { TCoolDockCustomize } 138 139 procedure TCoolDockCustomize.SetLayoutList(const AValue: TCoolDockLayoutList); 140 begin 141 if FLayoutList=AValue then exit; 142 FLayoutList:=AValue; 143 end; 144 145 function TCoolDockCustomize.Execute: Boolean; 146 begin 147 Form := TCoolDockCustomizeForm.Create(Self); 148 if Assigned(Master) then begin 149 Form.SpinEdit1.Value := TCoolDockMaster(Master).DefaultMoveSpeed; 150 Form.ComboBox1.ItemIndex := Integer(TCoolDockMaster(Master).DefaultTabsPos); 151 Form.ComboBox2.ItemIndex := Integer(TCoolDockMaster(Master).DefaultHeaderPos); 152 Form.LayoutList := FLayoutList; 153 end; 154 Form.ShowModal; 155 if Assigned(Master) then begin 156 TCoolDockMaster(Master).DefaultMoveSpeed := Form.SpinEdit1.Value; 157 TCoolDockMaster(Master).DefaultTabsPos := THeaderPos(Form.ComboBox1.ItemIndex); 158 TCoolDockMaster(Master).DefaultHeaderPos := THeaderPos(Form.ComboBox2.ItemIndex); 159 end; 160 Form.Free; 161 Result := True; 162 end; 163 164 constructor TCoolDockCustomize.Create(AOwner: TComponent); 165 begin 166 inherited Create(AOwner); 167 end; 168 169 destructor TCoolDockCustomize.Destroy; 170 begin 171 Master := nil; 172 inherited Destroy; 173 end; 174 175 117 176 initialization 118 177 {$I UCoolDockCustomize.lrs}
Note:
See TracChangeset
for help on using the changeset viewer.