gq_ugroupsort.pas
来自「亚惠快餐管理信息系统 包括亚惠快餐管理的各项功能」· PAS 代码 · 共 73 行
PAS
73 行
unit GQ_UGroupSort;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls;
type
TGroupSortForm = class(TForm)
sortbox: TListBox;
sortlist: TListBox;
sortradio: TRadioGroup;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Button1: TButton;
Button2: TButton;
procedure Label3Click(Sender: TObject);
procedure Label4Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
GroupSortForm: TGroupSortForm;
implementation
{$R *.DFM}
procedure TGroupSortForm.Label3Click(Sender: TObject);
var
tempstring: string;
begin
if sortbox.ItemIndex = -1 then
exit;
if sortRadio.ItemIndex = 0 then
tempstring := sortbox.Items[sortbox.itemindex] + ' ASC';
if sortRadio.ItemIndex = 1 then
tempstring := sortbox.Items[sortbox.itemindex] + ' DESC';
if sortlist.Items.IndexOf(tempstring) <> -1 then
begin
showmessage('请不要重复选取');
exit;
end;
sortlist.Items.Add(tempstring);
end;
procedure TGroupSortForm.Label4Click(Sender: TObject);
begin
if sortlist.ItemIndex = -1 then
exit;
sortlist.Items.Delete(sortlist.itemindex);
end;
procedure TGroupSortForm.Button2Click(Sender: TObject);
begin
GroupSortForm.ModalResult := mrCancel;
end;
procedure TGroupSortForm.Button1Click(Sender: TObject);
begin
GroupSortForm.ModalResult := mrOK;
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?