📄 d_lmddbdiagram2.pas
字号:
unit d_LMDDBDiagram2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, LmdDsgDiagramDb, ExtCtrls;
type
TdlgLinkProps = class(TForm)
Button1: TButton;
Button2: TButton;
RadioGroup1: TRadioGroup;
RadioGroup2: TRadioGroup;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
private
FBeginType: TLMDDBLinkPointType;
FEndType: TLMDDBLinkPointType;
function GetBeginLines: TStrings;
function GetEndLines: TStrings;
function GetBeginLineIndex: Integer;
function GetEndLineIndex: Integer;
procedure SetBeginLineIndex(const Value: Integer);
procedure SetEndLineIndex(const Value: Integer);
{ Private declarations }
public
{ Public declarations }
function Execute: Boolean;
property BeginType: TLMDDBLinkPointType read FBeginType write FBeginType;
property EndType: TLMDDBLinkPointType read FEndType write FEndType;
property BeginLines: TStrings read GetBeginLines;
property EndLines: TStrings read GetEndLines;
property BeginLineIndex: Integer read GetBeginLineIndex write SetBeginLineIndex;
property EndLineIndex: Integer read GetEndLineIndex write SetEndLineIndex;
end;
implementation
{$R *.dfm}
{ TdlgLinkProps }
function TdlgLinkProps.Execute: Boolean;
begin
RadioGroup1.ItemIndex := Ord(BeginType);
RadioGroup2.ItemIndex := Ord(EndType);
Result := (ShowModal = mrOk);
BeginType := TLMDDBLinkPointType(RadioGroup1.ItemIndex);
EndType := TLMDDBLinkPointType(RadioGroup2.ItemIndex);
end;
function TdlgLinkProps.GetBeginLineIndex: Integer;
begin
Result := ComboBox1.ItemIndex;
end;
function TdlgLinkProps.GetBeginLines: TStrings;
begin
Result := ComboBox1.Items;
end;
function TdlgLinkProps.GetEndLineIndex: Integer;
begin
Result := ComboBox2.ItemIndex;
end;
function TdlgLinkProps.GetEndLines: TStrings;
begin
Result := ComboBox2.Items;
end;
procedure TdlgLinkProps.SetBeginLineIndex(const Value: Integer);
begin
ComboBox1.ItemIndex := Value;
end;
procedure TdlgLinkProps.SetEndLineIndex(const Value: Integer);
begin
ComboBox2.ItemIndex := Value;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -