You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
1.8 KiB
Plaintext

12 months ago
unit u_msg_mold;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, bsSkinCtrls, StdCtrls, DBCtrls, DB, bsSkinBoxCtrls;
type
Tfrm_msg_mold = class(TForm)
bsSkinPanel1: TbsSkinPanel;
bsSkinPanel2: TbsSkinPanel;
bsSkinButton44: TbsSkinButton;
bsSkinButton45: TbsSkinButton;
bsSkinGroupBox1: TbsSkinGroupBox;
bsSkinGroupBox2: TbsSkinGroupBox;
DBMemo1: TDBMemo;
Memo4: TMemo;
Memo3: TMemo;
Memo2: TMemo;
Memo5: TMemo;
t_msg_mold1: TDataSource;
bsSkinListBox1: TbsSkinListBox;
Memo1: TMemo;
procedure bsSkinButton44Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure bsSkinListBox1ListBoxDblClick(Sender: TObject);
procedure bsSkinButton45Click(Sender: TObject);
private
{ Private declarations }
public
transtype:smallint;
{ Public declarations }
end;
var
frm_msg_mold: Tfrm_msg_mold;
implementation
uses u_main;
{$R *.dfm}
procedure Tfrm_msg_mold.bsSkinButton44Click(Sender: TObject);
begin
if t_msg_mold1.DataSet.State in [dsedit,dsinsert] then
t_msg_mold1.DataSet.Post;
end;
procedure Tfrm_msg_mold.FormShow(Sender: TObject);
begin
case transtype of
1:bsSkinListBox1.Items.Text:=Memo5.Text;
2:bsSkinListBox1.Items.Text:=Memo2.Text;
3:bsSkinListBox1.Items.Text:=Memo3.Text;
4:bsSkinListBox1.Items.Text:=Memo4.Text;
5:bsSkinListBox1.Items.Text:=Memo1.Text;
end;
end;
procedure Tfrm_msg_mold.bsSkinListBox1ListBoxDblClick(Sender: TObject);
begin
if t_msg_mold1.DataSet.State in [dsedit,dsinsert] then t_msg_mold1.DataSet.Post;
t_msg_mold1.DataSet.edit;
DBMemo1.Lines.Text:=DBMemo1.Lines.Text+'['+bsSkinListBox1.Items[bsSkinListBox1.ItemIndex]+']';
t_msg_mold1.DataSet.post;
end;
procedure Tfrm_msg_mold.bsSkinButton45Click(Sender: TObject);
begin
close;
end;
end.