OSDN Git Service

Fixed memory leaks
[winbottle/winbottle.git] / bottleclient / EditorTalkShow.pas
1 unit EditorTalkShow;
2
3 interface
4
5 uses
6   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7   Dialogs, TalkShowFrame, BottleDef;
8
9 type
10   TfrmEditorTalkShow = class(TForm)
11     TalkShowFrame: TfrmTalkShow;
12     procedure FormCreate(Sender: TObject);
13     procedure FormDestroy(Sender: TObject);
14   private
15     { Private \90é\8c¾ }
16   public
17     { Public \90é\8c¾ }
18   end;
19
20 var
21   frmEditorTalkShow: TfrmEditorTalkShow;
22
23 implementation
24
25 {$R *.dfm}
26
27 uses MainForm;
28
29 procedure TfrmEditorTalkShow.FormCreate(Sender: TObject);
30 begin
31   TalkShowFrame.SsParser := frmSender.SsParser;
32   self.Left := Pref.EditorPreviewWindowPosition.Left;
33   self.Top  := Pref.EditorPreviewWindowPosition.Top;
34   self.Width := Pref.EditorPreviewWindowPosition.Right - self.Left;
35   self.Height := Pref.EditorPreviewWindowPosition.Bottom - self.Top;
36 end;
37
38 procedure TfrmEditorTalkShow.FormDestroy(Sender: TObject);
39 var ARect: TRect;
40 begin
41   with ARect do
42   begin
43     Left   := self.Left;
44     Top    := self.Top;
45     Right  := self.Width + self.Left;
46     Bottom := self.Height + self.Top;
47   end;
48   Pref.EditorPreviewWindowPosition := ARect;
49 end;
50
51 initialization
52
53 frmEditorTalkShow := nil;
54
55 end.