⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 connectionsunit.pas

📁 三层的通用架构
💻 PAS
字号:
unit ConnectionsUnit;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, Menus;

type
  TConnectionsForm = class(TForm)
    ListView1: TListView;
    StatusBar1: TStatusBar;
    PopupMenu1: TPopupMenu;
    F1: TMenuItem;
    U1: TMenuItem;
    procedure ListView1DblClick(Sender: TObject);
    procedure F1Click(Sender: TObject);
    procedure U1Click(Sender: TObject);
    procedure PopupMenu1Popup(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  ConnectionsForm: TConnectionsForm;

implementation

uses MainUnit;

{$R *.dfm}

procedure TConnectionsForm.ListView1DblClick(Sender: TObject);
begin
  if ListView1.Selected <> nil then
    ListView1.Selected.Checked := not ListView1.Selected.Checked;
end;

procedure TConnectionsForm.F1Click(Sender: TObject);
begin
  if ListView1.Selected <> nil then
    ListView1.Selected.Checked := not ListView1.Selected.Checked;
end;

procedure TConnectionsForm.U1Click(Sender: TObject);
begin
  TheMainForm.ConnectionsUpdate;
end;

procedure TConnectionsForm.PopupMenu1Popup(Sender: TObject);
begin
  F1.Enabled := ListView1.Selected <> nil;
  if F1.Enabled then
    if ListView1.Selected.Checked then
      F1.Caption := '取消标记(&F)'
    else
      F1.Caption := '标记(&F)';
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -