📄 thmpiedlg.~pas
字号:
unit ThmPieDlg;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons{,MapXLib_TLB};
type
TThmPieFrm = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Edit2: TEdit;
CheckBox1: TCheckBox;
GroupBox1: TGroupBox;
Label3: TLabel;
Button2: TButton;
Button3: TButton;
ComboBox1: TComboBox;
ColorDialog1: TColorDialog;
BitBtn1: TBitBtn;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
ColorArr: Array of TColor;
//SArr: Array of CMapxStyle;
procedure FormShow(MaxV,MaxR: double; Related: Boolean; CArr: Array of TColor; Count: integer);
end;
var
ThmPieFrm: TThmPieFrm;
implementation
{$R *.dfm}
procedure TThmPieFrm.FormShow(MaxV,MaxR: double; Related: Boolean; CArr: Array of TColor; Count: integer);
var
i: integer;
begin
ThmPiefm:= TThmPiefm.Create(nil);
with ThmPiefm do
begin
Edit1.Text:= FloatToStr(MaxV);
Edit2.Text:= FloatToStr(MaxR);
CheckBox1.Checked:= Related;
ComboBox1.Clear;
SetLength(ColorArr,Count);
for i:= 1 to Count do
begin
ComboBox1.Items.Add(inttostr(i));
ColorArr[i-1]:= CArr[i-1];
end;
ShowModal;
end;
end;
procedure TThmPieFrm.BitBtn1Click(Sender: TObject);
begin
if ComboBox1.Text <> '' then
begin
if Self.ColorDialog1.Execute then
ColorArr[ComboBox1.ItemIndex]:= ColorDialog1.Color;
BitBtn1.Font.Color:= ColorDialog1.Color;
end;
end;
procedure TThmPieFrm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action:=Cafree;
self:= nil;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -