Changeset 16
- Timestamp:
- Jan 8, 2016, 5:09:58 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LinuxBuilder.lpi
r13 r16 49 49 <Filename Value="LinuxBuilder.lpr"/> 50 50 <IsPartOfProject Value="True"/> 51 <UnitName Value="LinuxBuilder"/>52 51 </Unit0> 53 52 <Unit1> … … 57 56 <HasResources Value="True"/> 58 57 <ResourceBaseClass Value="Form"/> 59 <UnitName Value="UFormMain"/>60 58 </Unit1> 61 59 <Unit2> 62 60 <Filename Value="UKConfig.pas"/> 63 61 <IsPartOfProject Value="True"/> 64 <UnitName Value="UKConfig"/>65 62 </Unit2> 66 63 <Unit3> … … 70 67 <HasResources Value="True"/> 71 68 <ResourceBaseClass Value="Form"/> 72 <UnitName Value="UFormList"/>73 69 </Unit3> 74 70 <Unit4> … … 78 74 <HasResources Value="True"/> 79 75 <ResourceBaseClass Value="Form"/> 80 <UnitName Value="UFormLog"/>81 76 </Unit4> 82 77 <Unit5> … … 86 81 <HasResources Value="True"/> 87 82 <ResourceBaseClass Value="Form"/> 88 <UnitName Value="UFormCompare"/>89 83 </Unit5> 90 84 <Unit6> … … 94 88 <HasResources Value="True"/> 95 89 <ResourceBaseClass Value="Form"/> 96 <UnitName Value="UFormSearch"/>97 90 </Unit6> 98 91 </Units> … … 132 125 </Options> 133 126 </Linking> 134 <Other>135 <CompilerMessages>136 <MsgFileName Value=""/>137 </CompilerMessages>138 <CompilerPath Value="$(CompPath)"/>139 </Other>140 127 </CompilerOptions> 141 128 <Debugging> -
trunk/UFormList.lfm
r4 r16 1 1 object FormList: TFormList 2 Left = 3272 Left = 94 3 3 Height = 1193 4 Top = 344 Top = 0 5 5 Width = 1528 6 Caption = ' FormList'6 Caption = 'Options list' 7 7 ClientHeight = 1193 8 8 ClientWidth = 1528 … … 11 11 object Memo1: TMemo 12 12 Left = 8 13 Height = 11 5214 Top = 813 Height = 1128 14 Top = 32 15 15 Width = 1510 16 16 ReadOnly = True … … 26 26 ParentColor = False 27 27 end 28 object CheckBoxAccessible: TCheckBox 29 Left = 12 30 Height = 24 31 Top = 4 32 Width = 146 33 Caption = 'Only accessible' 34 TabOrder = 1 35 end 28 36 end -
trunk/UFormList.pas
r4 r16 13 13 14 14 TFormList = class(TForm) 15 CheckBoxAccessible: TCheckBox; 15 16 Label1: TLabel; 16 17 Memo1: TMemo; … … 28 29 29 30 uses 30 UFormMain ;31 UFormMain, UKConfig; 31 32 32 33 {$R *.lfm} … … 37 38 var 38 39 List: TStringList; 40 I: Integer; 39 41 begin 40 42 try … … 43 45 Memo1.Lines.Clear; 44 46 FormMain.Config.TopNode.SaveToList(List); 47 if CheckBoxAccessible.Checked then 48 for I := List.Count - 1 to 0 do 49 if not TMenuNode(List.Objects[I]).CanBeVisible then 50 List.Delete(I); 45 51 List.Sort; 46 52 Memo1.Lines.Assign(List); -
trunk/UFormMain.lfm
r15 r16 1 1 object FormMain: TFormMain 2 Left = 7032 Left = 596 3 3 Height = 587 4 Top = 2 364 Top = 245 5 5 Width = 857 6 6 ActiveControl = TreeView1 7 7 Caption = 'LinuxBuilder' 8 ClientHeight = 5 618 ClientHeight = 557 9 9 ClientWidth = 857 10 10 Menu = MainMenu1 … … 13 13 OnDestroy = FormDestroy 14 14 OnShow = FormShow 15 LCLVersion = '1. 3'15 LCLVersion = '1.7' 16 16 WindowState = wsMaximized 17 17 object TreeView1: TTreeView 18 18 Left = 8 19 Height = 50 419 Height = 500 20 20 Top = 0 21 21 Width = 520 … … 32 32 Left = 0 33 33 Height = 26 34 Top = 53 534 Top = 531 35 35 Width = 857 36 36 Panels = < … … 46 46 Left = 0 47 47 Height = 26 48 Top = 50 948 Top = 505 49 49 Width = 857 50 50 Align = alBottom … … 90 90 object Memo1: TMemo 91 91 Left = 536 92 Height = 49 892 Height = 494 93 93 Top = 0 94 94 Width = 312 … … 162 162 object MenuItemArch: TMenuItem 163 163 Caption = 'Architecture' 164 object MenuItem12: TMenuItem165 Caption = 'New Item14'166 end167 164 end 168 165 object MenuItem2: TMenuItem -
trunk/UFormMain.pas
r15 r16 35 35 MenuItem10: TMenuItem; 36 36 MenuItemArch: TMenuItem; 37 MenuItem12: TMenuItem;38 37 MenuItemCompareRecent: TMenuItem; 39 38 MenuItem2: TMenuItem; … … 81 80 Config: TConfigMenu; 82 81 procedure Reload; 82 procedure UpdateInterface; 83 83 procedure FocusTreeNode(Node: TMenuNode); 84 84 end; … … 137 137 LastOpenedListOpen.AddItem(Dir); 138 138 Reload; 139 UpdateInterface; 139 140 end; 140 141 … … 230 231 end; 231 232 233 procedure TFormMain.UpdateInterface; 234 begin 235 Caption := Config.BaseDir + ' - ' + Application.Title; 236 end; 237 232 238 procedure TFormMain.FocusTreeNode(Node: TMenuNode); 233 239 var … … 274 280 procedure TFormMain.AExitExecute(Sender: TObject); 275 281 begin 276 Application.Terminate;282 FormMain.Close; 277 283 end; 278 284 -
trunk/UKConfig.pas
r15 r16 33 33 Parent: TExpression; 34 34 function Show: String; virtual; 35 function CanBeTrue: Boolean; virtual; 35 36 procedure GetList(List: TStringList); virtual; 36 37 constructor Create; virtual; … … 44 45 TExpressionVar = class(TExpression) 45 46 Name: string; 46 Node: TMenuNode;47 //Node: TMenuNode; 47 48 Negative: Boolean; 48 49 Compare: TCompareType; 49 50 Value: string; 51 function CompareValue: Boolean; 52 function CanBeTrue: Boolean; override; 50 53 constructor Create; override; 51 54 procedure GetList(List: TStringList); override; … … 88 91 function GetTopNode: TMenuNode; virtual; 89 92 function FindNode(ID: string): TMenuNode; virtual; 93 function CanBeVisible: Boolean; 90 94 property Visible: Boolean read GetVisible; 91 95 end; … … 138 142 { TExpressionVar } 139 143 144 function TExpressionVar.CompareValue: Boolean; 145 begin 146 147 end; 148 149 function TExpressionVar.CanBeTrue: Boolean; 150 begin 151 if Compare = ctNone then begin 152 153 end else 154 if Compare = ctEqual then begin 155 Result := Result and CompareValue; 156 end else 157 if Compare = ctNotEqual then begin 158 Result := Result and not CompareValue; 159 end; 160 // Result := Node.CanBeVisible; 161 end; 162 140 163 constructor TExpressionVar.Create; 141 164 begin … … 176 199 end; 177 200 if Assigned(Parent) then Result := '(' + Result + ')'; 201 end; 202 203 function TExpression.CanBeTrue: Boolean; 204 var 205 I: Integer; 206 begin 207 if ExpOperator = eoAnd then begin 208 Result := True; 209 for I := 0 to Items.Count - 1 do 210 Result := Result and TExpression(Items[I]).CanBeTrue; 211 end else 212 if ExpOperator = eoOr then begin 213 Result := False; 214 for I := 0 to Items.Count - 1 do 215 Result := Result or TExpression(Items[I]).CanBeTrue; 216 end; 178 217 end; 179 218 … … 320 359 I: Integer; 321 360 begin 322 if ID <> '' then List.Add (ID);361 if ID <> '' then List.AddObject(ID, Self); 323 362 for I := 0 to Items.Count - 1 do 324 363 with TMenuNode(Items[I]) do begin … … 403 442 end; 404 443 end; 444 end; 445 446 function TMenuNode.CanBeVisible: Boolean; 447 begin 448 // TODO 449 // Check if it can be selected manually if manual option 450 // Check if it can be selected automatically by other option 451 405 452 end; 406 453
Note:
See TracChangeset
for help on using the changeset viewer.