?? unit10.pas
字號:
unit Unit10;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, RzButton,ComCtrls;
type
TForm10 = class(TForm)
GroupBox1: TGroupBox;
RzButton17: TRzButton;
RzButton18: TRzButton;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
ComboBox2: TComboBox;
ComboBox1: TComboBox;
procedure FormShow(Sender: TObject);
procedure RzButton17Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form10: TForm10;
implementation
uses P2Pszform1;
{$R *.dfm}
procedure TForm10.FormShow(Sender: TObject);
var
Drive: Char;
DriveLetter: String[1];
begin
for Drive := 'E' to 'Z' do
begin
DriveLetter := Drive ;
FORM10.ComboBox2.Items.Add(DriveLetter);
FORM10.ComboBox1.Items.Add(DriveLetter);
end;
ComboBox2.ItemIndex:=0;
ComboBox1.ItemIndex:=0;
end;
procedure TForm10.RzButton17Click(Sender: TObject);
var
Item:TListItem;
i:Integer;
begin
for i:=0 to Szform.listview3.Items.Count -1 do
begin
if (Szform.ListView3.Items[i].Caption=ComboBox2.Text) or (Szform.ListView3.Items[i].SubItems[0]=ComboBox1.Text) then
begin
Application.MessageBox(PAnsiChar('服務器盤符: ['+ComboBox2.Text+'] 或客戶機盤符: ['+combobox1.text+'] 已存在,請不要重復添加'),'提示',MB_OK);
exit
end;
end;
Item:=Szform.listview3.Items.Add;
Item.Caption:=ComboBox2.Text;
Item.SubItems.Add(ComboBox1.Text)
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -