📄 unitfeatureconfig.~pas
字号:
unit UnitFeatureConfig;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, MapXContainer, Global;
type
TForm_FeatureConfig = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Edit1: TEdit;
ComboBox1: TComboBox;
Button1: TButton;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
FBFt: TBusinessFeature;
FFcItem: TFeatureClass;
FIsOk: Boolean;
FMode: TConfigMode;
{ Private declarations }
public
{ Public declarations }
property FcItem:TFeatureClass read FFcItem write FFcItem;
property BFt:TBusinessFeature read FBFt write FBFt;
property Mode:TConfigMode read FMode write FMode;
property IsOk:Boolean read FIsOk;
end;
var
Form_FeatureConfig: TForm_FeatureConfig;
function AddFeatueItem(aFcItem:TFeatureClass):TBusinessFeature;
function ModifyFeatureItem(aBFt:TBusinessFeature):Boolean;
implementation
uses
MapXBase;
{$R *.dfm}
function AddFeatueItem(aFcItem:TFeatureClass):TBusinessFeature;
begin
with TForm_FeatureConfig.Create(nil) do
begin
try
FcItem:=aFcItem;
ShowModal;
Result:=BFt;
finally
Free;
end;
end;
end;
function ModifyFeatureItem(aBFt:TBusinessFeature):Boolean;
begin
with TForm_FeatureConfig.Create(nil) do
begin
try
BFt:=aBFt;
ShowModal;
Result:=IsOk;
finally
Free;
end;
end;
end;
procedure TForm_FeatureConfig.Button1Click(Sender: TObject);
begin
if Mode=cmAdd then
BFt:=FcItem.FeatureList.Add;
BFt.FeatureName:=Edit1.Text;
BFt.FeatureType:=TShapeType(ComboBox1.ItemIndex+1);
// BFt.StyleId:=GMapTools.m_Map.UserStyles
FIsOk:=True;
Close;
end;
procedure TForm_FeatureConfig.FormShow(Sender: TObject);
begin
FIsOk:=False;
end;
procedure TForm_FeatureConfig.Button2Click(Sender: TObject);
begin
Close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -