-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathWvN.GitLens.Options.pas
86 lines (71 loc) · 1.78 KB
/
WvN.GitLens.Options.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
unit WvN.GitLens.Options;
interface
uses
Vcl.Forms,
ToolsAPI,
WvN.GitLens.Options.Frame,
WvN.GitLens.Theme,
System.SysUtils,
System.UITypes;
type
TWvNGitLensAddInOptions = class(TInterfacedObject, INTAAddInOptions)
private
FFrame: TOptionsFrame;
public
OnPaint:TProc;
procedure DialogClosed(Accepted: Boolean);
procedure FrameCreated(AFrame: TCustomFrame);
function GetArea: string;
function GetCaption: string;
function GetFrameClass: TCustomFrameClass;
function GetHelpContext: Integer;
function ValidateContents: Boolean;
function IncludeInIDEInsight: Boolean;
end;
implementation
{ TWvNGitLensAddInOptions }
uses
System.IniFiles, System.Rtti;
procedure TWvNGitLensAddInOptions.DialogClosed(Accepted: Boolean);
begin
if Accepted then
begin
WvNGitLensTheme := FFrame.Theme;
WvNGitLensTheme.SaveToFile;
OnPaint;
end;
end;
procedure TWvNGitLensAddInOptions.FrameCreated(AFrame: TCustomFrame);
begin
FFrame := TOptionsFrame(AFrame);
WvNGitLensTheme.LoadFromFile;
FFrame.Theme := WvNGitLensTheme;
// FFrame.cbTextColor.Selected := WvNGitLensTheme.TextColor;
// FFrame.cbBackgroundColor.Selected := WvNGitLensTheme.BackgroundColor;
// FFrame.UpdatePreview(;
end;
function TWvNGitLensAddInOptions.GetArea: string;
begin
Result := 'Debugger Options';
end;
function TWvNGitLensAddInOptions.GetCaption: string;
begin
Result := 'WvNGitLens';
end;
function TWvNGitLensAddInOptions.GetFrameClass: TCustomFrameClass;
begin
Result := TOptionsFrame;
end;
function TWvNGitLensAddInOptions.GetHelpContext: Integer;
begin
Result := 0;
end;
function TWvNGitLensAddInOptions.IncludeInIDEInsight: Boolean;
begin
Result := True;
end;
function TWvNGitLensAddInOptions.ValidateContents: Boolean;
begin
Result := True;
end;
end.