IDE: A new dialog for manifest options. Issue #30977, patch from AlexeyT.

git-svn-id: trunk@53418 -
This commit is contained in:
juha 2016-11-22 15:59:00 +00:00
parent 1780042136
commit a2d289acd6
6 changed files with 289 additions and 152 deletions

2
.gitattributes vendored
View File

@ -6280,6 +6280,8 @@ ide/mainbase.pas svneol=native#text/pascal
ide/mainintf.pas svneol=native#text/pascal ide/mainintf.pas svneol=native#text/pascal
ide/makeresstrdlg.lfm svneol=native#text/plain ide/makeresstrdlg.lfm svneol=native#text/plain
ide/makeresstrdlg.pas svneol=native#text/pascal ide/makeresstrdlg.pas svneol=native#text/pascal
ide/manifestdialog.lfm svneol=native#text/plain
ide/manifestdialog.pas svneol=native#text/pascal
ide/miscoptions.pas svneol=native#text/pascal ide/miscoptions.pas svneol=native#text/pascal
ide/modematrixopts.pas svneol=native#text/plain ide/modematrixopts.pas svneol=native#text/plain
ide/mouseactiondialog.lfm svneol=native#text/plain ide/mouseactiondialog.lfm svneol=native#text/plain

View File

@ -1,21 +1,21 @@
object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
Left = 0 Left = 0
Height = 550 Height = 462
Top = 0 Top = 0
Width = 487 Width = 487
ClientHeight = 550 ClientHeight = 462
ClientWidth = 487 ClientWidth = 487
TabOrder = 0 TabOrder = 0
DesignLeft = 392 DesignLeft = 392
DesignTop = 251 DesignTop = 251
object AppSettingsGroupBox: TGroupBox object AppSettingsGroupBox: TGroupBox
Left = 0 Left = 0
Height = 501 Height = 413
Top = 0 Top = 0
Width = 487 Width = 487
Align = alTop Align = alTop
Caption = 'AppSettingsGroupBox' Caption = 'AppSettingsGroupBox'
ClientHeight = 482 ClientHeight = 394
ClientWidth = 483 ClientWidth = 483
TabOrder = 0 TabOrder = 0
object TitleLabel: TLabel object TitleLabel: TLabel
@ -73,12 +73,12 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 24 Height = 24
Top = 413 Top = 321
Width = 191 Width = 191
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 3 BorderSpacing.Top = 3
Caption = 'UseAppBundleCheckBox' Caption = 'UseAppBundleCheckBox'
TabOrder = 12 TabOrder = 9
end end
object UseXPManifestCheckBox: TCheckBox object UseXPManifestCheckBox: TCheckBox
AnchorSideLeft.Control = AppSettingsGroupBox AnchorSideLeft.Control = AppSettingsGroupBox
@ -192,43 +192,6 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
TabOrder = 2 TabOrder = 2
end end
object UIAccessCheckBox: TCheckBox
AnchorSideTop.Control = ExecutionLevelComboBox
AnchorSideTop.Side = asrBottom
Left = 27
Height = 24
Top = 331
Width = 152
BorderSpacing.Top = 3
Caption = 'UIAccessCheckBox'
TabOrder = 10
end
object ExecutionLevelComboBox: TComboBox
AnchorSideLeft.Control = DpiAwareComboBox
AnchorSideTop.Control = DpiAwareComboBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DpiAwareComboBox
AnchorSideRight.Side = asrBottom
Left = 195
Height = 31
Top = 297
Width = 282
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
ItemHeight = 0
Style = csDropDownList
TabOrder = 9
end
object ExecutionLevelLabel: TLabel
AnchorSideTop.Control = ExecutionLevelComboBox
AnchorSideTop.Side = asrCenter
Left = 27
Height = 17
Top = 304
Width = 138
Caption = 'ExecutionLevelLabel'
ParentColor = False
end
object DefaultIconButton: TButton object DefaultIconButton: TButton
AnchorSideLeft.Control = LoadIconButton AnchorSideLeft.Control = LoadIconButton
AnchorSideTop.Control = LoadIconButton AnchorSideTop.Control = LoadIconButton
@ -260,11 +223,11 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
ParentFont = False ParentFont = False
end end
object DarwinDividerBevel: TDividerBevel object DarwinDividerBevel: TDividerBevel
AnchorSideTop.Control = TextFieldButton AnchorSideTop.Control = ManifestButton
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 17 Height = 17
Top = 393 Top = 301
Width = 471 Width = 471
Caption = 'For Darwin' Caption = 'For Darwin'
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
@ -278,59 +241,29 @@ object ProjectApplicationOptionsFrame: TProjectApplicationOptionsFrame
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 27 Left = 27
Height = 29 Height = 29
Top = 443 Top = 351
Width = 177 Width = 177
AutoSize = True AutoSize = True
BorderSpacing.Left = 21 BorderSpacing.Left = 21
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'CreateAppBundleButton' Caption = 'CreateAppBundleButton'
OnClick = CreateAppBundleButtonClick OnClick = CreateAppBundleButtonClick
TabOrder = 13 TabOrder = 10
end end
object DpiAwareLabel: TLabel object ManifestButton: TButton
AnchorSideLeft.Control = UseXPManifestCheckBox AnchorSideLeft.Control = UseXPManifestCheckBox
AnchorSideTop.Control = DpiAwareComboBox
AnchorSideTop.Side = asrCenter
Left = 27
Height = 17
Top = 270
Width = 103
BorderSpacing.Left = 21
BorderSpacing.Top = 3
Caption = 'DpiAwareLabel'
ParentColor = False
end
object DpiAwareComboBox: TComboBox
AnchorSideLeft.Control = ExecutionLevelLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = UseXPManifestCheckBox AnchorSideTop.Control = UseXPManifestCheckBox
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = TitleEdit
AnchorSideRight.Side = asrBottom
Left = 195
Height = 31
Top = 263
Width = 282
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 30
BorderSpacing.Top = 3
ItemHeight = 0
Style = csDropDownList
TabOrder = 8
end
object TextFieldButton: TButton
AnchorSideLeft.Control = UIAccessCheckBox
AnchorSideTop.Control = UIAccessCheckBox
AnchorSideTop.Side = asrBottom
Left = 27 Left = 27
Height = 29 Height = 29
Top = 358 Top = 266
Width = 120 Width = 118
AutoSize = True AutoSize = True
BorderSpacing.Top = 3 BorderSpacing.Left = 21
Caption = 'TextFieldButton' BorderSpacing.Top = 6
OnClick = TextFieldButtonClick Caption = 'ManifestButton'
TabOrder = 11 OnClick = ManifestButtonClick
TabOrder = 8
end end
end end
object OpenPictureDialog1: TOpenPictureDialog object OpenPictureDialog1: TOpenPictureDialog

View File

@ -8,7 +8,8 @@ uses
Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs, Classes, SysUtils, LCLProc, FileUtil, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, Buttons, ComCtrls, ExtDlgs, Math, LCLType, IDEOptionsIntf, ExtCtrls, StdCtrls, Buttons, ComCtrls, ExtDlgs, Math, LCLType, IDEOptionsIntf,
LazIDEIntf, IDEDialogs, DividerBevel, Project, LazarusIDEStrConsts, LazIDEIntf, IDEDialogs, DividerBevel, Project, LazarusIDEStrConsts,
EnvironmentOpts, ApplicationBundle, ProjectIcon, W32Manifest, CompilerOptions; EnvironmentOpts, ApplicationBundle, ProjectIcon, W32Manifest, CompilerOptions,
ManifestDialog;
type type
@ -16,22 +17,17 @@ type
TProjectApplicationOptionsFrame = class(TAbstractIDEOptionsEditor) TProjectApplicationOptionsFrame = class(TAbstractIDEOptionsEditor)
AppSettingsGroupBox: TGroupBox; AppSettingsGroupBox: TGroupBox;
TextFieldButton: TButton; ManifestButton: TButton;
CreateAppBundleButton: TBitBtn; CreateAppBundleButton: TBitBtn;
DefaultIconButton: TButton; DefaultIconButton: TButton;
DpiAwareLabel: TLabel;
DpiAwareComboBox: TComboBox;
WindowsDividerBevel: TDividerBevel; WindowsDividerBevel: TDividerBevel;
DarwinDividerBevel: TDividerBevel; DarwinDividerBevel: TDividerBevel;
UIAccessCheckBox: TCheckBox;
ExecutionLevelComboBox: TComboBox;
ClearIconButton: TBitBtn; ClearIconButton: TBitBtn;
IconImage: TImage; IconImage: TImage;
IconLabel: TLabel; IconLabel: TLabel;
IconPanel: TPanel; IconPanel: TPanel;
IconTrack: TTrackBar; IconTrack: TTrackBar;
IconTrackLabel: TLabel; IconTrackLabel: TLabel;
ExecutionLevelLabel: TLabel;
LoadIconButton: TBitBtn; LoadIconButton: TBitBtn;
OpenPictureDialog1: TOpenPictureDialog; OpenPictureDialog1: TOpenPictureDialog;
SaveIconButton: TBitBtn; SaveIconButton: TBitBtn;
@ -46,8 +42,8 @@ type
procedure IconImagePictureChanged(Sender: TObject); procedure IconImagePictureChanged(Sender: TObject);
procedure IconTrackChange(Sender: TObject); procedure IconTrackChange(Sender: TObject);
procedure LoadIconButtonClick(Sender: TObject); procedure LoadIconButtonClick(Sender: TObject);
procedure ManifestButtonClick(Sender: TObject);
procedure SaveIconButtonClick(Sender: TObject); procedure SaveIconButtonClick(Sender: TObject);
procedure TextFieldButtonClick(Sender: TObject);
procedure UseXPManifestCheckBoxChange(Sender: TObject); procedure UseXPManifestCheckBoxChange(Sender: TObject);
private private
FProject: TProject; FProject: TProject;
@ -66,13 +62,6 @@ implementation
{$R *.lfm} {$R *.lfm}
const
ExecutionLevelToCaption: array[TXPManifestExecutionLevel] of PString = (
{ xmelAsInvoker } @dlgPOAsInvoker,
{ xmelHighestAvailable } @dlgPOHighestAvailable,
{ xmelRequireAdministrator } @dlgPORequireAdministrator
);
function CreateProjectApplicationBundle(AProject: TProject): string; function CreateProjectApplicationBundle(AProject: TProject): string;
// returns target file name // returns target file name
var var
@ -167,36 +156,41 @@ begin
end; end;
end; end;
procedure TProjectApplicationOptionsFrame.ManifestButtonClick(Sender: TObject);
var
Man: TProjectXPManifest;
Form: TManifestForm;
begin
Man:= FProject.ProjResources.XPManifest;
Form:= TManifestForm.Create(Self);
try
Form.DpiAwareComboBox.ItemIndex := Ord(Man.DpiAware);
Form.ExecutionLevelComboBox.ItemIndex := Ord(Man.ExecutionLevel);
Form.UIAccessCheckBox.Checked := Man.UIAccess;
Form.NameEdit.Text := Man.TextName;
Form.DescEdit.Text := Man.TextDesc;
if Form.ShowModal=mrOk then
begin
Man.DpiAware := TXPManifestDpiAware(Form.DpiAwareComboBox.ItemIndex);
Man.ExecutionLevel := TXPManifestExecutionLevel(Form.ExecutionLevelComboBox.ItemIndex);
Man.UIAccess := Form.UIAccessCheckBox.Checked;
Man.TextName := Form.NameEdit.Text;
Man.TextDesc := Form.DescEdit.Text;
end;
finally
Form.Free;
end;
end;
procedure TProjectApplicationOptionsFrame.SaveIconButtonClick(Sender: TObject); procedure TProjectApplicationOptionsFrame.SaveIconButtonClick(Sender: TObject);
begin begin
if SavePictureDialog1.Execute then if SavePictureDialog1.Execute then
IconImage.Picture.SaveToFile(SavePictureDialog1.FileName); IconImage.Picture.SaveToFile(SavePictureDialog1.FileName);
end; end;
procedure TProjectApplicationOptionsFrame.TextFieldButtonClick(Sender: TObject);
var
Caps, Values: array[0..1] of string;
begin
Caps[0] := lisName;
Caps[1] := lisCodeHelpDescrTag;
Values[0] := FProject.ProjResources.XPManifest.TextName;
Values[1] := FProject.ProjResources.XPManifest.TextDesc;
if InputQuery(TextFieldButton.Caption, Caps, Values) then
begin
FProject.ProjResources.XPManifest.TextName := Values[0];
FProject.ProjResources.XPManifest.TextDesc := Values[1];
end;
end;
procedure TProjectApplicationOptionsFrame.UseXPManifestCheckBoxChange(Sender: TObject); procedure TProjectApplicationOptionsFrame.UseXPManifestCheckBoxChange(Sender: TObject);
begin begin
DpiAwareLabel.Enabled := UseXPManifestCheckBox.Checked; ManifestButton.Enabled := UseXPManifestCheckBox.Checked;
DpiAwareComboBox.Enabled := UseXPManifestCheckBox.Checked;
ExecutionLevelLabel.Enabled := UseXPManifestCheckBox.Checked;
ExecutionLevelComboBox.Enabled := UseXPManifestCheckBox.Checked;
UIAccessCheckBox.Enabled := UseXPManifestCheckBox.Checked;
TextFieldButton.Enabled := UseXPManifestCheckBox.Checked;
end; end;
procedure TProjectApplicationOptionsFrame.SetIconFromStream(Value: TStream); procedure TProjectApplicationOptionsFrame.SetIconFromStream(Value: TStream);
@ -228,10 +222,6 @@ begin
end; end;
procedure TProjectApplicationOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog); procedure TProjectApplicationOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog);
var
ExecutionLevel: TXPManifestExecutionLevel;
DpiLevel: TXPManifestDpiAware;
DpiLevelNames: array[TXPManifestDpiAware] of string;
begin begin
AppSettingsGroupBox.Caption := dlgApplicationSettings; AppSettingsGroupBox.Caption := dlgApplicationSettings;
TitleLabel.Caption := dlgPOTitle; TitleLabel.Caption := dlgPOTitle;
@ -242,20 +232,8 @@ begin
// Windows specific, Manifest // Windows specific, Manifest
WindowsDividerBevel.Caption := lisForWindows; WindowsDividerBevel.Caption := lisForWindows;
UseXPManifestCheckBox.Caption := dlgPOUseManifest; UseXPManifestCheckBox.Caption := dlgPOUseManifest;
ManifestButton.Caption := dlgPOManifestOptions;
DpiAwareLabel.Caption := dlgPODpiAwareness; UseXPManifestCheckBoxChange(nil);
DpiLevelNames[xmdaFalse] := dlgPODpiAwarenessOff;
DpiLevelNames[xmdaTrue] := dlgPODpiAwarenessOn;
DpiLevelNames[xmdaPerMonitor] := dlgPODpiAwarenessOldOffNewPerMonitor;
DpiLevelNames[xmdaTruePM] := dlgPODpiAwarenessOldOnNewPerMonitor;
ExecutionLevelLabel.Caption := dlgPOExecutionLevel;
for ExecutionLevel in TXPManifestExecutionLevel do
ExecutionLevelComboBox.Items.Add(ExecutionLevelToCaption[ExecutionLevel]^);
for DpiLevel in TXPManifestDpiAware do
DpiAwareComboBox.Items.Add(DpiLevelNames[DpiLevel] + ' (' + ManifestDpiAwareValues[DpiLevel] + ')');
UIAccessCheckBox.Caption := dlgPOUIAccess;
TextFieldButton.Caption := dlgPOTextFields;
// Darwin specific, Application Bundle // Darwin specific, Application Bundle
DarwinDividerBevel.Caption := lisForDarwin; DarwinDividerBevel.Caption := lisForDarwin;
@ -292,16 +270,7 @@ begin
with ProjResources.XPManifest do with ProjResources.XPManifest do
begin begin
UseXPManifestCheckBox.Checked := UseManifest; UseXPManifestCheckBox.Checked := UseManifest;
DpiAwareComboBox.ItemIndex := Ord(DpiAware);
ExecutionLevelComboBox.ItemIndex := Ord(ExecutionLevel);
UIAccessCheckBox.Checked := UIAccess;
end; end;
DpiAwareLabel.Enabled := UseXPManifestCheckBox.Checked;
DpiAwareComboBox.Enabled := UseXPManifestCheckBox.Checked;
ExecutionLevelLabel.Enabled := UseXPManifestCheckBox.Checked;
ExecutionLevelComboBox.Enabled := UseXPManifestCheckBox.Checked;
UIAccessCheckBox.Enabled := UseXPManifestCheckBox.Checked;
TextFieldButton.Enabled := UseXPManifestCheckBox.Checked;
AStream := TProjectIcon(ProjResources[TProjectIcon]).GetStream; AStream := TProjectIcon(ProjResources[TProjectIcon]).GetStream;
try try
SetIconFromStream(AStream); SetIconFromStream(AStream);
@ -332,9 +301,6 @@ begin
with ProjResources.XPManifest do with ProjResources.XPManifest do
begin begin
UseManifest := UseXPManifestCheckBox.Checked; UseManifest := UseXPManifestCheckBox.Checked;
DpiAware := TXPManifestDpiAware(DpiAwareComboBox.ItemIndex);
ExecutionLevel := TXPManifestExecutionLevel(ExecutionLevelComboBox.ItemIndex);
UIAccess := UIAccessCheckBox.Checked;
end; end;
end; end;
end; end;

View File

@ -2548,6 +2548,7 @@ resourcestring
dlgPOUseAppBundle = 'Use Application Bundle for running and debugging'; dlgPOUseAppBundle = 'Use Application Bundle for running and debugging';
dlgPOCreateAppBundle = 'Create Application Bundle'; dlgPOCreateAppBundle = 'Create Application Bundle';
dlgPOUseManifest = 'Use manifest resource (and enable themes)'; dlgPOUseManifest = 'Use manifest resource (and enable themes)';
dlgPOManifestOptions = 'Manifest options';
dlgPODpiAwareness = 'DPI awareness'; dlgPODpiAwareness = 'DPI awareness';
dlgPODpiAwarenessOff = 'off'; dlgPODpiAwarenessOff = 'off';
dlgPODpiAwarenessOn = 'on'; dlgPODpiAwarenessOn = 'on';

149
ide/manifestdialog.lfm Normal file
View File

@ -0,0 +1,149 @@
object ManifestForm: TManifestForm
Left = 554
Height = 212
Top = 512
Width = 568
BorderIcons = [biSystemMenu]
BorderStyle = bsDialog
Caption = 'Manifest'
ClientHeight = 212
ClientWidth = 568
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '1.7'
object DpiAwareLabel: TLabel
AnchorSideTop.Control = DpiAwareComboBox
AnchorSideTop.Side = asrCenter
Left = 8
Height = 17
Top = 15
Width = 103
BorderSpacing.Left = 21
BorderSpacing.Top = 3
Caption = 'DpiAwareLabel'
ParentColor = False
end
object DpiAwareComboBox: TComboBox
AnchorSideLeft.Control = ExecutionLevelLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Side = asrBottom
AnchorSideRight.Side = asrBottom
Left = 176
Height = 31
Top = 8
Width = 381
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 30
BorderSpacing.Top = 3
ItemHeight = 0
Style = csDropDownList
TabOrder = 0
end
object ExecutionLevelLabel: TLabel
AnchorSideTop.Control = ExecutionLevelComboBox
AnchorSideTop.Side = asrCenter
Left = 8
Height = 17
Top = 49
Width = 138
Caption = 'ExecutionLevelLabel'
ParentColor = False
end
object ExecutionLevelComboBox: TComboBox
AnchorSideLeft.Control = DpiAwareComboBox
AnchorSideTop.Control = DpiAwareComboBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DpiAwareComboBox
AnchorSideRight.Side = asrBottom
Left = 176
Height = 31
Top = 42
Width = 381
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
ItemHeight = 0
Style = csDropDownList
TabOrder = 1
end
object UIAccessCheckBox: TCheckBox
AnchorSideTop.Control = ExecutionLevelComboBox
AnchorSideTop.Side = asrBottom
Left = 8
Height = 24
Top = 76
Width = 152
BorderSpacing.Top = 3
Caption = 'UIAccessCheckBox'
TabOrder = 2
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 29
Top = 177
Width = 556
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
HelpButton.OnClick = HelpButtonClick
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 5
ShowButtons = [pbOK, pbCancel, pbHelp]
ShowBevel = False
end
object NameLabel: TLabel
AnchorSideLeft.Control = DpiAwareLabel
AnchorSideTop.Control = NameEdit
AnchorSideTop.Side = asrCenter
Left = 8
Height = 17
Top = 108
Width = 77
BorderSpacing.Top = 3
Caption = 'NameLabel'
ParentColor = False
end
object NameEdit: TEdit
AnchorSideLeft.Control = DpiAwareComboBox
AnchorSideTop.Control = UIAccessCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = DpiAwareComboBox
AnchorSideRight.Side = asrBottom
Left = 176
Height = 27
Top = 103
Width = 381
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
TabOrder = 3
end
object DescLabel: TLabel
AnchorSideLeft.Control = DpiAwareLabel
AnchorSideTop.Control = DescEdit
AnchorSideTop.Side = asrCenter
Left = 8
Height = 17
Top = 138
Width = 69
BorderSpacing.Top = 3
Caption = 'DescLabel'
ParentColor = False
end
object DescEdit: TEdit
AnchorSideLeft.Control = NameEdit
AnchorSideTop.Control = NameEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = NameEdit
AnchorSideRight.Side = asrBottom
Left = 176
Height = 27
Top = 133
Width = 381
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
TabOrder = 4
end
end

86
ide/manifestdialog.pas Normal file
View File

@ -0,0 +1,86 @@
unit ManifestDialog;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
ButtonPanel, LazarusIDEStrConsts, W32Manifest, LCLIntf;
type
{ TManifestForm }
TManifestForm = class(TForm)
ButtonPanel1: TButtonPanel;
DpiAwareComboBox: TComboBox;
DpiAwareLabel: TLabel;
DescEdit: TEdit;
DescLabel: TLabel;
NameEdit: TEdit;
ExecutionLevelComboBox: TComboBox;
ExecutionLevelLabel: TLabel;
NameLabel: TLabel;
UIAccessCheckBox: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure HelpButtonClick(Sender: TObject);
private
public
end;
var
ManifestForm: TManifestForm;
implementation
{$R *.lfm}
{ TManifestForm }
procedure TManifestForm.FormCreate(Sender: TObject);
var
DpiLevel: TXPManifestDpiAware;
DpiLevelNames: array[TXPManifestDpiAware] of string;
ExecLevel: TXPManifestExecutionLevel;
ExecLevelNames: array[TXPManifestExecutionLevel] of string;
begin
Caption := dlgPOManifestOptions;
DpiLevelNames[xmdaFalse] := dlgPODpiAwarenessOff;
DpiLevelNames[xmdaTrue] := dlgPODpiAwarenessOn;
DpiLevelNames[xmdaPerMonitor] := dlgPODpiAwarenessOldOffNewPerMonitor;
DpiLevelNames[xmdaTruePM] := dlgPODpiAwarenessOldOnNewPerMonitor;
ExecLevelNames[xmelAsInvoker] := dlgPOAsInvoker;
ExecLevelNames[xmelHighestAvailable] := dlgPOHighestAvailable;
ExecLevelNames[xmelRequireAdministrator] := dlgPORequireAdministrator;
DpiAwareLabel.Caption := dlgPODpiAwareness;
ExecutionLevelLabel.Caption := dlgPOExecutionLevel;
UIAccessCheckBox.Caption := dlgPOUIAccess;
NameLabel.Caption := lisName;
DescLabel.Caption := lisCodeHelpDescrTag;
ExecutionLevelComboBox.Items.Clear;
for ExecLevel in TXPManifestExecutionLevel do
ExecutionLevelComboBox.Items.Add(ExecLevelNames[ExecLevel]);
DpiAwareComboBox.Items.Clear;
for DpiLevel in TXPManifestDpiAware do
DpiAwareComboBox.Items.Add(DpiLevelNames[DpiLevel] + ' (' + ManifestDpiAwareValues[DpiLevel] + ')');
ButtonPanel1.OKButton.Caption := lisOk;
ButtonPanel1.CancelButton.Caption := lisCancel;
ButtonPanel1.HelpButton.Caption := lisHelp;
end;
procedure TManifestForm.HelpButtonClick(Sender: TObject);
begin
OpenURL('http://wiki.lazarus.freepascal.org/IDE_Window:__Project_Options');
end;
end.