Changeset 75
- Timestamp:
- Jun 4, 2024, 12:22:49 AM (6 months ago)
- Location:
- trunk
- Files:
-
- 56 added
- 32 deleted
- 10 edited
- 2 copied
- 85 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Compiler/Analyzer.pas
r74 r75 1 unit UAnalyzer; 2 3 {$MODE Delphi} 4 {$MACRO ON} 1 unit Analyzer; 5 2 6 3 interface 7 4 8 5 uses 9 SysUtils, Variants, Classes, Contnrs,10 Dialogs, USourceCodePascal, FileUtil, SpecializedList;6 SysUtils, Variants, Classes, Dialogs, SourceCodePascal, FileUtil, 7 Generics.Collections; 11 8 12 9 type … … 54 51 CodePosition: TPoint; 55 52 SourceCode2: string; 56 Tokens: TObjectList ; // TObjectList<TToken>53 Tokens: TObjectList<TToken>; 57 54 TokenIndex: Integer; 58 55 constructor Create; … … 83 80 end; 84 81 85 { T ListAnalyzer}86 87 T ListAnalyzer = class(TListObject)82 { TAnalyzers } 83 84 TAnalyzers = class(TObjectList<TAnalyzer>) 88 85 function SearchBySysName(Name: string): TAnalyzer; 89 86 procedure LoadToStrings(Strings: TStrings); … … 93 90 SExpectedButFound = 'Expected "%s" but "%s" found.'; 94 91 92 95 93 implementation 96 94 97 { T ListAnalyzer}98 99 function T ListAnalyzer.SearchBySysName(Name: string): TAnalyzer;95 { TAnalyzers } 96 97 function TAnalyzers.SearchBySysName(Name: string): TAnalyzer; 100 98 var 101 99 I: Integer; … … 107 105 end; 108 106 109 procedure T ListAnalyzer.LoadToStrings(Strings: TStrings);107 procedure TAnalyzers.LoadToStrings(Strings: TStrings); 110 108 var 111 109 I: Integer; … … 154 152 constructor TAnalyzer.Create; 155 153 begin 156 Tokens := TObjectList .Create;154 Tokens := TObjectList<TToken>.Create; 157 155 {$IFDEF windows} 158 156 LineEndingChar := LineEnding[1]; … … 164 162 destructor TAnalyzer.Destroy; 165 163 begin 166 Tokens.Free;167 inherited Destroy;164 FreeAndNil(Tokens); 165 inherited; 168 166 end; 169 167 -
trunk/Compiler/Compiler.pas
r74 r75 1 unit UCompiler; 2 3 {$MODE Delphi} 1 unit Compiler; 4 2 5 3 interface 6 4 7 5 uses 8 SysUtils, Variants, Classes, Contnrs, FileUtil, UModularSystem, UCompilerAPI, 9 Dialogs, USourceCodePascal, UProducer, UAnalyzer, SpecializedList, UTarget, 10 fgl; 6 SysUtils, Variants, Classes, FileUtil, ModularSystem, CompilerAPI, 7 Dialogs, SourceCodePascal, Producer, Analyzer, Generics.Collections, Target; 11 8 12 9 type … … 20 17 21 18 TSourceFileManager = class 22 Files: T ListString;19 Files: TStringList; 23 20 function LoadStringFromFile(FileName: string): string; 24 21 procedure SaveStringToFile(FileName: string; Content: string); … … 45 42 public 46 43 AbstractCode: TProgram; 47 ErrorMessages: T FPGObjectList<TErrorMessage>;44 ErrorMessages: TObjectList<TErrorMessage>; 48 45 CompiledFolder: string; 49 46 50 Targets: T ListTarget;51 Analyzers: T ListAnalyzer;52 Convertors: T ListObject;53 Executors: T ListObject;47 Targets: TTargets; 48 Analyzers: TAnalyzers; 49 Convertors: TObjectList<TObject>; 50 Executors: TObjectList<TObject>; 54 51 API: TCompilerAPI; 55 52 TargetFolder: string; … … 73 70 74 71 uses 75 UAnalyzerPascal;72 AnalyzerPascal; 76 73 77 74 resourcestring … … 146 143 constructor TSourceFileManager.Create; 147 144 begin 148 Files := T ListString.Create;145 Files := TStringList.Create; 149 146 end; 150 147 151 148 destructor TSourceFileManager.Destroy; 152 149 begin 153 F iles.Free;154 inherited Destroy;150 FreeAndNil(Files); 151 inherited; 155 152 end; 156 153 … … 168 165 constructor TCompiler.Create; 169 166 begin 170 Targets := T ListTarget.Create;171 Analyzers := T ListAnalyzer.Create;172 Convertors := T ListObject.Create;173 Executors := T ListObject.Create;167 Targets := TTargets.Create; 168 Analyzers := TAnalyzers.Create; 169 Convertors := TObjectList<TObject>.Create; 170 Executors := TObjectList<TObject>.Create; 174 171 API := TCompilerAPI.Create; 175 172 API.Compiler := Self; 176 173 AbstractCode := TProgram.Create; 177 ErrorMessages := T FPGObjectList<TErrorMessage>.Create;174 ErrorMessages := TObjectList<TErrorMessage>.Create; 178 175 CompiledFolder := 'Compiled'; 179 176 ModuleManager := TModuleManager.Create(nil); -
trunk/Compiler/CompilerAPI.pas
r74 r75 1 unit UCompilerAPI; 2 3 {$mode delphi}{$H+} 1 unit CompilerAPI; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UModularSystem, UAnalyzer, UTarget, USourceConvertor,9 SpecializedList, UExecutor;6 Classes, SysUtils, ModularSystem, Analyzer, Target, SourceConvertor, 7 Generics.Collections, Executor; 10 8 11 9 type … … 25 23 end; 26 24 25 27 26 implementation 28 27 29 28 uses 30 UCompiler;29 Compiler; 31 30 32 31 … … 40 39 procedure TCompilerAPI.UnregisterTarget(AClass: TTargetClass); 41 40 begin 42 TCompiler(Compiler).Targets.Remove(TObject(AClass));41 //TCompiler(Compiler).Targets.Remove(TObject(AClass)); 43 42 end; 44 43 … … 69 68 destructor TCompilerAPI.Destroy; 70 69 begin 71 inherited Destroy;70 inherited; 72 71 end; 73 72 -
trunk/Compiler/Executor.pas
r74 r75 1 unit UExecutor; 2 3 {$mode Delphi}{$H+} 1 unit Executor; 4 2 5 3 interface … … 33 31 TExecutorClass = class of TExecutor; 34 32 33 35 34 implementation 36 35 … … 39 38 procedure TExecutor.SetRunState(AValue: TRunState); 40 39 begin 41 if FRunState =AValue then Exit;42 FRunState :=AValue;40 if FRunState = AValue then Exit; 41 FRunState := AValue; 43 42 end; 44 43 -
trunk/Compiler/Modules/ASM8051/ProducerASM8051.pas
r74 r75 1 unit UProducerASM8051; 2 3 {$MODE Delphi} 1 unit ProducerASM8051; 4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 Dialogs, USourceCodePascal, UProducer, Contnrs;7 Dialogs, SourceCodePascal, Producer, Generics.Collections; 10 8 11 9 type … … 37 35 procedure GenerateModule(Module: TSourceModule); 38 36 public 39 AssemblyCode: TObjectList ; // TList<TAssemblerLine>37 AssemblyCode: TObjectList<TAssemblerLine>; 40 38 procedure AssignToStringList(Target: TStringList); override; 41 39 procedure Produce(Module: TSourceModule); override; … … 107 105 constructor TProducerAsm8051.Create; 108 106 begin 109 AssemblyCode := TObjectList .Create;107 AssemblyCode := TObjectList<TAssemblerLine>.Create; 110 108 {$IFDEF Windows} 111 109 CompilerPath := 'c:\ASM8051\ASM51.EXE'; -
trunk/Compiler/Modules/ASM8051/TargetASM8051.pas
r74 r75 1 unit UTargetASM8051; 2 3 {$mode Delphi}{$H+} 1 unit TargetASM8051; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget;6 Classes, SysUtils, Target; 9 7 10 8 type … … 16 14 end; 17 15 16 18 17 implementation 19 18 … … 22 21 constructor TTargetASM8051.Create; 23 22 begin 24 inherited Create;23 inherited; 25 24 SysName := 'ASM8051'; 26 25 Name := 'ASM8051'; -
trunk/Compiler/Modules/Brainfuck/ModuleBrainfuck.pas
r74 r75 1 unit UModuleBrainfuck; 2 3 {$mode delphi}{$H+} 1 unit ModuleBrainfuck; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UModularSystem, USourceConvertor;6 Classes, SysUtils, ModularSystem, SourceConvertor; 9 7 10 8 type … … 42 40 43 41 uses 44 UCompilerAPI, USourceCodePascal;42 CompilerAPI, SourceCodePascal; 45 43 46 44 resourcestring … … 56 54 constructor TConvertorBFToPascal.Create; 57 55 begin 58 inherited Create;56 inherited; 59 57 Name := 'BFToPascal'; 60 58 InputType := TSourceBrainfuck; … … 71 69 constructor TConvertorTextToBF.Create; 72 70 begin 73 inherited Create;71 inherited; 74 72 Name := 'TextToBF'; 75 73 InputType := TSourceFileLink; -
trunk/Compiler/Modules/Delphi/ModuleDelphi.pas
r74 r75 1 unit UModuleDelphi; 2 3 {$mode Delphi}{$H+} 1 unit ModuleDelphi; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget, UExecutor, UModularSystem;6 Classes, SysUtils, Target, Executor, ModularSystem; 9 7 10 8 type … … 28 26 29 27 uses 30 UProducerDelphi, UCompilerAPI;28 ProducerDelphi, CompilerAPI; 31 29 32 30 resourcestring … … 38 36 begin 39 37 inherited; 40 Name:= 'Delphi';38 Identification := 'Delphi'; 41 39 Title := SDelphi; 42 40 end; -
trunk/Compiler/Modules/Delphi/ProducerDelphi.pas
r74 r75 1 unit UProducerDelphi; 2 3 {$MODE Delphi} 1 unit ProducerDelphi; 4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 Dialogs, USourceCodePascal, UProducer, StrUtils, USourceConvertor;7 Dialogs, SourceCodePascal, Producer, StrUtils, SourceConvertor; 10 8 11 9 type … … 16 14 private 17 15 Producer: TProducer; 18 procedure GenerateUses(UsedModules: TUsedModule List);16 procedure GenerateUses(UsedModules: TUsedModules); 19 17 procedure GenerateModule(Module: TSourceModule); 20 18 procedure GenerateUnit(Module: TSourceModule); … … 22 20 procedure GeneratePackage(Module: TSourceModule); 23 21 procedure GenerateType(AType: TType; AssignSymbol: Char = ':'); 24 procedure GenerateTypes(Types: TType List);22 procedure GenerateTypes(Types: TTypes); 25 23 procedure GenerateCommonBlockInterface(CommonBlock: TCommonBlock; 26 24 LabelPrefix: string); 27 25 procedure GenerateCommonBlockImplementation(CommonBlock: TCommonBlock; 28 26 LabelPrefix: string); 29 procedure GenerateFunctions(Functions: TFunction List);27 procedure GenerateFunctions(Functions: TFunctions); 30 28 procedure GenerateFunction(AFunction: TFunction); 31 29 procedure GenerateFunctionHead(AFunction: TFunction); 32 procedure GenerateConstants(Constants: TConstant List);30 procedure GenerateConstants(Constants: TConstants); 33 31 procedure GenerateConstant(Constant: TConstant); 34 32 procedure GenerateBeginEnd(BeginEnd: TBeginEnd); 35 procedure GenerateVariableList(Variables: TVariable List);33 procedure GenerateVariableList(Variables: TVariables); 36 34 procedure GenerateVariable(Variable: TVariable); 37 35 procedure GenerateCommand(Command: TCommand); … … 49 47 end; 50 48 49 51 50 implementation 52 51 … … 72 71 destructor TProducerPascal.Destroy; 73 72 begin 74 Producer.Free;73 FreeAndNil(Producer); 75 74 inherited; 76 75 end; 77 76 78 procedure TProducerPascal.GenerateUses(UsedModules: TUsedModule List);77 procedure TProducerPascal.GenerateUses(UsedModules: TUsedModules); 79 78 var 80 79 I: Integer; … … 142 141 procedure TProducerPascal.GenerateLibrary(Module: TSourceModule); 143 142 begin 144 145 143 end; 146 144 147 145 procedure TProducerPascal.GeneratePackage(Module: TSourceModule); 148 146 begin 149 150 147 end; 151 148 … … 192 189 end; 193 190 194 procedure TProducerPascal.GenerateTypes(Types: TType List);191 procedure TProducerPascal.GenerateTypes(Types: TTypes); 195 192 var 196 193 I: Integer; … … 231 228 end; 232 229 233 procedure TProducerPascal.GenerateFunctions(Functions: TFunction List);230 procedure TProducerPascal.GenerateFunctions(Functions: TFunctions); 234 231 var 235 232 I: Integer; … … 280 277 end; 281 278 282 procedure TProducerPascal.GenerateConstants(Constants: TConstant List);279 procedure TProducerPascal.GenerateConstants(Constants: TConstants); 283 280 var 284 281 I: Integer; … … 322 319 end; 323 320 324 procedure TProducerPascal.GenerateVariableList(Variables: TVariable List);321 procedure TProducerPascal.GenerateVariableList(Variables: TVariables); 325 322 var 326 323 I: Integer; -
trunk/Compiler/Modules/GCC/ModuleGCC.pas
r74 r75 1 unit UModuleGCC; 2 3 {$mode delphi}{$H+} 1 unit ModuleGCC; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UModularSystem, UProducerGCC, UTargetGCC, UCompilerAPI;6 Classes, SysUtils, ModularSystem, ProducerGCC, TargetGCC, CompilerAPI; 9 7 10 8 type … … 13 11 14 12 TModuleGCC = class(TModule) 13 public 15 14 Target: TTargetGCC; 16 15 constructor Create(AOwner: TComponent); override; … … 31 30 begin 32 31 inherited; 33 Name:= 'GCC';32 Identification := 'GCC'; 34 33 Title := SGCC; 35 34 end; -
trunk/Compiler/Modules/GCC/ProducerGCC.pas
r74 r75 1 unit UProducerGCC; 2 3 {$MODE Delphi} 1 unit ProducerGCC; 4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 Dialogs, StdCtrls, USourceCode, UProducer, StrUtils;7 Dialogs, StdCtrls, SourceCodePascal, Producer, StrUtils; 10 8 11 9 type … … 19 17 procedure Emit(AText: string); 20 18 procedure EmitLn(AText: string = ''); 21 procedure GenerateUses(UsedModules: TUsedModule List);19 procedure GenerateUses(UsedModules: TUsedModules); 22 20 procedure GenerateModule(Module: TSourceModule); 23 21 procedure GenerateCommonBlock(CommonBlock: TCommonBlock; 24 22 LabelPrefix: string); 25 23 procedure GenerateType(AType: TType); 26 procedure GenerateTypes(Types: TType List);24 procedure GenerateTypes(Types: TTypes); 27 25 procedure GenerateProgram(ProgramBlock: TProgram); 28 procedure GenerateFunctions(Functions: TFunction List;26 procedure GenerateFunctions(Functions: TFunctions; 29 27 Prefix: string = ''); 30 28 procedure GenerateBeginEnd(BeginEnd: TBeginEnd); 31 procedure GenerateVariableList(VariableList: TVariable List);29 procedure GenerateVariableList(VariableList: TVariables); 32 30 procedure GenerateVariable(Variable: TVariable); 33 31 procedure GenerateCommand(Command: TCommand); … … 113 111 end; 114 112 115 procedure TProducerGCCC.GenerateUses(UsedModules: TUsedModule List);113 procedure TProducerGCCC.GenerateUses(UsedModules: TUsedModules); 116 114 var 117 115 I: Integer; … … 155 153 end; 156 154 157 procedure TProducerGCCC.GenerateFunctions(Functions: TFunction List;158 Prefix: string = '');155 procedure TProducerGCCC.GenerateFunctions(Functions: TFunctions; Prefix: string 156 ); 159 157 var 160 158 I: Integer; … … 202 200 end; 203 201 204 procedure TProducerGCCC.GenerateVariableList(VariableList: TVariable List);202 procedure TProducerGCCC.GenerateVariableList(VariableList: TVariables); 205 203 var 206 204 I: Integer; … … 361 359 end; 362 360 363 procedure TProducerGCCC.GenerateTypes(Types: TType List);361 procedure TProducerGCCC.GenerateTypes(Types: TTypes); 364 362 var 365 363 I: Integer; -
trunk/Compiler/Modules/GCC/TargetGCC.pas
r74 r75 1 unit UTargetGCC; 2 3 {$mode Delphi}{$H+} 1 unit TargetGCC; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget;6 Classes, SysUtils, Target; 9 7 10 8 type … … 22 20 constructor TTargetGCC.Create; 23 21 begin 24 inherited Create;22 inherited; 25 23 SysName := 'GCC'; 26 24 Name := 'GCC'; -
trunk/Compiler/Modules/Interpretter/ModuleInterpretter.pas
r74 r75 1 unit UModuleInterpretter; 2 3 {$mode Delphi}{$H+} 1 unit ModuleInterpretter; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget, UExecutor, USourceCodePascal, Dialogs,9 SpecializedList, UModularSystem;6 Classes, SysUtils, Target, Executor, SourceCodePascal, Dialogs, 7 Generics.Collections, ModularSystem; 10 8 11 9 type … … 30 28 function Evaluate(Expression: TExpression): TValue; 31 29 public 32 Variables: T ListObject;30 Variables: TObjectList<TVariable>; 33 31 procedure Run; override; 34 32 constructor Create; … … 47 45 48 46 uses 49 UCompiler, UCompilerAPI;47 Compiler, CompilerAPI; 50 48 51 49 resourcestring … … 58 56 begin 59 57 inherited; 60 Name:= 'Interpretter';58 Identification := 'Interpretter'; 61 59 Title := 'Interpretter'; 62 60 Version := '0.1'; … … 187 185 constructor TExecutorInterpretter.Create; 188 186 begin 189 Variables := T ListObject.Create;187 Variables := TVariables.Create; 190 188 end; 191 189 192 190 destructor TExecutorInterpretter.Destroy; 193 191 begin 194 Variables.Free;195 inherited Destroy;192 FreeAndnil(Variables); 193 inherited; 196 194 end; 197 195 -
trunk/Compiler/Modules/Pascal/AnalyzerPascal.pas
r74 r75 1 unit UAnalyzerPascal; 2 3 {$mode delphi} 1 unit AnalyzerPascal; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UAnalyzer, USourceCodePascal, Dialogs, USourceConvertor;6 Classes, SysUtils, Analyzer, SourceCodePascal, Dialogs, SourceConvertor; 9 7 10 8 type … … 16 14 public 17 15 Parser: TAnalyzer; 18 function DebugExpressions(List: T ListExpression): string;16 function DebugExpressions(List: TExpressions): string; 19 17 function ParseFile(Name: string): Boolean; 20 18 function ParseWhileDo(var WhileDo: TWhileDo; SourceCode: TCommonBlock): Boolean; 21 19 function ParseExpression(SourceCode: TExpression): Boolean; 22 20 function ParseExpressionParenthases(SourceCode: TExpression; 23 Expressions: T ListExpression): Boolean;21 Expressions: TExpressions): Boolean; 24 22 function ParseExpressionOperator(SourceCode: TExpression; 25 Expressions: T ListExpression): Boolean;23 Expressions: TExpressions): Boolean; 26 24 function ParseExpressionRightValue(SourceCode: TExpression; 27 Expressions: T ListExpression): Boolean;25 Expressions: TExpressions): Boolean; 28 26 function ParseExpressionFunctionCall(SourceCode: TExpression; 29 Expressions: T ListExpression; var Func: TFunctionCall): Boolean;30 function ParseUses(SourceCode: TUsedModule List; AExported: Boolean): Boolean;31 function ParseUsesItem(SourceCode: TUsedModule List; AExported: Boolean): Boolean;27 Expressions: TExpressions; var Func: TFunctionCall): Boolean; 28 function ParseUses(SourceCode: TUsedModules; AExported: Boolean): Boolean; 29 function ParseUsesItem(SourceCode: TUsedModules; AExported: Boolean): Boolean; 32 30 function ParseModule(ProgramCode: TProgram): TSourceModule; 33 31 function ParseUnit(var SourceCode: TModuleUnit; ProgramCode: TProgram): Boolean; … … 40 38 function ParseCommand(SourceCode: TCommonBlock): TCommand; 41 39 function ParseBeginEnd(var BeginEnd: TBeginEnd; SourceCode: TCommonBlock): Boolean; 42 function ParseFunction(SourceCode: TFunction List; Exported: Boolean = False): Boolean;40 function ParseFunction(SourceCode: TFunctions; Exported: Boolean = False): Boolean; 43 41 procedure ParseFunctionParameters(SourceCode: TFunction; ValidateParams: Boolean = False); 44 42 function ParseIfThenElse(var IfThenElse: TIfThenElse; SourceCode: TCommonBlock): Boolean; … … 46 44 function ParseAssigment(var Assignment: TAssignment; SourceCode: TCommonBlock): Boolean; 47 45 function ParseFunctionCall(var Call: TFunctionCall; SourceCode: TCommonBlock): Boolean; 48 function ParseVariableList(SourceCode: TVariable List; Exported: Boolean = False): Boolean;49 procedure ParseVariable(SourceCode: TVariable List; Exported: Boolean = False);50 function ParseConstantList(SourceCode: TConstant List; Exported: Boolean = False): Boolean;51 function ParseConstant(SourceCode: TConstant List; Exported: Boolean = False): Boolean;52 function ParseType(TypeList: TType List; var NewType: TType; ExpectName: Boolean = True;46 function ParseVariableList(SourceCode: TVariables; Exported: Boolean = False): Boolean; 47 procedure ParseVariable(SourceCode: TVariables; Exported: Boolean = False); 48 function ParseConstantList(SourceCode: TConstants; Exported: Boolean = False): Boolean; 49 function ParseConstant(SourceCode: TConstants; Exported: Boolean = False): Boolean; 50 function ParseType(TypeList: TTypes; var NewType: TType; ExpectName: Boolean = True; 53 51 AssignSymbol: string = '='; ForwardDeclaration: Boolean = False): Boolean; 54 52 function ParseTypeParameters(var NewType: TType): Boolean; … … 86 84 SNotRecordOrClass = '"%s" not record or class'; 87 85 86 88 87 implementation 89 88 90 89 { TAnalyzerPascal } 91 90 92 function TAnalyzerPascal.DebugExpressions(List: T ListExpression): string;91 function TAnalyzerPascal.DebugExpressions(List: TExpressions): string; 93 92 var 94 93 I: Integer; … … 152 151 function TAnalyzerPascal.ParseExpression(SourceCode: TExpression): Boolean; 153 152 var 154 Expressions: T ListExpression;153 Expressions: TExpressions; 155 154 I: Integer; 156 155 II: Integer; … … 158 157 (* with Parser do 159 158 try 160 Expressions := T ListExpression.Create;159 Expressions := TExpressions.Create; 161 160 Expressions.Add(TExpression.Create); 162 161 with SourceCode do begin … … 206 205 207 206 function TAnalyzerPascal.ParseExpressionParenthases(SourceCode: TExpression; 208 Expressions: T ListExpression): Boolean;207 Expressions: TExpressions): Boolean; 209 208 var 210 209 NewExpression: TExpression; … … 230 229 231 230 function TAnalyzerPascal.ParseExpressionOperator(SourceCode: TExpression; 232 Expressions: T ListExpression): Boolean;231 Expressions: TExpressions): Boolean; 233 232 begin 234 233 (*if IsOperator(NextToken) then begin … … 241 240 242 241 function TAnalyzerPascal.ParseExpressionRightValue(SourceCode: TExpression; 243 Expressions: T ListExpression): Boolean;242 Expressions: TExpressions): Boolean; 244 243 var 245 244 UseType: TType; … … 348 347 end; 349 348 if Assigned(NewExpression) then begin 350 TExpression(Expressions.Last).SubItems .Last:= NewExpression;349 TExpression(Expressions.Last).SubItems[TExpression(Expressions.Last).SubItems.Count - 1] := NewExpression; 351 350 with TExpression(Expressions.Items[Expressions.Add(TExpression.Create)]) do 352 351 begin 353 352 CommonBlock := SourceCode.CommonBlock; 354 SubItems .First:= NewExpression;353 SubItems[0] := NewExpression; 355 354 end; 356 355 Result := True; … … 364 363 365 364 function TAnalyzerPascal.ParseExpressionFunctionCall(SourceCode: TExpression; 366 Expressions: T ListExpression; var Func: TFunctionCall): Boolean;365 Expressions: TExpressions; var Func: TFunctionCall): Boolean; 367 366 var 368 367 UseFunction: TFunction; … … 666 665 { TParserParseFunctionList } 667 666 668 function TAnalyzerPascal.ParseFunction(SourceCode: TFunction List;667 function TAnalyzerPascal.ParseFunction(SourceCode: TFunctions; 669 668 Exported: Boolean = False): Boolean; 670 669 var … … 796 795 while (NextToken <> ')') and (NextTokenType <> ttEndOfFile) do begin 797 796 // while IsIdentificator(NextCode) do begin 798 with TParameter List(Parameters) do begin797 with TParameters(Parameters) do begin 799 798 VariableName := ReadToken; 800 799 if VariableName = 'var' then begin … … 948 947 { TParserVariableList } 949 948 950 function TAnalyzerPascal.ParseVariableList(SourceCode: TVariable List; Exported: Boolean = False): Boolean;949 function TAnalyzerPascal.ParseVariableList(SourceCode: TVariables; Exported: Boolean = False): Boolean; 951 950 var 952 951 NewValueType: TType; … … 968 967 { TParserVariable } 969 968 970 procedure TAnalyzerPascal.ParseVariable(SourceCode: TVariable List; Exported: Boolean = False);969 procedure TAnalyzerPascal.ParseVariable(SourceCode: TVariables; Exported: Boolean = False); 971 970 var 972 971 VariableName: string; … … 1016 1015 { TParserConstantList } 1017 1016 1018 function TAnalyzerPascal.ParseConstantList(SourceCode: TConstant List; Exported: Boolean = False): Boolean;1017 function TAnalyzerPascal.ParseConstantList(SourceCode: TConstants; Exported: Boolean = False): Boolean; 1019 1018 begin 1020 1019 with Parser do … … 1030 1029 end; 1031 1030 1032 function TAnalyzerPascal.ParseConstant(SourceCode: TConstant List;1031 function TAnalyzerPascal.ParseConstant(SourceCode: TConstants; 1033 1032 Exported: Boolean): Boolean; 1034 1033 var … … 1082 1081 { TParserType } 1083 1082 1084 function TAnalyzerPascal.ParseType(TypeList: TType List; var NewType: TType; ExpectName: Boolean = True;1083 function TAnalyzerPascal.ParseType(TypeList: TTypes; var NewType: TType; ExpectName: Boolean = True; 1085 1084 AssignSymbol: string = '='; ForwardDeclaration: Boolean = False): Boolean; 1086 1085 begin … … 1471 1470 { TParserUsedModuleList } 1472 1471 1473 function TAnalyzerPascal.ParseUses(SourceCode: TUsedModule List; AExported: Boolean): Boolean;1472 function TAnalyzerPascal.ParseUses(SourceCode: TUsedModules; AExported: Boolean): Boolean; 1474 1473 var 1475 1474 NewUsedModule: TUsedModule; … … 1488 1487 end; 1489 1488 1490 function TAnalyzerPascal.ParseUsesItem(SourceCode: TUsedModule List;1489 function TAnalyzerPascal.ParseUsesItem(SourceCode: TUsedModules; 1491 1490 AExported: Boolean): Boolean; 1492 1491 begin -
trunk/Compiler/Modules/Pascal/ModulePascal.pas
r74 r75 1 unit UModulePascal; 2 3 {$mode delphi}{$H+} 1 unit ModulePascal; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UModularSystem, UAnalyzerPascal;6 Classes, SysUtils, ModularSystem, AnalyzerPascal; 9 7 10 8 type … … 24 22 25 23 uses 26 UCompilerAPI;24 CompilerAPI; 27 25 28 26 { TModulePascal } … … 31 29 begin 32 30 inherited; 33 Name:= 'Pascal';31 Identification := 'Pascal'; 34 32 Title := 'Pascal'; 35 33 Version := '0.1'; … … 38 36 destructor TModulePascal.Destroy; 39 37 begin 40 inherited Destroy;38 inherited; 41 39 end; 42 40 -
trunk/Compiler/Modules/Pascal/SourceCodePascal.pas
r74 r75 1 unit USourceCodePascal; 2 3 {$MODE Delphi} 4 {$MACRO ON} 1 unit SourceCodePascal; 5 2 6 3 interface 7 4 8 5 uses 9 SysUtils, Variants, Classes, Dialogs, SpecializedList, USourceConvertor;6 SysUtils, Variants, Classes, Dialogs, Generics.Collections, SourceConvertor; 10 7 11 8 type … … 22 19 23 20 TCommonBlock = class; 24 TType List= class;25 TConstant List= class;26 TVariable List= class;27 TFunction List= class;28 T ListExpression= class;21 TTypes = class; 22 TConstants = class; 23 TVariables = class; 24 TFunctions = class; 25 TExpressions = class; 29 26 TExpression = class; 30 27 TFunction = class; … … 40 37 41 38 TContext = class 42 43 end; 44 45 TCommandList = class; 39 end; 40 41 TCommands = class; 46 42 47 43 TCommand = class … … 57 53 end; 58 54 59 // TListExpression = TGObjectList<Integer, TExpression> 60 TListExpression = class(TListObject); 55 { TExpressions } 56 57 TExpressions = class(TObjectList<TExpression>) 58 procedure Assign(Source: TExpressions); 59 end; 61 60 62 61 { TFunctionCall } … … 64 63 TFunctionCall = class(TCommand) 65 64 FunctionRef: TFunction; 66 ParameterExpression: T ListExpression;65 ParameterExpression: TExpressions; 67 66 constructor Create; 68 67 destructor Destroy; override; … … 70 69 71 70 TBeginEnd = class(TCommand) 72 Commands: TCommand List;71 Commands: TCommands; 73 72 CommonBlock: TCommonBlock; 74 73 procedure Clear; … … 90 89 91 90 TRepeatUntil = class(TCommand) 92 Block: TCommand List;91 Block: TCommands; 93 92 Condition: TExpression; 94 93 end; … … 120 119 end; 121 120 122 // TListCaseOfEndBranche = TGObjectList<Integer, TCaseOfEndBranche> 123 TListCaseOfEndBranche = class(TListObject); 121 TListCaseOfEndBranche = class(TObjectList<TCaseOfEndBranche>); 124 122 125 123 TCaseOfEnd = class(TCommand) … … 132 130 133 131 TTryFinally = class(TCommand) 134 Block: TCommand List;135 FinallyBlock: TCommand List;132 Block: TCommands; 133 FinallyBlock: TCommands; 136 134 end; 137 135 138 136 TTryExcept = class(TCommand) 139 Block: TCommandList; 140 ExceptBlock: TCommandList; 141 end; 142 143 // TCommandList = TGObjectList<Integer, TCommand> 144 TCommandList = class(TListObject); 137 Block: TCommands; 138 ExceptBlock: TCommands; 139 end; 140 141 TCommands = class(TObjectList<TCommand>); 145 142 146 143 TCommonBlockSection = (cbsVariable, cbsType, cbsConstant); … … 150 147 Parent: TCommonBlock; 151 148 ParentModule: TSourceModule; 152 Constants: TConstant List;153 Types: TType List;154 Variables: TVariable List;155 Functions: TFunction List;156 Order: T ListObject;149 Constants: TConstants; 150 Types: TTypes; 151 Variables: TVariables; 152 Functions: TFunctions; 153 Order: TObjectList<TObject>; 157 154 Code: TBeginEnd; 158 155 constructor Create; virtual; … … 166 163 ForwardDeclared: Boolean; 167 164 Internal: Boolean; 168 Parent: TType List;165 Parent: TTypes; 169 166 Name: string; 170 167 Size: Integer; … … 172 169 Exported: Boolean; 173 170 Visibility: TTypeVisibility; 174 Parameters: TType List;171 Parameters: TTypes; 175 172 procedure Assign(Source: TType); 176 173 constructor Create; … … 178 175 end; 179 176 180 // TListType = TGObjectList<Integer, TType> 181 TListType = class(TListObject); 182 183 TTypeList = class(TListType) 177 { TTypes } 178 179 TTypes = class(TObjectList<TType>) 184 180 Parent: TCommonBlock; 185 181 function Search(Name: string; Exported: Boolean = False): TType; 186 182 destructor Destroy; override; 183 function AddNew: TType; 187 184 end; 188 185 … … 214 211 end; 215 212 216 // TListEnumItem = TGObjectList<Integer, TEnumItem> 217 TListEnumItem = class(TListObject); 213 TEnumItems = class(TObjectList<TEnumItem>); 218 214 219 215 TTypeEnumeration = class(TType) 220 Items: T ListEnumItem;216 Items: TEnumItems; 221 217 constructor Create; 222 218 destructor Destroy; override; … … 239 235 end; 240 236 241 // TListConstant = TGObjectList<Integer, TConstant> 242 TListConstant = class(TListObject); 243 244 TConstantList = class(TListConstant) 237 TConstants = class(TObjectList<TConstant>) 245 238 Parent: TCommonBlock; 246 239 function Search(Name: string): TConstant; … … 256 249 end; 257 250 258 // TListVariable = TGObjectList<Integer, TVariable> 259 TListVariable = class(TListObject); 260 261 TVariableList = class(TListVariable) 251 TVariables = class(TObjectList<TVariable>) 262 252 Parent: TCommonBlock; 263 253 function Search(Name: string; Exported: Boolean = False): TVariable; … … 268 258 end; 269 259 270 // TListParameter = TGObjectList<Integer, TParameter> 271 TListParameter = class(TListObject); 272 273 TParameterList = class(TListParameter) 260 TParameters = class(TObjectList<TParameter>) 274 261 Parent: TFunction; 275 262 function Search(Name: string): TParameter; … … 288 275 Value: TValue; 289 276 OperatorName: string; 290 SubItems: T ListExpression;277 SubItems: TExpressions; 291 278 Associated: Boolean; 292 279 Braces: Boolean; … … 302 289 Internal: Boolean; 303 290 FunctionType: TFunctionType; 304 Parameters: TParameter List;291 Parameters: TParameters; 305 292 ResultType: TType; 306 293 Exported: Boolean; … … 310 297 end; 311 298 312 // TListFunction = TGObjectList<Integer, TFunction> 313 TListFunction = class(TListObject); 314 315 TFunctionList = class(TListFunction) 299 { TFunctions } 300 301 TFunctions = class(TObjectList<TFunction>) 316 302 Parent: TCommonBlock; 317 303 function Search(Name: string; Exported: Boolean = False): TFunction; 318 304 destructor Destroy; override; 305 function AddNew: TFunction; 319 306 end; 320 307 … … 326 313 end; 327 314 328 // TListUsedModule = TGObjectList<Integer, TUsedModule> 329 TListUsedModule = class(TListObject); 330 331 TUsedModuleList = class(TListUsedModule) 315 TUsedModules = class(TObjectList<TUsedModule>) 332 316 ParentModule: TSourceModule; 333 317 end; … … 340 324 Name: string; 341 325 TargetFile: string; 342 UsedModules: TUsedModule List;326 UsedModules: TUsedModules; 343 327 Body: TCommonBlock; 344 328 Internal: Boolean; … … 374 358 end; 375 359 376 // TListModule = TGObjectList<Integer, TModule> 377 TListModule = class(TListObject); 378 379 { TModuleList } 380 381 TModuleList = class(TListModule) 360 { TModules } 361 362 TModules = class(TObjectList<TSourceModule>) 382 363 function Search(Name: string): TSourceModule; 383 364 end; … … 387 368 TProgram = class(TSource) 388 369 Device: TDevice; 389 Modules: TModule List;370 Modules: TModules; 390 371 MainModule: TSourceModule; 391 372 procedure Clear; … … 408 389 SAssignmentError = 'Assignment error'; 409 390 391 410 392 implementation 411 393 … … 415 397 begin 416 398 inherited; 417 Parameters := TParameter List.Create;399 Parameters := TParameters.Create; 418 400 Parameters.Parent := Self; 419 401 //ResultType := TType.Create; … … 422 404 destructor TFunction.Destroy; 423 405 begin 424 Parameters.Free;425 // ResultType.Free;406 FreeAndNil(Parameters); 407 // FreeAndNil(ResultType); 426 408 inherited; 427 409 end; … … 438 420 begin 439 421 Device := TDevice.Create; 440 Modules := TModule List.Create;422 Modules := TModules.Create; 441 423 end; 442 424 443 425 destructor TProgram.Destroy; 444 426 begin 445 Modules.Free; 446 Device.Free; 447 end; 448 449 { TConstant } 450 451 452 { TConstantList } 453 454 destructor TConstantList.Destroy; 455 begin 456 inherited; 457 end; 458 459 function TConstantList.Search(Name: string): TConstant; 427 FreeAndNil(Modules); 428 FreeAndNil(Device); 429 end; 430 431 { TConstants } 432 433 destructor TConstants.Destroy; 434 begin 435 inherited; 436 end; 437 438 function TConstants.Search(Name: string): TConstant; 460 439 var 461 440 I: Integer; … … 476 455 begin 477 456 inherited; 478 UsedModules := TUsedModule List.Create;457 UsedModules := TUsedModules.Create; 479 458 UsedModules.ParentModule := Self; 480 459 Body := TCommonBlock.Create; … … 484 463 destructor TSourceModule.Destroy; 485 464 begin 486 Body.Free;487 UsedModules.Free;465 FreeAndNil(Body); 466 FreeAndNil(UsedModules); 488 467 inherited; 489 468 end; … … 504 483 constructor TCommonBlock.Create; 505 484 begin 506 Constants := TConstant List.Create;485 Constants := TConstants.Create; 507 486 Constants.Parent := Self; 508 Types := TType List.Create;487 Types := TTypes.Create; 509 488 Types.Parent := Self; 510 Variables := TVariable List.Create;489 Variables := TVariables.Create; 511 490 Variables.Parent := Self; 512 Functions := TFunction List.Create;491 Functions := TFunctions.Create; 513 492 Functions.Parent := Self; 514 493 Code := TBeginEnd.Create; 515 494 Code.Parent := Self; 516 495 Code.CommonBlock := Self; 517 Order := T ListObject.Create;496 Order := TObjectList<TObject>.Create; 518 497 Order.OwnsObjects := False; 519 498 end; … … 521 500 destructor TCommonBlock.Destroy; 522 501 begin 523 Constants.Free; 524 Types.Free; 525 Variables.Free; 526 Functions.Free; 527 Code.Free; 528 Order.Free; 529 inherited; 530 end; 531 532 { TTypeList } 533 534 destructor TTypeList.Destroy; 535 begin 536 inherited; 537 end; 538 539 function TTypeList.Search(Name: string; Exported: Boolean = False): TType; 502 FreeAndNil(Constants); 503 FreeAndNil(Types); 504 FreeAndNil(Variables); 505 FreeAndNil(Functions); 506 FreeAndNil(Code); 507 FreeAndNil(Order); 508 inherited; 509 end; 510 511 { TTypes } 512 513 destructor TTypes.Destroy; 514 begin 515 inherited; 516 end; 517 518 function TTypes.AddNew: TType; 519 begin 520 Result := TType.Create; 521 Add(Result); 522 end; 523 524 function TTypes.Search(Name: string; Exported: Boolean = False): TType; 540 525 var 541 526 I: Integer; … … 557 542 end; 558 543 559 { TVariable List}560 561 destructor TVariable List.Destroy;562 begin 563 inherited; 564 end; 565 566 function TVariable List.Search(Name: string; Exported: Boolean = False): TVariable;544 { TVariables } 545 546 destructor TVariables.Destroy; 547 begin 548 inherited; 549 end; 550 551 function TVariables.Search(Name: string; Exported: Boolean = False): TVariable; 567 552 var 568 553 I: Integer; … … 602 587 end; 603 588 604 { TFunctionList } 605 606 destructor TFunctionList.Destroy; 607 begin 608 inherited; 609 end; 610 611 function TFunctionList.Search(Name: string; Exported: Boolean): TFunction; 589 { TFunctions } 590 591 destructor TFunctions.Destroy; 592 begin 593 inherited; 594 end; 595 596 function TFunctions.AddNew: TFunction; 597 begin 598 Result := TFunction.Create; 599 Add(Result); 600 end; 601 602 function TFunctions.Search(Name: string; Exported: Boolean): TFunction; 612 603 var 613 604 I: Integer; … … 631 622 constructor TExpression.Create; 632 623 begin 633 SubItems := T ListExpression.Create;624 SubItems := TExpressions.Create; 634 625 SubItems.Count := 2; 635 626 SubItems.OwnsObjects := False; … … 638 629 destructor TExpression.Destroy; 639 630 begin 640 SubItems.Free;631 FreeAndNil(SubItems); 641 632 inherited; 642 633 end; … … 654 645 end; 655 646 656 { TParameter List}657 658 destructor TParameter List.Destroy;659 begin 660 inherited; 661 end; 662 663 function TParameter List.Search(Name: string): TParameter;647 { TParameters } 648 649 destructor TParameters.Destroy; 650 begin 651 inherited; 652 end; 653 654 function TParameters.Search(Name: string): TParameter; 664 655 var 665 656 I: Integer; … … 675 666 procedure TBeginEnd.Clear; 676 667 begin 677 678 668 end; 679 669 … … 681 671 begin 682 672 inherited; 683 Commands := TCommand List.Create;673 Commands := TCommands.Create; 684 674 end; 685 675 686 676 destructor TBeginEnd.Destroy; 687 677 begin 688 Commands.Free;678 FreeAndNil(Commands); 689 679 inherited; 690 680 end; … … 699 689 destructor TAssignment.Destroy; 700 690 begin 701 Source.Free; 702 inherited; 691 FreeAndNil(Source); 692 inherited; 693 end; 694 695 { TExpressions } 696 697 procedure TExpressions.Assign(Source: TExpressions); 698 var 699 I: Integer; 700 begin 701 while Count > Source.Count do Delete(Count - 1); 702 while Count < Source.Count do Add(TExpression.Create); 703 for I := 0 to Count - 1 do 704 Items[I].Assign(Source[I]); 703 705 end; 704 706 … … 713 715 destructor TWhileDo.Destroy; 714 716 begin 715 Condition.Free;716 Command.Free;717 FreeAndNil(Condition); 718 FreeAndNil(Command); 717 719 inherited; 718 720 end; … … 728 730 destructor TCaseOfEnd.Destroy; 729 731 begin 730 Branches.Free;732 FreeAndNil(Branches); 731 733 inherited; 732 734 end; … … 741 743 destructor TIfThenElse.Destroy; 742 744 begin 743 Condition.Free;744 inherited Destroy;745 FreeAndNil(Condition); 746 inherited; 745 747 end; 746 748 … … 750 752 begin 751 753 inherited; 752 ParameterExpression := T ListExpression.Create;754 ParameterExpression := TExpressions.Create; 753 755 end; 754 756 755 757 destructor TFunctionCall.Destroy; 756 758 begin 757 ParameterExpression.Free;758 inherited Destroy;759 FreeAndNil(ParameterExpression); 760 inherited; 759 761 end; 760 762 … … 770 772 destructor TForToDo.Destroy; 771 773 begin 772 Start.Free;773 Stop.Free;;774 inherited Destroy;774 FreeAndNil(Start); 775 FreeAndNil(Stop); 776 inherited; 775 777 end; 776 778 … … 785 787 destructor TTypeRecord.Destroy; 786 788 begin 787 CommonBlock.Free;788 inherited Destroy;789 end; 790 791 { TModule List}792 793 function TModule List.Search(Name: string): TSourceModule;789 FreeAndNil(CommonBlock); 790 inherited; 791 end; 792 793 { TModules } 794 795 function TModules.Search(Name: string): TSourceModule; 794 796 var 795 797 I: Integer; … … 820 822 function TSourceModule.SearchConstant(Name: string; Outside: Boolean): TConstant; 821 823 begin 822 823 824 end; 824 825 … … 864 865 destructor TModuleProgram.Destroy; 865 866 begin 866 inherited Destroy;867 inherited; 867 868 end; 868 869 … … 881 882 destructor TModuleUnit.Destroy; 882 883 begin 883 InititializeSection.Free;884 F inalalizeSection.Free;885 inherited Destroy;884 FreeAndNil(InititializeSection); 885 FreeAndNil(FinalalizeSection); 886 inherited; 886 887 end; 887 888 … … 891 892 begin 892 893 inherited; 893 Items := T ListEnumItem.Create;894 Items := TEnumItems.Create; 894 895 end; 895 896 896 897 destructor TTypeEnumeration.Destroy; 897 898 begin 898 Items.Free;899 inherited Destroy;899 FreeAndNil(Items); 900 inherited; 900 901 end; 901 902 … … 910 911 destructor TTypeClass.Destroy; 911 912 begin 912 CommonBlock.Free;913 inherited Destroy;913 FreeAndNil(CommonBlock); 914 inherited; 914 915 end; 915 916 … … 942 943 constructor TType.Create; 943 944 begin 944 Parameters := TType List.Create;945 Parameters := TTypes.Create; 945 946 //Parameters.Parent := Parent.Parent; 946 947 end; … … 948 949 destructor TType.Destroy; 949 950 begin 950 Parameters.Free;951 inherited Destroy;951 FreeAndNil(Parameters); 952 inherited; 952 953 end; 953 954 -
trunk/Compiler/Producer.pas
r74 r75 1 unit UProducer; 2 3 {$MODE Delphi} 1 unit Producer; 4 2 5 3 interface 6 4 7 5 uses 8 USourceCodePascal, Classes, SysUtils, StrUtils, SpecializedList, Process,6 SourceCodePascal, Classes, SysUtils, StrUtils, Generics.Collections, Process, 9 7 FileUtil, Forms; 10 8 -
trunk/Compiler/SourceConvertor.pas
r74 r75 1 unit USourceConvertor; 2 3 {$mode delphi}{$H+} 1 unit SourceConvertor; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, SpecializedList;6 Classes, SysUtils, Generics.Collections; 9 7 10 8 type … … 22 20 23 21 TSourceText = class(TSource) 24 Code: T ListString;22 Code: TStringList; 25 23 constructor Create; 26 24 destructor Destroy; override; … … 28 26 29 27 TSourceList = class 30 Items: T ListObject; // TListObject<TSource>28 Items: TObjectList<TSource>; 31 29 end; 32 30 … … 57 55 procedure TConvertor.Convert(Input, Output: TSourceList); 58 56 begin 59 60 57 end; 61 58 … … 74 71 constructor TSourceText.Create; 75 72 begin 76 Code := T ListString.Create;73 Code := TStringList.Create; 77 74 end; 78 75 79 76 destructor TSourceText.Destroy; 80 77 begin 81 Code.Free;82 inherited Destroy;78 FreeAndNil(Code); 79 inherited; 83 80 end; 84 81 -
trunk/Compiler/Target.pas
r74 r75 1 unit UTarget; 2 3 {$mode Delphi}{$H+} 1 unit Target; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UProducer, UExecutor, SpecializedList;6 Classes, SysUtils, Producer, Executor, Generics.Collections; 9 7 10 8 type … … 17 15 Producer: TProducer; 18 16 Executor: TExecutor; 19 Compiler: TObject; // TCompiler17 Compiler: TObject; // TCompiler 20 18 constructor Create; virtual; 21 19 destructor Destroy; override; … … 24 22 TTargetClass = class of TTarget; 25 23 26 { T ListTarget}24 { TTargets } 27 25 28 T ListTarget = class(TListObject)26 TTargets = class(TObjectList<TTarget>) 29 27 function SearchBySysName(Name: string): TTarget; 30 28 procedure LoadToStrings(Strings: TStrings); … … 43 41 destructor TTarget.Destroy; 44 42 begin 45 Producer.Free;46 Executor.Free;47 inherited Destroy;43 FreeAndNil(Producer); 44 FreeAndNil(Executor); 45 inherited; 48 46 end; 49 47 50 { T ListTarget}48 { TTargets } 51 49 52 function T ListTarget.SearchBySysName(Name: string): TTarget;50 function TTargets.SearchBySysName(Name: string): TTarget; 53 51 var 54 52 I: Integer; … … 60 58 end; 61 59 62 procedure T ListTarget.LoadToStrings(Strings: TStrings);60 procedure TTargets.LoadToStrings(Strings: TStrings); 63 61 var 64 62 I: Integer; -
trunk/Compiler/Target/Dynamic C/ProducerDynamicC.pas
r74 r75 1 unit UProducerDynamicc; 2 3 {$MODE Delphi} 1 unit ProducerDynamicC; 4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 Dialogs, StdCtrls, USourceCodePascal, UProducer, StrUtils;7 Dialogs, StdCtrls, SourceCodePascal, Producer, StrUtils; 10 8 11 9 type … … 17 15 function TranslateType(Name: string): string; 18 16 function TranslateOperator(Name: string): string; 19 procedure GenerateUses(UsedModules: TUsedModule List);17 procedure GenerateUses(UsedModules: TUsedModules); 20 18 procedure GenerateModule(Module: TSourceModule); 21 19 procedure GenerateCommonBlock(CommonBlock: TCommonBlock; 22 20 LabelPrefix: string); 23 21 procedure GenerateType(AType: TType); 24 procedure GenerateTypes(Types: TType List);22 procedure GenerateTypes(Types: TTypes); 25 23 procedure GenerateProgram(ProgramBlock: TProgram); 26 procedure GenerateFunctions(Functions: TFunction List;24 procedure GenerateFunctions(Functions: TFunctions; 27 25 Prefix: string = ''; HeaderOnly: Boolean = False); 28 26 procedure GenerateBeginEnd(BeginEnd: TBeginEnd); 29 procedure GenerateVariableList(VariableList: TVariable List);27 procedure GenerateVariableList(VariableList: TVariables); 30 28 procedure GenerateVariable(Variable: TVariable); 31 29 procedure GenerateCommand(Command: TCommand); … … 43 41 end; 44 42 43 45 44 implementation 46 45 … … 56 55 destructor TProducerDynamicC.Destroy; 57 56 begin 58 TextSource.Free;57 FreeAndNil(TextSource); 59 58 inherited; 60 59 end; … … 87 86 end; 88 87 89 procedure TProducerDynamicC.GenerateUses(UsedModules: TUsedModule List);88 procedure TProducerDynamicC.GenerateUses(UsedModules: TUsedModules); 90 89 var 91 90 I: Integer; … … 150 149 end; 151 150 152 procedure TProducerDynamicC.GenerateFunctions(Functions: TFunction List;151 procedure TProducerDynamicC.GenerateFunctions(Functions: TFunctions; 153 152 Prefix: string = ''; HeaderOnly: Boolean = False); 154 153 var … … 197 196 end; 198 197 199 procedure TProducerDynamicC.GenerateVariableList(VariableList: TVariable List);198 procedure TProducerDynamicC.GenerateVariableList(VariableList: TVariables); 200 199 var 201 200 I: Integer; … … 360 359 end; 361 360 362 procedure TProducerDynamicC.GenerateTypes(Types: TType List);361 procedure TProducerDynamicC.GenerateTypes(Types: TTypes); 363 362 var 364 363 I: Integer; -
trunk/Compiler/Target/GCC/ProducerGCC.pas
r74 r75 1 unit UProducerGCC; 2 3 {$MODE Delphi} 1 unit ProducerGCC; 4 2 5 3 interface 6 4 7 5 uses 8 SysUtils, Variants, Classes, Graphics, Controls, Forms, 9 Dialogs, StdCtrls, USourceCodePascal, UProducer, StrUtils;6 SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, 7 SourceCodePascal, Producer, StrUtils; 10 8 11 9 type … … 19 17 procedure Emit(AText: string); 20 18 procedure EmitLn(AText: string = ''); 21 procedure GenerateUses(UsedModules: TUsedModule List);19 procedure GenerateUses(UsedModules: TUsedModules); 22 20 procedure GenerateModule(Module: TSourceModule); 23 21 procedure GenerateCommonBlock(CommonBlock: TCommonBlock; 24 22 LabelPrefix: string); 25 23 procedure GenerateType(AType: TType); 26 procedure GenerateTypes(Types: TType List);24 procedure GenerateTypes(Types: TTypes); 27 25 procedure GenerateProgram(ProgramBlock: TProgram); 28 procedure GenerateFunctions(Functions: TFunction List;26 procedure GenerateFunctions(Functions: TFunctions; 29 27 Prefix: string = ''); 30 28 procedure GenerateBeginEnd(BeginEnd: TBeginEnd); 31 procedure GenerateVariableList(VariableList: TVariable List);29 procedure GenerateVariableList(VariableList: TVariables); 32 30 procedure GenerateVariable(Variable: TVariable); 33 31 procedure GenerateCommand(Command: TCommand); … … 48 46 end; 49 47 48 50 49 implementation 51 50 … … 66 65 destructor TProducerGCCC.Destroy; 67 66 begin 68 TextSource.Free;67 FreeAndNil(TextSource); 69 68 inherited; 70 69 end; … … 113 112 end; 114 113 115 procedure TProducerGCCC.GenerateUses(UsedModules: TUsedModule List);114 procedure TProducerGCCC.GenerateUses(UsedModules: TUsedModules); 116 115 var 117 116 I: Integer; … … 155 154 end; 156 155 157 procedure TProducerGCCC.GenerateFunctions(Functions: TFunction List;156 procedure TProducerGCCC.GenerateFunctions(Functions: TFunctions; 158 157 Prefix: string = ''); 159 158 var … … 202 201 end; 203 202 204 procedure TProducerGCCC.GenerateVariableList(VariableList: TVariable List);203 procedure TProducerGCCC.GenerateVariableList(VariableList: TVariables); 205 204 var 206 205 I: Integer; … … 361 360 end; 362 361 363 procedure TProducerGCCC.GenerateTypes(Types: TType List);362 procedure TProducerGCCC.GenerateTypes(Types: TTypes); 364 363 var 365 364 I: Integer; -
trunk/Compiler/Target/Java/TargetJava.pas
r74 r75 1 unit UTargetJava; 2 3 {$mode Delphi}{$H+} 1 unit TargetJava; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget;6 Classes, SysUtils, Target; 9 7 10 8 type … … 22 20 constructor TTargetJava.Create; 23 21 begin 24 inherited Create;22 inherited; 25 23 SysName := 'Java'; 26 24 Name := 'Java'; -
trunk/Compiler/Target/NASM/TargetNASM.pas
r74 r75 1 unit UTargetNASM; 2 3 {$mode Delphi}{$H+} 1 unit TargetNASM; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget;6 Classes, SysUtils, Target; 9 7 10 8 type … … 23 21 constructor TTargetNASM.Create; 24 22 begin 25 inherited Create;23 inherited; 26 24 Name := 'NASM'; 27 25 SysName := 'NASM'; -
trunk/Compiler/Target/PHP/TargetPHP.pas
r74 r75 1 unit UTargetPHP; 2 3 {$mode Delphi}{$H+} 1 unit TargetPHP; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget;6 Classes, SysUtils, Target; 9 7 10 8 type … … 16 14 end; 17 15 16 18 17 implementation 19 18 … … 22 21 constructor TTargetPHP.Create; 23 22 begin 24 inherited Create;23 inherited; 25 24 SysName := 'PHP'; 26 25 Name := 'PHP'; -
trunk/Compiler/Target/XML/TargetXML.pas
r74 r75 1 unit UTargetXML; 2 3 {$mode Delphi}{$H+} 1 unit TargetXML; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UTarget, UProducer, USourceCodePascal;6 Classes, SysUtils, Target, Producer, SourceCodePascal; 9 7 10 8 type … … 91 89 constructor TTargetXML.Create; 92 90 begin 93 inherited Create;91 inherited; 94 92 SysName := 'XML'; 95 93 Name := 'XML'; -
trunk/Compiler/TranspascalCompiler.lpk
r74 r75 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 <Package Version=" 4">3 <Package Version="5"> 4 4 <PathDelim Value="\"/> 5 5 <Name Value="TranspascalCompiler"/> … … 25 25 </CompilerOptions> 26 26 <Version Minor="1"/> 27 <Files Count="2 7">27 <Files Count="28"> 28 28 <Item1> 29 <Filename Value=" UCompiler.pas"/>30 <UnitName Value=" UCompiler"/>29 <Filename Value="Compiler.pas"/> 30 <UnitName Value="Compiler"/> 31 31 </Item1> 32 32 <Item2> 33 <Filename Value="Modules\Pascal\ USourceCodePascal.pas"/>34 <UnitName Value=" USourceCodePascal"/>33 <Filename Value="Modules\Pascal\SourceCodePascal.pas"/> 34 <UnitName Value="SourceCodePascal"/> 35 35 </Item2> 36 36 <Item3> 37 <Filename Value=" UProducer.pas"/>38 <UnitName Value=" UProducer"/>37 <Filename Value="Producer.pas"/> 38 <UnitName Value="Producer"/> 39 39 </Item3> 40 40 <Item4> 41 <Filename Value=" UAnalyzer.pas"/>42 <UnitName Value=" UAnalyzer"/>41 <Filename Value="Analyzer.pas"/> 42 <UnitName Value="Analyzer"/> 43 43 </Item4> 44 44 <Item5> 45 <Filename Value=" UTarget.pas"/>46 <UnitName Value=" UTarget"/>45 <Filename Value="Target.pas"/> 46 <UnitName Value="Target"/> 47 47 </Item5> 48 48 <Item6> 49 <Filename Value=" UExecutor.pas"/>50 <UnitName Value=" UExecutor"/>49 <Filename Value="Executor.pas"/> 50 <UnitName Value="Executor"/> 51 51 </Item6> 52 52 <Item7> 53 <Filename Value="Modules\Pascal\ UAnalyzerPascal.pas"/>54 <UnitName Value=" UAnalyzerPascal"/>53 <Filename Value="Modules\Pascal\AnalyzerPascal.pas"/> 54 <UnitName Value="AnalyzerPascal"/> 55 55 </Item7> 56 56 <Item8> 57 <Filename Value="Target\Dynamic C\ UProducerDynamicc.pas"/>58 <UnitName Value=" UProducerDynamicC"/>57 <Filename Value="Target\Dynamic C\ProducerDynamicC.pas"/> 58 <UnitName Value="ProducerDynamicC"/> 59 59 </Item8> 60 60 <Item9> 61 <Filename Value="Modules\ASM8051\ UProducerASM8051.pas"/>62 <UnitName Value=" UProducerAsm8051"/>61 <Filename Value="Modules\ASM8051\ProducerASM8051.pas"/> 62 <UnitName Value="ProducerASM8051"/> 63 63 </Item9> 64 64 <Item10> 65 <Filename Value="Modules\ASM8051\ UTargetASM8051.pas"/>66 <UnitName Value=" UTargetASM8051"/>65 <Filename Value="Modules\ASM8051\TargetASM8051.pas"/> 66 <UnitName Value="TargetASM8051"/> 67 67 </Item10> 68 68 <Item11> 69 <Filename Value="Modules\GCC\ UTargetGCC.pas"/>70 <UnitName Value=" UTargetGCC"/>69 <Filename Value="Modules\GCC\TargetGCC.pas"/> 70 <UnitName Value="TargetGCC"/> 71 71 </Item11> 72 72 <Item12> 73 <Filename Value="Modules\GCC\ UProducerGCC.pas"/>74 <UnitName Value=" UProducerGCC"/>73 <Filename Value="Modules\GCC\ProducerGCC.pas"/> 74 <UnitName Value="ProducerGCC"/> 75 75 </Item12> 76 76 <Item13> 77 <Filename Value="Modules\Delphi\ UProducerDelphi.pas"/>78 <UnitName Value=" UProducerDelphi"/>77 <Filename Value="Modules\Delphi\ProducerDelphi.pas"/> 78 <UnitName Value="ProducerDelphi"/> 79 79 </Item13> 80 80 <Item14> 81 <Filename Value="Modules\Delphi\ UModuleDelphi.pas"/>82 <UnitName Value=" UModuleDelphi"/>81 <Filename Value="Modules\Delphi\ModuleDelphi.pas"/> 82 <UnitName Value="ModuleDelphi"/> 83 83 </Item14> 84 84 <Item15> 85 <Filename Value="Target\PHP\ UTargetPHP.pas"/>86 <UnitName Value=" UTargetPHP"/>85 <Filename Value="Target\PHP\TargetPHP.pas"/> 86 <UnitName Value="TargetPHP"/> 87 87 </Item15> 88 88 <Item16> 89 <Filename Value="Target\Java\ UTargetJava.pas"/>90 <UnitName Value=" UTargetJava"/>89 <Filename Value="Target\Java\TargetJava.pas"/> 90 <UnitName Value="TargetJava"/> 91 91 </Item16> 92 92 <Item17> 93 <Filename Value="Target\XML\ UTargetXML.pas"/>94 <UnitName Value=" UTargetXML"/>93 <Filename Value="Target\XML\TargetXML.pas"/> 94 <UnitName Value="TargetXML"/> 95 95 </Item17> 96 96 <Item18> 97 <Filename Value="Modules\Interpretter\ UModuleInterpretter.pas"/>98 <UnitName Value=" UModuleInterpretter"/>97 <Filename Value="Modules\Interpretter\ModuleInterpretter.pas"/> 98 <UnitName Value="ModuleInterpretter"/> 99 99 </Item18> 100 100 <Item19> 101 <Filename Value="Target\NASM\ UTargetNASM.pas"/>102 <UnitName Value=" UTargetNASM"/>101 <Filename Value="Target\NASM\TargetNASM.pas"/> 102 <UnitName Value="TargetNASM"/> 103 103 </Item19> 104 104 <Item20> 105 <Filename Value="Modules\Pascal\ UModulePascal.pas"/>106 <UnitName Value=" UModulePascal"/>105 <Filename Value="Modules\Pascal\ModulePascal.pas"/> 106 <UnitName Value="ModulePascal"/> 107 107 </Item20> 108 108 <Item21> 109 <Filename Value=" UCompilerAPI.pas"/>110 <UnitName Value=" UCompilerAPI"/>109 <Filename Value="CompilerAPI.pas"/> 110 <UnitName Value="CompilerAPI"/> 111 111 </Item21> 112 112 <Item22> 113 <Filename Value="Modules\GCC\ UModuleGCC.pas"/>114 <UnitName Value=" UModuleGCC"/>113 <Filename Value="Modules\GCC\ModuleGCC.pas"/> 114 <UnitName Value="ModuleGCC"/> 115 115 </Item22> 116 116 <Item23> 117 <Filename Value=" USourceConvertor.pas"/>118 <UnitName Value=" USourceConvertor"/>117 <Filename Value="SourceConvertor.pas"/> 118 <UnitName Value="SourceConvertor"/> 119 119 </Item23> 120 120 <Item24> 121 <Filename Value="Modules\Brainfuck\ UModuleBrainfuck.pas"/>122 <UnitName Value=" UModuleBrainfuck"/>121 <Filename Value="Modules\Brainfuck\ModuleBrainfuck.pas"/> 122 <UnitName Value="ModuleBrainfuck"/> 123 123 </Item24> 124 124 <Item25> 125 <Filename Value="Modules\PHP\ UModulePHP.pas"/>126 <UnitName Value=" UModulePHP"/>125 <Filename Value="Modules\PHP\ModulePHP.pas"/> 126 <UnitName Value="ModulePHP"/> 127 127 </Item25> 128 128 <Item26> 129 <Filename Value="Modules\Java\ UModuleJava.pas"/>130 <UnitName Value=" UModuleJava"/>129 <Filename Value="Modules\Java\ModuleJava.pas"/> 130 <UnitName Value="ModuleJava"/> 131 131 </Item26> 132 132 <Item27> 133 <Filename Value="Modules\ASM8051\ UModuleASM8051.pas"/>134 <UnitName Value=" UModuleASM8051"/>133 <Filename Value="Modules\ASM8051\ModuleASM8051.pas"/> 134 <UnitName Value="ModuleASM8051"/> 135 135 </Item27> 136 <Item28> 137 <Filename Value="Target\GCC\ProducerGCC.pas"/> 138 <UnitName Value="ProducerGCC"/> 139 </Item28> 136 140 </Files> 137 <RequiredPkgs Count="4"> 141 <CompatibilityMode Value="True"/> 142 <RequiredPkgs Count="3"> 138 143 <Item1> 139 144 <PackageName Value="ModularSystem"/> … … 141 146 </Item1> 142 147 <Item2> 143 <PackageName Value=" TemplateGenerics"/>148 <PackageName Value="LCL"/> 144 149 </Item2> 145 150 <Item3> 146 <PackageName Value="LCL"/>147 </Item3>148 <Item4>149 151 <PackageName Value="FCL"/> 150 152 <MinVersion Major="1" Valid="True"/> 151 </Item 4>153 </Item3> 152 154 </RequiredPkgs> 153 155 <UsageOptions> -
trunk/Compiler/TranspascalCompiler.pas
r74 r75 9 9 10 10 uses 11 UCompiler, USourceCodePascal, UProducer, UAnalyzer, UTarget, UExecutor,12 UAnalyzerPascal, UProducerDynamicc, UProducerASM8051, UTargetASM8051,13 UTargetGCC, UProducerGCC, UProducerDelphi, UModuleDelphi, UTargetPHP,14 UTargetJava, UTargetXML, UModuleInterpretter, UTargetNASM, UModulePascal,15 UCompilerAPI, UModuleGCC, USourceConvertor, UModuleBrainfuck, UModulePHP,16 UModuleJava, UModuleASM8051,LazarusPackageIntf;11 Compiler, SourceCodePascal, Producer, Analyzer, Target, Executor, 12 AnalyzerPascal, ProducerDynamicC, ProducerASM8051, TargetASM8051, TargetGCC, 13 ProducerGCC, ProducerDelphi, ModuleDelphi, TargetPHP, TargetJava, TargetXML, 14 ModuleInterpretter, TargetNASM, ModulePascal, CompilerAPI, ModuleGCC, 15 SourceConvertor, ModuleBrainfuck, ModulePHP, ModuleJava, ModuleASM8051, 16 LazarusPackageIntf; 17 17 18 18 implementation -
trunk/IDE/Core.lfm
r74 r75 3 3 OnDestroy = DataModuleDestroy 4 4 OldCreateOrder = False 5 Height = 381 6 HorizontalOffset = 652 7 VerticalOffset = 519 8 Width = 466 5 Height = 572 6 HorizontalOffset = 978 7 VerticalOffset = 779 8 Width = 699 9 PPI = 144 9 10 object LastOpenedFiles: TLastOpenedList 10 11 MaxCount = 10 11 12 OnChange = LastOpenedFilesChange 12 left = 4813 top = 2413 Left = 72 14 Top = 36 14 15 end 15 object CoolTranslator1: TCoolTranslator16 object Translator1: TTranslator 16 17 POFilesFolder = 'Languages' 17 left = 4818 top = 8018 Left = 72 19 Top = 120 19 20 end 20 21 object DebugLog1: TDebugLog … … 22 23 FileName = 'DebugLog.txt' 23 24 MaxCount = 100 24 left = 4825 top = 13625 Left = 72 26 Top = 204 26 27 end 27 28 object ApplicationInfo: TApplicationInfo … … 40 41 RegistryKey = '\Software\Chronosoft\Transpascal' 41 42 RegistryRoot = rrKeyCurrentUser 42 left = 4843 top = 20043 Left = 72 44 Top = 300 44 45 end 45 46 object ModuleManager1: TModuleManager 46 47 Options = [] 47 left = 24248 top = 9848 Left = 363 49 Top = 147 49 50 end 50 51 end -
trunk/IDE/Core.pas
r74 r75 1 unit UCore; 2 3 {$mode delphi} 1 unit Core; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, FileUtil, ULastOpenedList, UProject, UApplicationInfo,9 UCompiler, URegistry, Registry, UDebugLog, UCoolTranslator, UTarget,10 USourceCodePascal, UModularSystem;6 Classes, SysUtils, FileUtil, LastOpenedList, Project, ApplicationInfo, 7 Compiler, Registry, RegistryEx, DebugLog, Translator, Target, 8 SourceCodePascal, ModularSystem; 11 9 12 10 type … … 32 30 TCore = class(TDataModule) 33 31 ApplicationInfo: TApplicationInfo; 34 CoolTranslator1: TCoolTranslator;32 Translator1: TTranslator; 35 33 DebugLog1: TDebugLog; 36 34 LastOpenedFiles: TLastOpenedList; … … 47 45 LogParsing: Boolean; 48 46 Project: TProject; 49 ProjectTemplates: TProjectTemplate List;47 ProjectTemplates: TProjectTemplates; 50 48 TargetProject: TProject; 51 49 Compiler: TCustomCompiler; … … 69 67 70 68 uses 71 UFormMain, UProjectTemplates, UIDEModulePascal, UModulePascal, UModuleGCC,72 UModuleInterpretter, UModuleDelphi, UModulePHP, UModuleJava, UModuleASM8051;69 FormMain, ProjectTemplates, IDEModulePascal, ModulePascal, ModuleGCC, 70 ModuleInterpretter, ModuleDelphi, ModulePHP, ModuleJava, ModuleASM8051; 73 71 74 72 { TCore } … … 79 77 Project.LoadFromFile(FileName); 80 78 LastOpenedFiles.AddItem(FileName); 81 FormMain. UpdateInterface;79 FormMain.FormMain.UpdateInterface; 82 80 end; 83 81 … … 102 100 //Compiler.OnSaveTarget := SaveSourceFile; 103 101 Project := TProject.Create; 104 ProjectTemplates := TProjectTemplate List.Create;102 ProjectTemplates := TProjectTemplates.Create; 105 103 TargetProject := TProject.Create; 106 104 LastOpenedFiles := TLastOpenedList.Create(nil); … … 136 134 procedure TCore.LastOpenedFilesChange(Sender: TObject); 137 135 begin 138 LastOpenedFiles.LoadToMenuItem(FormMain. MenuItemOpenRecent,139 FormMain. OpenRecentClick);140 LastOpenedFiles.LoadToMenuItem(FormMain. PopupMenu1.Items,141 FormMain. OpenRecentClick);136 LastOpenedFiles.LoadToMenuItem(FormMain.FormMain.MenuItemOpenRecent, 137 FormMain.FormMain.OpenRecentClick); 138 LastOpenedFiles.LoadToMenuItem(FormMain.FormMain.PopupMenu1.Items, 139 FormMain.FormMain.OpenRecentClick); 142 140 end; 143 141 144 142 procedure TCore.ProjectChange(Sender: TObject); 145 143 begin 146 FormMain. UpdateInterface;144 FormMain.FormMain.UpdateInterface; 147 145 end; 148 146 149 147 function TCore.LoadSourceFile(FileName: string; var Content: string): Boolean; 150 148 begin 151 152 149 end; 153 150 154 151 function TCore.SaveSourceFile(FileName: string; const Content: string): Boolean; 155 152 begin 156 157 153 end; 158 154 … … 173 169 else LogParsing := False; 174 170 if ValueExists('LanguageCode') then 175 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadString('LanguageCode'))176 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');171 Translator1.Language := Translator1.Languages.SearchByCode(ReadString('LanguageCode')) 172 else Translator1.Language := Translator1.Languages.SearchByCode(''); 177 173 finally 178 174 Free; 179 175 end; 180 LastOpenedFiles.LoadFromRegistry( RegContext(Root, Key + '\LastOpenedFiles')); //Root, Key + '\LastOpenedFiles');176 LastOpenedFiles.LoadFromRegistry(TRegistryContext.Create(Root, Key + '\LastOpenedFiles')); //Root, Key + '\LastOpenedFiles'); 181 177 Compiler.LoadFromRegistry(Root, Key + '\Compiler'); 182 FormMain. LoadFromRegistry(Root, Key);178 FormMain.FormMain.LoadFromRegistry(Root, Key); 183 179 end; 184 180 … … 194 190 else WriteString('TargetName', ''); 195 191 WriteBool('LogParsing', LogParsing); 196 if Assigned( CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then197 WriteString('LanguageCode', CoolTranslator1.Language.Code)192 if Assigned(Translator1.Language) and (Translator1.Language.Code <> '') then 193 WriteString('LanguageCode', Translator1.Language.Code) 198 194 else WriteString('LanguageCode', ''); 199 195 finally 200 196 Free; 201 197 end; 202 LastOpenedFiles.SaveToRegistry( RegContext(Root, Key + '\LastOpenedFiles'));198 LastOpenedFiles.SaveToRegistry(TRegistryContext.Create(Root, Key + '\LastOpenedFiles')); 203 199 Compiler.SaveToRegistry(Root, Key + '\Compiler'); 204 FormMain. SaveToRegistry(Root, Key);200 FormMain.FormMain.SaveToRegistry(Root, Key); 205 201 end; 206 202 … … 237 233 Name := 'System'; 238 234 Internal := True; 239 with TType(Body.Types.AddNew(TType.Create))do begin235 with Body.Types.AddNew do begin 240 236 Name := 'Byte'; 241 237 Size := 1; 242 238 Internal := True; 243 239 end; 244 with TType(Body.Types.AddNew(TType.Create))do begin240 with Body.Types.AddNew do begin 245 241 Name := 'ShortInt'; 246 242 Size := 1; 247 243 Internal := True; 248 244 end; 249 with TType(Body.Types.AddNew(TType.Create))do begin245 with Body.Types.AddNew do begin 250 246 Name := 'Word'; 251 247 Size := 2; 252 248 Internal := True; 253 249 end; 254 with TType(Body.Types.AddNew(TType.Create))do begin250 with Body.Types.AddNew do begin 255 251 Name := 'SmallInt'; 256 252 Size := 2; 257 253 Internal := True; 258 254 end; 259 with TType(Body.Types.AddNew(TType.Create))do begin255 with Body.Types.AddNew do begin 260 256 Name := 'Cardinal'; 261 257 Size := 4; 262 258 Internal := True; 263 259 end; 264 with TType(Body.Types.AddNew(TType.Create))do begin260 with Body.Types.AddNew do begin 265 261 Name := 'Integer'; 266 262 Size := 4; 267 263 Internal := True; 268 264 end; 269 with TType(Body.Types.AddNew(TType.Create))do begin265 with Body.Types.AddNew do begin 270 266 Name := 'UInt64'; 271 267 Size := 8; 272 268 Internal := True; 273 269 end; 274 with TType(Body.Types.AddNew(TType.Create))do begin270 with Body.Types.AddNew do begin 275 271 Name := 'Int64'; 276 272 Size := 8; 277 273 Internal := True; 278 274 end; 279 with TFunction(Body.Functions.AddNew(TFunction.Create))do begin275 with Body.Functions.AddNew do begin 280 276 Name := 'WriteLn'; 281 277 Internal := True; -
trunk/IDE/Forms/FormCodeTree.pas
r74 r75 1 unit UFormCodeTree; 2 3 {$mode Delphi}{$H+} 1 unit FormCodeTree; 4 2 5 3 interface … … 20 18 end; 21 19 22 var23 FormCodeTree: TFormCodeTree;24 20 25 21 implementation -
trunk/IDE/Forms/FormExternalProducerOutput.pas
r74 r75 1 unit UFormExternalProducerOutput; 2 3 {$mode delphi} 1 unit FormExternalProducerOutput; 4 2 5 3 interface … … 20 18 end; 21 19 22 var23 FormExternalProducerOutput: TFormExternalProducerOutput;24 20 25 21 implementation -
trunk/IDE/Forms/FormMain.lfm
r74 r75 1 1 object FormMain: TFormMain 2 2 Left = 799 3 Height = 5013 Height = 752 4 4 Top = 435 5 Width = 6955 Width = 1042 6 6 Caption = 'Transpascal IDE' 7 ClientHeight = 467 8 ClientWidth = 695 9 Font.Height = -11 7 ClientHeight = 752 8 ClientWidth = 1042 9 DesignTimePPI = 144 10 Font.Height = -17 10 11 Font.Name = 'Tahoma' 11 12 Menu = MainMenu … … 15 16 OnShow = FormShow 16 17 Position = poDesktopCenter 17 LCLVersion = ' 1.8.0.4'18 LCLVersion = '3.2.0.0' 18 19 object Splitter3: TSplitter 19 20 Cursor = crVSplit 20 21 Left = 0 21 Height = 522 Top = 46223 Width = 69522 Height = 8 23 Top = 744 24 Width = 1042 24 25 Align = alBottom 25 26 ResizeAnchor = akBottom … … 27 28 object ToolBar1: TToolBar 28 29 Left = 0 29 Height = 2630 Height = 39 30 31 Top = 0 31 Width = 69532 Width = 1042 32 33 Images = ImageList1 33 34 ParentShowHint = False … … 40 41 end 41 42 object ToolButton2: TToolButton 42 Left = 2443 Left = 36 43 44 Top = 2 44 45 Action = AProjectOpen … … 47 48 end 48 49 object ToolButton3: TToolButton 49 Left = 5950 Left = 89 50 51 Top = 2 51 52 Action = AProjectSave 52 53 end 53 54 object ToolButton4: TToolButton 54 Left = 8255 Left = 124 55 56 Top = 2 56 57 Action = AProjectClose 57 58 end 58 59 object ToolButton5: TToolButton 59 Left = 1 0560 Height = 2260 Left = 159 61 Height = 33 61 62 Top = 2 62 63 Style = tbsSeparator 63 64 end 64 65 object ToolButton6: TToolButton 65 Left = 1 1366 Left = 167 66 67 Top = 2 67 68 Action = AViewOptions 68 69 end 69 70 object ToolButton7: TToolButton 70 Left = 13671 Left = 202 71 72 Top = 2 72 73 Action = ABuild 73 74 end 74 75 object ToolButton8: TToolButton 75 Left = 15976 Left = 237 76 77 Top = 2 77 78 Action = ARun 78 79 end 79 80 object ToolButton9: TToolButton 80 Left = 18281 Left = 272 81 82 Top = 2 82 83 Action = APause 83 84 end 84 85 object ToolButton10: TToolButton 85 Left = 20586 Left = 307 86 87 Top = 2 87 88 Action = AStop 88 89 end 89 90 object ComboBoxTarget: TComboBox 90 Left = 22891 Left = 342 91 92 Height = 40 92 93 Top = 2 93 Width = 1 0094 Width = 150 94 95 ItemHeight = 0 95 OnChange = ComboBoxTargetChange96 96 Style = csDropDownList 97 97 TabOrder = 0 98 OnChange = ComboBoxTargetChange 98 99 end 99 100 object ToolButton11: TToolButton 100 Left = 328101 Left = 492 101 102 Top = 2 102 103 Action = AViewTargets … … 104 105 end 105 106 object Splitter1: TSplitter 106 Left = 490107 Height = 330108 Top = 26109 Width = 5107 Left = 734 108 Height = 545 109 Top = 39 110 Width = 8 110 111 Align = alRight 111 112 ResizeAnchor = akRight 112 113 end 113 114 object PageControlRight: TPageControl 114 Left = 495115 Height = 330116 Top = 26117 Width = 200115 Left = 742 116 Height = 545 117 Top = 39 118 Width = 300 118 119 ActivePage = TabSheetExternalProducer 119 120 Align = alRight … … 136 137 object PageControlBottom: TPageControl 137 138 Left = 0 138 Height = 1 01139 Top = 361140 Width = 695139 Height = 152 140 Top = 592 141 Width = 1042 141 142 ActivePage = TabSheetMessages 142 143 Align = alBottom … … 154 155 Cursor = crVSplit 155 156 Left = 0 156 Height = 5157 Top = 356158 Width = 695157 Height = 8 158 Top = 584 159 Width = 1042 159 160 Align = alBottom 160 161 ResizeAnchor = akBottom … … 162 163 object PageControlMain: TPageControl 163 164 Left = 0 164 Height = 330165 Top = 26166 Width = 490167 ActivePage = TabSheet Source165 Height = 545 166 Top = 39 167 Width = 734 168 ActivePage = TabSheetTarget 168 169 Align = alClient 169 TabIndex = 0170 TabIndex = 1 170 171 TabOrder = 6 171 172 object TabSheetSource: TTabSheet … … 178 179 object MainMenu: TMainMenu 179 180 Images = ImageList1 180 left = 115181 top = 160181 Left = 173 182 Top = 240 182 183 object MenuItem1: TMenuItem 183 184 Caption = 'Project' … … 288 289 object ActionList1: TActionList 289 290 Images = ImageList1 290 left = 112291 top = 216291 Left = 168 292 Top = 324 292 293 object AProjectNew: TAction 293 294 Category = 'Project' … … 448 449 DefaultExt = '.tppr' 449 450 Filter = 'Project file (*.tppr)|*.tppr|Any file (*.*)|*.*' 450 left = 115451 top = 54451 Left = 173 452 Top = 81 452 453 end 453 454 object SaveDialogProject: TSaveDialog 454 455 DefaultExt = '.tppr' 455 456 Filter = 'Project file (*.tppr)|*.tppr|Any file (*.*)|*.*' 456 left = 115457 top = 104457 Left = 173 458 Top = 156 458 459 end 459 460 object ImageList1: TImageList 460 left = 112461 top = 272461 Left = 168 462 Top = 408 462 463 Bitmap = { 463 4C690F0000001000000010000000000000000000000000000000000000000000 464 0000000000000000000000000000000000000000000000000000000000000000 465 0000000000000000000000000000000000000000000000000000000000000000 466 0000000000000000000000000000000000000000000000000000000000000000 467 0000000000000000000000000000000000000000000000000000000000000000 468 0000000000000000000000000000000000000000000000000000000000000000 469 0000000000000000000000000000000000000000000000000000000000000000 470 0000000000000000000000000000000000000000000000000000000000000000 471 0000000000000000000000000000000000000000000000000000000000000000 472 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 473 0000000000000000000000000000000000000000000000000000000000000000 474 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 475 0000000000000000000000000000000000000000000000000000000000000000 476 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 477 0000000000000000000000000000000000000000000000000000000000000000 478 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 479 0000000000000000000000000000000000000000000000000000000000000000 480 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 481 0000000000000000000000000000000000000000000000000000000000000000 482 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 483 0000000000000000000000000000000000000000000000000000000000000000 484 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 485 0000000000000000000000000000000000000000000000000000000000000000 486 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 487 0000000000000000000000000000000000000000000000000000000000000000 488 0000000000000000000000000000000000000000000000000000000000000000 489 0000000000000000000000000000000000000000000000000000000000000000 490 0000000000000000000000000000000000000000000000000000000000000000 491 0000000000000000000000000000000000000000000000000000000000000000 492 0000000000000000000000000000000000000000000000000000000000000000 493 0000000000000000000000000000000000000000000000000000000000000000 494 0000000000000000000000000000000000000000000000000000000000000000 495 0000000000000000000000000000000000000000000000000000000000000000 496 0000000000000000000000000000000000000000000000000000000000000000 497 0000000000000000000000000000000000000000000000000000000000000000 498 00000000000000000000000000FF000000FF0000000000000000000000000000 499 0000000000000000000000000000000000000000000000000000000000000000 500 0000000000FF000000FF800080FF800080FF000000FF00000000000000000000 501 0000000000000000000000000000000000000000000000000000000000FF0000 502 00FF800080FF800080FF800080FF800080FF800080FF000000FF000000000000 503 000000000000000000000000000000000000000000FF000000FF800080FF8000 504 80FF800080FF800080FF800080FF800080FF800080FF800080FF000000FF0000 505 0000000000000000000000000000000000FFC0C0C0FF800080FF800080FF8000 506 80FF800080FF800080FF800080FF800080FF800080FF800080FF800080FF0000 507 00FF000000000000000000000000000000FF800080FFC0C0C0FF800080FF8000 508 80FF800080FF800080FF800080FF800080FF800080FF800080FF800080FF8000 509 80FF000000FF0000000000000000000000FF800080FF800080FFC0C0C0FF8000 510 80FF800080FF800080FF800080FF800080FF800080FF800080FF800080FF8000 511 80FF800080FF000000FF00000000000000FF800080FF800080FF800080FFC0C0 512 C0FF800080FF800080FF800080FF800080FF800080FF800080FF800080FF8000 513 80FF800080FF000000FF000000FF000000FF800080FF800080FF800080FF8000 514 80FFC0C0C0FF800080FF800080FF800080FF800080FF800080FF800080FF0000 515 00FF000000FF808080FF0000000000000000000000FF800080FF800080FF8000 516 80FF800080FFC0C0C0FF800080FF800080FF800080FF000000FF000000FF8080 517 80FFFFFFFFFF808080FF000000000000000000000000000000FF800080FF8000 518 80FF800080FF800080FFC0C0C0FF000000FF000000FF808080FFC0C0C0FFFFFF 519 FFFFC0C0C0FF000000FF000000FF000000000000000000000000000000FF8000 520 80FF800080FF800080FF000000FF808080FFFFFFFFFFC0C0C0FFFFFFFFFFC0C0 521 C0FF000000FF000000FF00000000000000000000000000000000000000000000 522 00FF800080FF800080FF000000FFFFFFFFFFC0C0C0FFFFFFFFFF000000FF0000 523 00FF000000000000000000000000000000000000000000000000000000000000 524 0000000000FF800080FF000000FF808080FF000000FF000000FF000000000000 525 0000000000000000000000000000000000000000000000000000000000000000 526 000000000000000000FF000000FF000000FF0000000000000000000000000000 527 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 528 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 529 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 530 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 531 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000A4000000A6000000 532 A9200000AA7E0000AAB20000AAC80000AAB20000AA7E0000A9200000A6000000 533 A400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000A4000000A6410A0A 534 AEC13F3FD5E76060EDF86A6AF3FE6060ECF83E3ED4E70A0AADC10000A6410000 535 A400FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000A3200A0AABC15555 536 E3F35A5AE2FF5656DEFF5656DEFF5656DEFF5959E1FF5050DEF30909AAC10000 537 A320FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000009E7E3939CCE64A4A 538 D2FF4545CDFF4545CDFF4545CDFF4545CDFF4545CDFF4848D0FF3131C3E60000 539 9E7EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000009AB24A4AD4F83737 540 BFFF3737BFFF3131BAFF2727B0FF1C1CA6FF1616A0FF12129CFF2323AEF80000 541 9AB2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000095C84848D0FE2E2E 542 B8FF1D1DADFF1212A5FF1111A4FF1111A4FF1111A4FF1111A4FF1B1BADFE0000 543 95C8FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000008FB23434C3F81414 544 B2FF1111B1FF1111B1FF1111B1FF1111B1FF1111B1FF1111B1FF1414B0F80000 545 8FB2FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000897E1818AFE61414 546 C1FF1111BFFF1111BFFF1111BFFF1111BFFF1111BFFF1111BFFF0A0AA6E60000 547 897EFFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000008420030389C11515 548 BFF31212CDFF1111CCFF1111CCFF1111CCFF1111CCFF0E0EBCF3020288C10000 549 8420FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000008100000078410202 550 7DC10A0AA8E70F0FCAF81111D5FE0F0FCAF80A0AA8E702027DC1000078410000 551 8100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000008100000075000000 552 64200000607E000060B2000060C8000060B20000607E00006420000075000000 553 8100FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 554 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 555 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 556 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 557 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 558 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 559 FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 560 0000000000000000000000000000000000000000000000000000000000000000 561 0000000000000000000000000000000000000000000000000000000000000000 562 0000000000000000000000000000000000000000000000000000000000000000 563 000000000000000000000000000000000000000000001818C0FF1818C0FFC0C0 564 C0FF000000000000000000000000000000000000000000000000000000000000 565 00001818C0FF1818C0FFC0C0C0FF00000000000000002020C8FF2020C8FF2020 566 C8FF2020C8FFC0C0C0FF00000000000000000000000000000000000000002020 567 C8FF2020C8FFC0C0C0FF000000000000000000000000000000002626CEFF2626 568 CEFF2626CEFF2626CEFFC0C0C0FF0000000000000000000000002626CEFF2626 569 CEFFC0C0C0FF0000000000000000000000000000000000000000000000000000 570 00002929D1FF2929D1FF2929D1FFC0C0C0FF000000002929D1FFC0C0C0FF0000 571 0000000000000000000000000000000000000000000000000000000000000000 572 0000000000002C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FF2C2CD4FFC0C0C0FF0000 573 0000000000000000000000000000000000000000000000000000000000000000 574 000000000000000000002F2FD7FF2F2FD7FF2F2FD7FFC0C0C0FF000000000000 575 0000000000000000000000000000000000000000000000000000000000000000 576 0000000000003232DAFF3232DAFF3232DAFF3232DAFF3232DAFFC0C0C0FF0000 577 0000000000000000000000000000000000000000000000000000000000000000 578 00003535DDFF3535DDFF3535DDFFC0C0C0FF000000003535DDFF3535DDFFC0C0 579 C0FF000000000000000000000000000000000000000000000000000000003838 580 E0FF3838E0FF3838E0FFC0C0C0FF0000000000000000000000003838E0FF3838 581 E0FFC0C0C0FF00000000000000000000000000000000000000003A3AE2FF3A3A 582 E2FF3A3AE2FFC0C0C0FF00000000000000000000000000000000000000003A3A 583 E2FFC0C0C0FF00000000000000000000000000000000000000003A3AE2FF3A3A 584 E2FF3A3AE2FFC0C0C0FF00000000000000000000000000000000000000000000 585 00003A3AE2FFC0C0C0FF00000000000000000000000000000000000000003A3A 586 E2FFC0C0C0FF0000000000000000000000000000000000000000000000000000 587 0000000000000000000000000000000000000000000000000000000000000000 588 0000000000000000000000000000000000000000000000000000000000000000 589 0000000000003A3AE2FFC0C0C0FF000000000000000000000000000000000000 590 0000000000000000000000000000000000000000000000000000000000000000 591 0000000000000000000000000000000000000000000000000000000000000000 592 0000000000000000000000000000000000000000000000000000000000000000 593 000000000000000000000000000000000000000000FF000000FF000000FF0000 594 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 595 000000000000000000000000000000000000000000FF000000FFFFFFFFFFFFFF 596 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 597 000000000000000000000000000000000000000000FF008484FF000000FFFFFF 598 FFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 599 0000840000FF000000000000000000000000000000FF008484FF008484FF0000 600 00FFFFFFFFFFFFFFFFFFFFFFFFFF000000FF0000000000000000000000008400 601 00FF840000FF000000000000000000000000000000FF008484FF008484FF0084 602 84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000840000FF8400 603 00FF840000FF840000FF840000FF00000000000000FF008484FF008484FF0084 604 84FF000000FFFFFFFFFFFFFFFFFF000000FF00000000840000FF840000FF8400 605 00FF840000FF840000FF840000FF00000000000000FF008484FF008484FF0084 606 84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000840000FF8400 607 00FF840000FF840000FF840000FF00000000000000FF008484FF008484FF0084 608 84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000008400 609 00FF840000FF000000000000000000000000000000FF008484FF008484FF0000 610 00FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 611 0000840000FF000000000000000000000000000000FF008484FF008484FF0084 612 84FF000000FFFFFFFFFFFFFFFFFF000000FF0000000000000000000000000000 613 0000000000000000000000000000000000FF000000FF008484FF008484FF0084 614 84FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 615 00FF0000000000000000000000000000000000000000000000FF008484FF0084 616 84FF000000FF0000000000000000000000000000000000000000000000000000 617 0000000000000000000000000000000000000000000000000000000000FF0084 618 84FF000000FF0000000000000000000000000000000000000000000000000000 619 0000000000000000000000000000000000000000000000000000000000000000 620 00FF000000FF0000000000000000000000000000000000000000000000000000 621 0000000000000000000000000000000000000000000000000000000000000000 622 0000000000FF0000000000000000000000000000000000000000000000000000 623 0000000000000000000000000000000000000000000000000000000000000000 624 0000000000000000000000000000000000000000000000000000000000000000 625 000000000000000000000000000000000000000000000000000000000000C584 626 44FFC28342FFD89C6DFFD69668FFD49463FFD69668FFB2793CFFB1783BFF0000 627 0000000000000000000000000000000000000000000000000000C58442FFDCA2 628 77FFF3DAC7FFFCF7F1FFFFFEFEFFFFFEFEFFFCF4EDFFF1D6C0FFC7935DFFA66F 629 33FF0000000000000000000000000000000000000000C48443FFE5B999FFFCF4 630 EDFFFBD2C1FFFAA887FFFD8757FFFD8454FFF8A582FFF7CEBDFFFAF1E7FFD2A7 631 7AFFA36A2AFF000000000000000000000000C48445FFDCA277FFFCF4EDFFFABF 632 A6FFFF7A43FFFFBB9EFFFFF6F3FFFFFEFEFFFEEDE5FFFA9970FFF3B69CFFF8F0 633 E6FFBB8B56FF986426FF0000000000000000C48341FFF0DAC3FFFAD1C0FFFF79 634 40FFFF986EFFFFFEFEFFFFC9B2FFFD9164FFFAC6AFFFFEF5F1FFF5773DFFEDC5 635 B2FFE4CBB3FF905D21FF0000000000000000D1834CFFFCF7F1FFFAA582FFFF73 636 3AFFFF844EFFFFAE8AFFFE6C2DFFF76727FFF19268FFFFFEFEFFE98354FFD785 637 60FFF8F1ECFF81551FFF0000000000000000CD844EFFFFFEFEFFFC814CFFFF70 638 31FFFF6B2CFFFD6928FFF86523FFF49265FFFDF5F1FFF4D4C5FFC65018FFBA59 639 27FFFEFEFDFF834A1CFF0000000000000000CD8147FFFFFEFEFFF87A46FFF968 640 29FFF66525FFF16020FFF18653FFFFFEFEFFF0BFA8FFC55A24FFB64C15FFB757 641 24FFFEFEFDFF7F481AFF0000000000000000CD7F45FFFCF4EDFFEC9772FFE860 642 21FFE05A1DFFDB5819FFEDAA89FFFFFEFEFFC84E12FFB94C11FFB34C13FFC77B 643 53FFF6F0ECFF7A4319FF0000000000000000B4793AFFEFD6C1FFEDC5B2FFDD5A 644 1AFFD55617FFD25313FFD87D4DFFE3A686FFBB4C11FFB34A12FFB64A10FFDEB9 645 A6FFDCC9B8FF563C0DFF0000000000000000B67734FFD6996BFFF9F0E7FFDDA4 646 88FFC75013FFC04E11FFDCA688FFFFFEFEFFB54911FFB64A10FFD59E82FFF3EC 647 E7FF9A7352FF49340DFF000000000000000000000000B2702BFFDBAB80FFF8EF 648 E7FFE2BBA6FFCC7E56FFC15823FFC05722FFC97F56FFDEBAA7FFF2EBE7FFB393 649 76FF483108FF0000000000000000000000000000000000000000A1692CFFC088 650 58FFE0C9B4FFF7F1ECFFFEFDFCFFFEFDFCFFF5F0ECFFDCC9B8FF9E7857FF4731 651 08FF000000000000000000000000000000000000000000000000000000009164 652 29FF855A24FF885015FF824A1DFF7E4719FF794417FF583C0EFF49340DFF0000 653 0000000000000000000000000000000000000000000000000000000000000000 654 0000000000000000000000000000000000000000000000000000000000000000 655 0000000000000000000000000000FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 656 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 657 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 658 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 659 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 660 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 661 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 662 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 663 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000000063000000B7FFFF 664 FF00FFFFFF00000000FF000000FF000000B7FFFFFF00FFFFFF00000000FF0000 665 00FF0000008BFFFFFF00FFFFFF00FFFFFF0000000040000000FF000000B7FFFF 666 FF0000000063000000B7FFFFFF00000000B700000063000000630000008B0000 667 0020000000FF00000020FFFFFF0000000020000000FF000000FF000000B7FFFF 668 FF00FFFFFF00FFFFFF00FFFFFF000000008B0000008BFFFFFF00FFFFFF00FFFF 669 FF00000000FF00000040FFFFFF0000000020000000B70000008B000000B7FFFF 670 FF00FFFFFF00FFFFFF00FFFFFF00000000FF0000008BFFFFFF00FFFFFF000000 671 0020000000FF00000020FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF 672 FF00FFFFFF00FFFFFF000000008B000000FF00000040FFFFFF00FFFFFF000000 673 00FF00000040FFFFFF00FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF 674 FF00FFFFFF0000000040000000FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFF 675 FF00000000FF00000063FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF 676 FF00FFFFFF00000000FF000000FF00000020FFFFFF00FFFFFF00FFFFFF00FFFF 677 FF00000000FF0000008BFFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF 678 FF0000000063000000FF00000063FFFFFF00FFFFFF0000000063000000B70000 679 0020000000FF00000063FFFFFF00FFFFFF00FFFFFF000000008B000000B7FFFF 680 FF000000008B000000FF000000FF000000FF0000008BFFFFFF00000000B70000 681 00FF000000B7FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 682 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 683 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 684 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 685 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 686 FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF 687 FF00FFFFFF00FFFFFF00FFFFFF00000000000000000000000000000000000000 688 0000000000000000000000000000000000000000000000000000000000000000 689 0000000000000000000000000000000000000000000000000000000000000000 690 000000000000000000000000000000000000000000FF000000FF000000FF0000 691 0000000000000000000000000000000000000000000000000000000000000000 692 0000000000000000000000000000000000FF0000000000000000000000000000 693 00FF00000000000000FF00000000000000000000000000000000000000000000 694 0000000000000000000000000000000000000000000000000000000000000000 695 0000000000FF000000FF0000000000000000000000FF000000FF000000FF0000 696 0000000000000000000000000000000000000000000000000000000000000000 697 00FF000000FF000000FF00000000000000FF00FFFFFFFFFFFFFF00FFFFFF0000 698 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000000000 699 0000000000000000000000000000000000FFFFFFFFFF00FFFFFFFFFFFFFF00FF 700 FFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF000000FF000000000000 701 0000000000000000000000000000000000FF00FFFFFFFFFFFFFF00FFFFFFFFFF 702 FFFF00FFFFFFFFFFFFFF00FFFFFFFFFFFFFF00FFFFFF000000FF000000000000 703 0000000000000000000000000000000000FFFFFFFFFF00FFFFFFFFFFFFFF00FF 704 FFFF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 705 00FF000000FF000000FF000000FF000000FF00FFFFFFFFFFFFFF00FFFFFF0000 706 00FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 707 84FF008484FF000000FF00000000000000FFFFFFFFFF00FFFFFF000000FF0084 708 84FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 709 84FF000000FF0000000000000000000000FF00FFFFFF000000FF008484FF0084 710 84FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0000 711 00FF000000000000000000000000000000FF000000FF008484FF008484FF0084 712 84FF008484FF008484FF008484FF008484FF008484FF008484FF000000FF0000 713 0000000000000000000000000000000000FF000000FF000000FF000000FF0000 714 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000000000 715 0000000000000000000000000000000000000000000000000000000000000000 716 0000000000000000000000000000000000000000000000000000000000000000 717 0000000000000000000000000000000000000000000000000000000000000000 718 0000000000000000000000000000000000000000000000000000000000000000 719 0000000000000000000000000000000000000000000000000000000000000000 720 0000000000000000000000000000000000000000000000000000000000000000 721 0000000000000000000000000000000000000000000000000000000000000000 722 0000000000000000000000000000000000000000000000000000000000000000 723 0000000000000000000000000000000000000000000000000000DE9077BFDA8A 724 70FFD88367FFD57C61FF0000000000000000DE9077BFDA8A70FFD88367FFD57C 725 61FF000000000000000000000000000000000000000000000000D9866CBFEBB0 726 9DFFF0BBABFFD27457FF0000000000000000D9866CBFEBB09DFFF0BBABFFD274 727 57FF000000000000000000000000000000000000000000000000D57C61BFE8A7 728 93FFEDB6A3FFCD6849FF0000000000000000D57C61BFE8A793FFEDB6A3FFCD68 729 49FF000000000000000000000000000000000000000000000000D27457BFE5A1 730 8BFFEBAF9AFFC95E3EFF0000000000000000D27457BFE5A18BFFEBAF9AFFC95E 731 3EFF000000000000000000000000000000000000000000000000CD6849BFE198 732 81FFE8A793FFC45432FF0000000000000000CD6849BFE19881FFE8A793FFC454 733 32FF000000000000000000000000000000000000000000000000C86A4DBFE7A5 734 90FFE5A18BFFBF4A27FF0000000000000000C86A4DBFE7A590FFE5A18BFFBF4A 735 27FF000000000000000000000000000000000000000000000000B95435BFE299 736 84FFE29A85FFB5401DFF0000000000000000B95435BFE29984FFE29A85FFB540 737 1DFF000000000000000000000000000000000000000000000000BF4A27C0D985 738 6BFFDF957EFFAA3A18FF0000000000000000BF4A27C0D9856BFFDF957EFFAA3A 739 18FF000000000000000000000000000000000000000000000000B5401DBFD57C 740 61FFDE9077FF993414FF0000000000000000B5401DBFD57C61FFDE9077FF9934 741 14FF000000000000000000000000000000000000000000000000AA3A18BFD375 742 58FFDC8B71FF8A2C0FFF0000000000000000AA3A18BFD37558FFDC8B71FF8A2C 743 0FFF000000000000000000000000000000000000000000000000993414BFCF6F 744 50FFDA886DFF7F270BFF0000000000000000993414BFCF6F50FFDA886DFF7F27 745 0BFF0000000000000000000000000000000000000000000000008A2C0FBF842A 746 0EFF7C260BFF7A250AFF00000000000000008A2C0FBF842A0EFF7C260BFF7A25 747 0AFF000000000000000000000000000000000000000000000000000000000000 748 0000000000000000000000000000000000000000000000000000000000000000 749 0000000000000000000000000000000000000000000000000000000000000000 750 0000000000000000000000000000000000000000000000000000000000000000 751 0000000000000000000000000000000000000000000000000000000000000000 752 0000000000000000000000000000000000000000000000000000000000000000 753 000000000000000000000000000000000000000000FF000000FF000000FF0000 754 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 755 00FF000000FF000000FF0000000000000000000000FF008484FF000000FFFFFF 756 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 757 00FFFFFFFFFF000000FF0000000000000000000000FF008484FF000000FFFFFF 758 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 759 00FF000000FF000000FF0000000000000000000000FF008484FF000000FFFFFF 760 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 761 00FF008484FF000000FF0000000000000000000000FF008484FF000000FFFFFF 762 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 763 00FF008484FF000000FF0000000000000000000000FF008484FF000000FFFFFF 764 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 765 00FF008484FF000000FF0000000000000000000000FF008484FF000000FFFFFF 766 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0000 767 00FF008484FF000000FF0000000000000000000000FF008484FF008484FF0000 768 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0084 769 84FF008484FF000000FF0000000000000000000000FF008484FF008484FF0084 770 84FF008484FF008484FF008484FF008484FF008484FF008484FF008484FF0084 771 84FF008484FF000000FF0000000000000000000000FF008484FF008484FF0000 772 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 773 00FF008484FF000000FF0000000000000000000000FF008484FF008484FF0000 774 00FF000000FF000000FF000000FF000000FF000000FFFFFFFFFFFFFFFFFF0000 775 00FF008484FF000000FF0000000000000000000000FF008484FF008484FF0000 776 00FF000000FF000000FF000000FF000000FF000000FFFFFFFFFFFFFFFFFF0000 777 00FF008484FF000000FF0000000000000000000000FF008484FF008484FF0000 778 00FF000000FF000000FF000000FF000000FF000000FFFFFFFFFFFFFFFFFF0000 779 00FF008484FF000000FF000000000000000000000000000000FF000000FF0000 780 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 781 00FF000000FF000000FF00000000000000000000000000000000000000000000 782 0000000000000000000000000000000000000000000000000000000000000000 783 0000000000000000000000000000000000000000000000000000000000000000 784 0000000000000000000000000000000000000000000000000000000000000000 785 00000000000000000000000000000000000000000000000000FF000000FF0000 786 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000000000 787 00000000000000000000000000000000000000000000000000FFFFFFFFFFFFFF 788 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF000000FF0000 789 00000000000000000000000000000000000000000000000000FFFFFFFFFFFFFF 790 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FFBDBDBDFF0000 791 00FF0000000000000000000000000000000000000000000000FFFFFFFFFFFFFF 792 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000FF000000FF0000 793 00FF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 794 FFFFFF0000FFFF0000FFFF0000FFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 795 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 796 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 797 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 798 FFFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFFFFFFFFFFFF 799 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 800 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 801 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 802 FFFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFFFFFFFFFFFF 803 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 804 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 805 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 806 FFFFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFFFFFFFFFFFF 807 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 808 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 809 FFFF000000FF00000000000000000000000000000000000000FFFFFFFFFFFFFF 810 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 811 FFFF000000FF00000000000000000000000000000000000000FF000000FF0000 812 00FF000000FF000000FF000000FF000000FF000000FF000000FF000000FF0000 813 00FF000000FF0000000000000000000000000000000000000000000000000000 814 0000000000000000000000000000000000000000000000000000000000000000 815 0000000000000000000000000000A37B48FFA37B48FFA27A47FFA27946FFA178 816 45FFA07744FFA07643FF9F7542FF9E7441FF9E7340FF9D723FFF9C713EFF9C70 817 3DFF9B6F3CFF9A6E3BFF9A6D3AFFA37B48FFBEA27FFFBEA17EFFBDA17DFFBDA0 818 7CFFBD9F7CFFBC9F7BFFBB9E7AFFBB9D7AFFBB9D79FFBA9C78FFB99B78FFB99A 819 77FFB89A76FFB89975FF996C39FFA27A47FFFFFFFFFFFFFFFFFFFEFEFEFFFEFE 820 FEFFFDFDFDFFFDFDFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFAF9FFFAFAF9FFFAF9 821 F8FFF9F9F7FFF9F8F7FF986B37FFA17946FFFFFFFFFF878787FF5D5D5DFFA0A0 822 A0FFFDFCFCFFFCFCFBFFFCFBFBFFFBFBFAFFFBFAF9FFFAFAF9FFFAF9F8FFF9F8 823 F7FFF8F8F7FFF8F7F6FF976A36FFA17844FFFEFEFEFF5F5F5FFF949494FF5353 824 53FFFCFCFBFF7B7B7BFF797979FF757575FF727272FF6E6E6EFF6A6A69FF6666 825 66FF626262FFF7F7F5FF966935FFA07643FFFEFDFDFF8C8C8CFF525252FFA4A4 826 A4FFFBFBFAFFFBFBFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8F7FFF8F8F6FFF8F7 827 F6FFF7F7F5FFF7F6F4FF966734FF9F7542FFFDFDFCFFFCFCFCFFFCFCFBFFFBFB 828 FAFFFBFAFAFFFAFAF9FFFAF9F8FFF9F9F8FFF9F8F7FFF8F8F6FFF8F7F6FFF7F6 829 F5FFF7F6F4FFF6F5F4FF956633FF9E7441FFFCFCFCFFB5B5B5FF848484FFBEBD 830 BDFFFAFAF9FFFAF9F8FFF9F9F7FFF9F8F7FFF8F8F6FFF8F7F5FFF7F6F5FFF7F6 831 F4FFF6F5F3FFF6F5F3FF946531FF9D7340FFFCFBFBFF818181FFC4C4C4FF8F8F 832 8FFFFAF9F8FF7B7B7AFF797979FF757574FF727171FF6D6D6DFF696969FF6666 833 65FF626261FFF5F4F2FF936430FF9D723EFFFBFBFAFF9F9F9EFF7F7F7FFFAEAE 834 ADFFF9F8F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F6F4FFF6F5F3FFF5F4 835 F3FFF5F4F2FFF4F3F1FF92622FFF9C703DFFFAFAF9FFFAF9F9FFF9F9F8FFF9F8 836 F7FFF8F8F7FFF8F7F6FFF7F7F5FFF7F6F5FFF6F5F4FFF6F5F3FFF5F4F3FFF5F4 837 F2FFF4F3F1FFF4F3F0FF92612EFF9B6F3CFFFAF9F8FFBEBEBDFF929292FFBCBC 838 BBFFF8F7F6FFF7F7F5FFF7F6F4FFF6F5F4FFF6F5F3FFF5F4F2FFF5F4F2FFF4F3 839 F1FFF4F2F0FFF3F2F0FF91602DFF9A6E3BFFF9F9F8FF7C7C7CFFC4C4C4FF8787 840 87FFF7F6F5FF7A7A7AFF787878FF747474FF717170FF6D6D6CFF696968FF6565 841 65FF616161FFF2F1EFFF905F2BFF996D3AFFF9F8F7FF959594FF878787FF9B9A 842 9AFFF7F6F4FFF6F5F3FFF6F5F3FFF5F4F2FFF4F3F1FFF4F3F1FFF3F2F0FFF3F2 843 EFFFF2F1EFFFF2F1EEFF8F5E2AFF996C38FFF8F7F6FFF8F7F5FFF7F6F5FFF6F6 844 F4FFF6F5F3FFF5F5F3FFF5F4F2FFF4F3F1FFF4F3F1FFF3F2F0FFF3F2EFFFF2F1 845 EFFFF2F0EEFFF1F0EDFF8E5D29FF986B37FF976A36FF966935FF966734FF9566 846 33FF946532FF946531FF936430FF92622FFF92612EFF91602DFF90602CFF905F 847 2BFF8F5D2AFF8E5C29FF8D5B28FF000000000000000000000000000000000000 848 0000000000000000000000000000000000000000000000000000000000000000 849 0000000000000000000000000000000000000000000000000000000000000000 850 0000000000000000000000000000000000000000000000000000000000000000 851 0000000000000000000000000000000000000000000000000000000000000000 852 0000000000000000000000000000000000000000000000000000000000000000 853 0000000000000000000000000000000000000000000000000000339966FF0000 854 00000000000066CC99FF009933FF009933FF009933FF339966FF000000000000 855 0000000000000000000000000000000000000000000000000000009933FF3399 856 66FF009933FF009933FF009933FF009933FF009933FF339966FF339966FF0000 857 0000000000000000000000000000000000000000000000000000009933FF0099 858 33FF009933FF009933FF66CC99FF000000000000000066CC99FF009933FF66CC 859 99FF000000000000000000000000000000000000000000000000009933FF0099 860 33FF009933FF339966FF0000000000000000000000000000000066CC99FF0099 861 33FF000000000000000000000000000000000000000000000000009933FF0099 862 33FF009933FF009933FF339966FF000000000000000000000000000000000000 863 0000000000000000000000000000000000000000000000000000000000000000 864 0000000000000000000000000000000000000000000000000000000000000000 865 0000000000000000000000000000000000000000000000000000000000000000 866 0000000000000000000000000000339966FF009933FF009933FF009933FF0099 867 33FF000000000000000000000000000000000000000000000000009933FF66CC 868 99FF00000000000000000000000000000000339966FF009933FF009933FF0099 869 33FF00000000000000000000000000000000000000000000000066CC99FF0099 870 33FF66CC99FF000000000000000066CC99FF009933FF009933FF009933FF0099 871 33FF000000000000000000000000000000000000000000000000000000003399 872 66FF339966FF009933FF009933FF009933FF009933FF009933FF339966FF0099 873 33FF000000000000000000000000000000000000000000000000000000000000 874 0000339966FF009933FF009933FF009933FF66CC99FF00000000000000003399 875 66FF000000000000000000000000000000000000000000000000000000000000 876 0000000000000000000000000000000000000000000000000000000000000000 877 0000000000000000000000000000000000000000000000000000000000000000 878 0000000000000000000000000000000000000000000000000000000000000000 879 0000000000000000000000000000000000000000000000000000000000000000 880 0000000000000000000000000000000000000000000000000000000000000000 881 0000000000000000000000000000000000000000000000000000000000000000 882 000000FF00FF0000000000000000000000000000000000000000000000000000 883 0000000000000000000000000000000000000000000000000000000000000000 884 000000FF00FF00FF00FF00000000000000000000000000000000000000000000 885 0000000000000000000000000000000000000000000000000000000000000000 886 000000FF00FF00FF00FF00FF00FF000000000000000000000000000000000000 887 0000000000000000000000000000000000000000000000000000000000000000 888 000000FF00FF00FF00FF00FF00FF00FF00FF0000000000000000000000000000 889 0000000000000000000000000000000000000000000000000000000000000000 890 000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000000000000000 891 0000000000000000000000000000000000000000000000000000000000000000 892 000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000 893 0000000000000000000000000000000000000000000000000000000000000000 894 000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF0000 895 0000000000000000000000000000000000000000000000000000000000000000 896 000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000000000 897 0000000000000000000000000000000000000000000000000000000000000000 898 000000FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000000000000000 899 0000000000000000000000000000000000000000000000000000000000000000 900 000000FF00FF00FF00FF00FF00FF00FF00FF0000000000000000000000000000 901 0000000000000000000000000000000000000000000000000000000000000000 902 000000FF00FF00FF00FF00FF00FF000000000000000000000000000000000000 903 0000000000000000000000000000000000000000000000000000000000000000 904 000000FF00FF00FF00FF00000000000000000000000000000000000000000000 905 0000000000000000000000000000000000000000000000000000000000000000 906 000000FF00FF0000000000000000000000000000000000000000000000000000 907 0000000000000000000000000000000000000000000000000000000000000000 908 0000000000000000000000000000000000000000000000000000000000000000 909 0000000000000000000000000000000000000000000000000000000000000000 910 0000000000000000000000000000000000000000000000000000000000000000 911 0000000000000000000000000000000000000000000000000000000000000000 912 0000000000000000000000000000000000000000000000000000000000000000 913 0000000000000000000000000000000000000000000000000000000000000000 914 000000000000000000003131312F313131FF3030301F00000000000000000000 915 0000000000000000000000000000000000000000000000000000000000000000 916 000000000000000000002E2E2E3F2E2E2EFF2E2E2E3F00000000000000000000 917 0000000000000000000000000000000000000000000000000000000000000000 918 00002A2A2A7F2A2A2ADF2B2B2BFF2B2B2BFF2B2B2BFF2A2A2ADF2A2A2A7F0000 919 0000000000000000000000000000000000000000000000000000000000002727 920 279F272727FF282828AF2828284F272727FF2828284F282828AF272727FF2727 921 279F0000000000000000000000000000000000000000000000002424247F2424 922 24FF2424245F0000000000000000242424FF00000000000000002424245F2424 923 24FF2424247F0000000000000000000000000000000000000000202020DF2020 924 20AF000000000000000000000000202020FF0000000000000000000000002020 925 20AF202020DF0000000000000000000000001C1C1C1F1C1C1C3F1D1D1DFF1D1D 926 1D4F0000000000000000000000001D1D1DFF0000000000000000000000001D1D 927 1D4F1D1D1DFF1C1C1C3F1C1C1C1F1A1A1A1F1A1A1AFF1A1A1AFF1A1A1AFF1A1A 928 1AFF1A1A1AFF1A1A1AFF1A1A1AFF1A1A1ABF1A1A1AFF1A1A1AFF1A1A1AFF1A1A 929 1AFF1A1A1AFF1A1A1AFF1A1A1AFF000000001818182F1818183F161616FF1616 930 167F1818183F1818183F1818183F161616FF1818183F1818183F1818183F1616 931 167F161616FF1818183F1818181F000000000000000000000000131313DF1313 932 13AF000000000000000000000000131313FF0000000000000000000000001313 933 13AF131313DF00000000000000000000000000000000000000000F0F0F7F0F0F 934 0FFF0E0E0E5F00000000000000000F0F0FFF00000000000000000E0E0E5F0F0F 935 0FFF1010106F0000000000000000000000000000000000000000000000000D0D 936 0D9F0C0C0CFF0C0C0CAF0B0B0B4F0C0C0CFF0B0B0B4F0C0C0CAF0C0C0CFF0D0D 937 0D9F000000000000000000000000000000000000000000000000000000000000 938 00000909097F090909DF090909FF090909FF090909FF090909DF0909096F0000 939 0000000000000000000000000000000000000000000000000000000000000000 940 000000000000000000000505053F050505FF0505053F00000000000000000000 941 0000000000000000000000000000000000000000000000000000000000000000 942 000000000000000000000202022F020202FF0303031F00000000000000000000 943 0000000000000000000000000000 464 4C7A0F00000010000000100000008C0A00000000000078DAED9A0B544DF91EC7 465 CFCAB2D6154A8A89A9A5B98C94A644AEC7186118B40C2D8F3CEE6D3AA1282291 466 9E3A2244EE44629454485C16998C6772EA62702F732F17638CD7984B73178D4E 467 A7C7E975BEF7FFDF9D73DA67B7CF3E2F83B1FA9DF5B5CFFEEDDFE7F7FBBFF63E 468 7BEF88446DA66D80B0DAF8779B6FB3577932A96412B75AB49A911139B438B6F4 469 E4D0C91990032525257A59811C8CDF8C1C1ABF8939B4FC86E660CD6DAB634239 470 34CCEAD5BC7DD09583CD51E3F03A73B039BA4F8DED17CAC1AE6700DB2A077331 471 62B1469C0F5AF54D3C8F0CE268B3DE0689447944F9447F7312890E251015125D 472 516D139AFDF94C9C003FDAD2F268A9B7F7ED32B1B85C111A2A578AC52F142347 473 DE2AB3B43C524A8FEBE6F739595A1E2E9D31E367F99C394FE0E7F750A3D9B37F 474 82AFEF4379870E874A691C3F9F9D306CD8B5673E3E37316EDCF5569A30E1DFF0 475 F4BCF08CC6F1F399853E3EB71443864841E5E97916CECEC7E0E0908FEEDD73D1 476 B56B167AF73EAAA071FCFCF62BA486D2DDFD341C1D8F90F8FDB0B1C9D3D2FBEF 477 1F51D2387E3EB5D0CBEB82C2CEAE90C47ECD2B3BBB630A1AC7CF6F4CB0B72F78 478 6667574A62A5BCB2B4CC7F46E3F8F924A776ED369676EB269577ED7A9DC45FD3 479 9295D539B9854572298DE3E71389A2475B58AC2AB5B43C58666DFD0F858DCD6D 480 25DDD27DEAA7C7699C6E3E92683E596762B2DEC464DD89AFA8B609CDFE48912E 481 FEF7AAB7C5ECED4B40A5BABE1A1DEBE474056CE9CA2374BC6FDFEFC016374697 482 9F6B2E2E37A0963A96FDDD107373BB05AE8CE1A979787C0FB58C65070EBC07AE 483 0CCD3178F003A8A566B8FBBA6CE8D0C7508B1BABCBAFB6E1C39F402DA1187378 484 4372183BD6A6D8EBAA63C2BD069F0CE2F9CC603E298937071F9FC473DFC7F03C 485 39B83C6505794E0E36AF66D93294E7638DE1CDAD6F70FF397369F4F8EBA9AF73 486 ED717813D6239737ED3C308F37E799999BE38DD8A5A4B1F8FBDA31B89B15863B 487 3B16E256FA3C665B1833025F477F0C61760CEEEF8D82FCDE6534D6CA00A59251 488 63553964774A70799B3FF2970EE2CD7131E9533C3D93C1C436DC2C45FDC10D68 489 DA30134D49D3A1D8BF06B5DF15A35E56869B0762B12FD415DAEC38A62E65EBA5 490 F940ECA7405136502367EA2BCB9FA23E231CF2935950543C43518A1F76CEEFAB 491 C97171ED6854DCBB80FA1BE4392F6614B0734973DBAF16A269EB7CD47F5B0065 492 B50CD5519FA0FC5221FEFBCFE3D8E2FF8186BFB17612D3DF7AD24E2C1F0E244D 493 068E6E8272F147A85DE00C59DA4226DFFFD64EC7F7EBC450C85E2071462F0D7F 494 9DC6D3714A9C04847B028BDCD014D20F8AA0DEA84A0B4213A95D75EB12BEF5B5 495 C7D9D9CE24B4096B7D1C5AF8C4F10CAF88FD0C750B5D5013F421646227C8D64F 496 63FC15D283B834A70F4E4EEA865333FB30BC6442CF165E328E19BB175F45E017 497 F107783CC7113FCEEA81F2431B19FECAE4AE3833C906C727D9E272DC34D454BC 498 2043DC43C37F13331C2FEF943263F3604E4FDCF67B0F37A7D9E2EEAACFF173FE 499 7A1451D6A72B4EFA74C1C333F9B87FF534FC4674D6F027A3BC70276311EA2ACA 500 F0202F19977D6D5132D906F7F39399FA2726DA30ECEDEC3590BF2843E6F2A998 501 E8D5596B0D1486F7C78F875743F1B20C4F8AF2712DC10FA5B37AA364E61F7155 502 E28787670FA0F279198E6F5B89099E7FE05D837B42DC50923C0B8FAF7E835A32 503 47CAA64646D5A4BFB4CDD9D133315E07ABB6ADF35DB08E8C75B26F37ACF17144 504 C2F81E8819FB1E668DB06AD5E657F3B61B6D6A7E0E9A47748AB5AFBE0EF3F952 505 38EC28762C3B17DDAAF6A952E823882AD64975DC89AF162B770A4F3DFACF2816 506 7F4A15C7C76BB5975B9F53E7148F4F538B5B5B88E78E094F9BE6E9E1C1D74EBE 507 3E7179D5586BD550CF09ABFFF304F814CEFD420A6B2E79FBD4F6FC6FFEBB4803 508 EF65F00AEE715ABD4337F65945AB1DEA7B55ED77BC06DF77AA59C1ADD07DAB3E 509 560FAF23D6707159F6BDB82EB1C6CF0C56D37F1359FEE707C359919163D56602 510 F6704B94F4DEA670DC5DBB00B7E303A1CFCFB51FD62F963E3FB61B1545877173 511 C54CE8F3738DE496FE72601BCA4FEEC3F58513A1CFCF35925BFA744F0A9E1764 512 E2EA1723A1CFCF35925BFAD3CE44D05A17A70F843E3FD7AE847E2E2DDBBF05B4 513 96D4C719FAFC5C3B337DB0F44946129E64AEC389518ED0E7E71AC95DF2C3BA45 514 78B43D018786DB439F9F6B24B794CE2F996F6478D9419F9F6B24B7F43F91B370 515 3F651936B959439F9F6B24B7F45F4B7D712F390C12E78ED0E7E71AC92D4D72B5 516 427CDF8E88FDD012FAFCEFE0DFF961E2F550E7FB3BBEF7793CBF8746F1E6D6E7 517 FD0D7A177843DE9DE9FA0D36E4F753E837DCF0777726F1E6F6FF37E645669E3F 518 BF976B809E5711069DB726F3C5C5C57AEF830DBC6E4090E7FEA733C3FEA60143 519 CDE8FA9C76B4D5FF8DEB9BC8BF89737F5FDC0450ED8D1D8FBD319F614FF438E4 520 468D45EECA4F91133906D92B46237BF928EC8EF046D6B291C80AFF04BB968E40 521 E6928F9119369C61CFEF95E0FC9E0414EF5985E2DC7814E7C4E35C4E1C8AB263 522 51B49B2A0667B3A27166175166144E67AEC4E98C48642C1EC6D4559B92BE6B27 523 6A6A6A226A446363031A1B1AD0D0508F86FA3AD453D5295057578B3A452D762E 524 1A823DA4CDD4366CD8007F7F7FE4E6E6A2A95180259C82AAB6065F85FE89F477 525 2C5333202000E9E9E998366D1AC3C6C5C521262606919191888888C092254B10 526 1A1A82E0E060CC9D3B17B5B5D5D811329819272569EFE6CD9B3175EA54E4E5E5 527 35D7246A69AFBA6E0D5397B2B53555D8B1C08B19E3E6BE36B7B9B9BD026C4D33 528 5B535D85EDC18398F9A1EC89132790447E57CE936B1C779C9AD96A162B67941E 529 E489DD646EE938252626E2E2C58B484D4D65D8B8B85855FF572062D932848585 530 212484F63F88F43F10D55595D8367F005917239936E7E464432291E0E8D1235A 531 635CABAA5BA3AA5B5D2567D82AB90C69733D98F5D4DCDE3A565F396C756BB64A 532 5E81B44077662DD2F69E3F5F8CB4B4349C3B57A435C62D6C650B5B590139D156 533 F147CC3AA675E3E3E399FED375446BC6C6C6223A3A1A2B56ACC0B265E1A4FF8B 534 49FF1722282808818181A894BDC49680FEC820E7006DF3F6EDE90CBB2B33536B 535 8C5BDA2B636ACA2B5F326CA5EC57A47EE14ACE81A14C7B15DC7112622B7E85AC 536 A21C5FFABB30E7005DC7742DD2F544D7447AD040666EE9FCD031A6E344FBBA45 537 ECC6B439D5DF155FFEC5057FFD73BF77EA59645046B0A63FC1D73220CA18A411 538 FB984E53C7B13836AF37078761DAC0690FDB27C4F3D5D2F4C9C0FA06F5F975CC 539 09773C05DACF373EAD72E830BE31E6AE03C1FAAA5A426B401FCFD75E767BDE86 540 39790D4F02309B372707581F7379537280E7632E6F4C0E087CDE54FD3735FE6F 541 6AFDB599C8D3D3D3830803060CE8650AEFEEEEEE4D04BA358673757595103DEA 542 DFBF3FD4A2FBD4AF8F757676CE2142BF7EFD0A88A6A8BE4FA1FBF43B3DAE8BED 543 D3A78F840844012C1F58DF0354C779DBE1E4E4F488A880E30367BF80C6B17D0E 544 0E0EBD88BC1D1D1D4134857D8CFA38FB53A88FC653AE67CF9E54109054E838CD 545 696F6FEF41E4DDBD7B771049E877B5A88FB32F61F9B4D685ADADED23A2028E0F 546 9CFD021AC7377ED6D6D6122258595905B07C1A9EFAE97E972E5D96EA9AC3CE9D 547 3BE774EAD40944051D3B769C42BFABB605F43B3DAE6F0D75E8D04142F488082C 548 D1FDA5C6ACE3F6EDDB7B13816E4D397F2C2C2C3C88D0AE5D3B9DE7DFFF0101C8 549 8363 944 550 } 945 551 end 946 552 object PopupMenu1: TPopupMenu 947 left = 196948 top = 54553 Left = 294 554 Top = 81 949 555 end 950 556 end -
trunk/IDE/Forms/FormMain.pas
r74 r75 1 unit UFormMain; 2 3 {$MODE Delphi} 1 unit FormMain; 4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, 9 ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, Registry, 10 UProject, FileUtil, Menus, ActnList, DateUtils, 11 UFormTargetCode, UFormCodeTree, URegistry; 7 ComCtrls, ExtCtrls, SynEdit, SynHighlighterPas, Registry, Project, FileUtil, 8 Menus, ActnList, DateUtils, FormTargetCode, FormCodeTree, RegistryEx, 9 FormMessages, FormSourceCode, FormProject, FormTargetProject, FormTargets, 10 FormExternalProducerOutput; 12 11 13 12 type … … 145 144 procedure UpdateTitle; 146 145 procedure ProducerProcessOutput(Text: string); 146 procedure ShowProject(ProjectFile: TProjectFile); 147 procedure ShowTargetCode(ProjectFile: TProjectFile); 147 148 public 149 FormMessages: TFormMessages; 150 FormSourceCode: TFormSourceCode; 151 FormProject: TFormProject; 152 FormTargetCode: TFormTargetCode; 153 FormTargetProject: TFormTargetProject; 154 FormExternalProducerOutput: TFormExternalProducerOutput; 155 FormTargets: TFormTargets; 156 FormCodeTree: TFormCodeTree; 148 157 procedure LoadFromRegistry(Root: HKEY; const Key: string); 149 158 procedure SaveToRegistry(Root: HKEY; const Key: string); … … 162 171 163 172 uses 164 UCore, UFormMessages, UFormSourceCode, UFormProject, UCommon, UFormAbout, UFormOptions, 165 UFormTargets, UTarget, UExecutor, UFormProjectNew, 166 UFormTargetProject, UFormExternalProducerOutput; 173 Core, Common, FormAbout, FormOptions, Target, Executor, FormProjectNew; 167 174 168 175 resourcestring … … 175 182 FormSourceCode.Save; 176 183 AProjectSave.Execute; 177 with Core do begin184 with Core.Core do begin 178 185 // Compile project file 179 186 Compiler.Init; … … 214 221 procedure TFormMain.AResetExecute(Sender: TObject); 215 222 begin 216 Core.Co mpiler.Target.Executor.Reset;223 Core.Core.Compiler.Target.Executor.Reset; 217 224 end; 218 225 … … 220 227 begin 221 228 ABuildExecute(Self); 222 Core.Co mpiler.Target.Executor.Run;229 Core.Core.Compiler.Target.Executor.Run; 223 230 end; 224 231 225 232 procedure TFormMain.ARunToCursorExecute(Sender: TObject); 226 233 begin 227 Core.Co mpiler.Target.Executor.RunToCursor(0); // determine position234 Core.Core.Compiler.Target.Executor.RunToCursor(0); // determine position 228 235 end; 229 236 230 237 procedure TFormMain.AStepInExecute(Sender: TObject); 231 238 begin 232 Core.Co mpiler.Target.Executor.StepIn;239 Core.Core.Compiler.Target.Executor.StepIn; 233 240 end; 234 241 235 242 procedure TFormMain.AStepOutExecute(Sender: TObject); 236 243 begin 237 Core.Co mpiler.Target.Executor.StepOut;244 Core.Core.Compiler.Target.Executor.StepOut; 238 245 end; 239 246 240 247 procedure TFormMain.AStepOverExecute(Sender: TObject); 241 248 begin 242 Core.Co mpiler.Target.Executor.StepOver;249 Core.Core.Compiler.Target.Executor.StepOver; 243 250 end; 244 251 245 252 procedure TFormMain.AStopExecute(Sender: TObject); 246 253 begin 247 Core.Co mpiler.Target.Executor.Stop;254 Core.Core.Compiler.Target.Executor.Stop; 248 255 end; 249 256 … … 264 271 265 272 procedure TFormMain.AViewOptionsExecute(Sender: TObject); 266 begin 267 FormOptions.ShowModal; 273 var 274 FormOptions: TFormOptions; 275 begin 276 FormOptions := TFormOptions.Create(nil); 277 try 278 FormOptions.ShowModal; 279 finally 280 FormOptions.Free; 281 end; 268 282 end; 269 283 … … 280 294 procedure TFormMain.AViewSourceEditorExecute(Sender: TObject); 281 295 begin 282 283 296 end; 284 297 … … 288 301 F: TFileStream; 289 302 begin 290 FileName := ExtractFileDir(Core. Project.FileName) + Name + '.pas';303 FileName := ExtractFileDir(Core.Core.Project.FileName) + Name + '.pas'; 291 304 if FileExists(FileName) then 292 305 try … … 303 316 procedure TFormMain.UpdateInterface; 304 317 begin 305 with Core do begin306 UpdateTitle;307 AProjectClose.Enabled := Assigned(Project);308 AProjectSave.Enabled := Assigned(Project) and Project.Modified;309 AProjectSaveAs.Enabled := Assigned(Project);310 (*AProgramRun.Enabled := Project.Active and (BrainFuckInterpreter.State = rsStopped);311 AProgramPause.Enabled := Project.Active and (BrainFuckInterpreter.State = rsRunning);312 AProgramStop.Enabled := Project.Active and (BrainFuckInterpreter.State <> rsStopped);*)313 ABuild.Enabled := Assigned(Project) and Assigned(Compiler.Target) and314 Assigned(Compiler.Target.Producer);315 APause.Enabled := Assigned(Project) and Assigned(Compiler.Target) and316 Assigned(Compiler.Target.Executor) and (Compiler.Target.Executor.State = rsRunning);317 ARun.Enabled := Assigned(Project) and Assigned(Compiler.Target) and318 Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsStopped) or319 (Compiler.Target.Executor.State = rsPaused));320 AStop.Enabled := Assigned(Project) and Assigned(Compiler.Target) and321 Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsRunning) or322 (Compiler.Target.Executor.State = rsPaused));323 AStepIn.Enabled := Assigned(Project) and Assigned(Compiler.Target) and324 Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsRunning) or325 (Compiler.Target.Executor.State = rsPaused));326 AStepOut.Enabled := AStepIn.Enabled;327 AStepOver.Enabled := AStepIn.Enabled;328 ARunToCursor.Enabled := AStepIn.Enabled;318 with Core.Core do begin 319 UpdateTitle; 320 AProjectClose.Enabled := Assigned(Project); 321 AProjectSave.Enabled := Assigned(Project) and Project.Modified; 322 AProjectSaveAs.Enabled := Assigned(Project); 323 (*AProgramRun.Enabled := Project.Active and (BrainFuckInterpreter.State = rsStopped); 324 AProgramPause.Enabled := Project.Active and (BrainFuckInterpreter.State = rsRunning); 325 AProgramStop.Enabled := Project.Active and (BrainFuckInterpreter.State <> rsStopped);*) 326 ABuild.Enabled := Assigned(Project) and Assigned(Compiler.Target) and 327 Assigned(Compiler.Target.Producer); 328 APause.Enabled := Assigned(Project) and Assigned(Compiler.Target) and 329 Assigned(Compiler.Target.Executor) and (Compiler.Target.Executor.State = rsRunning); 330 ARun.Enabled := Assigned(Project) and Assigned(Compiler.Target) and 331 Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsStopped) or 332 (Compiler.Target.Executor.State = rsPaused)); 333 AStop.Enabled := Assigned(Project) and Assigned(Compiler.Target) and 334 Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsRunning) or 335 (Compiler.Target.Executor.State = rsPaused)); 336 AStepIn.Enabled := Assigned(Project) and Assigned(Compiler.Target) and 337 Assigned(Compiler.Target.Executor) and ((Compiler.Target.Executor.State = rsRunning) or 338 (Compiler.Target.Executor.State = rsPaused)); 339 AStepOut.Enabled := AStepIn.Enabled; 340 AStepOver.Enabled := AStepIn.Enabled; 341 ARunToCursor.Enabled := AStepIn.Enabled; 329 342 end; 330 343 331 344 UpdateMenu; 332 Core.Co mpiler.Targets.LoadToStrings(ComboBoxTarget.Items);333 ComboBoxTarget.ItemIndex := Core.Co mpiler.Targets.IndexOf(Core.Compiler.Target);345 Core.Core.Compiler.Targets.LoadToStrings(ComboBoxTarget.Items); 346 ComboBoxTarget.ItemIndex := Core.Core.Compiler.Targets.IndexOf(Core.Core.Compiler.Target); 334 347 FormSourceCode.UpdateInterface; 335 348 FormTargetCode.UpdateInterface; … … 435 448 begin 436 449 with TMenuItem(Sender) do begin 437 Core.Co mpiler.Target := TTarget(Core.Compiler.Targets[MenuIndex]);450 Core.Core.Compiler.Target := TTarget(Core.Core.Compiler.Targets[MenuIndex]); 438 451 UpdateInterface; 439 452 end; … … 446 459 begin 447 460 MenuItemProducer.Clear; 448 with Core do461 with Core.Core do 449 462 for I := 0 to Compiler.Targets.Count - 1 do begin 450 463 NewMenuItem := TMenuItem.Create(MenuItemProducer); … … 461 474 Title: string; 462 475 begin 463 Title := Core. ApplicationInfo.AppName;464 if Assigned(Core. Project) then begin465 if Core. Project.FileName <> '' then Title :=Core.Project.FileName + ' - ' + Title;466 if Core. Project.Modified then Title := Title + ' *';476 Title := Core.Core.ApplicationInfo.AppName; 477 if Assigned(Core.Core.Project) then begin 478 if Core.Core.Project.FileName <> '' then Title := Core.Core.Project.FileName + ' - ' + Title; 479 if Core.Core.Project.Modified then Title := Title + ' *'; 467 480 end; 468 481 Caption := Title; … … 474 487 end; 475 488 489 procedure TFormMain.ShowProject(ProjectFile: TProjectFile); 490 begin 491 FormMain.TabSheetSource.Show; 492 FormSourceCode.ProjectFile := ProjectFile; 493 end; 494 495 procedure TFormMain.ShowTargetCode(ProjectFile: TProjectFile); 496 begin 497 FormTargetCode.ProjectFile := ProjectFile; 498 FormMain.TabSheetTarget.Show; 499 FormTargetCode.SynEdit1.Lines.Assign(ProjectFile.Source); 500 end; 501 476 502 procedure TFormMain.FormClose(Sender: TObject; var Action: TCloseAction); 477 503 begin 478 504 AProjectClose.Execute; 479 Core. SaveToRegistry(HKEY(Core.ApplicationInfo.RegistryRoot),Core.ApplicationInfo.RegistryKey);505 Core.Core.SaveToRegistry(HKEY(Core.Core.ApplicationInfo.RegistryRoot), Core.Core.ApplicationInfo.RegistryKey); 480 506 end; 481 507 … … 484 510 I: Integer; 485 511 begin 486 with Core.Compiler.Targets do 512 FormMessages := TFormMessages.Create(nil); 513 FormSourceCode := TFormSourceCode.Create(nil); 514 FormProject := TFormProject.Create(nil); 515 FormProject.OnShowProject := ShowProject; 516 FormTargetCode := TFormTargetCode.Create(nil); 517 FormTargetProject := TFormTargetProject.Create(nil); 518 FormTargetProject.OnShowTargetCode := ShowTargetCode; 519 FormExternalProducerOutput := TFormExternalProducerOutput.Create(nil); 520 FormTargets := TFormTargets.Create(nil); 521 FormCodeTree := TFormCodeTree.Create(nil); 522 523 with Core.Core.Compiler.Targets do 487 524 for I := 0 to Count - 1 do 488 525 with TTarget(Items[I]) do … … 498 535 begin 499 536 if Sender is TMenuItem then 500 Core. ProjectOpen(StringReplace(TMenuItem(Sender).Caption, '&', '', [rfReplaceAll]));537 Core.Core.ProjectOpen(StringReplace(TMenuItem(Sender).Caption, '&', '', [rfReplaceAll])); 501 538 end; 502 539 503 540 procedure TFormMain.FormShow(Sender: TObject); 504 541 begin 505 Core. LoadFromRegistry(HKEY(Core.ApplicationInfo.RegistryRoot),Core.ApplicationInfo.RegistryKey);542 Core.Core.LoadFromRegistry(HKEY(Core.Core.ApplicationInfo.RegistryRoot), Core.Core.ApplicationInfo.RegistryKey); 506 543 DockInit; 507 Core. ProjectTemplatesInit;508 509 if Core. ReopenLastOpenedFile and (Core.LastOpenedFiles.Items.Count > 0) then510 if FileExists(Core. LastOpenedFiles.Items[0]) then511 Core. ProjectOpen(Core.LastOpenedFiles.Items[0]);544 Core.Core.ProjectTemplatesInit; 545 546 if Core.Core.ReopenLastOpenedFile and (Core.Core.LastOpenedFiles.Items.Count > 0) then 547 if FileExists(Core.Core.LastOpenedFiles.Items[0]) then 548 Core.Core.ProjectOpen(Core.Core.LastOpenedFiles.Items[0]); 512 549 513 550 WindowState := wsMaximized; … … 517 554 procedure TFormMain.AProjectOpenExecute(Sender: TObject); 518 555 begin 519 if Core. LastOpenedFiles.Items.Count > 0 then520 OpenDialogProject.FileName := Core. LastOpenedFiles.Items[0]556 if Core.Core.LastOpenedFiles.Items.Count > 0 then 557 OpenDialogProject.FileName := Core.Core.LastOpenedFiles.Items[0] 521 558 else OpenDialogProject.FileName := ExtractFileDir(Application.ExeName); 522 559 if OpenDialogProject.Execute then begin 523 Core. ProjectOpen(OpenDialogProject.FileName);560 Core.Core.ProjectOpen(OpenDialogProject.FileName); 524 561 end; 525 562 end; … … 529 566 //if Project.Modified then ; A 530 567 FormSourceCode.ProjectFile := nil; 531 FreeAndNil(Core. Project);568 FreeAndNil(Core.Core.Project); 532 569 FormProject.UpdateProjectTree; 533 570 UpdateInterface; … … 540 577 541 578 procedure TFormMain.AAboutExecute(Sender: TObject); 542 begin 543 FormAbout.ShowModal; 579 var 580 FormAbout: TFormAbout; 581 begin 582 FormAbout := TFormAbout.Create(nil); 583 try 584 FormAbout.ShowModal; 585 finally 586 FormAbout.Free; 587 end; 544 588 end; 545 589 546 590 procedure TFormMain.AHomepageExecute(Sender: TObject); 547 591 begin 548 OpenWebPage(Core. ApplicationInfo.HomePage);592 OpenWebPage(Core.Core.ApplicationInfo.HomePage); 549 593 end; 550 594 551 595 procedure TFormMain.APauseExecute(Sender: TObject); 552 596 begin 553 Core.Co mpiler.Target.Executor.Pause;597 Core.Core.Compiler.Target.Executor.Pause; 554 598 end; 555 599 556 600 procedure TFormMain.AProjectNewExecute(Sender: TObject); 557 begin 601 var 602 FormProjectNew: TFormProjectNew; 603 begin 604 FormProjectNew := TFormProjectNew.Create(nil); 558 605 if FormProjectNew.ShowModal = mrOk then begin 559 606 if Assigned(FormProjectNew.ListView1.Selected) then begin 560 607 if TProjectTemplate(FormProjectNew.ListView1.Selected.Data).IsProject then 561 Core. ProjectNew;562 TProjectTemplate(FormProjectNew.ListView1.Selected.Data).InitProject(Core. Project);608 Core.Core.ProjectNew; 609 TProjectTemplate(FormProjectNew.ListView1.Selected.Data).InitProject(Core.Core.Project); 563 610 end; 564 611 end; 612 FormProjectNew.Free; 565 613 UpdateInterface; 566 614 end; … … 568 616 procedure TFormMain.AProjectSaveAsExecute(Sender: TObject); 569 617 begin 570 if Core. LastOpenedFiles.Items.Count > 0 then571 SaveDialogProject.FileName := Core. LastOpenedFiles.Items[0]618 if Core.Core.LastOpenedFiles.Items.Count > 0 then 619 SaveDialogProject.FileName := Core.Core.LastOpenedFiles.Items[0] 572 620 else SaveDialogProject.FileName := ExtractFileDir(Application.ExeName); 573 if Assigned(Core. Project) then621 if Assigned(Core.Core.Project) then 574 622 if SaveDialogProject.Execute then begin 575 Core. Project.SaveToFile(SaveDialogProject.FileName);623 Core.Core.Project.SaveToFile(SaveDialogProject.FileName); 576 624 FormSourceCode.Save; 577 Core. Project.Save;625 Core.Core.Project.Save; 578 626 UpdateInterface; 579 Core. LastOpenedFiles.AddItem(SaveDialogProject.FileName);627 Core.Core.LastOpenedFiles.AddItem(SaveDialogProject.FileName); 580 628 end; 581 629 end; … … 584 632 begin 585 633 FormSourceCode.Save; 586 if not FileExists(Core. Project.FileName) then AProjectSaveAs.Execute587 else Core. Project.SaveToFile(Core.Project.FileName);634 if not FileExists(Core.Core.Project.FileName) then AProjectSaveAs.Execute 635 else Core.Core.Project.SaveToFile(Core.Core.Project.FileName); 588 636 end; 589 637 … … 591 639 begin 592 640 with TMenuItem(Sender) do begin 593 Core.Co mpiler.Target := TTarget(Core.Compiler.Targets[ComboBoxTarget.ItemIndex]);641 Core.Core.Compiler.Target := TTarget(Core.Core.Compiler.Targets[ComboBoxTarget.ItemIndex]); 594 642 UpdateInterface; 595 643 end; -
trunk/IDE/Forms/FormMessages.pas
r74 r75 1 unit UFormMessages; 2 3 {$mode objfpc}{$H+} 1 unit FormMessages; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 ComCtrls, UProject, UCompiler;7 ComCtrls, Project, Compiler; 10 8 11 9 type 10 TSelectFileEvent = procedure(FileName: string; Position: TPoint); 12 11 13 12 { TFormMessages } … … 15 14 TFormMessages = class(TForm) 16 15 ListView1: TListView; 17 procedure ListBoxMessagesSelectionChange(Sender: TObject; User: boolean);16 procedure ListBoxMessagesSelectionChange(Sender: TObject; User: Boolean); 18 17 procedure ListView1Click(Sender: TObject); 19 18 procedure ListView1Data(Sender: TObject; Item: TListItem); … … 21 20 Selected: Boolean); 22 21 private 23 { private declarations }22 FOnSelectFile: TSelectFileEvent; 24 23 public 25 24 procedure Reload; 25 property OnSelectFile: TSelectFileEvent read FOnSelectFile write FOnSelectFile; 26 26 end; 27 27 28 var29 FormMessages: TFormMessages;30 28 31 29 implementation … … 34 32 35 33 uses 36 UCore, UFormMain, UFormSourceCode;34 Core, FormMain, FormSourceCode; 37 35 38 36 { TFormMessages } 39 37 40 38 procedure TFormMessages.ListBoxMessagesSelectionChange(Sender: TObject; 41 User: boolean);39 User: Boolean); 42 40 begin 43 44 41 end; 45 42 … … 52 49 procedure TFormMessages.ListView1Data(Sender: TObject; Item: TListItem); 53 50 begin 54 with Core , FormMain, FormSourceCodedo51 with Core.Core, FormMain.FormMain do 55 52 with TErrorMessage(Compiler.ErrorMessages[Item.Index]) do begin 56 53 if FileName = '' then Item.Caption := ' ' … … 68 65 P: TPoint; 69 66 begin 70 with Core , FormSourceCode do67 with Core.Core do 71 68 if Assigned(ListView1.Selected) then 72 69 with TErrorMessage(ListView1.Selected.Data) do 73 70 if FileName <> '' then begin 74 ProjectFile := Project.Files.SearchFile(FileName); 75 if Assigned(ProjectFile) then 76 SynEditSource.Lines.Assign(ProjectFile.Source) 77 else if FileExists(FileName) then 78 SynEditSource.Lines.LoadFromFile(FileName); 79 SynEditSource.CaretXY := Position; 80 TForm(SynEditSource.Owner).Show; 81 SynEditSource.SetFocus; 71 if Assigned(FOnSelectFile) then 72 FOnSelectFile(FileName, Position); 82 73 end; 83 74 end; … … 85 76 procedure TFormMessages.Reload; 86 77 begin 87 ListView1.Items.Count := Core.Co mpiler.ErrorMessages.Count;78 ListView1.Items.Count := Core.Core.Compiler.ErrorMessages.Count; 88 79 ListView1.Refresh; 89 80 end; -
trunk/IDE/Forms/FormOptions.pas
r74 r75 1 unit UFormOptions; 2 3 {$mode delphi} 1 unit FormOptions; 4 2 5 3 interface … … 26 24 end; 27 25 28 var29 FormOptions: TFormOptions;30 26 31 27 implementation … … 34 30 35 31 uses 36 UCore, UFormMain, ULanguages;32 Core, Languages; 37 33 38 34 { TFormOptions } … … 41 37 begin 42 38 if ComboBoxLanguage.ItemIndex <> -1 then 43 Core.Co olTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);44 Core. ReopenLastOpenedFile := CheckBoxReopenProject.Checked;39 Core.Core.Translator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]); 40 Core.Core.ReopenLastOpenedFile := CheckBoxReopenProject.Checked; 45 41 end; 46 42 47 43 procedure TFormOptions.FormShow(Sender: TObject); 48 44 begin 49 Core.Co olTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);50 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Co olTranslator1.Language);45 Core.Core.Translator1.LanguageListToStrings(ComboBoxLanguage.Items); 46 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.Core.Translator1.Language); 51 47 if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0; 52 CheckBoxReopenProject.Checked := Core. ReopenLastOpenedFile;48 CheckBoxReopenProject.Checked := Core.Core.ReopenLastOpenedFile; 53 49 end; 54 50 -
trunk/IDE/Forms/FormProject.lfm
r74 r75 1 1 object FormProject: TFormProject 2 2 Left = 507 3 Height = 2533 Height = 380 4 4 Top = 197 5 Width = 3315 Width = 496 6 6 Caption = 'Project manager' 7 ClientHeight = 253 8 ClientWidth = 331 9 LCLVersion = '1.1' 7 ClientHeight = 380 8 ClientWidth = 496 9 DesignTimePPI = 144 10 LCLVersion = '3.2.0.0' 10 11 object TreeViewProject: TTreeView 11 12 Left = 0 12 Height = 25313 Height = 380 13 14 Top = 0 14 Width = 33115 Width = 496 15 16 Align = alClient 16 DefaultItemHeight = 1617 17 PopupMenu = PopupMenuFile 18 18 ReadOnly = True … … 24 24 object PopupMenuFile: TPopupMenu 25 25 Images = FormMain.ImageList1 26 left = 9427 top = 3826 Left = 141 27 Top = 57 28 28 object MenuItem4: TMenuItem 29 29 Action = AShow … … 40 40 end 41 41 object ActionList1: TActionList 42 left = 18443 top = 4042 Left = 276 43 Top = 60 44 44 object AAdd: TAction 45 45 Caption = 'Add' … … 60 60 end 61 61 object OpenDialog1: TOpenDialog 62 left = 9463 top = 9862 Left = 141 63 Top = 147 64 64 end 65 65 end -
trunk/IDE/Forms/FormProject.pas
r74 r75 1 unit UFormProject;1 unit FormProject; 2 2 3 3 interface 4 4 5 5 uses 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,7 Menus, ActnList, UProject;6 Classes, SysUtils, LazFileUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, Project; 8 8 9 9 type 10 TShowProjectEvent = procedure (ProjectFile: TProjectFile) of object; 10 11 11 12 { TFormProject } … … 31 32 procedure TreeViewProjectDblClick(Sender: TObject); 32 33 private 33 procedure UpdateProjectFiles(Node: TTreeNode; Files: TProjectFileList); 34 FOnShowProject: TShowProjectEvent; 35 procedure UpdateProjectFiles(Node: TTreeNode; Files: TProjectFiles); 34 36 public 35 37 procedure UpdateProjectTree; 36 38 procedure UpdateInterface; 39 property OnShowProject: TShowProjectEvent read FOnShowProject write FOnShowProject; 37 40 end; 38 41 39 42 var 40 43 FormProject: TFormProject; 44 41 45 42 46 implementation … … 45 49 46 50 uses 47 UCore, UFormMain, UFormSourceCode, UFormTargetCode, UFormCodeTree;51 Core, FormMain, FormSourceCode, FormTargetCode, FormCodeTree; 48 52 49 53 resourcestring … … 56 60 ); 57 61 begin 58 with FormMain, FormSourceCode do59 62 if Assigned(Node) then begin 60 63 if TProjectFile(Node.Data) is TProjectFile then begin … … 107 110 begin 108 111 if Assigned(TreeViewProject.Selected) then 109 Core. Project.Files.Remove(TreeViewProject.Selected.Data);112 Core.Core.Project.Files.Remove(TreeViewProject.Selected.Data); 110 113 UpdateProjectTree; 111 114 end; … … 126 129 begin 127 130 if Assigned(TreeViewProject.Selected) then begin 128 FormMain.TabSheetSource.Show;129 FormSourceCode.ProjectFile := TProjectFile(TreeViewProject.Selected.Data);131 if Assigned(FOnShowProject) then 132 FOnShowProject(TProjectFile(TreeViewProject.Selected.Data)); 130 133 end; 131 134 end; … … 135 138 NewNode: TTreeNode; 136 139 begin 137 with Core , TreeViewProject, Items do140 with Core.Core, TreeViewProject, Items do 138 141 try 139 142 BeginUpdate; … … 147 150 (TreeViewProject.TopItem.Count > 0) then 148 151 TreeViewProject.TopItem.Items[0].Selected := True 149 else FormSourceCode.ProjectFile := nil; 152 else begin 153 if Assigned(FOnShowProject) then 154 FOnShowProject(nil); 155 end; 150 156 finally 151 157 EndUpdate; … … 158 164 end; 159 165 160 procedure TFormProject.UpdateProjectFiles(Node: TTreeNode; Files: TProjectFile List);166 procedure TFormProject.UpdateProjectFiles(Node: TTreeNode; Files: TProjectFiles); 161 167 var 162 168 I: Integer; -
trunk/IDE/Forms/FormProjectNew.pas
r74 r75 1 unit UFormProjectNew; 2 3 {$mode delphi} 1 unit FormProjectNew; 4 2 5 3 interface … … 23 21 procedure ListView1SelectItem(Sender: TObject; Item: TListItem; 24 22 Selected: Boolean); 25 private26 { private declarations }27 23 public 28 24 procedure UpdateInterface; 29 25 end; 30 31 var32 FormProjectNew: TFormProjectNew;33 26 34 27 … … 36 29 37 30 uses 38 UCore, UFormMain, UProject;31 Core, FormMain, Project; 39 32 40 33 {$R *.lfm} … … 72 65 ListView1.BeginUpdate; 73 66 ListView1.Items.Clear; 74 with Core do67 with Core.Core do 75 68 for I := 0 to ProjectTemplates.Count - 1 do 76 69 with TProjectTemplate(ProjectTemplates[I]) do 77 if (not Assigned(Core.Project) and IsProject) or Assigned(Core.Project) then begin 70 if (not Assigned(Core.Core.Project) and IsProject) or 71 Assigned(Core.Core.Project) then begin 78 72 NewItem := ListView1.Items.Add; 79 73 NewItem.Caption := Name; -
trunk/IDE/Forms/FormSourceCode.pas
r74 r75 1 unit UFormSourceCode; 2 3 {$mode objfpc}{$H+} 1 unit FormSourceCode; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, 9 SynEdit, SynHighlighterPas, UProject;7 SynEdit, SynHighlighterPas, Project; 10 8 11 9 type … … 24 22 procedure Save; 25 23 procedure UpdateInterface; 24 procedure SelectFile(FileName: string; Position: TPoint); 26 25 end; 27 26 28 var29 FormSourceCode: TFormSourceCode;30 27 31 28 implementation 32 29 33 30 uses 34 UFormMain, UCore;31 FormMain, Core; 35 32 36 33 {$R *.lfm} … … 41 38 begin 42 39 Save; 43 if Assigned(Core. Project) and Assigned(ProjectFile) then40 if Assigned(Core.Core.Project) and Assigned(ProjectFile) then 44 41 ProjectFile.Modified := True; 45 42 end; … … 62 59 procedure TFormSourceCode.UpdateInterface; 63 60 begin 64 SynEditSource.Enabled := Assigned(Core.Project); 65 if not Assigned(Core.Project) then SynEditSource.ClearAll; 61 SynEditSource.Enabled := Assigned(Core.Core.Project); 62 if not Assigned(Core.Core.Project) then SynEditSource.ClearAll; 63 end; 64 65 procedure TFormSourceCode.SelectFile(FileName: string; Position: TPoint); 66 var 67 ProjectFile: TProjectFile; 68 begin 69 with Core.Core do begin 70 ProjectFile := Project.Files.SearchFile(FileName); 71 if Assigned(ProjectFile) then 72 SynEditSource.Lines.Assign(ProjectFile.Source) 73 else if FileExists(FileName) then 74 SynEditSource.Lines.LoadFromFile(FileName); 75 SynEditSource.CaretXY := Position; 76 TForm(SynEditSource.Owner).Show; 77 SynEditSource.SetFocus; 78 end; 66 79 end; 67 80 -
trunk/IDE/Forms/FormTargetCode.lfm
r74 r75 1 1 object FormTargetCode: TFormTargetCode 2 2 Left = 403 3 Height = 3033 Height = 454 4 4 Top = 186 5 Width = 3985 Width = 597 6 6 Caption = 'Target code' 7 ClientHeight = 303 8 ClientWidth = 398 9 LCLVersion = '0.9.31' 7 ClientHeight = 454 8 ClientWidth = 597 9 DesignTimePPI = 144 10 LCLVersion = '3.2.0.0' 10 11 inline SynEdit1: TSynEdit 11 12 Left = 0 12 Height = 30313 Height = 454 13 14 Top = 0 14 Width = 39815 Width = 597 15 16 Align = alClient 16 Font.Height = - 1317 Font.Height = -20 17 18 Font.Name = 'Courier New' 18 19 Font.Pitch = fpFixed … … 21 22 ParentFont = False 22 23 TabOrder = 0 23 Gutter.Width = 5724 Gutter.Width = 85 24 25 Gutter.MouseActions = < 25 26 item … … 527 528 Command = emcMouseLink 528 529 end> 530 MouseTextActions = <> 529 531 MouseSelActions = < 530 532 item … … 534 536 VisibleSpecialChars = [vscSpace, vscTabAtLast] 535 537 ReadOnly = True 538 SelectedColor.BackPriority = 50 539 SelectedColor.ForePriority = 50 540 SelectedColor.FramePriority = 50 541 SelectedColor.BoldPriority = 50 542 SelectedColor.ItalicPriority = 50 543 SelectedColor.UnderlinePriority = 50 544 SelectedColor.StrikeOutPriority = 50 536 545 BracketHighlightStyle = sbhsBoth 537 546 BracketMatchColor.Background = clNone … … 547 556 inline SynLeftGutterPartList1: TSynGutterPartList 548 557 object SynGutterMarks1: TSynGutterMarks 549 Width = 24558 Width = 36 550 559 MouseActions = <> 551 560 end 552 561 object SynGutterLineNumber1: TSynGutterLineNumber 553 Width = 17562 Width = 25 554 563 MouseActions = <> 555 564 MarkupInfo.Background = clBtnFace … … 561 570 end 562 571 object SynGutterChanges1: TSynGutterChanges 563 Width = 4572 Width = 6 564 573 MouseActions = <> 565 574 ModifiedColor = 59900 … … 567 576 end 568 577 object SynGutterSeparator1: TSynGutterSeparator 569 Width = 2578 Width = 3 570 579 MouseActions = <> 580 MarkupInfo.Background = clWhite 581 MarkupInfo.Foreground = clGray 571 582 end 572 583 object SynGutterCodeFolding1: TSynGutterCodeFolding 584 Width = 15 573 585 MouseActions = < 574 586 item … … 625 637 object SynPasSyn1: TSynPasSyn 626 638 Enabled = False 627 AsmAttri.FrameEdges = sfeAround628 CommentAttri.FrameEdges = sfeAround629 IDEDirectiveAttri.FrameEdges = sfeAround630 IdentifierAttri.FrameEdges = sfeAround631 KeyAttri.FrameEdges = sfeAround632 NumberAttri.FrameEdges = sfeAround633 SpaceAttri.FrameEdges = sfeAround634 StringAttri.FrameEdges = sfeAround635 SymbolAttri.FrameEdges = sfeAround636 CaseLabelAttri.FrameEdges = sfeAround637 DirectiveAttri.FrameEdges = sfeAround638 639 CompilerMode = pcmDelphi 639 640 NestedComments = False 640 left = 174 641 top = 38 641 TypeHelpers = True 642 StringMultilineMode = [] 643 Left = 261 644 Top = 57 642 645 end 643 646 object SynCppSyn1: TSynCppSyn 644 647 DefaultFilter = 'Soubory C++ (*.c,*.cpp,*.h,*.hpp,*.hh)|*.c;*.cpp;*.h;*.hpp;*.hh' 645 648 Enabled = False 646 AsmAttri.FrameEdges = sfeAround 647 CommentAttri.FrameEdges = sfeAround 648 DirecAttri.FrameEdges = sfeAround 649 IdentifierAttri.FrameEdges = sfeAround 650 InvalidAttri.FrameEdges = sfeAround 651 KeyAttri.FrameEdges = sfeAround 652 NumberAttri.FrameEdges = sfeAround 653 SpaceAttri.FrameEdges = sfeAround 654 StringAttri.FrameEdges = sfeAround 655 SymbolAttri.FrameEdges = sfeAround 656 left = 176 657 top = 85 649 Left = 264 650 Top = 128 658 651 end 659 652 object SynXMLSyn1: TSynXMLSyn 660 653 DefaultFilter = 'XML Dokument (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dtd' 661 654 Enabled = False 662 ElementAttri.FrameEdges = sfeAround663 AttributeAttri.FrameEdges = sfeAround664 NamespaceAttributeAttri.FrameEdges = sfeAround665 AttributeValueAttri.FrameEdges = sfeAround666 NamespaceAttributeValueAttri.FrameEdges = sfeAround667 TextAttri.FrameEdges = sfeAround668 CDATAAttri.FrameEdges = sfeAround669 EntityRefAttri.FrameEdges = sfeAround670 ProcessingInstructionAttri.FrameEdges = sfeAround671 CommentAttri.FrameEdges = sfeAround672 DocTypeAttri.FrameEdges = sfeAround673 SpaceAttri.FrameEdges = sfeAround674 SymbolAttri.FrameEdges = sfeAround675 655 WantBracesParsed = False 676 left = 178677 top = 133656 Left = 267 657 Top = 200 678 658 end 679 659 end -
trunk/IDE/Forms/FormTargetCode.pas
r74 r75 1 unit UFormTargetCode; 2 3 {$mode Delphi}{$H+} 1 unit FormTargetCode; 4 2 5 3 interface … … 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, SynEdit, 9 7 SynHighlighterMulti, SynHighlighterVB, SynHighlighterPas, SynHighlighterCpp, 10 SynHighlighterXML, UProject;8 SynHighlighterXML, Project; 11 9 12 10 type … … 27 25 end; 28 26 29 var30 FormTargetCode: TFormTargetCode;31 27 32 28 implementation … … 35 31 36 32 uses 37 UCore;33 Core; 38 34 39 35 procedure TFormTargetCode.SetProjectFile(AValue: TProjectFile); … … 48 44 procedure TFormTargetCode.UpdateInterface; 49 45 begin 50 SynEdit1.Enabled := Assigned(Core. Project);51 if not Assigned(Core. Project) then SynEdit1.ClearAll;46 SynEdit1.Enabled := Assigned(Core.Core.Project); 47 if not Assigned(Core.Core.Project) then SynEdit1.ClearAll; 52 48 end; 53 54 49 55 50 end. -
trunk/IDE/Forms/FormTargetOptions.pas
r74 r75 1 unit UFormTargetOptions; 2 3 {$mode delphi} 1 unit FormTargetOptions; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 UTarget;7 Target; 10 8 11 9 type … … 34 32 end; 35 33 36 var37 FormTargetOptions: TFormTargetOptions;38 34 39 35 implementation -
trunk/IDE/Forms/FormTargetProject.pas
r74 r75 1 unit UFormTargetProject; 2 3 {$mode delphi} 1 unit FormTargetProject; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls,9 UProject;6 Classes, SysUtils, LazFileUtils, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Project; 10 8 11 9 type 10 TShowTargetCodeEvent = procedure(ProjectFile: TProjectFile) of object; 12 11 13 12 { TFormTargetProject } … … 17 16 procedure TreeViewProjectChange(Sender: TObject; Node: TTreeNode); 18 17 private 19 procedure UpdateProjectFiles(Node: TTreeNode; Files: TProjectFileList); 18 FOnShowTargetCode: TShowTargetCodeEvent; 19 procedure UpdateProjectFiles(Node: TTreeNode; Files: TProjectFiles); 20 20 procedure UpdateProjectTree; 21 21 public 22 22 procedure UpdateInterface; 23 property OnShowTargetCode: TShowTargetCodeEvent read FOnShowTargetCode 24 write FOnShowTargetCode; 23 25 end; 24 25 var26 FormTargetProject: TFormTargetProject;27 26 28 27 … … 32 31 33 32 uses 34 UCore, UFormMain, UFormTargetCode;33 Core, FormMain, FormTargetCode; 35 34 36 35 procedure TFormTargetProject.UpdateProjectTree; … … 38 37 NewNode: TTreeNode; 39 38 begin 40 with Core ,FormMain, TreeViewProject, Items do begin39 with Core.Core, FormMain.FormMain, TreeViewProject, Items do begin 41 40 BeginUpdate; 42 41 Clear; … … 50 49 (TreeViewProject.TopItem.Count > 0) then 51 50 TreeViewProject.TopItem.Items[0].Selected := True 52 else FormTargetCode.ProjectFile := nil; 51 else begin 52 if Assigned(FOnShowTargetCode) then 53 FOnShowTargetCode(nil); 54 end; 53 55 end; 54 56 end; … … 62 64 Node: TTreeNode); 63 65 begin 64 with FormMain , FormTargetCodedo66 with FormMain.FormMain do 65 67 if Assigned(Node) then begin 66 68 if TProjectFile(Node.Data) is TProjectFile then begin 67 ProjectFile := TProjectFile(Node.Data); 68 FormMain.TabSheetTarget.Show; 69 SynEdit1.Lines.Assign(TProjectFile(Node.Data).Source); 69 if Assigned(FOnShowTargetCode) then 70 FOnShowTargetCode(TProjectFile(Node.Data)) 70 71 end; 71 72 end; 72 73 end; 73 74 74 procedure TFormTargetProject.UpdateProjectFiles(Node: TTreeNode; Files: TProjectFile List);75 procedure TFormTargetProject.UpdateProjectFiles(Node: TTreeNode; Files: TProjectFiles); 75 76 var 76 77 I: Integer; -
trunk/IDE/Forms/FormTargets.lfm
r74 r75 1 1 object FormTargets: TFormTargets 2 2 Left = 292 3 Height = 3433 Height = 514 4 4 Top = 138 5 Width = 5225 Width = 783 6 6 Caption = 'Targets' 7 ClientHeight = 343 8 ClientWidth = 522 7 ClientHeight = 514 8 ClientWidth = 783 9 DesignTimePPI = 144 9 10 OnShow = FormShow 10 LCLVersion = ' 1.1'11 LCLVersion = '3.2.0.0' 11 12 object ListView1: TListView 12 Left = 813 Height = 32714 Top = 815 Width = 50813 Left = 12 14 Height = 490 15 Top = 12 16 Width = 762 16 17 Anchors = [akTop, akLeft, akRight, akBottom] 17 18 Columns = < 18 19 item 19 20 Caption = 'Name' 20 Width = 8021 Width = 120 21 22 end 22 23 item 23 24 Caption = 'Compiler path' 24 Width = 20025 Width = 300 25 26 end 26 27 item 27 28 Caption = 'Executor path' 28 Width = 20029 Width = 327 29 30 end> 30 31 OwnerData = True … … 39 40 object PopupMenu1: TPopupMenu 40 41 Images = FormMain.ImageList1 41 left = 12442 top = 6942 Left = 186 43 Top = 104 43 44 end 44 45 object ActionList1: TActionList 45 left = 20046 top = 7246 Left = 300 47 Top = 108 47 48 object ATargetOptions: TAction 48 49 Caption = 'Options' -
trunk/IDE/Forms/FormTargets.pas
r74 r75 1 unit UFormTargets; 2 3 {$mode objfpc}{$H+} 1 unit FormTargets; 4 2 5 3 interface … … 27 25 end; 28 26 29 var30 FormTargets: TFormTargets;31 27 32 28 implementation … … 35 31 36 32 uses 37 UCore, UFormMain, UCompiler, UProducer, UTarget, 38 UFormTargetOptions; 33 Core, FormMain, Compiler, Producer, Target, FormTargetOptions; 39 34 40 35 resourcestring … … 50 45 51 46 procedure TFormTargets.ATargetOptionsExecute(Sender: TObject); 47 var 48 FormTargetOptions: TFormTargetOptions; 52 49 begin 53 50 if Assigned(ListView1.Selected) then begin 51 FormTargetOptions := TFormTargetOptions.Create(nil); 54 52 FormTargetOptions.LoadControls(TTarget(ListView1.Selected.Data)); 55 53 if FormTargetOptions.ShowModal = mrOk then begin … … 57 55 ReloadList; 58 56 end; 57 FormTargetOptions.Free; 59 58 end; 60 59 end; … … 62 61 procedure TFormTargets.ListView1Data(Sender: TObject; Item: TListItem); 63 62 begin 64 if (Item.Index >= 0) and (Item.Index < Core.Co mpiler.Targets.Count) then65 with TTarget(Core.Co mpiler.Targets[Item.Index]) do begin63 if (Item.Index >= 0) and (Item.Index < Core.Core.Compiler.Targets.Count) then 64 with TTarget(Core.Core.Compiler.Targets[Item.Index]) do begin 66 65 Item.Caption := Name; 67 Item.Data := Core.Co mpiler.Targets[Item.Index];66 Item.Data := Core.Core.Compiler.Targets[Item.Index]; 68 67 //Item.SubItems.Add(Producer.CompilerPath); 69 68 end; … … 72 71 procedure TFormTargets.ReloadList; 73 72 begin 74 ListView1.Items.Count := Core.Co mpiler.Targets.Count;73 ListView1.Items.Count := Core.Core.Compiler.Targets.Count; 75 74 ListView1.Refresh; 76 75 end; -
trunk/IDE/Languages/Transpascal.cs.po
r74 r75 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 12 #: taboutform.caption 13 msgctxt "taboutform.caption" 14 msgid "About" 15 msgstr "O programu" 16 17 #: taboutform.okbutton.caption 18 msgctxt "taboutform.okbutton.caption" 19 msgid "OK" 20 msgstr "OK" 21 22 #: tcodeform.caption 23 msgctxt "tcodeform.caption" 24 msgid "Source code" 25 msgstr "Zdrojový kód" 26 27 #: tcompiledform.caption 28 msgid "Compiled code" 29 msgstr "Přeložený zdroj" 30 31 #: tcompilersettingsform.button1.caption 32 msgctxt "tcompilersettingsform.button1.caption" 33 msgid "Browse" 34 msgstr "Procházet..." 35 36 #: tcompilersettingsform.buttoncancel.caption 37 msgctxt "tcompilersettingsform.buttoncancel.caption" 38 msgid "Cancel" 39 msgstr "Zrušit" 40 41 #: tcompilersettingsform.buttonok.caption 42 msgctxt "tcompilersettingsform.buttonok.caption" 43 msgid "Ok" 44 msgstr "Ok" 45 46 #: tcompilersettingsform.caption 47 msgctxt "tcompilersettingsform.caption" 12 #: formmain.sbuildfinished 13 #, object-pascal-format 14 msgctxt "formmain.sbuildfinished" 15 msgid "Build finished in %s seconds" 16 msgstr "" 17 18 #: formproject.senternewfilename 19 #, fuzzy 20 msgctxt "formproject.senternewfilename" 21 msgid "Enter new file name" 22 msgstr "Zadejte nové jméno souboru" 23 24 #: formproject.srenamesourcefile 25 #, fuzzy 26 msgctxt "formproject.srenamesourcefile" 27 msgid "Rename source file" 28 msgstr "Přejmenování zdrojového souboru" 29 30 #: formtargets.scompileroptions 31 #, fuzzy 32 msgctxt "formtargets.scompileroptions" 48 33 msgid "Compiler options" 49 msgstr "Volbny překladače" 50 51 #: tcompilersettingsform.label1.caption 52 msgctxt "tcompilersettingsform.label1.caption" 53 msgid "Compiler path:" 54 msgstr "Cesta překladače:" 55 56 #: tformabout.caption 57 msgctxt "tformabout.caption" 58 msgid "About" 59 msgstr "O programu" 60 61 #: tformabout.okbutton.caption 62 msgctxt "tformabout.okbutton.caption" 63 msgid "OK" 64 msgstr "OK" 65 66 #: tformcodetree.caption 67 msgctxt "tformcodetree.caption" 68 msgid "Code tree" 69 msgstr "Strom kódu" 70 71 #: tformcompilers.caption 72 msgid "Compilers" 73 msgstr "Překladače" 74 75 #: tformcompilers.listview1.columns[0].caption 76 msgctxt "tformcompilers.listview1.columns[0].caption" 77 msgid "Name" 78 msgstr "Jméno" 79 80 #: tformcompilers.listview1.columns[1].caption 81 msgctxt "tformcompilers.listview1.columns[1].caption" 82 msgid "Execution path" 83 msgstr "Cesta vykonání" 84 85 #: tformcompilersettings.button1.caption 86 msgctxt "tformcompilersettings.button1.caption" 87 msgid "Browse" 88 msgstr "Procházet..." 89 90 #: tformcompilersettings.buttoncancel.caption 91 msgctxt "tformcompilersettings.buttoncancel.caption" 92 msgid "Cancel" 93 msgstr "Zrušit" 94 95 #: tformcompilersettings.buttonok.caption 96 msgctxt "tformcompilersettings.buttonok.caption" 97 msgid "Ok" 98 msgstr "Ok" 99 100 #: tformcompilersettings.caption 101 msgctxt "tformcompilersettings.caption" 102 msgid "Compiler options" 103 msgstr "Volbny překladače" 104 105 #: tformcompilersettings.label1.caption 106 msgctxt "tformcompilersettings.label1.caption" 107 msgid "Compiler path:" 108 msgstr "Cesta překladače:" 109 110 #: tformexternalproduceroutput.caption 111 msgctxt "tformexternalproduceroutput.caption" 112 msgid "External producer" 113 msgstr "Vnější generátor" 34 msgstr "Volby překladače" 35 36 #: formtargets.scompilerpath 37 #, fuzzy 38 msgctxt "formtargets.scompilerpath" 39 msgid "Compiler path" 40 msgstr "Cesta překladače" 41 42 #: project.snewproject 43 #, fuzzy 44 msgctxt "project.snewproject" 45 msgid "New project" 46 msgstr "Nový projekt" 47 48 #: projecttemplates.sconsoleapplication 49 #, fuzzy 50 msgctxt "projecttemplates.sconsoleapplication" 51 msgid "Console application" 52 msgstr "Konzolová aplikace" 53 54 #: projecttemplates.sguiapplication 55 #, fuzzy 56 msgctxt "projecttemplates.sguiapplication" 57 msgid "GUI application" 58 msgstr "GUI aplikace" 59 60 #: projecttemplates.spackage 61 #, fuzzy 62 msgctxt "projecttemplates.spackage" 63 msgid "Package" 64 msgstr "Balíček" 65 66 #: projecttemplates.sunit 67 #, fuzzy 68 msgctxt "projecttemplates.sunit" 69 msgid "Unit" 70 msgstr "Jednotka" 114 71 115 72 #: tformmain.aabout.caption … … 149 106 150 107 #: tformmain.aprojectnew.caption 151 #| msgid "New"152 108 msgctxt "tformmain.aprojectnew.caption" 153 109 msgid "New..." … … 339 295 msgstr "Cílový projekt" 340 296 341 #: tformmessages.caption342 msgctxt "tformmessages.caption"343 msgid "Messages"344 msgstr "Zprávy"345 346 #: tformmessages.listview1.columns[0].caption347 msgctxt "tformmessages.listview1.columns[0].caption"348 msgid "File"349 msgstr "Soubor"350 351 #: tformmessages.listview1.columns[1].caption352 msgctxt "tformmessages.listview1.columns[1].caption"353 msgid "Position"354 msgstr "Pozice"355 356 #: tformmessages.listview1.columns[2].caption357 msgctxt "tformmessages.listview1.columns[2].caption"358 msgid "Message"359 msgstr "Zpráva"360 361 #: tformoptions.buttoncancel.caption362 msgctxt "tformoptions.buttoncancel.caption"363 msgid "Cancel"364 msgstr "Zrušit"365 366 #: tformoptions.buttonok.caption367 msgctxt "tformoptions.buttonok.caption"368 msgid "Ok"369 msgstr "Ok"370 371 #: tformoptions.caption372 msgctxt "tformoptions.caption"373 msgid "Options"374 msgstr "Volby"375 376 #: tformoptions.checkboxreopenproject.caption377 msgid "Reopen last opened project"378 msgstr "Znovuotevřít naposledy otevřený projekt"379 380 #: tformoptions.label3.caption381 msgid "Interface language:"382 msgstr "Jazyk rozhraní:"383 384 #: tformproducers.caption385 msgctxt "tformproducers.caption"386 msgid "Producers"387 msgstr "Tvůrci"388 389 #: tformproducers.listview1.columns[0].caption390 msgctxt "tformproducers.listview1.columns[0].caption"391 msgid "Name"392 msgstr "Jméno"393 394 #: tformproducers.listview1.columns[1].caption395 msgctxt "tformproducers.listview1.columns[1].caption"396 msgid "Execution path"397 msgstr "Cesta vykonání"398 399 297 #: tformproject.aadd.caption 400 298 msgid "Add" 401 msgstr " Přidat"299 msgstr "" 402 300 403 301 #: tformproject.adelete.caption 404 302 msgid "Delete" 405 msgstr " Smazat"303 msgstr "" 406 304 407 305 #: tformproject.arename.caption 408 306 msgid "Rename" 409 msgstr " Přejmenovat"307 msgstr "" 410 308 411 309 #: tformproject.ashow.caption 412 310 msgid "Show" 413 msgstr " Ukázat"311 msgstr "" 414 312 415 313 #: tformproject.caption 314 #, fuzzy 416 315 msgctxt "tformproject.caption" 417 316 msgid "Project manager" 418 317 msgstr "Správce projektu" 419 318 420 #: tformprojectnew.buttoncancel.caption421 msgctxt "tformprojectnew.buttoncancel.caption"422 msgid "Cancel"423 msgstr "Zrušit"424 425 #: tformprojectnew.buttonok.caption426 msgctxt "tformprojectnew.buttonok.caption"427 msgid "Ok"428 msgstr "Ok"429 430 #: tformprojectnew.caption431 msgid "New item"432 msgstr "Nová položka"433 434 #: tformsourcecode.caption435 msgctxt "tformsourcecode.caption"436 msgid "Source code"437 msgstr "Zdrojový kód"438 439 319 #: tformtargetcode.caption 320 #, fuzzy 440 321 msgctxt "tformtargetcode.caption" 441 322 msgid "Target code" 442 323 msgstr "Cílový kód" 443 324 444 #: tformtargetoptions.button1.caption445 msgctxt "tformtargetoptions.button1.caption"446 msgid "Ok"447 msgstr "Ok"448 449 #: tformtargetoptions.button2.caption450 msgctxt "tformtargetoptions.button2.caption"451 msgid "Cancel"452 msgstr "Zrušit"453 454 #: tformtargetoptions.buttonexecutorselect.caption455 msgctxt "tformtargetoptions.buttonexecutorselect.caption"456 msgid "Select..."457 msgstr "Výběr..."458 459 #: tformtargetoptions.buttonproducerselect.caption460 msgctxt "tformtargetoptions.buttonproducerselect.caption"461 msgid "Select..."462 msgstr "Výběr..."463 464 #: tformtargetoptions.caption465 msgctxt "tformtargetoptions.caption"466 msgid "Target options"467 msgstr "Volby cíle"468 469 #: tformtargetoptions.label1.caption470 msgid "Name:"471 msgstr "Jméno:"472 473 #: tformtargetoptions.label2.caption474 msgctxt "tformtargetoptions.label2.caption"475 msgid "Compiler path:"476 msgstr "Cesta překladače:"477 478 #: tformtargetoptions.label3.caption479 msgid "Executor path:"480 msgstr "Cesta vykonávače:"481 482 #: tformtargetoptions.labelname.caption483 msgid " "484 msgstr " "485 486 #: tformtargetproject.caption487 msgid "FormTargetProject"488 msgstr ""489 490 325 #: tformtargets.atargetoptions.caption 326 #, fuzzy 491 327 msgctxt "tformtargets.atargetoptions.caption" 492 328 msgid "Options" … … 494 330 495 331 #: tformtargets.atargetoptions.hint 496 msgctxt "tformtargets.atargetoptions.hint"497 332 msgid "Target options" 498 msgstr " Volby cíle"333 msgstr "" 499 334 500 335 #: tformtargets.caption 336 #, fuzzy 501 337 msgctxt "tformtargets.caption" 502 338 msgid "Targets" … … 504 340 505 341 #: tformtargets.listview1.columns[0].caption 506 msgctxt "tformtargets.listview1.columns[0].caption"507 342 msgid "Name" 508 msgstr " Jméno"343 msgstr "" 509 344 510 345 #: tformtargets.listview1.columns[1].caption 511 # | msgid "Execution path"346 #, fuzzy 512 347 msgctxt "tformtargets.listview1.columns[1].caption" 513 348 msgid "Compiler path" … … 516 351 #: tformtargets.listview1.columns[2].caption 517 352 msgid "Executor path" 518 msgstr "Cesta vykonávače" 519 520 #: tmainform.aabout.caption 521 msgctxt "tmainform.aabout.caption" 522 msgid "About..." 523 msgstr "O aplikaci..." 524 525 #: tmainform.abuild.caption 526 msgctxt "tmainform.abuild.caption" 527 msgid "Build" 528 msgstr "Sestavit" 529 530 #: tmainform.aexit.caption 531 msgctxt "tmainform.aexit.caption" 532 msgid "Exit" 533 msgstr "Ukončit" 534 535 #: tmainform.ahomepage.caption 536 msgctxt "tmainform.ahomepage.caption" 537 msgid "Homepage" 538 msgstr "Domovská stránka" 539 540 #: tmainform.apause.caption 541 msgctxt "tmainform.apause.caption" 542 msgid "Pause" 543 msgstr "Pozastavit" 544 545 #: tmainform.aprojectclose.caption 546 msgctxt "tmainform.aprojectclose.caption" 547 msgid "Close" 548 msgstr "Zavřít" 549 550 #: tmainform.aprojectnew.caption 551 msgctxt "tmainform.aprojectnew.caption" 552 msgid "New" 553 msgstr "Nový" 554 555 #: tmainform.aprojectnew.hint 556 msgctxt "tmainform.aprojectnew.hint" 557 msgid "Create new project" 558 msgstr "Vytvořit nový projekt" 559 560 #: tmainform.aprojectopen.caption 561 msgctxt "tmainform.aprojectopen.caption" 562 msgid "Open..." 563 msgstr "Otevřít..." 564 565 #: tmainform.aprojectopen.hint 566 msgctxt "tmainform.aprojectopen.hint" 567 msgid "Open project" 568 msgstr "Otevřít projekt" 569 570 #: tmainform.aprojectsave.caption 571 msgctxt "tmainform.aprojectsave.caption" 572 msgid "Save" 573 msgstr "Uložit" 574 575 #: tmainform.aprojectsave.hint 576 msgctxt "tmainform.aprojectsave.hint" 577 msgid "Save project to disk" 578 msgstr "Uložit projekt na disk" 579 580 #: tmainform.aprojectsaveas.caption 581 msgctxt "tmainform.aprojectsaveas.caption" 582 msgid "Save as..." 583 msgstr "Uložit jako..." 584 585 #: tmainform.aprojectsaveas.hint 586 msgctxt "tmainform.aprojectsaveas.hint" 587 msgid "Save project with custom name" 588 msgstr "Uložit projekt s vlastním jménem" 589 590 #: tmainform.areset.caption 591 msgctxt "tmainform.areset.caption" 592 msgid "Reset" 593 msgstr "Vynulovat" 594 595 #: tmainform.arun.caption 596 msgctxt "tmainform.arun.caption" 597 msgid "Run" 598 msgstr "Spustit" 599 600 #: tmainform.aruntocursor.caption 601 msgctxt "tmainform.aruntocursor.caption" 602 msgid "Run to cursor" 603 msgstr "Spustit po ukazatel" 604 605 #: tmainform.astepin.caption 606 msgctxt "tmainform.astepin.caption" 607 msgid "Step in" 608 msgstr "Vejít do" 609 610 #: tmainform.astepout.caption 611 msgctxt "tmainform.astepout.caption" 612 msgid "Step out" 613 msgstr "Vyjít ven" 614 615 #: tmainform.astepover.caption 616 msgctxt "tmainform.astepover.caption" 617 msgid "Step over" 618 msgstr "Přejít přes" 619 620 #: tmainform.astop.caption 621 msgctxt "tmainform.astop.caption" 622 msgid "Stop" 623 msgstr "Zastavit" 624 625 #: tmainform.aviewcodetree.caption 626 msgctxt "tmainform.aviewcodetree.caption" 627 msgid "Code tree" 628 msgstr "Strom kódu" 629 630 #: tmainform.aviewcompiledsoruce.caption 631 msgctxt "tmainform.aviewcompiledsoruce.caption" 632 msgid "Compiled source" 633 msgstr "Přeložený zdroj" 634 635 #: tmainform.aviewmessages.caption 636 msgctxt "tmainform.aviewmessages.caption" 637 msgid "Messages" 638 msgstr "Zprávy" 639 640 #: tmainform.aviewobjectinspector.caption 641 msgctxt "tmainform.aviewobjectinspector.caption" 642 msgid "Object inspector" 643 msgstr "Inspektor objektů" 644 645 #: tmainform.aviewoptions.caption 646 msgctxt "tmainform.aviewoptions.caption" 647 msgid "Options" 648 msgstr "Volby" 649 650 #: tmainform.aviewproject.caption 651 msgctxt "tmainform.aviewproject.caption" 652 msgid "Project manager" 653 msgstr "Správce projektu" 654 655 #: tmainform.aviewsourceeditor.caption 656 msgctxt "tmainform.aviewsourceeditor.caption" 657 msgid "Source editor" 658 msgstr "Zdrojový editor" 659 660 #: tmainform.aviewtargets.caption 661 msgctxt "tmainform.aviewtargets.caption" 662 msgid "Targets" 663 msgstr "Cíle" 664 665 #: tmainform.caption 666 msgctxt "tmainform.caption" 667 msgid "Transpascal IDE" 668 msgstr "Transpascal IDE" 669 670 #: tmainform.menuitem1.caption 671 msgctxt "tmainform.menuitem1.caption" 672 msgid "Project" 673 msgstr "Projekt" 674 675 #: tmainform.menuitem12.caption 676 msgctxt "tmainform.menuitem12.caption" 677 msgid "-" 678 msgstr "-" 679 680 #: tmainform.menuitem15.caption 681 msgctxt "tmainform.menuitem15.caption" 682 msgid "View" 683 msgstr "Zobrazit" 684 685 #: tmainform.menuitem22.caption 686 msgctxt "tmainform.menuitem22.caption" 687 msgid "-" 688 msgstr "-" 689 690 #: tmainform.menuitem27.caption 691 msgctxt "tmainform.menuitem27.caption" 692 msgid "-" 693 msgstr "-" 694 695 #: tmainform.menuitem7.caption 696 msgctxt "tmainform.menuitem7.caption" 697 msgid "Run" 698 msgstr "Spustit" 699 700 #: tmainform.menuitem9.caption 701 msgctxt "tmainform.menuitem9.caption" 702 msgid "Help" 703 msgstr "Nápověda" 704 705 #: tmainform.menuitemopenrecent.caption 706 msgctxt "tmainform.menuitemopenrecent.caption" 707 msgid "Open recent" 708 msgstr "Otevřít nedávné" 709 710 #: tmainform.menuitemproducer.caption 711 #| msgid "Producer" 712 msgctxt "tmainform.menuitemproducer.caption" 713 msgid "Target" 714 msgstr "Cíl" 715 716 #: tmainform.tabsheetbreakpoints.caption 717 msgctxt "tmainform.tabsheetbreakpoints.caption" 718 msgid "Breakpoints" 719 msgstr "Body zastavení" 720 721 #: tmainform.tabsheetcodetree.caption 722 msgctxt "tmainform.tabsheetcodetree.caption" 723 msgid "Code Tree" 724 msgstr "Strom kódu" 725 726 #: tmainform.tabsheetcompiledproject.caption 727 msgctxt "tmainform.tabsheetcompiledproject.caption" 728 msgid "Target project" 729 msgstr "Cílový projekt" 730 731 #: tmainform.tabsheetmessages.caption 732 msgctxt "tmainform.tabsheetmessages.caption" 733 msgid "Messages" 734 msgstr "Zprávy" 735 736 #: tmainform.tabsheetproject.caption 737 msgctxt "tmainform.tabsheetproject.caption" 738 msgid "Project" 739 msgstr "Projekt" 740 741 #: tmainform.tabsheetsource.caption 742 msgctxt "tmainform.tabsheetsource.caption" 743 msgid "Source code" 744 msgstr "Zdrojový kód" 745 746 #: tmainform.tabsheettarget.caption 747 msgctxt "tmainform.tabsheettarget.caption" 748 msgid "Target code" 749 msgstr "Cílový kód" 750 751 #: tmessagesform.caption 752 msgctxt "tmessagesform.caption" 753 msgid "Messages" 754 msgstr "Zprávy" 755 756 #: tmessagesform.listview1.columns[0].caption 757 msgctxt "tmessagesform.listview1.columns[0].caption" 758 msgid "File" 759 msgstr "Soubor" 760 761 #: tmessagesform.listview1.columns[1].caption 762 msgctxt "tmessagesform.listview1.columns[1].caption" 763 msgid "Position" 764 msgstr "Pozice" 765 766 #: tmessagesform.listview1.columns[2].caption 767 msgctxt "tmessagesform.listview1.columns[2].caption" 768 msgid "Message" 769 msgstr "Zpráva" 770 771 #: tprojectmanager.caption 772 msgctxt "tprojectmanager.caption" 773 msgid "Project manager" 774 msgstr "Správce projektu" 775 776 #: uaboutform.sapplicationname 777 msgctxt "uaboutform.sapplicationname" 778 msgid "Application name" 779 msgstr "Jméno aplikace" 780 781 #: uaboutform.semail 782 msgctxt "uaboutform.semail" 783 msgid "E-mail" 784 msgstr "E-mail" 785 786 #: uaboutform.smanufacturer 787 msgctxt "uaboutform.smanufacturer" 788 msgid "Company" 789 msgstr "Společnost" 790 791 #: uaboutform.sreleasedate 792 msgctxt "uaboutform.sreleasedate" 793 msgid "Release date" 794 msgstr "Datum uvolnění" 795 796 #: uaboutform.sversion 797 msgctxt "uaboutform.sversion" 798 msgid "Version" 799 msgstr "Verze" 800 801 #: ucompilersform.scompileroptions 802 msgctxt "ucompilersform.scompileroptions" 803 msgid "Compiler options" 804 msgstr "Volby překladače" 805 806 #: ucompilersform.scompilerpath 807 msgctxt "ucompilersform.scompilerpath" 808 msgid "Compiler path" 809 msgstr "Cesta překladače" 810 811 #: uformabout.sapplicationname 812 msgctxt "uformabout.sapplicationname" 813 msgid "Application name" 814 msgstr "Jméno aplikace" 815 816 #: uformabout.semail 817 msgctxt "uformabout.semail" 818 msgid "E-mail" 819 msgstr "E-mail" 820 821 #: uformabout.smanufacturer 822 msgctxt "uformabout.smanufacturer" 823 msgid "Company" 824 msgstr "Společnost" 825 826 #: uformabout.sreleasedate 827 msgctxt "uformabout.sreleasedate" 828 msgid "Release date" 829 msgstr "Datum uvolnění" 830 831 #: uformabout.sversion 832 msgctxt "uformabout.sversion" 833 msgid "Version" 834 msgstr "Verze" 835 836 #: uformmain.sbuildfinished 837 msgid "Build finished in %s seconds" 838 msgstr "" 839 840 #: uformproject.senternewfilename 841 msgid "Enter new file name" 842 msgstr "Zadejte nové jméno souboru" 843 844 #: uformproject.srenamesourcefile 845 msgid "Rename source file" 846 msgstr "Přejmenování zdrojového souboru" 847 848 #: uformtargets.scompileroptions 849 msgctxt "uformtargets.scompileroptions" 850 msgid "Compiler options" 851 msgstr "Volby překladače" 852 853 #: uformtargets.scompilerpath 854 msgctxt "uformtargets.scompilerpath" 855 msgid "Compiler path" 856 msgstr "Cesta překladače" 857 858 #: umainform.snewproject 859 msgctxt "umainform.snewproject" 860 msgid "New project" 861 msgstr "Nový projekt" 862 863 #: uproject.snewproject 864 msgctxt "uproject.snewproject" 865 msgid "New project" 866 msgstr "Nový projekt" 867 868 #: uprojecttemplates.sconsoleapplication 869 msgid "Console application" 870 msgstr "Konzolová aplikace" 871 872 #: uprojecttemplates.sguiapplication 873 msgid "GUI application" 874 msgstr "GUI aplikace" 875 876 #: uprojecttemplates.spackage 877 msgid "Package" 878 msgstr "Balíček" 879 880 #: uprojecttemplates.sunit 881 msgid "Unit" 882 msgstr "Jednotka" 883 353 msgstr "" 354 -
trunk/IDE/Modules/Pascal/IDEModulePascal.pas
r74 r75 1 unit UIDEModulePascal; 2 3 {$mode delphi} 1 unit IDEModulePascal; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UModularSystem;6 Classes, SysUtils, ModularSystem; 9 7 10 8 type … … 23 21 begin 24 22 inherited; 25 Name:= 'Pascal';23 Identification := 'Pascal'; 26 24 Title := 'Pascal'; 27 25 Version := '0.1'; -
trunk/IDE/Project.pas
r74 r75 1 unit UProject; 2 3 {$mode Delphi}{$H+} 1 unit Project; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, Dialogs, DOM, XMLWrite, XMLRead, FileUtil, 9 SpecializedList;7 Generics.Collections; 10 8 11 9 const … … 19 17 end; 20 18 21 { TProjectPackage List}22 23 TProjectPackage List = class(TListObject)19 { TProjectPackages } 20 21 TProjectPackages = class(TObjectList<TProjectPackage>) 24 22 Parent: TProject; 25 23 procedure Load; … … 33 31 end; 34 32 35 TProjectBuildConfig List = class(TListObject)33 TProjectBuildConfigs = class(TObjectList<TProjectBuildConfig>) 36 34 end; 37 35 … … 57 55 end; 58 56 59 { TProjectFile List}60 61 TProjectFile List = class(TListObject)57 { TProjectFiles } 58 59 TProjectFiles = class(TObjectList<TProjectFile>) 62 60 Parent: TProject; 63 procedure DumpFileList(Files: T ListString);64 procedure LoadFromList(Files: T ListString);61 procedure DumpFileList(Files: TStringList); 62 procedure LoadFromList(Files: TStringList); 65 63 procedure Load; 66 64 procedure Save; … … 78 76 public 79 77 FileName: string; 80 Files: TProjectFile List;81 Packages: TProjectPackage List;82 BuildConfigs: TProjectBuildConfig List;78 Files: TProjectFiles; 79 Packages: TProjectPackages; 80 BuildConfigs: TProjectBuildConfigs; 83 81 MainSource: TProjectFile; 84 82 procedure LoadFromFile(FileName: string); … … 104 102 end; 105 103 106 { TProjectTemplate List}107 108 TProjectTemplate List = class(TListObject)104 { TProjectTemplates } 105 106 TProjectTemplates = class(TObjectList<TProjectTemplate>) 109 107 procedure AddTemplate(Template: TProjectTemplate); 110 108 end; … … 113 111 SNewProject = 'New project'; 114 112 113 115 114 implementation 116 115 117 { TProjectTemplate List}118 119 procedure TProjectTemplate List.AddTemplate(Template: TProjectTemplate);116 { TProjectTemplates } 117 118 procedure TProjectTemplates.AddTemplate(Template: TProjectTemplate); 120 119 begin 121 120 Add(Template); … … 136 135 destructor TProjectTemplate.Destroy; 137 136 begin 138 Description.Free; 139 inherited Destroy; 140 end; 141 142 { TProjectPackageList } 143 144 procedure TProjectPackageList.Load; 145 begin 146 147 end; 148 149 procedure TProjectPackageList.Save; 150 begin 151 152 end; 153 154 procedure TProjectPackageList.SaveToXMLNode(Node: TDOMNode); 155 begin 156 157 end; 158 159 procedure TProjectPackageList.LoadFromXMLNode(Node: TDOMNode); 160 begin 161 137 FreeAndNil(Description); 138 inherited; 139 end; 140 141 { TProjectPackages } 142 143 procedure TProjectPackages.Load; 144 begin 145 end; 146 147 procedure TProjectPackages.Save; 148 begin 149 end; 150 151 procedure TProjectPackages.SaveToXMLNode(Node: TDOMNode); 152 begin 153 end; 154 155 procedure TProjectPackages.LoadFromXMLNode(Node: TDOMNode); 156 begin 162 157 end; 163 158 164 159 { TProjectGroup } 165 160 166 procedure TProjectFile List.DumpFileList(Files: TListString);161 procedure TProjectFiles.DumpFileList(Files: TStringList); 167 162 var 168 163 I: Integer; … … 173 168 end; 174 169 175 procedure TProjectFile List.LoadFromList(Files: TListString);170 procedure TProjectFiles.LoadFromList(Files: TStringList); 176 171 var 177 172 I: Integer; … … 190 185 end; 191 186 192 procedure TProjectFile List.Load;187 procedure TProjectFiles.Load; 193 188 var 194 189 I: Integer; … … 198 193 end; 199 194 200 procedure TProjectFile List.Save;195 procedure TProjectFiles.Save; 201 196 var 202 197 I: Integer; … … 206 201 end; 207 202 208 procedure TProjectFile List.SaveToXMLNode(Node: TDOMNode);203 procedure TProjectFiles.SaveToXMLNode(Node: TDOMNode); 209 204 var 210 205 I: Integer; … … 219 214 end; 220 215 221 procedure TProjectFile List.LoadFromXMLNode(Node: TDOMNode);216 procedure TProjectFiles.LoadFromXMLNode(Node: TDOMNode); 222 217 var 223 218 NewNode: TDomNode; … … 236 231 end; 237 232 238 function TProjectFile List.SearchFile(FileName: string): TProjectFile;233 function TProjectFiles.SearchFile(FileName: string): TProjectFile; 239 234 var 240 235 I: Integer; … … 250 245 end; 251 246 252 function TProjectFile List.AddFile(FileName: string): TProjectFile;253 begin 254 Result := TProjectFile (AddNew(TProjectFile.Create));247 function TProjectFiles.AddFile(FileName: string): TProjectFile; 248 begin 249 Result := TProjectFile.Create; 255 250 Result.Parent := Parent; 256 251 Result.FileName := FileName; 252 Add(Result); 257 253 end; 258 254 … … 278 274 destructor TProjectFile.Destroy; 279 275 begin 280 Source.Free;281 inherited Destroy;276 FreeAndNil(Source); 277 inherited; 282 278 end; 283 279 … … 419 415 constructor TProject.Create; 420 416 begin 421 Files := TProjectFile List.Create;417 Files := TProjectFiles.Create; 422 418 Files.Parent := Self; 423 Packages := TProjectPackage List.Create;419 Packages := TProjectPackages.Create; 424 420 Packages.Parent := Self; 425 421 end; … … 427 423 destructor TProject.Destroy; 428 424 begin 429 F iles.Free;430 Packages.Free;431 BuildConfigs.Free;432 inherited Destroy;425 FreeAndNil(Files); 426 FreeAndNil(Packages); 427 FreeAndNil(BuildConfigs); 428 inherited; 433 429 end; 434 430 -
trunk/IDE/ProjectTemplates.pas
r74 r75 1 unit UProjectTemplates; 2 3 {$mode delphi} 1 unit ProjectTemplates; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, UProject;6 Classes, SysUtils, Project; 9 7 10 8 type -
trunk/IDE/TextSource.pas
r74 r75 1 unit UTextSource; 2 3 {$MODE Delphi} 1 unit TextSource; 4 2 5 3 interface -
trunk/IDE/Transpascal.lpi
r74 r75 2 2 <CONFIG> 3 3 <ProjectOptions> 4 <Version Value="1 0"/>4 <Version Value="12"/> 5 5 <PathDelim Value="\"/> 6 6 <General> 7 <Flags> 8 <CompatibilityMode Value="True"/> 9 </Flags> 7 10 <SessionStorage Value="InProjectDir"/> 8 <MainUnit Value="0"/>9 11 <Title Value="Transpascal IDE"/> 10 12 <ResourceType Value="res"/> … … 68 70 <PublishOptions> 69 71 <Version Value="2"/> 70 <IgnoreBinaries Value="False"/>71 <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>72 <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>73 72 </PublishOptions> 74 73 <RunParams> 75 <local> 76 <FormatVersion Value="1"/> 77 </local> 74 <FormatVersion Value="2"/> 75 <Modes Count="1"> 76 <Mode0 Name="default"/> 77 </Modes> 78 78 </RunParams> 79 <RequiredPackages Count=" 8">79 <RequiredPackages Count="6"> 80 80 <Item1> 81 81 <PackageName Value="ModularSystem"/> … … 89 89 </Item2> 90 90 <Item3> 91 <PackageName Value=" CoolTranslator"/>92 < DefaultFilename Value="..\Packages\CoolTranslator\CoolTranslator.lpk" Prefer="True"/>91 <PackageName Value="LCLBase"/> 92 <MinVersion Major="1" Release="1" Valid="True"/> 93 93 </Item3> 94 94 <Item4> 95 <PackageName Value=" LCLBase"/>96 < MinVersion Major="1" Release="1" Valid="True"/>95 <PackageName Value="TranspascalCompiler"/> 96 <DefaultFilename Value="..\Compiler\TranspascalCompiler.lpk" Prefer="True"/> 97 97 </Item4> 98 98 <Item5> 99 <PackageName Value=" TemplateGenerics"/>100 < DefaultFilename Value="..\Packages\TemplateGenerics\TemplateGenerics.lpk" Prefer="True"/>99 <PackageName Value="SynEdit"/> 100 <MinVersion Major="1" Valid="True"/> 101 101 </Item5> 102 102 <Item6> 103 <PackageName Value="TranspascalCompiler"/> 104 <DefaultFilename Value="..\Compiler\TranspascalCompiler.lpk" Prefer="True"/> 103 <PackageName Value="LCL"/> 105 104 </Item6> 106 <Item7>107 <PackageName Value="SynEdit"/>108 <MinVersion Major="1" Valid="True"/>109 </Item7>110 <Item8>111 <PackageName Value="LCL"/>112 </Item8>113 105 </RequiredPackages> 114 <Units Count=" 20">106 <Units Count="19"> 115 107 <Unit0> 116 108 <Filename Value="Transpascal.lpr"/> … … 118 110 </Unit0> 119 111 <Unit1> 120 <Filename Value="Forms\ UFormMain.pas"/>112 <Filename Value="Forms\FormMain.pas"/> 121 113 <IsPartOfProject Value="True"/> 122 114 <ComponentName Value="FormMain"/> … … 125 117 </Unit1> 126 118 <Unit2> 127 <Filename Value=" UTextSource.pas"/>119 <Filename Value="TextSource.pas"/> 128 120 <IsPartOfProject Value="True"/> 129 121 </Unit2> 130 122 <Unit3> 131 <Filename Value=" UProject.pas"/>123 <Filename Value="Project.pas"/> 132 124 <IsPartOfProject Value="True"/> 133 125 </Unit3> 134 126 <Unit4> 135 <Filename Value="Forms\ UFormProject.pas"/>127 <Filename Value="Forms\FormProject.pas"/> 136 128 <IsPartOfProject Value="True"/> 137 129 <ComponentName Value="FormProject"/> … … 140 132 </Unit4> 141 133 <Unit5> 142 <Filename Value="Forms\ UFormSourceCode.pas"/>134 <Filename Value="Forms\FormSourceCode.pas"/> 143 135 <IsPartOfProject Value="True"/> 144 136 <ComponentName Value="FormSourceCode"/> … … 147 139 </Unit5> 148 140 <Unit6> 149 <Filename Value="Forms\ UFormMessages.pas"/>141 <Filename Value="Forms\FormMessages.pas"/> 150 142 <IsPartOfProject Value="True"/> 151 143 <ComponentName Value="FormMessages"/> … … 154 146 </Unit6> 155 147 <Unit7> 156 <Filename Value="Forms\ UFormTargetCode.pas"/>148 <Filename Value="Forms\FormTargetCode.pas"/> 157 149 <IsPartOfProject Value="True"/> 158 150 <ComponentName Value="FormTargetCode"/> … … 161 153 </Unit7> 162 154 <Unit8> 163 <Filename Value="Forms\ UFormCodeTree.pas"/>155 <Filename Value="Forms\FormCodeTree.pas"/> 164 156 <IsPartOfProject Value="True"/> 165 157 <ComponentName Value="FormCodeTree"/> … … 168 160 </Unit8> 169 161 <Unit9> 170 <Filename Value="Forms\ UFormAbout.pas"/>171 <IsPartOfProject Value="True"/> 172 <ComponentName Value="Form About"/>162 <Filename Value="Forms\FormOptions.pas"/> 163 <IsPartOfProject Value="True"/> 164 <ComponentName Value="FormOptions"/> 173 165 <HasResources Value="True"/> 174 166 <ResourceBaseClass Value="Form"/> 175 167 </Unit9> 176 168 <Unit10> 177 <Filename Value="Forms\ UFormOptions.pas"/>178 <IsPartOfProject Value="True"/> 179 <ComponentName Value="Form Options"/>169 <Filename Value="Forms\FormTargets.pas"/> 170 <IsPartOfProject Value="True"/> 171 <ComponentName Value="FormTargets"/> 180 172 <HasResources Value="True"/> 181 173 <ResourceBaseClass Value="Form"/> 182 174 </Unit10> 183 175 <Unit11> 184 <Filename Value="Forms\ UFormTargets.pas"/>185 <IsPartOfProject Value="True"/> 186 <ComponentName Value="Form Targets"/>176 <Filename Value="Forms\FormProjectNew.pas"/> 177 <IsPartOfProject Value="True"/> 178 <ComponentName Value="FormProjectNew"/> 187 179 <HasResources Value="True"/> 188 180 <ResourceBaseClass Value="Form"/> 189 181 </Unit11> 190 182 <Unit12> 191 <Filename Value="Forms\UFormProjectNew.pas"/> 192 <IsPartOfProject Value="True"/> 193 <ComponentName Value="FormProjectNew"/> 194 <HasResources Value="True"/> 195 <ResourceBaseClass Value="Form"/> 183 <Filename Value="ProjectTemplates.pas"/> 184 <IsPartOfProject Value="True"/> 196 185 </Unit12> 197 186 <Unit13> 198 <Filename Value="UProjectTemplates.pas"/> 199 <IsPartOfProject Value="True"/> 187 <Filename Value="Forms\FormTargetProject.pas"/> 188 <IsPartOfProject Value="True"/> 189 <ComponentName Value="FormTargetProject"/> 190 <HasResources Value="True"/> 191 <ResourceBaseClass Value="Form"/> 200 192 </Unit13> 201 193 <Unit14> 202 <Filename Value=" Forms\UFormTargetProject.pas"/>203 <IsPartOfProject Value="True"/> 204 <ComponentName Value=" FormTargetProject"/>205 <HasResources Value="True"/> 206 <ResourceBaseClass Value=" Form"/>194 <Filename Value="Core.pas"/> 195 <IsPartOfProject Value="True"/> 196 <ComponentName Value="Core"/> 197 <HasResources Value="True"/> 198 <ResourceBaseClass Value="DataModule"/> 207 199 </Unit14> 208 200 <Unit15> 209 <Filename Value="UCore.pas"/> 210 <IsPartOfProject Value="True"/> 211 <ComponentName Value="Core"/> 212 <HasResources Value="True"/> 213 <ResourceBaseClass Value="DataModule"/> 201 <Filename Value="Forms\FormTargetOptions.pas"/> 202 <IsPartOfProject Value="True"/> 203 <ComponentName Value="FormTargetOptions"/> 204 <ResourceBaseClass Value="Form"/> 214 205 </Unit15> 215 206 <Unit16> 216 <Filename Value="Forms\ UFormTargetOptions.pas"/>217 <IsPartOfProject Value="True"/> 218 <ComponentName Value="Form TargetOptions"/>207 <Filename Value="Forms\FormExternalProducerOutput.pas"/> 208 <IsPartOfProject Value="True"/> 209 <ComponentName Value="FormExternalProducerOutput"/> 219 210 <ResourceBaseClass Value="Form"/> 220 211 </Unit16> 221 212 <Unit17> 222 <Filename Value="Forms\UFormExternalProducerOutput.pas"/> 223 <IsPartOfProject Value="True"/> 224 <ComponentName Value="FormExternalProducerOutput"/> 225 <ResourceBaseClass Value="Form"/> 213 <Filename Value="Notes.txt"/> 214 <IsPartOfProject Value="True"/> 226 215 </Unit17> 227 216 <Unit18> 228 <Filename Value=" Notes.txt"/>217 <Filename Value="Modules\Pascal\IDEModulePascal.pas"/> 229 218 <IsPartOfProject Value="True"/> 230 219 </Unit18> 231 <Unit19>232 <Filename Value="Modules\Pascal\UIDEModulePascal.pas"/>233 <IsPartOfProject Value="True"/>234 </Unit19>235 220 </Units> 236 221 </ProjectOptions> … … 266 251 <Linking> 267 252 <Debugging> 253 <DebugInfoType Value="dsDwarf3"/> 268 254 <UseHeaptrc Value="True"/> 269 255 <UseExternalDbgSyms Value="True"/> -
trunk/IDE/Transpascal.lpr
r74 r75 8 8 {$ENDIF}{$ENDIF} 9 9 Forms, Interfaces, SysUtils, 10 UFormMain {MainForm},11 UTextSource, UProject, TranspascalCompiler, UFormProject,12 UFormSourceCode, UFormMessages,13 UFormTargetCode, UFormCodeTree, TemplateGenerics, CoolTranslator, Common,14 UFormAbout, UFormOptions, UFormTargets,15 UFormProjectNew, UProjectTemplates, UFormTargetProject, UCore,16 UFormTargetOptions, UFormExternalProducerOutput, UIDEModulePascal;10 FormMain {MainForm}, 11 TextSource, Project, TranspascalCompiler, FormProject, 12 FormSourceCode, FormMessages, 13 FormTargetCode, FormCodeTree, Common, 14 FormOptions, FormTargets, 15 FormProjectNew, ProjectTemplates, FormTargetProject, Core, 16 FormTargetOptions, FormExternalProducerOutput, IDEModulePascal; 17 17 18 18 {$R *.res} … … 24 24 25 25 begin 26 Application.Title :='Transpascal IDE';26 Application.Title:='Transpascal IDE'; 27 27 {$IFDEF DEBUG} 28 28 // Heap trace … … 32 32 33 33 Application.Initialize; 34 Application.CreateForm(TCore, Core); 35 Application.CreateForm(TFormMain, FormMain); 36 Application.CreateForm(TFormProject, FormProject); 37 Application.CreateForm(TFormSourceCode, FormSourceCode); 38 Application.CreateForm(TFormMessages, FormMessages); 39 Application.CreateForm(TFormTargetCode, FormTargetCode); 40 Application.CreateForm(TFormCodeTree, FormCodeTree); 41 Application.CreateForm(TFormAbout, FormAbout); 42 Application.CreateForm(TFormOptions, FormOptions); 43 Application.CreateForm(TFormTargets, FormTargets); 44 Application.CreateForm(TFormProjectNew, FormProjectNew); 45 Application.CreateForm(TFormTargetProject, FormTargetProject); 46 Application.CreateForm(TFormTargetOptions, FormTargetOptions); 47 Application.CreateForm(TFormExternalProducerOutput, FormExternalProducerOutput 48 ); 34 Application.CreateForm(TCore, Core.Core); 35 Application.CreateForm(TFormMain, FormMain.FormMain); 49 36 Application.Run; 50 37 end. -
trunk/IDE/UProducerTreeView.pas
r41 r75 1 1 unit UProducerTreeView; 2 2 3 {$mode Delphi}{$H+}4 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, USourceCode, ComCtrls, UProducer, StrUtils;6 Classes, SysUtils, SourceCode, ComCtrls, Producer, StrUtils; 9 7 10 8 type -
trunk/Packages/Common/ApplicationInfo.pas
r74 r75 1 unit UApplicationInfo; 2 3 {$mode delphi} 1 unit ApplicationInfo; 4 2 5 3 interface 6 4 7 5 uses 8 SysUtils, Registry, Classes, Forms, URegistry;6 SysUtils, Classes, Forms, RegistryEx, Controls, Graphics, LCLType; 9 7 10 8 type … … 14 12 TApplicationInfo = class(TComponent) 15 13 private 14 FDescription: TTranslateString; 15 FIcon: TBitmap; 16 16 FIdentification: Byte; 17 FLicense: string; 17 18 FVersionMajor: Byte; 18 19 FVersionMinor: Byte; … … 31 32 public 32 33 constructor Create(AOwner: TComponent); override; 34 destructor Destroy; override; 33 35 property Version: string read GetVersion; 36 function GetRegistryContext: TRegistryContext; 34 37 published 35 38 property Identification: Byte read FIdentification write FIdentification; … … 44 47 property EmailContact: string read FEmailContact write FEmailContact; 45 48 property AppName: string read FAppName write FAppName; 49 property Description: TTranslateString read FDescription write FDescription; 46 50 property ReleaseDate: TDateTime read FReleaseDate write FReleaseDate; 47 51 property RegistryKey: string read FRegistryKey write FRegistryKey; 48 52 property RegistryRoot: TRegistryRoot read FRegistryRoot write FRegistryRoot; 53 property License: string read FLicense write FLicense; 54 property Icon: TBitmap read FIcon write FIcon; 49 55 end; 50 56 51 57 procedure Register; 52 58 59 53 60 implementation 54 61 55 62 procedure Register; 56 63 begin … … 69 76 constructor TApplicationInfo.Create(AOwner: TComponent); 70 77 begin 71 inherited Create(AOwner);78 inherited; 72 79 FVersionMajor := 1; 73 80 FIdentification := 1; … … 75 82 FRegistryKey := '\Software\' + FAppName; 76 83 FRegistryRoot := rrKeyCurrentUser; 84 FIcon := TBitmap.Create; 85 end; 86 87 destructor TApplicationInfo.Destroy; 88 begin 89 FreeAndNil(FIcon); 90 inherited; 91 end; 92 93 function TApplicationInfo.GetRegistryContext: TRegistryContext; 94 begin 95 Result := TRegistryContext.Create(RegistryRoot, RegistryKey); 77 96 end; 78 97 -
trunk/Packages/Common/Common.Delay.pas
r74 r75 1 unit UDelay; 2 3 {$mode delphi} 1 unit Common.Delay; 4 2 5 3 interface … … 73 71 74 72 end. 75 -
trunk/Packages/Common/Common.lpk
r74 r75 1 1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 <Package Version=" 4">3 <Package Version="5"> 4 4 <PathDelim Value="\"/> 5 5 <Name Value="Common"/> 6 <Type Value="RunAndDesignTime"/> 6 7 <AddToProjectUsesSection Value="True"/> 7 8 <Author Value="Chronos (robie@centrum.cz)"/> … … 10 11 <PathDelim Value="\"/> 11 12 <SearchPaths> 12 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 13 <OtherUnitFiles Value="Forms"/> 14 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)-$(BuildMode)"/> 13 15 </SearchPaths> 16 <Parsing> 17 <SyntaxOptions> 18 <SyntaxMode Value="Delphi"/> 19 <CStyleOperator Value="False"/> 20 <AllowLabel Value="False"/> 21 <CPPInline Value="False"/> 22 </SyntaxOptions> 23 </Parsing> 24 <CodeGeneration> 25 <Optimizations> 26 <OptimizationLevel Value="0"/> 27 </Optimizations> 28 </CodeGeneration> 29 <Linking> 30 <Debugging> 31 <GenerateDebugInfo Value="False"/> 32 </Debugging> 33 </Linking> 14 34 <Other> 15 35 <CompilerMessages> 16 < UseMsgFile Value="True"/>36 <IgnoredMessages idx6058="True" idx5071="True" idx5024="True" idx3124="True" idx3123="True"/> 17 37 </CompilerMessages> 18 <CompilerPath Value="$(CompPath)"/>19 38 </Other> 20 39 </CompilerOptions> 21 <Description Value="Various libraries"/> 22 <License Value="GNU/GPL"/> 23 <Version Minor="7"/> 24 <Files Count="19"> 40 <Description Value="Common package with various useful units. 41 42 Source: https://svn.zdechov.net/PascalClassLibrary/Common/"/> 43 <License Value="Copy left."/> 44 <Version Minor="12"/> 45 <Files Count="36"> 25 46 <Item1> 26 47 <Filename Value="StopWatch.pas"/> … … 28 49 </Item1> 29 50 <Item2> 30 <Filename Value=" UCommon.pas"/>31 <UnitName Value=" UCommon"/>51 <Filename Value="Common.pas"/> 52 <UnitName Value="Common"/> 32 53 </Item2> 33 54 <Item3> 34 <Filename Value=" UDebugLog.pas"/>35 <HasRegisterProc Value="True"/> 36 <UnitName Value=" UDebugLog"/>55 <Filename Value="DebugLog.pas"/> 56 <HasRegisterProc Value="True"/> 57 <UnitName Value="DebugLog"/> 37 58 </Item3> 38 59 <Item4> 39 <Filename Value=" UDelay.pas"/>40 <UnitName Value=" UDelay"/>60 <Filename Value="Common.Delay.pas"/> 61 <UnitName Value="Common.Delay"/> 41 62 </Item4> 42 63 <Item5> 43 <Filename Value="UPrefixMultiplier.pas"/> 44 <UnitName Value="UPrefixMultiplier"/> 64 <Filename Value="PrefixMultiplier.pas"/> 65 <HasRegisterProc Value="True"/> 66 <UnitName Value="PrefixMultiplier"/> 45 67 </Item5> 46 68 <Item6> 47 <Filename Value="U URI.pas"/>48 <UnitName Value="U URI"/>69 <Filename Value="URI.pas"/> 70 <UnitName Value="URI"/> 49 71 </Item6> 50 72 <Item7> 51 <Filename Value=" UThreading.pas"/>52 <UnitName Value=" UThreading"/>73 <Filename Value="Threading.pas"/> 74 <UnitName Value="Threading"/> 53 75 </Item7> 54 76 <Item8> 55 <Filename Value=" UMemory.pas"/>56 <UnitName Value=" UMemory"/>77 <Filename Value="Memory.pas"/> 78 <UnitName Value="Memory"/> 57 79 </Item8> 58 80 <Item9> 59 <Filename Value=" UResetableThread.pas"/>60 <UnitName Value=" UResetableThread"/>81 <Filename Value="ResetableThread.pas"/> 82 <UnitName Value="ResetableThread"/> 61 83 </Item9> 62 84 <Item10> 63 <Filename Value=" UPool.pas"/>64 <UnitName Value=" UPool"/>85 <Filename Value="Pool.pas"/> 86 <UnitName Value="Pool"/> 65 87 </Item10> 66 88 <Item11> 67 <Filename Value=" ULastOpenedList.pas"/>68 <HasRegisterProc Value="True"/> 69 <UnitName Value=" ULastOpenedList"/>89 <Filename Value="LastOpenedList.pas"/> 90 <HasRegisterProc Value="True"/> 91 <UnitName Value="LastOpenedList"/> 70 92 </Item11> 71 93 <Item12> 72 <Filename Value=" URegistry.pas"/>73 <UnitName Value=" URegistry"/>94 <Filename Value="RegistryEx.pas"/> 95 <UnitName Value="RegistryEx"/> 74 96 </Item12> 75 97 <Item13> 76 <Filename Value=" UJobProgressView.pas"/>77 <HasRegisterProc Value="True"/> 78 <UnitName Value=" UJobProgressView"/>98 <Filename Value="JobProgressView.pas"/> 99 <HasRegisterProc Value="True"/> 100 <UnitName Value="JobProgressView"/> 79 101 </Item13> 80 102 <Item14> 81 <Filename Value=" UXMLUtils.pas"/>82 <UnitName Value=" UXMLUtils"/>103 <Filename Value="XML.pas"/> 104 <UnitName Value="XML"/> 83 105 </Item14> 84 106 <Item15> 85 <Filename Value=" UApplicationInfo.pas"/>86 <HasRegisterProc Value="True"/> 87 <UnitName Value=" UApplicationInfo"/>107 <Filename Value="ApplicationInfo.pas"/> 108 <HasRegisterProc Value="True"/> 109 <UnitName Value="ApplicationInfo"/> 88 110 </Item15> 89 111 <Item16> 90 <Filename Value=" USyncCounter.pas"/>91 <UnitName Value=" USyncCounter"/>112 <Filename Value="SyncCounter.pas"/> 113 <UnitName Value="SyncCounter"/> 92 114 </Item16> 93 115 <Item17> 94 <Filename Value=" UListViewSort.pas"/>95 <HasRegisterProc Value="True"/> 96 <UnitName Value=" UListViewSort"/>116 <Filename Value="ListViewSort.pas"/> 117 <HasRegisterProc Value="True"/> 118 <UnitName Value="ListViewSort"/> 97 119 </Item17> 98 120 <Item18> 99 <Filename Value=" UPersistentForm.pas"/>100 <HasRegisterProc Value="True"/> 101 <UnitName Value=" UPersistentForm"/>121 <Filename Value="PersistentForm.pas"/> 122 <HasRegisterProc Value="True"/> 123 <UnitName Value="PersistentForm"/> 102 124 </Item18> 103 125 <Item19> 104 <Filename Value=" UFindFile.pas"/>105 <HasRegisterProc Value="True"/> 106 <UnitName Value=" UFindFile"/>126 <Filename Value="FindFile.pas"/> 127 <HasRegisterProc Value="True"/> 128 <UnitName Value="FindFile"/> 107 129 </Item19> 130 <Item20> 131 <Filename Value="ScaleDPI.pas"/> 132 <HasRegisterProc Value="True"/> 133 <UnitName Value="ScaleDPI"/> 134 </Item20> 135 <Item21> 136 <Filename Value="Theme.pas"/> 137 <HasRegisterProc Value="True"/> 138 <UnitName Value="Theme"/> 139 </Item21> 140 <Item22> 141 <Filename Value="StringTable.pas"/> 142 <UnitName Value="StringTable"/> 143 </Item22> 144 <Item23> 145 <Filename Value="MetaCanvas.pas"/> 146 <UnitName Value="MetaCanvas"/> 147 </Item23> 148 <Item24> 149 <Filename Value="Geometric.pas"/> 150 <UnitName Value="Geometric"/> 151 </Item24> 152 <Item25> 153 <Filename Value="Translator.pas"/> 154 <HasRegisterProc Value="True"/> 155 <UnitName Value="Translator"/> 156 </Item25> 157 <Item26> 158 <Filename Value="Languages.pas"/> 159 <UnitName Value="Languages"/> 160 </Item26> 161 <Item27> 162 <Filename Value="PixelPointer.pas"/> 163 <UnitName Value="PixelPointer"/> 164 </Item27> 165 <Item28> 166 <Filename Value="DataFile.pas"/> 167 <UnitName Value="DataFile"/> 168 </Item28> 169 <Item29> 170 <Filename Value="TestCase.pas"/> 171 <UnitName Value="TestCase"/> 172 </Item29> 173 <Item30> 174 <Filename Value="Generics.pas"/> 175 <UnitName Value="Generics"/> 176 </Item30> 177 <Item31> 178 <Filename Value="CommonPackage.pas"/> 179 <Type Value="Main Unit"/> 180 <UnitName Value="CommonPackage"/> 181 </Item31> 182 <Item32> 183 <Filename Value="Table.pas"/> 184 <UnitName Value="Table"/> 185 </Item32> 186 <Item33> 187 <Filename Value="FormEx.pas"/> 188 <HasRegisterProc Value="True"/> 189 <UnitName Value="FormEx"/> 190 </Item33> 191 <Item34> 192 <Filename Value="Forms\FormTests.pas"/> 193 <UnitName Value="FormTests"/> 194 </Item34> 195 <Item35> 196 <Filename Value="Forms\FormTest.pas"/> 197 <UnitName Value="FormTest"/> 198 </Item35> 199 <Item36> 200 <Filename Value="Forms\FormAbout.pas"/> 201 <UnitName Value="FormAbout"/> 202 </Item36> 108 203 </Files> 204 <CompatibilityMode Value="True"/> 109 205 <i18n> 110 206 <EnableI18N Value="True"/> 111 207 <OutDir Value="Languages"/> 208 <EnableI18NForLFM Value="True"/> 112 209 </i18n> 113 <Type Value="RunAndDesignTime"/>114 210 <RequiredPkgs Count="2"> 115 211 <Item1> 116 <PackageName Value=" TemplateGenerics"/>212 <PackageName Value="LCL"/> 117 213 </Item1> 118 214 <Item2> -
trunk/Packages/Common/Common.pas
r74 r75 1 unit UCommon; 2 3 {$mode delphi} 1 unit Common; 4 2 5 3 interface 6 4 7 5 uses 8 {$ ifdef Windows}Windows,{$endif}9 {$ ifdef Linux}baseunix,{$endif}10 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, 11 FileUtil ; //, ShFolder, ShellAPI;6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 {$IFDEF UNIX}baseunix,{$ENDIF} 8 Classes, SysUtils, StrUtils, Dialogs, Process, LCLIntf, Graphics, 9 FileUtil, Generics.Collections; //, ShFolder, ShellAPI; 12 10 13 11 type 14 12 TArrayOfByte = array of Byte; 15 TArrayOfString = array of string;16 13 TExceptionEvent = procedure(Sender: TObject; E: Exception) of object; 17 14 … … 28 25 unfDNSDomainName = 11); 29 26 27 TFilterMethod = function (FileName: string): Boolean of object; 28 TFileNameMethod = procedure (FileName: string) of object; 29 30 30 var 31 31 ExceptionHandler: TExceptionEvent; 32 32 DLLHandle1: HModule; 33 33 34 {$IFDEF Windows} 35 GetUserNameEx: procedure (NameFormat: DWORD; 36 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; 37 {$ENDIF} 38 39 function IntToBin(Data: Int64; Count: Byte): string; 34 {$IFDEF WINDOWS} 35 GetUserNameEx: procedure (NameFormat: DWORD; 36 lpNameBuffer: LPSTR; nSize: PULONG); stdcall; 37 {$ENDIF} 38 39 const 40 clLightBlue = TColor($FF8080); 41 clLightGreen = TColor($80FF80); 42 clLightRed = TColor($8080FF); 43 44 function AddLeadingZeroes(const aNumber, Length : integer) : string; 40 45 function BinToInt(BinStr: string): Int64; 41 function TryHexToInt(Data: string; var Value: Integer): Boolean;42 function TryBinToInt(Data: string; var Value: Integer): Boolean;43 46 function BinToHexString(Source: AnsiString): string; 44 47 //function DelTree(DirName : string): Boolean; … … 46 49 function BCDToInt(Value: Byte): Byte; 47 50 function CompareByteArray(Data1, Data2: TArrayOfByte): Boolean; 51 procedure CopyStringArray(Dest: TStringArray; Source: array of string); 52 function CombinePaths(Path1, Path2: string): string; 53 function ComputerName: string; 54 procedure DeleteFiles(APath, AFileSpec: string); 55 function Explode(Separator: Char; Data: string): TStringArray; 56 procedure ExecuteProgram(Executable: string; Parameters: array of string); 57 procedure FileDialogUpdateFilterFileType(FileDialog: TOpenDialog); 58 procedure FreeThenNil(var Obj); 59 function GetDirCount(Dir: string): Integer; 48 60 function GetUserName: string; 49 function LoggedOnUserNameEx(Format: TUserNameFormat): string;50 function SplitString(var Text: string; Count: Word): string;51 61 function GetBitCount(Variable: QWord; MaxIndex: Integer): Integer; 52 62 function GetBit(Variable: QWord; Index: Byte): Boolean; 63 function GetStringPart(var Text: string; Separator: string): string; 64 function GenerateNewName(OldName: string): string; 65 function GetFileFilterItemExt(Filter: string; Index: Integer): string; 66 function IntToBin(Data: Int64; Count: Byte): string; 67 function Implode(Separator: string; List: TList<string>): string; 68 function Implode(Separator: string; List: TStringList; Around: string = ''): string; 69 function LastPos(const SubStr: String; const S: String): Integer; 70 function LoadFileToStr(const FileName: TFileName): AnsiString; 71 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 72 function MergeArray(A, B: array of string): TStringArray; 73 function OccurenceOfChar(What: Char; Where: string): Integer; 74 procedure OpenWebPage(URL: string); 75 procedure OpenEmail(Email: string); 76 procedure OpenFileInShell(FileName: string); 77 function PosFromIndex(SubStr: string; Text: string; 78 StartIndex: Integer): Integer; 79 function PosFromIndexReverse(SubStr: string; Text: string; 80 StartIndex: Integer): Integer; 81 function RemoveQuotes(Text: string): string; 82 procedure SaveStringToFile(S, FileName: string); 53 83 procedure SetBit(var Variable: Int64; Index: Byte; State: Boolean); overload; 54 84 procedure SetBit(var Variable: QWord; Index: Byte; State: Boolean); overload; 55 85 procedure SetBit(var Variable: Cardinal; Index: Byte; State: Boolean); overload; 56 86 procedure SetBit(var Variable: Word; Index: Byte; State: Boolean); overload; 57 function AddLeadingZeroes(const aNumber, Length : integer) : string; 58 function LastPos(const SubStr: String; const S: String): Integer; 59 function GenerateNewName(OldName: string): string; 60 function GetFileFilterItemExt(Filter: string; Index: Integer): string; 61 procedure FileDialogUpdateFilterFileType(FileDialog: TOpenDialog); 62 procedure DeleteFiles(APath, AFileSpec: string); 63 procedure OpenWebPage(URL: string); 64 procedure OpenFileInShell(FileName: string); 65 procedure ExecuteProgram(CommandLine: string); 66 procedure FreeThenNil(var Obj); 67 function RemoveQuotes(Text: string): string; 68 function ComputerName: string; 69 function OccurenceOfChar(What: Char; Where: string): Integer; 70 function GetDirCount(Dir: string): Integer; 71 function MergeArray(A, B: array of string): TArrayOfString; 72 function LoadFileToStr(const FileName: TFileName): AnsiString; 87 procedure SearchFiles(AList: TStrings; Dir: string; 88 FilterMethod: TFilterMethod = nil; FileNameMethod: TFileNameMethod = nil); 89 function SplitString(var Text: string; Count: Word): string; 90 function StripTags(const S: string): string; 91 function TryHexToInt(Data: string; out Value: Integer): Boolean; 92 function TryBinToInt(Data: string; out Value: Integer): Boolean; 93 procedure SortStrings(Strings: TStrings); 73 94 74 95 … … 98 119 I: Integer; 99 120 begin 121 Result := ''; 100 122 for I := 1 to Length(Source) do begin 101 123 Result := Result + LowerCase(IntToHex(Ord(Source[I]), 2)); … … 112 134 Path := IncludeTrailingPathDelimiter(APath); 113 135 114 Find := FindFirst( UTF8Decode(Path + AFileSpec), faAnyFile xor faDirectory, SearchRec);136 Find := FindFirst(Path + AFileSpec, faAnyFile xor faDirectory, SearchRec); 115 137 while Find = 0 do begin 116 DeleteFile(Path + UTF8Encode(SearchRec.Name));138 DeleteFile(Path + SearchRec.Name); 117 139 118 140 Find := SysUtils.FindNext(SearchRec); … … 185 207 end;*) 186 208 209 function Implode(Separator: string; List: TStringList; Around: string = ''): string; 210 var 211 I: Integer; 212 begin 213 Result := ''; 214 for I := 0 to List.Count - 1 do begin 215 Result := Result + Around + List[I] + Around; 216 if I < List.Count - 1 then Result := Result + Separator; 217 end; 218 end; 219 187 220 function LastPos(const SubStr: String; const S: String): Integer; 188 221 begin … … 230 263 end; 231 264 232 function TryHexToInt(Data: string; varValue: Integer): Boolean;265 function TryHexToInt(Data: string; out Value: Integer): Boolean; 233 266 var 234 267 I: Integer; … … 246 279 end; 247 280 248 function TryBinToInt(Data: string; varValue: Integer): Boolean;281 function TryBinToInt(Data: string; out Value: Integer): Boolean; 249 282 var 250 283 I: Integer; … … 274 307 end; 275 308 276 function Explode(Separator: char; Data: string): TArrayOfString; 277 begin 278 SetLength(Result, 0); 279 while Pos(Separator, Data) > 0 do begin 309 function Explode(Separator: Char; Data: string): TStringArray; 310 var 311 Index: Integer; 312 begin 313 Result := Default(TStringArray); 314 repeat 315 Index := Pos(Separator, Data); 316 if Index > 0 then begin 317 SetLength(Result, Length(Result) + 1); 318 Result[High(Result)] := Copy(Data, 1, Index - 1); 319 Delete(Data, 1, Index); 320 end else Break; 321 until False; 322 if Data <> '' then begin 280 323 SetLength(Result, Length(Result) + 1); 281 Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1); 282 Delete(Data, 1, Pos(Separator, Data)); 283 end; 284 SetLength(Result, Length(Result) + 1); 285 Result[High(Result)] := Data; 286 end; 287 288 {$IFDEF Windows} 324 Result[High(Result)] := Data; 325 end; 326 end; 327 328 function Implode(Separator: string; List: TList<string>): string; 329 var 330 I: Integer; 331 begin 332 Result := ''; 333 for I := 0 to List.Count - 1 do begin 334 Result := Result + List[I]; 335 if I < List.Count - 1 then Result := Result + Separator; 336 end; 337 end; 338 339 {$IFDEF WINDOWS} 289 340 function GetUserName: string; 290 341 const … … 294 345 begin 295 346 L := MAX_USERNAME_LENGTH + 2; 347 Result := Default(string); 296 348 SetLength(Result, L); 297 349 if Windows.GetUserName(PChar(Result), L) and (L > 0) then begin … … 307 359 end; 308 360 end; 309 {$ endif}361 {$ENDIF} 310 362 311 363 function ComputerName: string; 312 {$ ifdef mswindows}364 {$IFDEF WINDOWS} 313 365 const 314 366 INFO_BUFFER_SIZE = 32767; … … 325 377 end; 326 378 end; 327 {$ endif}328 {$ ifdef unix}379 {$ENDIF} 380 {$IFDEF UNIX} 329 381 var 330 382 Name: UtsName; 331 383 begin 384 Name := Default(UtsName); 332 385 fpuname(Name); 333 386 Result := Name.Nodename; 334 387 end; 335 {$ endif}336 337 {$ ifdef windows}388 {$ENDIF} 389 390 {$IFDEF WINDOWS} 338 391 function LoggedOnUserNameEx(Format: TUserNameFormat): string; 339 392 const … … 413 466 procedure LoadLibraries; 414 467 begin 415 {$IFDEF W indows}468 {$IFDEF WINDOWS} 416 469 DLLHandle1 := LoadLibrary('secur32.dll'); 417 470 if DLLHandle1 <> 0 then … … 424 477 procedure FreeLibraries; 425 478 begin 426 {$IFDEF W indows}479 {$IFDEF WINDOWS} 427 480 if DLLHandle1 <> 0 then FreeLibrary(DLLHandle1); 428 481 {$ENDIF} 429 482 end; 430 483 431 procedure ExecuteProgram( CommandLine:string);484 procedure ExecuteProgram(Executable: string; Parameters: array of string); 432 485 var 433 486 Process: TProcess; 487 I: Integer; 434 488 begin 435 489 try 436 490 Process := TProcess.Create(nil); 437 Process.CommandLine := CommandLine; 491 Process.Executable := Executable; 492 for I := 0 to Length(Parameters) - 1 do 493 Process.Parameters.Add(Parameters[I]); 438 494 Process.Options := [poNoConsole]; 439 495 Process.Execute; … … 454 510 end; 455 511 512 procedure OpenEmail(Email: string); 513 begin 514 OpenURL('mailto:' + Email); 515 end; 516 456 517 procedure OpenFileInShell(FileName: string); 457 518 begin 458 ExecuteProgram('cmd.exe /c start "' + FileName + '"');519 ExecuteProgram('cmd.exe', ['/c', 'start', FileName]); 459 520 end; 460 521 … … 482 543 end; 483 544 484 function MergeArray(A, B: array of string): TArrayOfString; 485 var 486 I: Integer; 487 begin 545 function MergeArray(A, B: array of string): TStringArray; 546 var 547 I: Integer; 548 begin 549 Result := Default(TStringArray); 488 550 SetLength(Result, Length(A) + Length(B)); 489 551 for I := 0 to Length(A) - 1 do … … 511 573 end; 512 574 575 function DefaultSearchFilter(const FileName: string): Boolean; 576 begin 577 Result := True; 578 end; 579 580 procedure SaveStringToFile(S, FileName: string); 581 var 582 F: TextFile; 583 begin 584 AssignFile(F, FileName); 585 try 586 ReWrite(F); 587 Write(F, S); 588 finally 589 CloseFile(F); 590 end; 591 end; 592 593 procedure SearchFiles(AList: TStrings; Dir: string; 594 FilterMethod: TFilterMethod = nil; FileNameMethod: TFileNameMethod = nil); 595 var 596 SR: TSearchRec; 597 begin 598 Dir := IncludeTrailingPathDelimiter(Dir); 599 if FindFirst(Dir + '*', faAnyFile, SR) = 0 then 600 try 601 repeat 602 if (SR.Name = '.') or (SR.Name = '..') or (Assigned(FilterMethod) and (not FilterMethod(SR.Name) or 603 not FilterMethod(Copy(Dir, 3, Length(Dir)) + SR.Name))) then Continue; 604 if Assigned(FileNameMethod) then 605 FileNameMethod(Dir + SR.Name); 606 AList.Add(Dir + SR.Name); 607 if (SR.Attr and faDirectory) <> 0 then 608 SearchFiles(AList, Dir + SR.Name, FilterMethod); 609 until FindNext(SR) <> 0; 610 finally 611 FindClose(SR); 612 end; 613 end; 614 615 function GetStringPart(var Text: string; Separator: string): string; 616 var 617 P: Integer; 618 begin 619 P := Pos(Separator, Text); 620 if P > 0 then begin 621 Result := Copy(Text, 1, P - 1); 622 Delete(Text, 1, P - 1 + Length(Separator)); 623 end else begin 624 Result := Text; 625 Text := ''; 626 end; 627 Result := Trim(Result); 628 Text := Trim(Text); 629 end; 630 631 function StripTags(const S: string): string; 632 var 633 Len: Integer; 634 635 function ReadUntil(const ReadFrom: Integer; const C: Char): Integer; 636 var 637 J: Integer; 638 begin 639 for J := ReadFrom to Len do 640 if (S[j] = C) then 641 begin 642 Result := J; 643 Exit; 644 end; 645 Result := Len + 1; 646 end; 647 648 var 649 I, APos: Integer; 650 begin 651 Len := Length(S); 652 I := 0; 653 Result := ''; 654 while (I <= Len) do begin 655 Inc(I); 656 APos := ReadUntil(I, '<'); 657 Result := Result + Copy(S, I, APos - i); 658 I := ReadUntil(APos + 1, '>'); 659 end; 660 end; 661 662 function PosFromIndex(SubStr: string; Text: string; 663 StartIndex: Integer): Integer; 664 var 665 I, MaxLen: SizeInt; 666 Ptr: PAnsiChar; 667 begin 668 Result := 0; 669 if (StartIndex < 1) or (StartIndex > Length(Text) - Length(SubStr)) then Exit; 670 if Length(SubStr) > 0 then begin 671 MaxLen := Length(Text) - Length(SubStr) + 1; 672 I := StartIndex; 673 Ptr := @Text[StartIndex]; 674 while (I <= MaxLen) do begin 675 if (SubStr[1] = Ptr^) and (CompareByte(Substr[1], Ptr^, Length(SubStr)) = 0) then begin 676 Result := I; 677 Exit; 678 end; 679 Inc(I); 680 Inc(Ptr); 681 end; 682 end; 683 end; 684 685 function PosFromIndexReverse(SubStr: string; Text: string; 686 StartIndex: Integer): Integer; 687 var 688 I: SizeInt; 689 Ptr: PAnsiChar; 690 begin 691 Result := 0; 692 if (StartIndex < 1) or (StartIndex > Length(Text)) then Exit; 693 if Length(SubStr) > 0 then begin 694 I := StartIndex; 695 Ptr := @Text[StartIndex]; 696 while (I > 0) do begin 697 if (SubStr[1] = Ptr^) and (CompareByte(Substr[1], Ptr^, Length(SubStr)) = 0) then begin 698 Result := I; 699 Exit; 700 end; 701 Dec(I); 702 Dec(Ptr); 703 end; 704 end; 705 end; 706 707 procedure CopyStringArray(Dest: TStringArray; Source: array of string); 708 var 709 I: Integer; 710 begin 711 SetLength(Dest, Length(Source)); 712 for I := 0 to Length(Dest) - 1 do 713 Dest[I] := Source[I]; 714 end; 715 716 function CombinePaths(Path1, Path2: string): string; 717 begin 718 Result := Path1; 719 if Result <> '' then Result := Result + DirectorySeparator + Path2 720 else Result := Path2; 721 end; 722 723 procedure SortStrings(Strings: TStrings); 724 var 725 Tmp: TStringList; 726 begin 727 Strings.BeginUpdate; 728 try 729 if Strings is TStringList then begin 730 TStringList(Strings).Sort; 731 end else begin 732 Tmp := TStringList.Create; 733 try 734 Tmp.Assign(Strings); 735 Tmp.Sort; 736 Strings.Assign(Tmp); 737 finally 738 Tmp.Free; 739 end; 740 end; 741 finally 742 Strings.EndUpdate; 743 end; 744 end; 513 745 514 746 -
trunk/Packages/Common/CommonPackage.pas
r74 r75 3 3 } 4 4 5 unit Common ;5 unit CommonPackage; 6 6 7 {$warn 5023 off : no warning about unused units} 7 8 interface 8 9 9 10 uses 10 StopWatch, UCommon, UDebugLog, UDelay, UPrefixMultiplier, UURI, UThreading, 11 UMemory, UResetableThread, UPool, ULastOpenedList, URegistry, 12 UJobProgressView, UXMLUtils, UApplicationInfo, USyncCounter, UListViewSort, 13 UPersistentForm, UFindFile, LazarusPackageIntf; 11 StopWatch, Common, DebugLog, Common.Delay, PrefixMultiplier, URI, Threading, 12 Memory, ResetableThread, Pool, LastOpenedList, RegistryEx, JobProgressView, 13 XML, ApplicationInfo, SyncCounter, ListViewSort, PersistentForm, FindFile, 14 ScaleDPI, Theme, StringTable, MetaCanvas, Geometric, Translator, Languages, 15 PixelPointer, DataFile, TestCase, Generics, Table, FormEx, FormTests, 16 FormTest, FormAbout, LazarusPackageIntf; 14 17 15 18 implementation … … 17 20 procedure Register; 18 21 begin 19 RegisterUnit('UDebugLog', @UDebugLog.Register); 20 RegisterUnit('ULastOpenedList', @ULastOpenedList.Register); 21 RegisterUnit('UJobProgressView', @UJobProgressView.Register); 22 RegisterUnit('UApplicationInfo', @UApplicationInfo.Register); 23 RegisterUnit('UListViewSort', @UListViewSort.Register); 24 RegisterUnit('UPersistentForm', @UPersistentForm.Register); 25 RegisterUnit('UFindFile', @UFindFile.Register); 22 RegisterUnit('DebugLog', @DebugLog.Register); 23 RegisterUnit('PrefixMultiplier', @PrefixMultiplier.Register); 24 RegisterUnit('LastOpenedList', @LastOpenedList.Register); 25 RegisterUnit('JobProgressView', @JobProgressView.Register); 26 RegisterUnit('ApplicationInfo', @ApplicationInfo.Register); 27 RegisterUnit('ListViewSort', @ListViewSort.Register); 28 RegisterUnit('PersistentForm', @PersistentForm.Register); 29 RegisterUnit('FindFile', @FindFile.Register); 30 RegisterUnit('ScaleDPI', @ScaleDPI.Register); 31 RegisterUnit('Theme', @Theme.Register); 32 RegisterUnit('Translator', @Translator.Register); 33 RegisterUnit('FormEx', @FormEx.Register); 26 34 end; 27 35 -
trunk/Packages/Common/DebugLog.pas
r74 r75 1 unit UDebugLog; 2 3 {$mode delphi} 1 unit DebugLog; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, FileUtil, SpecializedList, SyncObjs;6 Classes, SysUtils, FileUtil, Generics.Collections, SyncObjs; 9 7 10 8 type … … 15 13 Group: string; 16 14 Text: string; 15 end; 16 17 TDebugLogItems = class(TObjectList<TDebugLogItem>) 17 18 end; 18 19 … … 29 30 procedure SetMaxCount(const AValue: Integer); 30 31 public 31 Items: T ListObject;32 Items: TDebugLogItems; 32 33 Lock: TCriticalSection; 33 34 procedure Add(Text: string; Group: string = ''); … … 44 45 45 46 procedure Register; 47 46 48 47 49 implementation … … 104 106 if ExtractFileDir(FileName) <> '' then 105 107 ForceDirectories(ExtractFileDir(FileName)); 106 if FileExists(FileName) then LogFile := TFileStream.Create( UTF8Decode(FileName), fmOpenWrite)107 else LogFile := TFileStream.Create( UTF8Decode(FileName), fmCreate);108 if FileExists(FileName) then LogFile := TFileStream.Create(FileName, fmOpenWrite) 109 else LogFile := TFileStream.Create(FileName, fmCreate); 108 110 LogFile.Seek(0, soFromEnd); 109 111 Text := FormatDateTime('hh:nn:ss.zzz', Now) + ': ' + Text + LineEnding; … … 117 119 begin 118 120 inherited; 119 Items := T ListObject.Create;121 Items := TDebugLogItems.Create; 120 122 Lock := TCriticalSection.Create; 121 123 MaxCount := 100; … … 126 128 destructor TDebugLog.Destroy; 127 129 begin 128 Items.Free;129 Lock.Free;130 FreeAndNil(Items); 131 FreeAndNil(Lock); 130 132 inherited; 131 133 end; 132 134 133 135 end. 134 -
trunk/Packages/Common/FindFile.pas
r74 r75 19 19 } 20 20 21 unit UFindFile;21 unit FindFile; 22 22 23 23 interface 24 24 25 25 uses 26 SysUtils, Classes, Graphics, Controls, Forms, Dialogs , FileCtrl;26 SysUtils, Classes, Graphics, Controls, Forms, Dialogs; 27 27 28 28 type … … 35 35 private 36 36 s : TStringList; 37 38 37 fSubFolder : boolean; 39 38 fAttr: TFileAttrib; 40 39 fPath : string; 41 40 fFileMask : string; 42 43 41 procedure SetPath(Value: string); 44 42 procedure FileSearch(const inPath : string); … … 46 44 constructor Create(AOwner: TComponent); override; 47 45 destructor Destroy; override; 48 49 46 function SearchForFiles: TStringList; 50 47 published … … 55 52 end; 56 53 54 const 55 {$IFDEF WINDOWS} 56 FilterAll = '*.*'; 57 {$ENDIF} 58 {$IFDEF UNIX} 59 FilterAll = '*'; 60 {$ENDIF} 61 57 62 procedure Register; 63 58 64 59 65 implementation … … 71 77 inherited Create(AOwner); 72 78 Path := IncludeTrailingBackslash(UTF8Encode(GetCurrentDir)); 73 FileMask := '*.*';79 FileMask := FilterAll; 74 80 FileAttr := [ffaAnyFile]; 75 81 s := TStringList.Create; … … 79 85 begin 80 86 s.Free; 81 inherited Destroy;87 inherited; 82 88 end; 83 89 … … 109 115 Attr := 0; 110 116 if ffaReadOnly in FileAttr then Attr := Attr + faReadOnly; 111 if ffaHidden in FileAttr then Attr := Attr + faHidden;112 if ffaSysFile in FileAttr then Attr := Attr + faSysFile;113 if ffaVolumeID in FileAttr then Attr := Attr + faVolumeID;117 if ffaHidden in FileAttr then Attr := Attr + 2; //faHidden; use constant to avoid platform warning 118 if ffaSysFile in FileAttr then Attr := Attr + 4; //faSysFile; use constant to avoid platform warning 119 // Deprecated: if ffaVolumeID in FileAttr then Attr := Attr + faVolumeID; 114 120 if ffaDirectory in FileAttr then Attr := Attr + faDirectory; 115 121 if ffaArchive in FileAttr then Attr := Attr + faArchive; 116 122 if ffaAnyFile in FileAttr then Attr := Attr + faAnyFile; 117 123 118 if SysUtils.FindFirst( UTF8Decode(inPath + FileMask), Attr, Rec) = 0 then124 if SysUtils.FindFirst(inPath + FileMask, Attr, Rec) = 0 then 119 125 try 120 126 repeat 121 s.Add(inPath + UTF8Encode(Rec.Name));127 s.Add(inPath + Rec.Name); 122 128 until SysUtils.FindNext(Rec) <> 0; 123 129 finally … … 127 133 If not InSubFolders then Exit; 128 134 129 if SysUtils.FindFirst( UTF8Decode(inPath + '*.*'), faDirectory, Rec) = 0 then135 if SysUtils.FindFirst(inPath + FilterAll, faDirectory, Rec) = 0 then 130 136 try 131 137 repeat 132 138 if ((Rec.Attr and faDirectory) > 0) and (Rec.Name <> '.') 133 139 and (Rec.Name <> '..') then 134 FileSearch(IncludeTrailingBackslash(inPath + UTF8Encode(Rec.Name)));140 FileSearch(IncludeTrailingBackslash(inPath + Rec.Name)); 135 141 until SysUtils.FindNext(Rec) <> 0; 136 142 finally 137 143 SysUtils.FindClose(Rec); 138 144 end; 139 end; 145 end; 140 146 141 147 end. 142 -
trunk/Packages/Common/JobProgressView.lfm
r74 r75 1 1 object FormJobProgressView: TFormJobProgressView 2 2 Left = 467 3 Height = 2463 Height = 414 4 4 Top = 252 5 Width = 3285 Width = 647 6 6 BorderIcons = [biSystemMenu] 7 ClientHeight = 246 8 ClientWidth = 328 9 Font.Height = -11 10 Font.Name = 'MS Sans Serif' 7 ClientHeight = 414 8 ClientWidth = 647 9 DesignTimePPI = 144 11 10 OnClose = FormClose 12 11 OnCloseQuery = FormCloseQuery 13 12 OnCreate = FormCreate 14 OnDestroy = FormDestroy 13 OnHide = FormHide 14 OnShow = FormShow 15 15 Position = poScreenCenter 16 LCLVersion = ' 1.1'16 LCLVersion = '2.2.0.4' 17 17 object PanelOperationsTitle: TPanel 18 18 Left = 0 19 Height = 2419 Height = 38 20 20 Top = 0 21 Width = 32821 Width = 647 22 22 Align = alTop 23 23 BevelOuter = bvNone 24 ClientHeight = 2425 ClientWidth = 32824 ClientHeight = 38 25 ClientWidth = 647 26 26 FullRepaint = False 27 27 TabOrder = 0 28 28 object LabelOperation: TLabel 29 Left = 830 Height = 1331 Top = 832 Width = 6629 Left = 10 30 Height = 26 31 Top = 10 32 Width = 99 33 33 Caption = 'Operations:' 34 Font.Height = -1135 Font.Name = 'MS Sans Serif'36 Font.Style = [fsBold]37 ParentColor = False38 34 ParentFont = False 39 35 end … … 41 37 object PanelLog: TPanel 42 38 Left = 0 43 Height = 1 2244 Top = 12445 Width = 32839 Height = 161 40 Top = 253 41 Width = 647 46 42 Align = alClient 47 43 BevelOuter = bvSpace 48 ClientHeight = 1 2249 ClientWidth = 32844 ClientHeight = 161 45 ClientWidth = 647 50 46 TabOrder = 1 51 47 object MemoLog: TMemo 52 Left = 853 Height = 1 0654 Top = 855 Width = 31248 Left = 10 49 Height = 141 50 Top = 10 51 Width = 627 56 52 Anchors = [akTop, akLeft, akRight, akBottom] 57 53 ReadOnly = True … … 62 58 object PanelProgress: TPanel 63 59 Left = 0 64 Height = 3865 Top = 5066 Width = 32860 Height = 65 61 Top = 126 62 Width = 647 67 63 Align = alTop 68 64 BevelOuter = bvNone 69 ClientHeight = 3870 ClientWidth = 32865 ClientHeight = 65 66 ClientWidth = 647 71 67 TabOrder = 2 72 68 object ProgressBarPart: TProgressBar 73 Left = 874 Height = 1775 Top = 1676 Width = 31269 Left = 12 70 Height = 29 71 Top = 29 72 Width = 628 77 73 Anchors = [akTop, akLeft, akRight] 78 74 TabOrder = 0 79 75 end 80 76 object LabelEstimatedTimePart: TLabel 81 Left = 882 Height = 1377 Left = 10 78 Height = 26 83 79 Top = -2 84 Width = 7180 Width = 132 85 81 Caption = 'Estimated time:' 86 ParentColor = False87 82 end 88 83 end 89 84 object PanelOperations: TPanel 90 85 Left = 0 91 Height = 2692 Top = 2493 Width = 32886 Height = 50 87 Top = 76 88 Width = 647 94 89 Align = alTop 95 90 BevelOuter = bvNone 96 ClientHeight = 2697 ClientWidth = 32891 ClientHeight = 50 92 ClientWidth = 647 98 93 FullRepaint = False 99 94 TabOrder = 3 100 95 object ListViewJobs: TListView 101 Left = 8102 Height = 16103 Top = 5104 Width = 31296 Left = 10 97 Height = 38 98 Top = 6 99 Width = 627 105 100 Anchors = [akTop, akLeft, akRight, akBottom] 106 101 AutoWidthLastColumn = True … … 109 104 Columns = < 110 105 item 111 Width = 312106 Width = 614 112 107 end> 113 108 OwnerData = True … … 122 117 object PanelProgressTotal: TPanel 123 118 Left = 0 124 Height = 36125 Top = 88126 Width = 328119 Height = 62 120 Top = 191 121 Width = 647 127 122 Align = alTop 128 123 BevelOuter = bvNone 129 ClientHeight = 36130 ClientWidth = 328124 ClientHeight = 62 125 ClientWidth = 647 131 126 TabOrder = 4 132 127 object LabelEstimatedTimeTotal: TLabel 133 Left = 8134 Height = 13128 Left = 10 129 Height = 26 135 130 Top = 0 136 Width = 97131 Width = 178 137 132 Caption = 'Total estimated time:' 138 ParentColor = False139 133 end 140 134 object ProgressBarTotal: TProgressBar 141 Left = 8142 Height = 16143 Top = 16144 Width = 312135 Left = 10 136 Height = 29 137 Top = 29 138 Width = 627 145 139 Anchors = [akTop, akLeft, akRight] 146 140 TabOrder = 0 147 141 end 148 142 end 143 object PanelText: TPanel 144 Left = 0 145 Height = 38 146 Top = 38 147 Width = 647 148 Align = alTop 149 BevelOuter = bvNone 150 ClientHeight = 38 151 ClientWidth = 647 152 TabOrder = 5 153 object LabelText: TLabel 154 Left = 10 155 Height = 29 156 Top = 10 157 Width = 630 158 Anchors = [akTop, akLeft, akRight] 159 AutoSize = False 160 end 161 end 149 162 object ImageList1: TImageList 150 BkColor = clForeground 151 left = 200 152 top = 8 163 Left = 240 164 Top = 10 153 165 Bitmap = { 154 4C69020000001000000010000000FF00FF00FF00FF00FF00FF00FF00FF00FF00 155 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 156 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 157 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 158 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 159 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 160 FF00000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 161 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000 162 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 163 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000 164 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 165 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000 166 00FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 167 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 168 00FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00 169 FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00 170 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FFFF00 171 FF00FF00FF00FF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00 172 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 173 00FFFF00FF00000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00 174 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF0000 175 00FF000000FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00 176 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000 177 00FF000000FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00 178 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF000000 179 00FF000000FF000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 180 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 181 FF00000000FFFF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 182 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 183 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 184 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 185 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 186 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 187 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 188 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 189 FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00 190 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 191 FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00 192 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 193 FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00 194 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 195 00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00 196 FF00FF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 197 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000 198 00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 199 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 200 84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 201 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 202 FFFF000084FF000000FFFF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 203 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000 204 84FF000000FFFF00FF00FF00FF00FF00FF00000000FF0000FFFF0000FFFF0000 205 FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF0000FFFF000084FF0000 206 00FFFF00FF00FF00FF00FF00FF00FF00FF00000000FF000000FF000000FF0000 207 00FF000000FF000000FF000000FF000000FF0000FFFF000084FF000000FFFF00 208 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 209 FF00FF00FF00FF00FF00FF00FF00000000FF000084FF000000FFFF00FF00FF00 210 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 211 FF00FF00FF00FF00FF00FF00FF00000000FF000000FFFF00FF00FF00FF00FF00 212 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 213 FF00FF00FF00FF00FF00FF00FF00000000FFFF00FF00FF00FF00FF00FF00FF00 214 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 215 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 216 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 217 FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00 218 FF00FF00FF00FF00FF00FF00FF00 166 4C7A0200000010000000100000006A0000000000000078DAE593490E00100C45 167 7B78F72E5684A63A1142C382BE4F0708F89C955117F4B016BE67B5FC6E96DB97 168 B0D4B9F4CD949F36DED1DF922B0F1BD11FAB5AFC68DE5C44D40220A9FA779EC8 169 6A349FD5A435E43CADA1E3678D73F773F1DBF3EFADFFEEFEBBF97F6696BE9D36 219 170 } 220 171 end … … 223 174 Interval = 100 224 175 OnTimer = TimerUpdateTimer 225 left = 264226 top = 8176 Left = 384 177 Top = 10 227 178 end 228 179 end -
trunk/Packages/Common/JobProgressView.pas
r74 r75 1 unit UJobProgressView; 2 3 {$MODE Delphi} 1 unit JobProgressView; 4 2 5 3 interface … … 7 5 uses 8 6 SysUtils, Variants, Classes, Graphics, Controls, Forms, Syncobjs, 9 Dialogs, ComCtrls, StdCtrls, ExtCtrls, Contnrs, UThreading,7 Dialogs, ComCtrls, StdCtrls, ExtCtrls, Generics.Collections, Threading, Math, 10 8 DateUtils; 11 9 … … 13 11 EstimatedTimeShowTreshold = 4; 14 12 EstimatedTimeShowTresholdTotal = 1; 15 MemoLogHeight = 200;16 13 UpdateInterval = 100; // ms 17 14 … … 24 21 FLock: TCriticalSection; 25 22 FOnChange: TNotifyEvent; 23 FText: string; 26 24 FValue: Integer; 27 25 FMax: Integer; 28 26 procedure SetMax(const AValue: Integer); 27 procedure SetText(AValue: string); 29 28 procedure SetValue(const AValue: Integer); 30 29 public … … 35 34 property Value: Integer read FValue write SetValue; 36 35 property Max: Integer read FMax write SetMax; 36 property Text: string read FText write SetText; 37 37 property OnChange: TNotifyEvent read FOnChange write FOnChange; 38 38 end; … … 69 69 end; 70 70 71 TJobs = class(TObjectList<TJob>) 72 end; 73 71 74 TJobThread = class(TListedThread) 72 75 procedure Execute; override; … … 80 83 TFormJobProgressView = class(TForm) 81 84 ImageList1: TImageList; 85 LabelText: TLabel; 82 86 Label2: TLabel; 83 87 LabelOperation: TLabel; … … 86 90 ListViewJobs: TListView; 87 91 MemoLog: TMemo; 92 PanelText: TPanel; 88 93 PanelProgressTotal: TPanel; 89 94 PanelOperationsTitle: TPanel; … … 94 99 ProgressBarTotal: TProgressBar; 95 100 TimerUpdate: TTimer; 101 procedure FormHide(Sender: TObject); 102 procedure FormShow(Sender: TObject); 103 procedure ReloadJobList; 96 104 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 97 procedure FormDestroy(Sender: TObject);98 105 procedure ListViewJobsData(Sender: TObject; Item: TListItem); 99 106 procedure TimerUpdateTimer(Sender: TObject); 100 107 procedure FormCreate(Sender: TObject); 101 108 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean); 109 procedure UpdateHeight; 102 110 public 103 111 JobProgressView: TJobProgressView; … … 118 126 TotalStartTime: TDateTime; 119 127 Log: TStringList; 128 FForm: TFormJobProgressView; 120 129 procedure SetTerminate(const AValue: Boolean); 121 130 procedure UpdateProgress; 122 procedure ReloadJobList;123 procedure StartJobs;124 procedure UpdateHeight;125 131 procedure JobProgressChange(Sender: TObject); 126 132 public 127 Form: TFormJobProgressView; 128 Jobs: TObjectList; // TListObject<TJob> 133 Jobs: TJobs; 129 134 CurrentJob: TJob; 130 135 CurrentJobIndex: Integer; … … 132 137 destructor Destroy; override; 133 138 procedure Clear; 134 procedureAddJob(Title: string; Method: TJobProgressViewMethod;135 NoThreaded: Boolean = False; WaitFor: Boolean = False) ;136 procedure Start (AAutoClose: Boolean = True);139 function AddJob(Title: string; Method: TJobProgressViewMethod; 140 NoThreaded: Boolean = False; WaitFor: Boolean = False): TJob; 141 procedure Start; 137 142 procedure Stop; 138 143 procedure TermSleep(Delay: Integer); 144 property Form: TFormJobProgressView read FForm; 139 145 property Terminate: Boolean read FTerminate write SetTerminate; 140 146 published … … 148 154 end; 149 155 150 //var151 // FormJobProgressView: TFormJobProgressView;152 153 156 procedure Register; 154 157 155 158 resourcestring 156 159 SExecuted = 'Executed'; 160 157 161 158 162 implementation … … 172 176 end; 173 177 178 { TJobThread } 179 174 180 procedure TJobThread.Execute; 175 181 begin 176 182 try 177 183 try 178 //raise Exception.Create('Exception in job');179 184 ProgressView.CurrentJob.Method(Job); 180 185 except … … 189 194 end; 190 195 191 procedure TJobProgressView.AddJob(Title: string; Method: TJobProgressViewMethod; 192 NoThreaded: Boolean = False; WaitFor: Boolean = False); 196 { TFormJobProgressView } 197 198 procedure TFormJobProgressView.UpdateHeight; 193 199 var 194 NewJob: TJob; 195 begin 196 NewJob := TJob.Create; 197 NewJob.ProgressView := Self; 198 NewJob.Title := Title; 199 NewJob.Method := Method; 200 NewJob.NoThreaded := NoThreaded; 201 NewJob.WaitFor := WaitFor; 202 NewJob.Progress.Max := 100; 203 NewJob.Progress.Reset; 204 NewJob.Progress.OnChange := JobProgressChange; 205 Jobs.Add(NewJob); 200 H: Integer; 201 PanelOperationsVisible: Boolean; 202 PanelOperationsHeight: Integer; 203 PanelProgressVisible: Boolean; 204 PanelProgressTotalVisible: Boolean; 205 PanelLogVisible: Boolean; 206 MemoLogHeight: Integer = 200; 207 I: Integer; 208 ItemRect: TRect; 209 MaxH: Integer; 210 begin 211 H := PanelOperationsTitle.Height; 212 PanelOperationsVisible := JobProgressView.Jobs.Count > 0; 213 if PanelOperationsVisible <> PanelOperations.Visible then 214 PanelOperations.Visible := PanelOperationsVisible; 215 if ListViewJobs.Items.Count > 0 then begin 216 Maxh := 0; 217 for I := 0 to ListViewJobs.Items.Count - 1 do 218 begin 219 ItemRect := ListViewJobs.Items[i].DisplayRect(drBounds); 220 Maxh := Max(Maxh, ItemRect.Top + (ItemRect.Bottom - ItemRect.Top)); 221 end; 222 PanelOperationsHeight := Scale96ToScreen(12) + Maxh; 223 end else PanelOperationsHeight := Scale96ToScreen(8); 224 if PanelOperationsHeight <> PanelOperations.Height then 225 PanelOperations.Height := PanelOperationsHeight; 226 if PanelOperationsVisible then 227 H := H + PanelOperations.Height; 228 229 PanelProgressVisible := (JobProgressView.Jobs.Count > 0) and not JobProgressView.Finished; 230 if PanelProgressVisible <> PanelProgress.Visible then 231 PanelProgress.Visible := PanelProgressVisible; 232 if PanelProgressVisible then 233 H := H + PanelProgress.Height; 234 PanelProgressTotalVisible := (JobProgressView.Jobs.Count > 1) and not JobProgressView.Finished; 235 if PanelProgressTotalVisible <> PanelProgressTotal.Visible then 236 PanelProgressTotal.Visible := PanelProgressTotalVisible; 237 if PanelProgressTotalVisible then 238 H := H + PanelProgressTotal.Height; 239 Constraints.MinHeight := H; 240 PanelLogVisible := MemoLog.Lines.Count > 0; 241 if PanelLogVisible <> PanelLog.Visible then 242 PanelLog.Visible := PanelLogVisible; 243 if PanelLogVisible then 244 H := H + Scale96ToScreen(MemoLogHeight); 245 if PanelText.Visible then 246 H := H + PanelText.Height; 247 if Height <> H then begin 248 Height := H; 249 Top := (Screen.Height - H) div 2; 250 end; 251 end; 252 253 procedure TFormJobProgressView.TimerUpdateTimer(Sender: TObject); 254 var 255 ProgressBarPartVisible: Boolean; 256 ProgressBarTotalVisible: Boolean; 257 begin 258 JobProgressView.UpdateProgress; 259 if Visible and (not ProgressBarPart.Visible) and 260 Assigned(JobProgressView.CurrentJob) and 261 (JobProgressView.CurrentJob.Progress.Value > 0) then begin 262 ProgressBarPartVisible := True; 263 if ProgressBarPartVisible <> ProgressBarPart.Visible then 264 ProgressBarPart.Visible := ProgressBarPartVisible; 265 ProgressBarTotalVisible := True; 266 if ProgressBarTotalVisible <> ProgressBarTotal.Visible then 267 ProgressBarTotal.Visible := ProgressBarTotalVisible; 268 end; 269 if not Visible then begin 270 TimerUpdate.Interval := UpdateInterval; 271 if not JobProgressView.OwnerDraw then Show; 272 end; 273 if Assigned(JobProgressView.CurrentJob) then begin 274 LabelText.Caption := JobProgressView.CurrentJob.Progress.Text; 275 if LabelText.Caption <> '' then begin 276 PanelText.Visible := True; 277 UpdateHeight; 278 end; 279 end; 280 end; 281 282 procedure TFormJobProgressView.ListViewJobsData(Sender: TObject; Item: TListItem); 283 begin 284 if (Item.Index >= 0) and (Item.Index < JobProgressView.Jobs.Count) then 285 with JobProgressView.Jobs[Item.Index] do begin 286 Item.Caption := Title; 287 if Item.Index = JobProgressView.CurrentJobIndex then Item.ImageIndex := 1 288 else if Finished then Item.ImageIndex := 0 289 else Item.ImageIndex := 2; 290 Item.Data := JobProgressView.Jobs[Item.Index]; 291 end; 292 end; 293 294 procedure TFormJobProgressView.FormClose(Sender: TObject; 295 var CloseAction: TCloseAction); 296 begin 297 end; 298 299 procedure TFormJobProgressView.FormCreate(Sender: TObject); 300 begin 301 Caption := SPleaseWait; 302 try 303 //Animate1.FileName := ExtractFileDir(UTF8Encode(Application.ExeName)) + 304 // DirectorySeparator + 'horse.avi'; 305 //Animate1.Active := True; 306 except 307 308 end; 309 end; 310 311 procedure TFormJobProgressView.ReloadJobList; 312 begin 313 // Workaround for not showing first line 314 //Form.ListViewJobs.Items.Count := Jobs.Count + 1; 315 //Form.ListViewJobs.Refresh; 316 317 if ListViewJobs.Items.Count <> JobProgressView.Jobs.Count then 318 ListViewJobs.Items.Count := JobProgressView.Jobs.Count; 319 ListViewJobs.Refresh; 320 Application.ProcessMessages; 321 UpdateHeight; 322 end; 323 324 procedure TFormJobProgressView.FormShow(Sender: TObject); 325 begin 326 ReloadJobList; 327 end; 328 329 procedure TFormJobProgressView.FormHide(Sender: TObject); 330 begin 331 JobProgressView.Jobs.Clear; 332 ReloadJobList; 333 end; 334 335 procedure TFormJobProgressView.FormCloseQuery(Sender: TObject; var CanClose: Boolean); 336 begin 337 CanClose := JobProgressView.Finished; 338 JobProgressView.Terminate := True; 339 Caption := SPleaseWait + STerminate; 340 end; 341 342 343 { TJobProgressView } 344 345 function TJobProgressView.AddJob(Title: string; Method: TJobProgressViewMethod; 346 NoThreaded: Boolean = False; WaitFor: Boolean = False): TJob; 347 begin 348 Result := TJob.Create; 349 Result.ProgressView := Self; 350 Result.Title := Title; 351 Result.Method := Method; 352 Result.NoThreaded := NoThreaded; 353 Result.WaitFor := WaitFor; 354 Result.Progress.Max := 100; 355 Result.Progress.Reset; 356 Result.Progress.OnChange := JobProgressChange; 357 Jobs.Add(Result); 206 358 //ReloadJobList; 207 359 end; 208 360 209 procedure TJobProgressView.Start(AAutoClose: Boolean = True); 210 begin 211 AutoClose := AAutoClose; 212 StartJobs; 213 end; 214 215 procedure TJobProgressView.StartJobs; 361 procedure TJobProgressView.Start; 216 362 var 217 363 I: Integer; … … 228 374 Form.MemoLog.Clear; 229 375 376 Form.PanelText.Visible := False; 230 377 Form.LabelEstimatedTimePart.Visible := False; 231 378 Form.LabelEstimatedTimeTotal.Visible := False; … … 248 395 I := 0; 249 396 while I < Jobs.Count do 250 with TJob(Jobs[I])do begin397 with Jobs[I] do begin 251 398 CurrentJobIndex := I; 252 CurrentJob := TJob(Jobs[I]);399 CurrentJob := Jobs[I]; 253 400 JobProgressChange(Self); 254 401 StartTime := Now; … … 257 404 Form.ProgressBarPart.Visible := False; 258 405 //Show; 259 ReloadJobList;406 Form.ReloadJobList; 260 407 Application.ProcessMessages; 261 408 if NoThreaded then begin … … 263 410 Method(CurrentJob); 264 411 end else begin 412 Thread := TJobThread.Create(True); 265 413 try 266 Thread := TJobThread.Create(True);267 414 with Thread do begin 268 415 FreeOnTerminate := False; … … 295 442 //if Visible then Hide; 296 443 Form.MemoLog.Lines.Assign(Log); 297 if (Form.MemoLog.Lines.Count = 0) and AutoClose then begin444 if (Form.MemoLog.Lines.Count = 0) and FAutoClose then begin 298 445 Form.Hide; 299 446 end; 300 Clear;447 if not Form.Visible then Clear; 301 448 Form.Caption := SFinished; 302 449 //LabelEstimatedTimePart.Visible := False; 303 450 Finished := True; 304 451 CurrentJobIndex := -1; 305 ReloadJobList; 306 end; 307 end; 308 309 procedure TJobProgressView.UpdateHeight; 310 var 311 H: Integer; 312 PanelOperationsVisible: Boolean; 313 PanelOperationsHeight: Integer; 314 PanelProgressVisible: Boolean; 315 PanelProgressTotalVisible: Boolean; 316 PanelLogVisible: Boolean; 317 begin 318 with Form do begin 319 H := PanelOperationsTitle.Height; 320 PanelOperationsVisible := Jobs.Count > 0; 321 if PanelOperationsVisible <> PanelOperations.Visible then 322 PanelOperations.Visible := PanelOperationsVisible; 323 PanelOperationsHeight := 8 + 18 * Jobs.Count; 324 if PanelOperationsHeight <> PanelOperations.Height then 325 PanelOperations.Height := PanelOperationsHeight; 326 if PanelOperationsVisible then 327 H := H + PanelOperations.Height; 328 329 PanelProgressVisible := (Jobs.Count > 0) and not Finished; 330 if PanelProgressVisible <> PanelProgress.Visible then 331 PanelProgress.Visible := PanelProgressVisible; 332 if PanelProgressVisible then 333 H := H + PanelProgress.Height; 334 PanelProgressTotalVisible := (Jobs.Count > 1) and not Finished; 335 if PanelProgressTotalVisible <> PanelProgressTotal.Visible then 336 PanelProgressTotal.Visible := PanelProgressTotalVisible; 337 if PanelProgressTotalVisible then 338 H := H + PanelProgressTotal.Height; 339 Constraints.MinHeight := H; 340 PanelLogVisible := MemoLog.Lines.Count > 0; 341 if PanelLogVisible <> PanelLog.Visible then 342 PanelLog.Visible := PanelLogVisible; 343 if PanelLogVisible then 344 H := H + MemoLogHeight; 345 if Height <> H then Height := H; 452 Form.ReloadJobList; 346 453 end; 347 454 end; … … 351 458 if Assigned(FOnOwnerDraw) then 352 459 FOnOwnerDraw(Self); 353 end;354 355 procedure TFormJobProgressView.TimerUpdateTimer(Sender: TObject);356 var357 ProgressBarPartVisible: Boolean;358 ProgressBarTotalVisible: Boolean;359 begin360 JobProgressView.UpdateProgress;361 if Visible and (not ProgressBarPart.Visible) and362 Assigned(JobProgressView.CurrentJob) and363 (JobProgressView.CurrentJob.Progress.Value > 0) then begin364 ProgressBarPartVisible := True;365 if ProgressBarPartVisible <> ProgressBarPart.Visible then366 ProgressBarPart.Visible := ProgressBarPartVisible;367 ProgressBarTotalVisible := True;368 if ProgressBarTotalVisible <> ProgressBarTotal.Visible then369 ProgressBarTotal.Visible := ProgressBarTotalVisible;370 end;371 if not Visible then begin372 TimerUpdate.Interval := UpdateInterval;373 if not JobProgressView.OwnerDraw then Show;374 end;375 end;376 377 procedure TFormJobProgressView.FormDestroy(Sender:TObject);378 begin379 end;380 381 procedure TFormJobProgressView.ListViewJobsData(Sender: TObject; Item: TListItem);382 begin383 if (Item.Index >= 0) and (Item.Index < JobProgressView.Jobs.Count) then384 with TJob(JobProgressView.Jobs[Item.Index]) do begin385 Item.Caption := Title;386 if Item.Index = JobProgressView.CurrentJobIndex then Item.ImageIndex := 1387 else if Finished then Item.ImageIndex := 0388 else Item.ImageIndex := 2;389 Item.Data := JobProgressView.Jobs[Item.Index];390 end;391 end;392 393 procedure TFormJobProgressView.FormClose(Sender: TObject;394 var CloseAction: TCloseAction);395 begin396 ListViewJobs.Clear;397 end;398 399 procedure TFormJobProgressView.FormCreate(Sender: TObject);400 begin401 Caption := SPleaseWait;402 try403 //Animate1.FileName := ExtractFileDir(UTF8Encode(Application.ExeName)) +404 // DirectorySeparator + 'horse.avi';405 //Animate1.Active := True;406 except407 408 end;409 460 end; 410 461 … … 427 478 end; 428 479 429 procedure TFormJobProgressView.FormCloseQuery(Sender: TObject; var CanClose: Boolean);430 begin431 CanClose := JobProgressView.Finished;432 JobProgressView.Terminate := True;433 Caption := SPleaseWait + STerminate;434 end;435 436 480 procedure TJobProgressView.SetTerminate(const AValue: Boolean); 437 481 var … … 440 484 if AValue = FTerminate then Exit; 441 485 for I := 0 to Jobs.Count - 1 do 442 TJob(Jobs[I]).Terminate := AValue;486 Jobs[I].Terminate := AValue; 443 487 FTerminate := AValue; 444 488 end; … … 489 533 end; 490 534 491 procedure TJobProgressView.ReloadJobList;492 begin493 UpdateHeight;494 // Workaround for not showing first line495 Form.ListViewJobs.Items.Count := Jobs.Count + 1;496 Form.ListViewJobs.Refresh;497 498 if Form.ListViewJobs.Items.Count <> Jobs.Count then499 Form.ListViewJobs.Items.Count := Jobs.Count;500 Form.ListViewJobs.Refresh;501 //Application.ProcessMessages;502 end;503 504 535 constructor TJobProgressView.Create(TheOwner: TComponent); 505 536 begin 506 537 inherited; 507 538 if not (csDesigning in ComponentState) then begin 508 F orm := TFormJobProgressView.Create(Self);509 F orm.JobProgressView := Self;510 end; 511 Jobs := T ObjectList.Create;539 FForm := TFormJobProgressView.Create(Self); 540 FForm.JobProgressView := Self; 541 end; 542 Jobs := TJobs.Create; 512 543 Log := TStringList.Create; 513 544 //PanelOperationsTitle.Height := 80; 514 ShowDelay := 0; //1000; // ms 545 AutoClose := True; 546 ShowDelay := 0; 515 547 end; 516 548 … … 518 550 begin 519 551 Jobs.Clear; 552 Log.Clear; 520 553 //ReloadJobList; 521 554 end; … … 527 560 inherited; 528 561 end; 562 563 { TProgress } 529 564 530 565 procedure TProgress.SetMax(const AValue: Integer); … … 535 570 if FMax < 1 then FMax := 1; 536 571 if FValue >= FMax then FValue := FMax; 572 finally 573 FLock.Release; 574 end; 575 end; 576 577 procedure TProgress.SetText(AValue: string); 578 begin 579 try 580 FLock.Acquire; 581 if FText = AValue then Exit; 582 FText := AValue; 537 583 finally 538 584 FLock.Release; … … 562 608 end; 563 609 564 { TProgress }565 566 610 procedure TProgress.Increment; 567 611 begin 568 try569 FLock.Acquire;612 FLock.Acquire; 613 try 570 614 Value := Value + 1; 571 615 finally … … 576 620 procedure TProgress.Reset; 577 621 begin 578 try579 FLock.Acquire;622 FLock.Acquire; 623 try 580 624 FValue := 0; 581 625 finally … … 593 637 begin 594 638 FLock.Free; 595 inherited Destroy;639 inherited; 596 640 end; 597 641 … … 624 668 destructor TJob.Destroy; 625 669 begin 626 Progress.Free;670 FreeAndNil(Progress); 627 671 inherited; 628 672 end; -
trunk/Packages/Common/Languages/DebugLog.cs.po
r74 r75 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Jiří Hajda <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 #: udebuglog.sfilenamenotdefined 14 #: debuglog.sfilenamenotdefined 15 msgctxt "debuglog.sfilenamenotdefined" 13 16 msgid "Filename not defined" 14 17 msgstr "Neurčen soubor" -
trunk/Packages/Common/Languages/Pool.cs.po
r74 r75 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Chronos <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 #: upool.sobjectpoolempty 14 #: pool.sobjectpoolempty 15 msgctxt "pool.sobjectpoolempty" 13 16 msgid "Object pool is empty" 14 17 msgstr "Zásobník objektů je prázdný" 15 18 16 #: upool.sreleaseerror 19 #: pool.sreleaseerror 20 msgctxt "pool.sreleaseerror" 17 21 msgid "Unknown object for release from pool" 18 22 msgstr "Neznýmý objekt pro uvolnění ze zásobníku" -
trunk/Packages/Common/Languages/ResetableThread.cs.po
r74 r75 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Chronos <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 #: uresetablethread.swaiterror 14 #: resetablethread.swaiterror 15 msgctxt "resetablethread.swaiterror" 13 16 msgid "WaitFor error" 14 17 msgstr "Chyba WaitFor" -
trunk/Packages/Common/Languages/Threading.cs.po
r74 r75 1 1 msgid "" 2 2 msgstr "" 3 "Content-Type: text/plain; charset=UTF-8\n"4 3 "Project-Id-Version: \n" 5 4 "POT-Creation-Date: \n" … … 7 6 "Last-Translator: Chronos <robie@centrum.cz>\n" 8 7 "Language-Team: \n" 8 "Language: cs\n" 9 9 "MIME-Version: 1.0\n" 10 "Content-Type: text/plain; charset=UTF-8\n" 10 11 "Content-Transfer-Encoding: 8bit\n" 12 "X-Generator: Poedit 3.0.1\n" 11 13 12 #: uthreading.scurrentthreadnotfound 14 #: threading.scurrentthreadnotfound 15 #, object-pascal-format 16 msgctxt "threading.scurrentthreadnotfound" 13 17 msgid "Current thread ID %d not found in virtual thread list." 14 18 msgstr "Aktuální vlákno ID %d nenalezeno v seznamu virtuálních vláken." -
trunk/Packages/Common/LastOpenedList.pas
r74 r75 1 unit ULastOpenedList; 2 3 {$mode delphi} 1 unit LastOpenedList; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Registry, URegistry, Menus;6 Classes, SysUtils, Registry, RegistryEx, Menus, XMLConf, DOM; 9 7 10 8 type … … 27 25 procedure LoadFromRegistry(Context: TRegistryContext); 28 26 procedure SaveToRegistry(Context: TRegistryContext); 27 procedure LoadFromXMLConfig(XMLConfig: TXMLConfig; Path: string); 28 procedure SaveToXMLConfig(XMLConfig: TXMLConfig; Path: string); 29 29 procedure AddItem(FileName: string); 30 function GetFirstFileName: string; 30 31 published 31 32 property MaxCount: Integer read FMaxCount write SetMaxCount; … … 81 82 destructor TLastOpenedList.Destroy; 82 83 begin 83 Items.Free;84 FreeAndNil(Items); 84 85 inherited; 85 86 end; … … 91 92 begin 92 93 if Assigned(MenuItem) then begin 93 MenuItem.Clear; 94 while MenuItem.Count > Items.Count do 95 MenuItem.Delete(MenuItem.Count - 1); 96 while MenuItem.Count < Items.Count do begin 97 NewMenuItem := TMenuItem.Create(MenuItem); 98 MenuItem.Add(NewMenuItem); 99 end; 94 100 for I := 0 to Items.Count - 1 do begin 95 NewMenuItem := TMenuItem.Create(MenuItem); 96 NewMenuItem.Caption := Items[I]; 97 NewMenuItem.OnClick := ClickAction; 98 MenuItem.Add(NewMenuItem); 101 MenuItem.Items[I].Caption := Items[I]; 102 MenuItem.Items[I].OnClick := ClickAction; 99 103 end; 100 104 end; … … 137 141 OpenKey(Context.Key, True); 138 142 for I := 0 to Items.Count - 1 do 139 WriteString('File' + IntToStr(I), UTF8Decode(Items[I]));143 WriteString('File' + IntToStr(I), Items[I]); 140 144 finally 141 145 Free; 146 end; 147 end; 148 149 procedure TLastOpenedList.LoadFromXMLConfig(XMLConfig: TXMLConfig; Path: string 150 ); 151 var 152 I: Integer; 153 Value: string; 154 Count: Integer; 155 begin 156 with XMLConfig do begin 157 Count := GetValue(DOMString(Path + '/Count'), 0); 158 if Count > MaxCount then Count := MaxCount; 159 Items.Clear; 160 for I := 0 to Count - 1 do begin 161 Value := string(GetValue(DOMString(Path + '/File' + IntToStr(I)), '')); 162 if Trim(Value) <> '' then Items.Add(Value); 163 end; 164 if Assigned(FOnChange) then 165 FOnChange(Self); 166 end; 167 end; 168 169 procedure TLastOpenedList.SaveToXMLConfig(XMLConfig: TXMLConfig; Path: string); 170 var 171 I: Integer; 172 begin 173 with XMLConfig do begin 174 SetValue(DOMString(Path + '/Count'), Items.Count); 175 for I := 0 to Items.Count - 1 do 176 SetValue(DOMString(Path + '/File' + IntToStr(I)), DOMString(Items[I])); 177 Flush; 142 178 end; 143 179 end; … … 151 187 end; 152 188 189 function TLastOpenedList.GetFirstFileName: string; 190 begin 191 if Items.Count > 0 then Result := Items[0] 192 else Result := ''; 193 end; 194 153 195 end. 154 -
trunk/Packages/Common/ListViewSort.pas
r74 r75 1 unit UListViewSort; 2 3 // Date: 2010-11-03 4 5 {$mode delphi} 1 unit ListViewSort; 2 3 // Date: 2019-05-17 6 4 7 5 interface 8 6 9 7 uses 10 {$IFDEF Windows}Windows, CommCtrl, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils, 11 Controls, DateUtils, Dialogs, SpecializedList, Forms, Grids, StdCtrls, ExtCtrls; 8 {$IFDEF Windows}Windows, CommCtrl, LMessages, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils, 9 Controls, DateUtils, Dialogs, Forms, Grids, StdCtrls, ExtCtrls, 10 LclIntf, LclType, LResources, Generics.Collections, Generics.Defaults; 12 11 13 12 type … … 18 17 TCompareEvent = function (Item1, Item2: TObject): Integer of object; 19 18 TListFilterEvent = procedure (ListViewSort: TListViewSort) of object; 19 20 TObjects = TObjectList<TObject>; 21 22 { TListViewSort } 20 23 21 24 TListViewSort = class(TComponent) … … 28 31 FColumn: Integer; 29 32 FOrder: TSortOrder; 33 FOldListViewWindowProc: TWndMethod; 34 FOnColumnWidthChanged: TNotifyEvent; 35 procedure DoColumnBeginResize(const AColIndex: Integer); 36 procedure DoColumnResized(const AColIndex: Integer); 37 procedure DoColumnResizing(const AColIndex, AWidth: Integer); 30 38 procedure SetListView(const Value: TListView); 31 39 procedure ColumnClick(Sender: TObject; Column: TListColumn); … … 40 48 procedure SetColumn(const Value: Integer); 41 49 procedure SetOrder(const Value: TSortOrder); 50 {$IFDEF WINDOWS} 51 procedure NewListViewWindowProc(var AMsg: TMessage); 52 {$ENDIF} 42 53 public 43 List: TListObject;44 Source: TListObject;54 Source: TObjects; 55 List: TObjects; 45 56 constructor Create(AOwner: TComponent); override; 46 57 destructor Destroy; override; … … 58 69 property OnCustomDraw: TLVCustomDrawItemEvent read FOnCustomDraw 59 70 write FOnCustomDraw; 71 property OnColumnWidthChanged: TNotifyEvent read FOnColumnWidthChanged 72 write FOnColumnWidthChanged; 60 73 property Column: Integer read FColumn write SetColumn; 61 74 property Order: TSortOrder read FOrder write SetOrder; … … 68 81 FOnChange: TNotifyEvent; 69 82 FStringGrid1: TStringGrid; 70 procedure DoOnKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 83 procedure DoOnChange; 84 procedure GridDoOnKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 85 procedure GridDoOnResize(Sender: TObject); 71 86 public 72 87 constructor Create(AOwner: TComponent); override; 73 88 procedure UpdateFromListView(ListView: TListView); 74 89 function TextEntered: Boolean; 90 function TextEnteredCount: Integer; 91 function TextEnteredColumn(Index: Integer): Boolean; 75 92 function GetColValue(Index: Integer): string; 93 procedure Reset; 76 94 property StringGrid: TStringGrid read FStringGrid1 write FStringGrid1; 77 95 published … … 79 97 property Align; 80 98 property Anchors; 99 property BorderSpacing; 100 end; 101 102 { TListViewEx } 103 104 TListViewEx = class(TWinControl) 105 private 106 FFilter: TListViewFilter; 107 FListView: TListView; 108 FListViewSort: TListViewSort; 109 procedure ResizeHanlder; 110 public 111 constructor Create(TheOwner: TComponent); override; 112 destructor Destroy; override; 113 published 114 property ListView: TListView read FListView write FListView; 115 property ListViewSort: TListViewSort read FListViewSort write FListViewSort; 116 property Filter: TListViewFilter read FFilter write FFilter; 117 property Visible; 81 118 end; 82 119 … … 88 125 procedure Register; 89 126 begin 90 RegisterComponents('Common', [TListViewSort, TListViewFilter]); 127 RegisterComponents('Common', [TListViewSort, TListViewFilter, TListViewEx]); 128 end; 129 130 { TListViewEx } 131 132 procedure TListViewEx.ResizeHanlder; 133 begin 134 end; 135 136 constructor TListViewEx.Create(TheOwner: TComponent); 137 begin 138 inherited Create(TheOwner); 139 Filter := TListViewFilter.Create(Self); 140 Filter.Parent := Self; 141 Filter.Align := alBottom; 142 ListView := TListView.Create(Self); 143 ListView.Parent := Self; 144 ListView.Align := alClient; 145 ListViewSort := TListViewSort.Create(Self); 146 ListViewSort.ListView := ListView; 147 end; 148 149 destructor TListViewEx.Destroy; 150 begin 151 inherited; 91 152 end; 92 153 93 154 { TListViewFilter } 94 155 95 procedure TListViewFilter.DoOnKeyUp(Sender: TObject; var Key: Word; 156 procedure TListViewFilter.DoOnChange; 157 begin 158 if Assigned(FOnChange) then FOnChange(Self); 159 end; 160 161 procedure TListViewFilter.GridDoOnKeyUp(Sender: TObject; var Key: Word; 96 162 Shift: TShiftState); 97 163 begin 98 if Assigned(FOnChange) then 99 FOnChange(Self); 164 DoOnChange; 165 end; 166 167 procedure TListViewFilter.GridDoOnResize(Sender: TObject); 168 begin 169 FStringGrid1.DefaultRowHeight := FStringGrid1.Height; 100 170 end; 101 171 … … 113 183 FStringGrid1.Options := [goFixedHorzLine, goFixedVertLine, goVertLine, 114 184 goHorzLine, goRangeSelect, goEditing, goAlwaysShowEditor, goSmoothScroll]; 115 FStringGrid1.OnKeyUp := DoOnKeyUp; 185 FStringGrid1.OnKeyUp := GridDoOnKeyUp; 186 FStringGrid1.OnResize := GridDoOnResize; 116 187 end; 117 188 … … 119 190 var 120 191 I: Integer; 121 NewColumn: TGridColumn;192 R: TRect; 122 193 begin 123 194 with FStringGrid1 do begin 124 Columns.Clear;125 195 while Columns.Count > ListView.Columns.Count do Columns.Delete(Columns.Count - 1); 126 while Columns.Count < ListView.Columns.Count do NewColumn :=Columns.Add;196 while Columns.Count < ListView.Columns.Count do Columns.Add; 127 197 for I := 0 to ListView.Columns.Count - 1 do begin 128 198 Columns[I].Width := ListView.Columns[I].Width; 199 if Selection.Left = I then begin 200 R := CellRect(I, 0); 201 Editor.Left := R.Left + 2; 202 Editor.Width := R.Width - 4; 203 end; 129 204 end; 130 205 end; … … 132 207 133 208 function TListViewFilter.TextEntered: Boolean; 209 begin 210 Result := TextEnteredCount > 0; 211 end; 212 213 function TListViewFilter.TextEnteredCount: Integer; 134 214 var 135 215 I: Integer; 136 216 begin 137 Result := False;217 Result := 0; 138 218 for I := 0 to FStringGrid1.ColCount - 1 do begin 139 219 if FStringGrid1.Cells[I, 0] <> '' then begin 140 Result := True; 141 Break; 220 Inc(Result); 142 221 end; 143 222 end; 223 end; 224 225 function TListViewFilter.TextEnteredColumn(Index: Integer): Boolean; 226 begin 227 Result := FStringGrid1.Cells[Index, 0] <> ''; 144 228 end; 145 229 … … 151 235 end; 152 236 237 procedure TListViewFilter.Reset; 238 var 239 I: Integer; 240 begin 241 with StringGrid do 242 for I := 0 to ColCount - 1 do 243 Cells[I, 0] := ''; 244 DoOnChange; 245 end; 246 153 247 { TListViewSort } 154 248 249 {$IFDEF WINDOWS} 250 procedure TListViewSort.NewListViewWindowProc(var AMsg: TMessage); 251 var 252 vColWidth: Integer; 253 vMsgNotify: TLMNotify absolute AMsg; 254 Code: Integer; 255 begin 256 // call the old WindowProc of ListView 257 FOldListViewWindowProc(AMsg); 258 259 // Currently we care only with WM_NOTIFY message 260 if AMsg.Msg = WM_NOTIFY then 261 begin 262 Code := NMHDR(PHDNotify(vMsgNotify.NMHdr)^.Hdr).Code; 263 case Code of 264 HDN_ENDTRACKA, HDN_ENDTRACKW: 265 DoColumnResized(PHDNotify(vMsgNotify.NMHdr)^.Item); 266 267 HDN_BEGINTRACKA, HDN_BEGINTRACKW: 268 DoColumnBeginResize(PHDNotify(vMsgNotify.NMHdr)^.Item); 269 270 HDN_TRACKA, HDN_TRACKW: 271 begin 272 vColWidth := -1; 273 if (PHDNotify(vMsgNotify.NMHdr)^.PItem<>nil) 274 and (PHDNotify(vMsgNotify.NMHdr)^.PItem^.Mask and HDI_WIDTH <> 0) 275 then 276 vColWidth := PHDNotify(vMsgNotify.NMHdr)^.PItem^.cxy; 277 278 DoColumnResizing(PHDNotify(vMsgNotify.NMHdr)^.Item, vColWidth); 279 end; 280 end; 281 end; 282 end; 283 {$ENDIF} 284 285 procedure TListViewSort.DoColumnBeginResize(const AColIndex: Integer); 286 begin 287 end; 288 289 procedure TListViewSort.DoColumnResizing(const AColIndex, AWidth: Integer); 290 begin 291 end; 292 293 procedure TListViewSort.DoColumnResized(const AColIndex: Integer); 294 begin 295 if Assigned(FOnColumnWidthChanged) then 296 FOnColumnWidthChanged(Self); 297 end; 155 298 156 299 procedure TListViewSort.ColumnClick(Sender: TObject; Column: TListColumn); … … 179 322 procedure TListViewSort.SetListView(const Value: TListView); 180 323 begin 324 if FListView = Value then Exit; 325 if Assigned(FListView) then 326 ListView.WindowProc := FOldListViewWindowProc; 181 327 FListView := Value; 182 328 FListView.OnColumnClick := ColumnClick; 183 329 FListView.OnCustomDrawItem := ListViewCustomDrawItem; 184 330 FListView.OnClick := ListViewClick; 331 FOldListViewWindowProc := FListView.WindowProc; 332 {$IFDEF WINDOWS} 333 FListView.WindowProc := NewListViewWindowProc; 334 {$ENDIF} 335 end; 336 337 var 338 ListViewSortCompare: TCompareEvent; 339 340 function ListViewCompare(constref Item1, Item2: TObject): Integer; 341 begin 342 Result := ListViewSortCompare(Item1, Item2); 185 343 end; 186 344 187 345 procedure TListViewSort.Sort(Compare: TCompareEvent); 188 346 begin 347 // TODO: Because TFLGObjectList compare handler is not class method, 348 // it is necessary to use simple function compare handler with local variable 349 ListViewSortCompare := Compare; 189 350 if (List.Count > 0) then 190 List.Sort( Compare);351 List.Sort(TComparer<TObject>.Construct(ListViewCompare)); 191 352 end; 192 353 … … 194 355 begin 195 356 if Assigned(FOnFilter) then FOnFilter(Self) 196 else if Assigned(Source) then 197 List.Assign(Source) else 357 else if Assigned(Source) then begin 198 358 List.Clear; 359 List.AddRange(Source); 360 end else List.Clear; 199 361 if ListView.Items.Count <> List.Count then 200 362 ListView.Items.Count := List.Count; 201 if Assigned(FOnCompareItem) then Sort(FOnCompareItem);363 if Assigned(FOnCompareItem) and (Order <> soNone) then Sort(FOnCompareItem); 202 364 //ListView.Items[-1]; // Workaround for not show first row if selected 203 365 ListView.Refresh; … … 251 413 begin 252 414 inherited; 253 List := T ListObject.Create;415 List := TObjects.Create; 254 416 List.OwnsObjects := False; 255 417 end; … … 257 419 destructor TListViewSort.Destroy; 258 420 begin 259 List.Free;421 FreeAndNil(List); 260 422 inherited; 261 423 end; … … 266 428 TP1: TPoint; 267 429 XBias, YBias: Integer; 268 OldColor: TColor; 430 PenColor: TColor; 431 BrushColor: TColor; 269 432 BiasTop, BiasLeft: Integer; 270 433 Rect1: TRect; … … 278 441 Item.Left := 0; 279 442 GetCheckBias(XBias, YBias, BiasTop, BiasLeft, ListView); 280 OldColor := ListView.Canvas.Pen.Color; 443 PenColor := ListView.Canvas.Pen.Color; 444 BrushColor := ListView.Canvas.Brush.Color; 281 445 //TP1 := Item.GetPosition; 282 446 lRect := Item.DisplayRect(drBounds); // Windows 7 workaround … … 290 454 ItemLeft := Item.Left; 291 455 ItemLeft := 23; // Windows 7 workaround 292 456 293 457 Rect1.Left := ItemLeft - CheckWidth - BiasLeft + 1 + XBias; 294 458 //ShowMessage(IntToStr(Tp1.Y) + ', ' + IntToStr(BiasTop) + ', ' + IntToStr(XBias)); … … 321 485 end; 322 486 //ListView.Canvas.Brush.Color := ListView.Color; 323 ListView.Canvas.Brush.Color := clWindow;324 ListView.Canvas.Pen.Color := OldColor;487 ListView.Canvas.Brush.Color := BrushColor; 488 ListView.Canvas.Pen.Color := PenColor; 325 489 end; 326 490 … … 389 553 FHeaderHandle := ListView_GetHeader(FListView.Handle); 390 554 for I := 0 to FListView.Columns.Count - 1 do begin 555 {$push}{$warn 5057 off} 391 556 FillChar(Item, SizeOf(THDItem), 0); 557 {$pop} 392 558 Item.Mask := HDI_FORMAT; 393 559 Header_GetItem(FHeaderHandle, I, Item); -
trunk/Packages/Common/Memory.pas
r74 r75 1 unit UMemory; 2 3 {$mode Delphi}{$H+} 1 unit Memory; 4 2 5 3 interface … … 24 22 constructor Create; 25 23 destructor Destroy; override; 24 procedure WriteMemory(Position: Integer; Memory: TMemory); 25 procedure ReadMemory(Position: Integer; Memory: TMemory); 26 26 property Data: PByte read FData; 27 27 property Size: Integer read FSize write SetSize; … … 42 42 end; 43 43 44 44 45 implementation 45 46 … … 48 49 procedure TPositionMemory.SetSize(AValue: Integer); 49 50 begin 50 inherited SetSize(AValue);51 inherited; 51 52 if FPosition > FSize then FPosition := FSize; 52 53 end; … … 105 106 begin 106 107 Size := 0; 107 inherited Destroy; 108 inherited; 109 end; 110 111 procedure TMemory.WriteMemory(Position: Integer; Memory: TMemory); 112 begin 113 Move(Memory.FData, PByte(PByte(@FData) + Position)^, Memory.Size); 114 end; 115 116 procedure TMemory.ReadMemory(Position: Integer; Memory: TMemory); 117 begin 118 Move(PByte(PByte(@FData) + Position)^, Memory.FData, Memory.Size); 108 119 end; 109 120 110 121 end. 111 -
trunk/Packages/Common/Pool.pas
r74 r75 1 unit UPool; 2 3 {$mode Delphi}{$H+} 1 unit Pool; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, syncobjs, SpecializedList, UThreading;6 Classes, SysUtils, syncobjs, Generics.Collections, Threading; 9 7 10 8 type … … 22 20 function NewItemObject: TObject; virtual; 23 21 public 24 Items: T ListObject;25 FreeItems: T ListObject;22 Items: TObjectList<TObject>; 23 FreeItems: TObjectList<TObject>; 26 24 function Acquire: TObject; virtual; 27 25 procedure Release(Item: TObject); virtual; … … 108 106 constructor TThreadedPool.Create; 109 107 begin 110 inherited Create;108 inherited; 111 109 Lock := TCriticalSection.Create; 112 110 end; … … 116 114 TotalCount := 0; 117 115 Lock.Free; 118 inherited Destroy;116 inherited; 119 117 end; 120 118 … … 185 183 begin 186 184 inherited; 187 Items := T ListObject.Create;188 FreeItems := T ListObject.Create;185 Items := TObjectList<TObject>.Create; 186 FreeItems := TObjectList<TObject>.Create; 189 187 FreeItems.OwnsObjects := False; 190 188 FReleaseEvent := TEvent.Create(nil, False, False, ''); … … 201 199 202 200 end. 203 -
trunk/Packages/Common/PrefixMultiplier.pas
r74 r75 1 unit UPrefixMultiplier;1 unit PrefixMultiplier; 2 2 3 3 // Date: 2010-06-01 4 5 {$mode delphi}6 4 7 5 interface … … 21 19 { TPrefixMultiplier } 22 20 23 TPrefixMultiplier = class 21 TPrefixMultiplier = class(TComponent) 24 22 private 25 function TruncateDigits(Value: Double;Digits:Integer=3):Double;23 function TruncateDigits(Value: Double; Digits: Integer = 3): Double; 26 24 public 27 25 function Add(Value: Double; PrefixMultipliers: TPrefixMultiplierDef; … … 33 31 ( 34 32 (ShortText: 'y'; FullText: 'yocto'; Value: 1e-24), 35 33 (ShortText: 'z'; FullText: 'zepto'; Value: 1e-21), 36 34 (ShortText: 'a'; FullText: 'atto'; Value: 1e-18), 37 35 (ShortText: 'f'; FullText: 'femto'; Value: 1e-15), … … 54 52 ( 55 53 (ShortText: 'ys'; FullText: 'yocto'; Value: 1e-24), 56 54 (ShortText: 'zs'; FullText: 'zepto'; Value: 1e-21), 57 55 (ShortText: 'as'; FullText: 'atto'; Value: 1e-18), 58 56 (ShortText: 'fs'; FullText: 'femto'; Value: 1e-15), … … 72 70 ); 73 71 72 procedure Register; 73 74 74 75 implementation 76 77 procedure Register; 78 begin 79 RegisterComponents('Common', [TPrefixMultiplier]); 80 end; 75 81 76 82 { TPrefixMultiplier } … … 92 98 end; 93 99 94 function TPrefixMultiplier.Add(Value: Double;PrefixMultipliers:TPrefixMultiplierDef95 ; UnitText:string;Digits:Integer):string;100 function TPrefixMultiplier.Add(Value: Double; PrefixMultipliers: TPrefixMultiplierDef 101 ; UnitText:string; Digits: Integer): string; 96 102 var 97 103 I: Integer; … … 118 124 119 125 end. 120 -
trunk/Packages/Common/RegistryEx.pas
r74 r75 1 unit URegistry; 2 3 {$MODE Delphi} 1 unit RegistryEx; 4 2 5 3 interface … … 9 7 10 8 type 11 TRegistryRoot = (rrKeyClassesRoot = HKEY($80000000), 12 rrKeyCurrentUser = HKEY($80000001), 13 rrKeyLocalMachine = HKEY($80000002), 14 rrKeyUsers = HKEY($80000003), 15 rrKeyPerformanceData = HKEY($80000004), 16 rrKeyCurrentConfig = HKEY($80000005), 17 rrKeyDynData = HKEY($80000006)); 9 TRegistryRoot = (rrKeyClassesRoot, rrKeyCurrentUser, rrKeyLocalMachine, 10 rrKeyUsers, rrKeyPerformanceData, rrKeyCurrentConfig, rrKeyDynData); 18 11 19 12 { TRegistryContext } … … 22 15 RootKey: HKEY; 23 16 Key: string; 17 class function Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; static; overload; 18 class function Create(RootKey: HKEY; Key: string): TRegistryContext; static; overload; 24 19 class operator Equal(A, B: TRegistryContext): Boolean; 25 20 end; … … 32 27 procedure SetCurrentContext(AValue: TRegistryContext); 33 28 public 29 function ReadChar(const Name: string): Char; 30 procedure WriteChar(const Name: string; Value: Char); 34 31 function ReadBoolWithDefault(const Name: string; 35 32 DefaultValue: Boolean): Boolean; 36 33 function ReadIntegerWithDefault(const Name: string; DefaultValue: Integer): Integer; 37 34 function ReadStringWithDefault(const Name: string; DefaultValue: string): string; 35 function ReadCharWithDefault(const Name: string; DefaultValue: Char): Char; 38 36 function ReadFloatWithDefault(const Name: string; 39 37 DefaultValue: Double): Double; … … 43 41 end; 44 42 45 function RegContext(RootKey: HKEY; Key: string): TRegistryContext; 43 const 44 RegistryRootHKEY: array[TRegistryRoot] of HKEY = (HKEY_CLASSES_ROOT, 45 HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_PERFORMANCE_DATA, 46 HKEY_CURRENT_CONFIG, HKEY_DYN_DATA); 46 47 47 48 48 49 implementation 49 50 function RegContext(RootKey: HKEY; Key: string): TRegistryContext;51 begin52 Result.RootKey := RootKey;53 Result.Key := Key;54 end;55 50 56 51 { TRegistryContext } … … 59 54 begin 60 55 Result := (A.Key = B.Key) and (A.RootKey = B.RootKey); 56 end; 57 58 class function TRegistryContext.Create(RootKey: TRegistryRoot; Key: string): TRegistryContext; 59 begin 60 Result.RootKey := RegistryRootHKEY[RootKey]; 61 Result.Key := Key; 62 end; 63 64 class function TRegistryContext.Create(RootKey: HKEY; Key: string): TRegistryContext; 65 begin 66 Result.RootKey := RootKey; 67 Result.Key := Key; 61 68 end; 62 69 … … 79 86 else begin 80 87 WriteString(Name, DefaultValue); 88 Result := DefaultValue; 89 end; 90 end; 91 92 function TRegistryEx.ReadCharWithDefault(const Name: string; DefaultValue: Char 93 ): Char; 94 begin 95 if ValueExists(Name) then Result := ReadChar(Name) 96 else begin 97 WriteChar(Name, DefaultValue); 81 98 Result := DefaultValue; 82 99 end; … … 113 130 function TRegistryEx.OpenKey(const Key: string; CanCreate: Boolean): Boolean; 114 131 begin 115 {$IFDEF Linux}116 CloseKey;132 {$IFDEF UNIX} 133 //CloseKey; 117 134 {$ENDIF} 118 135 Result := inherited OpenKey(Key, CanCreate); … … 121 138 function TRegistryEx.GetCurrentContext: TRegistryContext; 122 139 begin 123 Result.Key := CurrentPath;140 Result.Key := String(CurrentPath); 124 141 Result.RootKey := RootKey; 125 142 end; … … 129 146 RootKey := AValue.RootKey; 130 147 OpenKey(AValue.Key, True); 148 end; 149 150 function TRegistryEx.ReadChar(const Name: string): Char; 151 var 152 S: string; 153 begin 154 S := ReadString(Name); 155 if Length(S) > 0 then Result := S[1] 156 else Result := #0; 157 end; 158 159 procedure TRegistryEx.WriteChar(const Name: string; Value: Char); 160 begin 161 WriteString(Name, Value); 131 162 end; 132 163 -
trunk/Packages/Common/ResetableThread.pas
r74 r75 1 unit UResetableThread; 2 3 {$mode Delphi}{$H+} 1 unit ResetableThread; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, syncobjs, UThreading, UPool;6 Classes, SysUtils, syncobjs, Threading, Pool; 9 7 10 8 type … … 156 154 FThread.Name := 'ResetableThread'; 157 155 FThread.Parent := Self; 158 FThread. Resume;156 FThread.Start; 159 157 end; 160 158 … … 167 165 FreeAndNil(FStopEvent); 168 166 FreeAndNil(FLock); 169 inherited Destroy;167 inherited; 170 168 end; 171 169 … … 286 284 constructor TThreadPool.Create; 287 285 begin 288 inherited Create;286 inherited; 289 287 end; 290 288 … … 293 291 TotalCount := 0; 294 292 WaitForEmpty; 295 inherited Destroy;293 inherited; 296 294 end; 297 295 298 296 end. 299 -
trunk/Packages/Common/StopWatch.pas
r73 r75 5 5 6 6 uses 7 {$IFDEF W indows}Windows,{$ENDIF}7 {$IFDEF WINDOWS}Windows,{$ENDIF} 8 8 SysUtils, DateUtils; 9 9 … … 32 32 end; 33 33 34 34 35 implementation 35 36 … … 40 41 fIsRunning := False; 41 42 42 {$IFDEF W indows}43 {$IFDEF WINDOWS} 43 44 fIsHighResolution := QueryPerformanceFrequency(fFrequency) ; 44 45 {$ELSE} -
trunk/Packages/Common/SyncCounter.pas
r74 r75 1 unit USyncCounter; 2 3 {$mode delphi} 1 unit SyncCounter; 4 2 5 3 interface … … 25 23 procedure Assign(Source: TSyncCounter); 26 24 end; 25 27 26 28 27 implementation … … 69 68 begin 70 69 Lock.Free; 71 inherited Destroy;70 inherited; 72 71 end; 73 72 … … 79 78 80 79 end. 81 -
trunk/Packages/Common/Threading.pas
r74 r75 1 unit UThreading; 2 3 {$mode delphi} 1 unit Threading; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, Contnrs, SyncObjs;6 Classes, SysUtils, Forms, Generics.Collections, SyncObjs; 9 7 10 8 type 11 9 TExceptionEvent = procedure (Sender: TObject; E: Exception) of object; 12 10 TMethodCall = procedure of object; 13 14 11 15 12 { TVirtualThread } … … 22 19 function GetSuspended: Boolean; virtual; abstract; 23 20 function GetTerminated: Boolean; virtual; abstract; 24 function GetThreadId: Integer; virtual; abstract;21 function GetThreadId: TThreadID; virtual; abstract; 25 22 procedure SetFreeOnTerminate(const AValue: Boolean); virtual; abstract; 26 23 procedure SetPriority(const AValue: TThreadPriority); virtual; abstract; … … 30 27 Name: string; 31 28 procedure Execute; virtual; abstract; 32 procedure Resume; virtual; abstract;33 procedure Suspend; virtual; abstract;34 29 procedure Start; virtual; abstract; 35 30 procedure Terminate; virtual; abstract; … … 44 39 property Terminated: Boolean read GetTerminated write SetTerminated; 45 40 property Finished: Boolean read GetFinished; 46 property ThreadId: Integerread GetThreadId;41 property ThreadId: TThreadID read GetThreadId; 47 42 end; 48 43 … … 70 65 function GetSuspended: Boolean; override; 71 66 function GetTerminated: Boolean; override; 72 function GetThreadId: Integer; override;67 function GetThreadId: TThreadID; override; 73 68 procedure SetFreeOnTerminate(const AValue: Boolean); override; 74 69 procedure SetPriority(const AValue: TThreadPriority); override; … … 81 76 procedure Sleep(Delay: Integer); override; 82 77 procedure Execute; override; 83 procedure Resume; override;84 procedure Suspend; override;85 78 procedure Start; override; 86 79 procedure Terminate; override; … … 106 99 { TThreadList } 107 100 108 TThreadList = class(TObjectList )109 function FindById(Id: Integer): TVirtualThread;101 TThreadList = class(TObjectList<TVirtualThread>) 102 function FindById(Id: TThreadID): TVirtualThread; 110 103 constructor Create; virtual; 111 104 end; … … 134 127 Thread.FreeOnTerminate := False; 135 128 Thread.Method := Method; 136 Thread. Resume;129 Thread.Start; 137 130 while (Thread.State = ttsRunning) or (Thread.State = ttsReady) do begin 138 131 if MainThreadID = ThreadID then Application.ProcessMessages; … … 155 148 Thread.Method := Method; 156 149 Thread.OnFinished := CallBack; 157 Thread. Resume;150 Thread.Start; 158 151 //if Thread.State = ttsExceptionOccured then 159 152 // raise Exception.Create(Thread.ExceptionMessage); … … 168 161 if MainThreadID = ThreadID then Method 169 162 else begin 170 Thread := ThreadList.FindById(ThreadID); 163 try 164 ThreadListLock.Acquire; 165 Thread := ThreadList.FindById(ThreadID); 166 finally 167 ThreadListLock.Release; 168 end; 171 169 if Assigned(Thread) then begin 172 170 Thread.Synchronize(Method); … … 177 175 { TThreadList } 178 176 179 function TThreadList.FindById(Id: Integer): TVirtualThread;177 function TThreadList.FindById(Id: TThreadID): TVirtualThread; 180 178 var 181 179 I: Integer; 182 180 begin 183 181 I := 0; 184 while (I < ThreadList.Count) and (T VirtualThread(ThreadList[I]).ThreadID <> Id) do182 while (I < ThreadList.Count) and (ThreadList[I].ThreadID <> Id) do 185 183 Inc(I); 186 if I < ThreadList.Count then Result := T VirtualThread(ThreadList[I])184 if I < ThreadList.Count then Result := ThreadList[I] 187 185 else Result := nil; 188 186 end; … … 237 235 end; 238 236 239 function TListedThread.GetThreadId: Integer;237 function TListedThread.GetThreadId: TThreadID; 240 238 begin 241 239 Result := FThread.ThreadID; … … 294 292 end; 295 293 FThread.Free; 296 inherited Destroy;294 inherited; 297 295 end; 298 296 … … 313 311 procedure TListedThread.Execute; 314 312 begin 315 end;316 317 procedure TListedThread.Resume;318 begin319 FThread.Resume;320 end;321 322 procedure TListedThread.Suspend;323 begin324 FThread.Suspend;325 313 end; 326 314 … … 378 366 379 367 end. 380 -
trunk/Packages/Common/URI.pas
r74 r75 1 unit U URI;1 unit URI; 2 2 3 3 // Date: 2011-04-04 4 5 {$mode delphi}6 4 7 5 interface … … 85 83 end; 86 84 85 87 86 implementation 88 87 89 88 function LeftCutString(var Source: string; out Output: string; Delimiter: string; Allowed: string = ''): Boolean; 90 89 var 91 I , J: Integer;90 I: Integer; 92 91 Matched: Boolean; 93 92 begin … … 113 112 function RightCutString(var Source: string; out Output: string; Delimiter: string; Allowed: string = ''): Boolean; 114 113 var 115 I , J: Integer;114 I: Integer; 116 115 Matched: Boolean; 117 116 begin … … 183 182 begin 184 183 Items.Free; 185 inherited Destroy;184 inherited; 186 185 end; 187 186 … … 202 201 203 202 procedure TURI.SetAsString(Value: string); 204 var205 HostAddr: string;206 HostPort: string;207 203 begin 208 204 LeftCutString(Value, Scheme, ':'); … … 235 231 begin 236 232 Path.Free; 237 inherited Destroy;233 inherited; 238 234 end; 239 235 … … 246 242 Fragment := TURI(Source).Fragment; 247 243 Query := TURI(Source).Query; 248 end else inherited Assign(Source);244 end else inherited; 249 245 end; 250 246 … … 294 290 destructor TURL.Destroy; 295 291 begin 296 inherited Destroy;292 inherited; 297 293 end; 298 294 … … 347 343 begin 348 344 Directory.Free; 349 inherited Destroy; 350 end; 351 345 inherited; 346 end; 352 347 353 348 end. 354 -
trunk/Packages/Common/XML.pas
r74 r75 1 unit UXMLUtils; 2 3 {$mode delphi} 1 unit XML; 4 2 5 3 interface … … 7 5 uses 8 6 {$IFDEF WINDOWS}Windows,{$ENDIF} 9 Classes, SysUtils, DateUtils ;7 Classes, SysUtils, DateUtils, DOM, xmlread; 10 8 11 9 function XMLTimeToDateTime(XMLDateTime: string): TDateTime; 12 function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): WideString; 10 function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): string; 11 procedure WriteInteger(Node: TDOMNode; Name: string; Value: Integer); 12 procedure WriteInt64(Node: TDOMNode; Name: string; Value: Int64); 13 procedure WriteBoolean(Node: TDOMNode; Name: string; Value: Boolean); 14 procedure WriteString(Node: TDOMNode; Name: string; Value: string); 15 procedure WriteDateTime(Node: TDOMNode; Name: string; Value: TDateTime); 16 procedure WriteDouble(Node: TDOMNode; Name: string; Value: Double); 17 function ReadInteger(Node: TDOMNode; Name: string; DefaultValue: Integer): Integer; 18 function ReadInt64(Node: TDOMNode; Name: string; DefaultValue: Int64): Int64; 19 function ReadBoolean(Node: TDOMNode; Name: string; DefaultValue: Boolean): Boolean; 20 function ReadString(Node: TDOMNode; Name: string; DefaultValue: string): string; 21 function ReadDateTime(Node: TDOMNode; Name: string; DefaultValue: TDateTime): TDateTime; 22 function ReadDouble(Node: TDOMNode; Name: string; DefaultValue: Double): Double; 23 procedure ReadXMLFileParser(out Doc: TXMLDocument; FileName: string); 13 24 14 25 15 26 implementation 27 28 function ReadDouble(Node: TDOMNode; Name: string; DefaultValue: Double): Double; 29 var 30 NewNode: TDOMNode; 31 begin 32 Result := DefaultValue; 33 NewNode := Node.FindNode(DOMString(Name)); 34 if Assigned(NewNode) then 35 Result := StrToFloat(string(NewNode.TextContent)); 36 end; 37 38 procedure ReadXMLFileParser(out Doc: TXMLDocument; FileName: string); 39 var 40 Parser: TDOMParser; 41 Src: TXMLInputSource; 42 InFile: TFileStream; 43 begin 44 try 45 InFile := TFileStream.Create(FileName, fmOpenRead); 46 Src := TXMLInputSource.Create(InFile); 47 Parser := TDOMParser.Create; 48 Parser.Options.PreserveWhitespace := True; 49 Parser.Parse(Src, Doc); 50 finally 51 Src.Free; 52 Parser.Free; 53 InFile.Free; 54 end; 55 end; 16 56 17 57 function GetTimeZoneBias: Integer; … … 20 60 TimeZoneInfo: TTimeZoneInformation; 21 61 begin 62 {$push}{$warn 5057 off} 22 63 case GetTimeZoneInformation(TimeZoneInfo) of 23 TIME_ZONE_ID_STANDARD: Result := TimeZoneInfo.Bias + TimeZoneInfo.StandardBias;24 TIME_ZONE_ID_DAYLIGHT: Result := TimeZoneInfo.Bias + TimeZoneInfo.DaylightBias;64 TIME_ZONE_ID_STANDARD: Result := TimeZoneInfo.Bias + TimeZoneInfo.StandardBias; 65 TIME_ZONE_ID_DAYLIGHT: Result := TimeZoneInfo.Bias + TimeZoneInfo.DaylightBias; 25 66 else 26 67 Result := 0; 27 68 end; 69 {$pop} 28 70 end; 29 71 {$ELSE} … … 35 77 function LeftCutString(var Source: string; out Output: string; Delimiter: string; Allowed: string = ''): Boolean; 36 78 var 37 I , J: Integer;79 I: Integer; 38 80 Matched: Boolean; 39 81 begin … … 66 108 Minute: Integer; 67 109 Second: Integer; 110 SecondFraction: Double; 68 111 Millisecond: Integer; 69 112 begin … … 88 131 if Pos('Z', XMLDateTime) > 0 then 89 132 LeftCutString(XMLDateTime, Part, 'Z'); 90 Millisecond := StrToInt(Part); 133 SecondFraction := StrToFloat('0' + DefaultFormatSettings.DecimalSeparator + Part); 134 Millisecond := Trunc(SecondFraction * 1000); 91 135 end else begin 92 136 if Pos('+', XMLDateTime) > 0 then … … 106 150 end; 107 151 108 function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): WideString;152 function DateTimeToXMLTime(Value: TDateTime; ApplyLocalBias: Boolean = True): string; 109 153 const 110 154 Neg: array[Boolean] of string = ('+', '-'); … … 123 167 end; 124 168 169 procedure WriteInteger(Node: TDOMNode; Name: string; Value: Integer); 170 var 171 NewNode: TDOMNode; 172 begin 173 NewNode := Node.OwnerDocument.CreateElement(DOMString(Name)); 174 NewNode.TextContent := DOMString(IntToStr(Value)); 175 Node.AppendChild(NewNode); 176 end; 177 178 procedure WriteInt64(Node: TDOMNode; Name: string; Value: Int64); 179 var 180 NewNode: TDOMNode; 181 begin 182 NewNode := Node.OwnerDocument.CreateElement(DOMString(Name)); 183 NewNode.TextContent := DOMString(IntToStr(Value)); 184 Node.AppendChild(NewNode); 185 end; 186 187 procedure WriteBoolean(Node: TDOMNode; Name: string; Value: Boolean); 188 var 189 NewNode: TDOMNode; 190 begin 191 NewNode := Node.OwnerDocument.CreateElement(DOMString(Name)); 192 NewNode.TextContent := DOMString(BoolToStr(Value)); 193 Node.AppendChild(NewNode); 194 end; 195 196 procedure WriteString(Node: TDOMNode; Name: string; Value: string); 197 var 198 NewNode: TDOMNode; 199 begin 200 NewNode := Node.OwnerDocument.CreateElement(DOMString(Name)); 201 NewNode.TextContent := DOMString(Value); 202 Node.AppendChild(NewNode); 203 end; 204 205 procedure WriteDateTime(Node: TDOMNode; Name: string; Value: TDateTime); 206 var 207 NewNode: TDOMNode; 208 begin 209 NewNode := Node.OwnerDocument.CreateElement(DOMString(Name)); 210 NewNode.TextContent := DOMString(DateTimeToXMLTime(Value)); 211 Node.AppendChild(NewNode); 212 end; 213 214 procedure WriteDouble(Node: TDOMNode; Name: string; Value: Double); 215 var 216 NewNode: TDOMNode; 217 begin 218 NewNode := Node.OwnerDocument.CreateElement(DOMString(Name)); 219 NewNode.TextContent := DOMString(FloatToStr(Value)); 220 Node.AppendChild(NewNode); 221 end; 222 223 function ReadInteger(Node: TDOMNode; Name: string; DefaultValue: Integer): Integer; 224 var 225 NewNode: TDOMNode; 226 begin 227 Result := DefaultValue; 228 NewNode := Node.FindNode(DOMString(Name)); 229 if Assigned(NewNode) then 230 Result := StrToInt(string(NewNode.TextContent)); 231 end; 232 233 function ReadInt64(Node: TDOMNode; Name: string; DefaultValue: Int64): Int64; 234 var 235 NewNode: TDOMNode; 236 begin 237 Result := DefaultValue; 238 NewNode := Node.FindNode(DOMString(Name)); 239 if Assigned(NewNode) then 240 Result := StrToInt64(string(NewNode.TextContent)); 241 end; 242 243 function ReadBoolean(Node: TDOMNode; Name: string; DefaultValue: Boolean): Boolean; 244 var 245 NewNode: TDOMNode; 246 begin 247 Result := DefaultValue; 248 NewNode := Node.FindNode(DOMString(Name)); 249 if Assigned(NewNode) then 250 Result := StrToBool(string(NewNode.TextContent)); 251 end; 252 253 function ReadString(Node: TDOMNode; Name: string; DefaultValue: string): string; 254 var 255 NewNode: TDOMNode; 256 begin 257 Result := DefaultValue; 258 NewNode := Node.FindNode(DOMString(Name)); 259 if Assigned(NewNode) then 260 Result := string(NewNode.TextContent); 261 end; 262 263 function ReadDateTime(Node: TDOMNode; Name: string; DefaultValue: TDateTime 264 ): TDateTime; 265 var 266 NewNode: TDOMNode; 267 begin 268 Result := DefaultValue; 269 NewNode := Node.FindNode(DOMString(Name)); 270 if Assigned(NewNode) then 271 Result := XMLTimeToDateTime(string(NewNode.TextContent)); 272 end; 273 125 274 end. 126 -
trunk/Packages/ModularSystem/FormModuleList.pas
r74 r75 1 unit UFormModuleList; 2 3 {$mode delphi} 1 unit FormModuleList; 4 2 5 3 interface … … 7 5 uses 8 6 Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, 9 ComCtrls, ExtCtrls, Menus, ActnList, StdCtrls, SpecializedList, DateUtils,10 UListViewSort, UModularSystem;7 ComCtrls, ExtCtrls, Menus, ActnList, StdCtrls, Generics.Collections, DateUtils, 8 ListViewSort, ModularSystem, Common; 11 9 12 10 type … … 87 85 function ModuleToStr(Module: TObject): string; 88 86 87 89 88 implementation 90 89 … … 130 129 if Version <> '' then Item.SubItems.Add(Version) 131 130 else Item.SubItems.Add(' '); 132 Item.SubItems.Add( Dependencies.Implode(',', StrToStr));131 Item.SubItems.Add(Implode(',', Dependencies)); 133 132 if FileName <> '' then Item.SubItems.Add(FileName) 134 133 else Item.SubItems.Add(' '); … … 150 149 if (mloShowLicense in FOptions) and (License <> '') then Memo1.Lines.Add(SLicense + ': ' + License); 151 150 if (mloShowDependencies in FOptions) and (Dependencies.Count > 0) then 152 Memo1.Lines.Add(SDependencies + ': ' + Dependencies.Implode(', ', StrToStr));151 Memo1.Lines.Add(SDependencies + ': ' + Implode(', ', Dependencies)); 153 152 if (mloShowDescription in FOptions) and (Description.Count > 0) then 154 Memo1.Lines.Add(SDescription + ': ' + Description.Implode(', ', StrToStr));153 Memo1.Lines.Add(SDescription + ': ' + Implode(', ', Description)); 155 154 end; 156 155 end; … … 191 190 procedure TFormModuleList.AStartExecute(Sender: TObject); 192 191 var 193 Modules: T ListModule;192 Modules: TModules; 194 193 I: Integer; 195 194 begin … … 199 198 if not Running then 200 199 try 201 Modules := T ListModule.Create;200 Modules := TModules.Create; 202 201 Modules.OwnsObjects := False; 203 202 EnumDependenciesCascade(Modules, [mcNotRunning]); 204 203 if Modules.Count > 0 then begin 205 204 if MessageDlg(Format(SAdditionalModulesStart, [ 206 Identification, Modules. Implode(',', ModuleToStr)]),205 Identification, Modules.GetNames]), 207 206 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 208 207 Start; … … 216 215 procedure TFormModuleList.AStopExecute(Sender: TObject); 217 216 var 218 Modules: T ListModule;217 Modules: TModules; 219 218 I: Integer; 220 219 begin … … 224 223 if Running then 225 224 try 226 Modules := T ListModule.Create;225 Modules := TModules.Create; 227 226 Modules.OwnsObjects := False; 228 227 EnumSuperiorDependenciesCascade(Modules, [mcRunning]); 229 228 if Modules.Count > 0 then begin 230 229 if MessageDlg(Format(SAdditionalModulesStop, [ 231 Identification, 232 Modules.Implode(',', ModuleToStr)]), 230 Identification, Modules.GetNames]), 233 231 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 234 232 Stop; … … 242 240 procedure TFormModuleList.AUninstallExecute(Sender: TObject); 243 241 var 244 Modules: T ListModule;242 Modules: TModules; 245 243 I: Integer; 246 244 begin … … 250 248 if Installed then 251 249 try 252 Modules := T ListModule.Create;250 Modules := TModules.Create; 253 251 Modules.OwnsObjects := False; 254 252 EnumSuperiorDependenciesCascade(Modules, [mcInstalled]); 255 253 if Modules.Count > 0 then begin 256 254 if MessageDlg(Format(SAdditionalModulesUninstall, [ 257 Identification, 258 Modules.Implode(',', ModuleToStr)]), 255 Identification, Modules.GetNames]), 259 256 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 260 257 Uninstall; … … 275 272 procedure TFormModuleList.AInstallExecute(Sender: TObject); 276 273 var 277 Modules: T ListModule;274 Modules: TModules; 278 275 I: Integer; 279 276 begin … … 283 280 if not Installed then 284 281 try 285 Modules := T ListModule.Create;282 Modules := TModules.Create; 286 283 Modules.OwnsObjects := False; 287 284 EnumDependenciesCascade(Modules, [mcNotInstalled]); 288 285 if Modules.Count > 0 then begin 289 286 if MessageDlg(Format(SAdditionalModulesInstall, [ 290 Identification, 291 Modules.Implode(',', ModuleToStr)]), 287 Identification, Modules.GetNames]), 292 288 mtConfirmation, [mbYes, mbNo], 0) = mrYes then 293 289 Install; … … 301 297 procedure TFormModuleList.AEnableExecute(Sender: TObject); 302 298 var 303 Modules: T ListModule;299 Modules: TModules; 304 300 I: Integer; 305 301 begin … … 309 305 if not Enabled then 310 306 try 311 Modules := T ListModule.Create;307 Modules := TModules.Create; 312 308 Modules.OwnsObjects := False; 313 309 EnumDependenciesCascade(Modules, [mcNotRunning]); 314 310 if Modules.Count > 0 then begin 315 311 if MessageDlg(Format(SAdditionalModulesStart, [ 316 Identification, Modules. Implode(',', ModuleToStr)]),312 Identification, Modules.GetNames]), 317 313 mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 318 314 Enable; … … 331 327 procedure TFormModuleList.ADisableExecute(Sender: TObject); 332 328 var 333 Modules: T ListModule;329 Modules: TModules; 334 330 I: Integer; 335 331 begin … … 339 335 if Enabled then 340 336 try 341 Modules := T ListModule.Create;337 Modules := TModules.Create; 342 338 Modules.OwnsObjects := False; 343 339 EnumSuperiorDependenciesCascade(Modules, [mcInstalled]); 344 340 if Modules.Count > 0 then begin 345 341 if MessageDlg(Format(SAdditionalModulesUninstall, [ 346 Identification, 347 Modules.Implode(',', ModuleToStr)]), 342 Identification, Modules.GetNames]), 348 343 mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin 349 344 Stop; … … 400 395 7: Result := CompareString(TModule(Item1).Version, TModule( 401 396 Item2).Version); 402 8: Result := CompareString( TModule(Item1).Dependencies.Implode(',', StrToStr),403 TModule(Item2).Dependencies.Implode(',', StrToStr));397 8: Result := CompareString(Implode(',', TModule(Item1).Dependencies), 398 Implode(',', TModule(Item2).Dependencies)); 404 399 9: Result := CompareString(TModule(Item1).FileName, 405 400 TModule(Item2).FileName); … … 500 495 501 496 initialization 502 {$I UFormModuleList.lrs}497 {$I FormModuleList.lrs} 503 498 504 499 end. -
trunk/Packages/ModularSystem/Language/ModularSystem.cs.po
r74 r75 10 10 "Content-Transfer-Encoding: 8bit\n" 11 11 12 #: umodularsystem.smodulenotfound 12 #: modularsystem.smodulenotfound 13 #, object-pascal-format 14 msgctxt "modularsystem.smodulenotfound" 13 15 msgid "Module \"%1:s\" not found as dependency for module \"%0:s\"" 14 msgstr " Pro modul \"%0:s\" nenalezen závislý modul \"%1:s\""16 msgstr "" 15 17 -
trunk/Packages/ModularSystem/Language/ModularSystem.pot
r74 r75 2 2 msgstr "Content-Type: text/plain; charset=UTF-8" 3 3 4 #: umodularsystem.smodulenotfound 4 #: modularsystem.smodulenotfound 5 #, object-pascal-format 6 msgctxt "modularsystem.smodulenotfound" 5 7 msgid "Module \"%1:s\" not found as dependency for module \"%0:s\"" 6 8 msgstr "" -
trunk/Packages/ModularSystem/ModularSystem.lpk
r73 r75 1 <?xml version="1.0" ?>1 <?xml version="1.0" encoding="UTF-8"?> 2 2 <CONFIG> 3 <Package Version=" 4">3 <Package Version="5"> 4 4 <PathDelim Value="\"/> 5 5 <Name Value="ModularSystem"/> 6 <Type Value="RunAndDesignTime"/> 6 7 <Author Value="Chronos (robie@centrum.cz)"/> 7 8 <CompilerOptions> … … 11 12 <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/> 12 13 </SearchPaths> 13 <Other> 14 <CompilerMessages> 15 <MsgFileName Value=""/> 16 </CompilerMessages> 17 <CompilerPath Value="$(CompPath)"/> 18 </Other> 14 <Parsing> 15 <SyntaxOptions> 16 <SyntaxMode Value="Delphi"/> 17 </SyntaxOptions> 18 </Parsing> 19 19 </CompilerOptions> 20 20 <Description Value="Modular system"/> 21 21 <License Value="GNU/LGPLv3"/> 22 22 <Version Minor="2"/> 23 <Files Count=" 2">23 <Files Count="3"> 24 24 <Item1> 25 <Filename Value=" UModularSystem.pas"/>25 <Filename Value="ModularSystem.pas"/> 26 26 <HasRegisterProc Value="True"/> 27 <UnitName Value=" UModularSystem"/>27 <UnitName Value="ModularSystem"/> 28 28 </Item1> 29 29 <Item2> 30 <Filename Value=" UFormModuleList.pas"/>31 <UnitName Value=" UFormModuleList"/>30 <Filename Value="FormModuleList.pas"/> 31 <UnitName Value="FormModuleList"/> 32 32 </Item2> 33 <Item3> 34 <Filename Value="ModularSystemPackage.pas"/> 35 <Type Value="Main Unit"/> 36 <UnitName Value="ModularSystemPackage"/> 37 </Item3> 33 38 </Files> 39 <CompatibilityMode Value="True"/> 34 40 <i18n> 35 41 <EnableI18N Value="True"/> … … 37 43 <EnableI18NForLFM Value="True"/> 38 44 </i18n> 39 <Type Value="RunAndDesignTime"/>40 45 <RequiredPkgs Count="3"> 41 46 <Item1> -
trunk/Packages/ModularSystem/ModularSystem.pas
r74 r75 1 unit UModularSystem; 2 3 {$mode Delphi}{$H+} 1 unit ModularSystem; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, URegistry, SpecializedList;6 Classes, SysUtils, RegistryEx, Generics.Collections; 9 7 10 8 type 11 9 TModuleManager = class; 12 10 TModule = class; 13 T ListModule= class;11 TModules = class; 14 12 15 13 TAPI = class(TComponent) 16 17 14 end; 18 15 … … 39 36 FLicense: string; 40 37 FAuthor: string; 41 FDependencies: T ListString;42 FDescription: T ListString;38 FDependencies: TStringList; 39 FDescription: TStringList; 43 40 FFileName: string; 44 41 FWebSite: string; … … 65 62 procedure Reinstall; 66 63 procedure Upgrade; 67 procedure EnumDependenciesCascade(ModuleList: T ListModule;64 procedure EnumDependenciesCascade(ModuleList: TModules; 68 65 Conditions: TModuleConditions = [mcAll]); 69 procedure EnumSuperiorDependenciesCascade(ModuleList: T ListModule;66 procedure EnumSuperiorDependenciesCascade(ModuleList: TModules; 70 67 Conditions: TModuleConditions = [mcAll]); 71 68 procedure SetInstalledState(Value: Boolean); … … 84 81 property License: string read FLicense write FLicense; 85 82 property Author: string read FAuthor write FAuthor; 86 property Dependencies: T ListStringread FDependencies write FDependencies;87 property Description: T ListStringread FDescription write FDescription;83 property Dependencies: TStringList read FDependencies write FDependencies; 84 property Description: TStringList read FDescription write FDescription; 88 85 property FileName: string read FFileName write FFileName; 89 86 property Category: string read FCategory write FCategory; … … 92 89 end; 93 90 94 { TListModule } 95 96 TListModule = class(TListObject) 97 private 91 { TModules } 92 93 TModules = class(TObjectList<TModule>) 98 94 public 99 95 procedure Perform(Actions: array of TModuleAction; Conditions: TModuleConditions = [mcAll]); 100 96 function FindByName(Name: string): TModule; 97 function GetNames: string; 101 98 end; 102 99 103 100 TModuleManagerOption = (moAutoInstallOnRun, moAuto); 104 101 TModuleManagerOptions = set of TModuleManagerOption; 102 105 103 { TModuleManager } 106 104 … … 114 112 procedure DoUpdate(Sender: TObject); 115 113 public 116 Modules: T ListModule; // TObjectList<TModule>114 Modules: TModules; 117 115 function ModuleRunning(Name: string): Boolean; 118 procedure EnumDependenciesCascade(Module: TModule; ModuleList: T ListModule;116 procedure EnumDependenciesCascade(Module: TModule; ModuleList: TModules; 119 117 Conditions: TModuleConditions = [mcAll]); 120 118 procedure EnumSuperiorDependenciesCascade(Module: TModule; 121 ModuleList: T ListModule; Conditions: TModuleConditions = [mcAll]);119 ModuleList: TModules; Conditions: TModuleConditions = [mcAll]); 122 120 procedure RegisterModule(Module: TModule); 123 121 procedure UnregisterModule(Module: TModule); … … 145 143 end; 146 144 147 { T ListModule}148 149 procedure T ListModule.Perform(Actions: array of TModuleAction;145 { TModules } 146 147 procedure TModules.Perform(Actions: array of TModuleAction; 150 148 Conditions: TModuleConditions = [mcAll]); 151 149 var … … 153 151 A: Integer; 154 152 begin 155 try156 BeginUpdate;157 153 for I := 0 to Count - 1 do 158 154 with TModule(Items[I]) do … … 173 169 if Actions[A] = maDisable then Disable; 174 170 end; 175 finally 176 EndUpdate; 177 end; 178 end; 179 180 function TListModule.FindByName(Name: string): TModule; 171 end; 172 173 function TModules.FindByName(Name: string): TModule; 181 174 var 182 175 I: Integer; … … 188 181 end; 189 182 183 function TModules.GetNames: string; 184 var 185 I: Integer; 186 begin 187 Result := ''; 188 for I := 0 to Count - 1 do 189 Result := Result + ', ' + Items[I].Identification; 190 Result := Copy(Result, 3, MaxInt); 191 end; 192 190 193 { TModuleManager } 191 194 … … 216 219 217 220 procedure TModuleManager.EnumDependenciesCascade(Module: TModule; 218 ModuleList: T ListModule; Conditions: TModuleConditions = [mcAll]);221 ModuleList: TModules; Conditions: TModuleConditions = [mcAll]); 219 222 var 220 223 DepModule: TModule; 224 DepModuleName: string; 221 225 I: Integer; 222 226 begin 223 227 for I := 0 to Module.Dependencies.Count - 1 do begin 224 DepModule := Modules.FindByName(Module.Dependencies[I]); 228 DepModuleName := Module.Dependencies[I]; 229 DepModule := Modules.FindByName(DepModuleName); 225 230 if Assigned(DepModule) then 226 231 with DepModule do begin … … 236 241 Self.EnumDependenciesCascade(DepModule, ModuleList); 237 242 end; 238 end else raise Exception.CreateFmt(SModuleNotFound, [ DepModule.Identification]);243 end else raise Exception.CreateFmt(SModuleNotFound, [Module.Dependencies[I], Module.Identification]); 239 244 end; 240 245 end; 241 246 242 247 procedure TModuleManager.EnumSuperiorDependenciesCascade(Module: TModule; 243 ModuleList: T ListModule; Conditions: TModuleConditions = [mcAll]);248 ModuleList: TModules; Conditions: TModuleConditions = [mcAll]); 244 249 var 245 250 I: Integer; … … 267 272 Module.FManager := Self; 268 273 Module.API := API; 269 Modules.Update;274 //Modules.Update; 270 275 end; 271 276 … … 273 278 begin 274 279 Modules.Remove(Module); 275 Modules.Update;280 //Modules.Update; 276 281 end; 277 282 … … 279 284 begin 280 285 inherited; 281 Modules := T ListModule.Create;286 Modules := TModules.Create; 282 287 Modules.OwnsObjects := False; 283 Modules.OnUpdate := DoUpdate;288 //Modules.OnUpdate := DoUpdate; 284 289 end; 285 290 … … 362 367 procedure TModule.Enable; 363 368 var 364 List: T ListModule;369 List: TModules; 365 370 begin 366 371 if Enabled then Exit; 367 372 FEnabled := True; 368 373 try 369 List := T ListModule.Create;374 List := TModules.Create; 370 375 List.OwnsObjects := False; 371 376 EnumDependenciesCascade(List, [mcNotEnabled]); … … 380 385 procedure TModule.Disable; 381 386 var 382 List: T ListModule;387 List: TModules; 383 388 begin 384 389 if not Enabled then Exit; … … 386 391 FEnabled := False; 387 392 try 388 List := T ListModule.Create;393 List := TModules.Create; 389 394 List.OwnsObjects := False; 390 395 EnumSuperiorDependenciesCascade(List, [mcEnabled]); … … 393 398 List.Free; 394 399 end; 395 Manager.Modules.Update;400 //Manager.Modules.Update; 396 401 end; 397 402 … … 418 423 procedure TModule.Start; 419 424 var 420 List: T ListModule;425 List: TModules; 421 426 StartTime: TDateTime; 422 427 begin … … 424 429 if not Installed then Install; // Auto install not installed modules 425 430 try 426 List := T ListModule.Create;431 List := TModules.Create; 427 432 List.OwnsObjects := False; 428 433 EnumDependenciesCascade(List, [mcNotRunning]); … … 435 440 FStartUpTime := Now - StartTime; 436 441 FRunning := True; 437 Manager.Modules.Update;442 //Manager.Modules.Update; 438 443 end; 439 444 440 445 procedure TModule.Stop; 441 446 var 442 List: T ListModule;447 List: TModules; 443 448 begin 444 449 if not Running then Exit; 445 450 FRunning := False; 446 451 try 447 List := T ListModule.Create;452 List := TModules.Create; 448 453 List.OwnsObjects := False; 449 454 EnumSuperiorDependenciesCascade(List, [mcRunning]); … … 453 458 end; 454 459 DoStop; 455 Manager.Modules.Update;460 //Manager.Modules.Update; 456 461 end; 457 462 … … 464 469 procedure TModule.Install; 465 470 var 466 List: T ListModule;471 List: TModules; 467 472 begin 468 473 if Installed then Exit; 469 474 try 470 List := T ListModule.Create;475 List := TModules.Create; 471 476 List.OwnsObjects := False; 472 477 EnumDependenciesCascade(List, [mcNotInstalled]); … … 478 483 DoInstall; 479 484 //Enable; // Auto enable installed module 480 Manager.Modules.Update;485 //Manager.Modules.Update; 481 486 end; 482 487 483 488 procedure TModule.Uninstall; 484 489 var 485 List: T ListModule;490 List: TModules; 486 491 begin 487 492 if not Installed then Exit; 488 493 if Enabled then Disable; // Auto disable uninstalled module 489 494 try 490 List := T ListModule.Create;495 List := TModules.Create; 491 496 List.OwnsObjects := False; 492 497 EnumSuperiorDependenciesCascade(List, [mcInstalled]); … … 497 502 FInstalled := False; 498 503 DoUninstall; 499 Manager.Modules.Update;504 //Manager.Modules.Update; 500 505 end; 501 506 … … 515 520 Start; 516 521 end else DoUpgrade; 517 Manager.Modules.Update;518 end; 519 520 procedure TModule.EnumDependenciesCascade(ModuleList: T ListModule;522 //Manager.Modules.Update; 523 end; 524 525 procedure TModule.EnumDependenciesCascade(ModuleList: TModules; 521 526 Conditions: TModuleConditions = [mcAll]); 522 527 begin … … 525 530 end; 526 531 527 procedure TModule.EnumSuperiorDependenciesCascade(ModuleList: T ListModule;532 procedure TModule.EnumSuperiorDependenciesCascade(ModuleList: TModules; 528 533 Conditions: TModuleConditions = [mcAll]); 529 534 begin … … 535 540 begin 536 541 FInstalled := Value; 537 Manager.Modules.Update;542 //Manager.Modules.Update; 538 543 end; 539 544 … … 541 546 begin 542 547 inherited; 543 Dependencies := T ListString.Create;544 Description := T ListString.Create;548 Dependencies := TStringList.Create; 549 Description := TStringList.Create; 545 550 end; 546 551 -
trunk/Packages/ModularSystem/ModularSystemPackage.pas
r74 r75 3 3 } 4 4 5 unit ModularSystem ;5 unit ModularSystemPackage; 6 6 7 {$warn 5023 off : no warning about unused units} 7 8 interface 8 9 9 10 uses 10 UModularSystem, UFormModuleList, LazarusPackageIntf;11 ModularSystem, FormModuleList, LazarusPackageIntf; 11 12 12 13 implementation … … 14 15 procedure Register; 15 16 begin 16 RegisterUnit(' UModularSystem', @UModularSystem.Register);17 RegisterUnit('ModularSystem', @ModularSystem.Register); 17 18 end; 18 19
Note:
See TracChangeset
for help on using the changeset viewer.