-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathuFFSender.pas
More file actions
66 lines (57 loc) · 1.54 KB
/
Copy pathuFFSender.pas
File metadata and controls
66 lines (57 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
unit uFFSender;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, acPNG, ExtCtrls,Common,Common_ff,LCExceptions;
type
TfFFSender = class(TForm)
Image1: TImage;
Memo1: TMemo;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
Button1: TButton;
procedure FormShow(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
fFFSender: TfFFSender;
implementation
{$R *.dfm}
procedure TfFFSender.Button1Click(Sender: TObject);
begin
if FriendFeed.Authorized then
begin
if not FriendFeed.Entry(Memo1.Text,'me') then
TLCExceptions.Show(rcFFSendError,rcError,ErrorOk);
if CheckBox1.Checked then
begin
if FriendFeed.Subscribe(GroupName) then
begin
if not FriendFeed.Entry(Memo1.Text,GroupName) then
TLCExceptions.Show(rcFFSendGroupErr,rcError,ErrorOk);
end
else
TLCExceptions.Show(rcFFSubscribeError,rcError,ErrorOk);
end;
end
else
TLCExceptions.Show(rcFFAuthError,rcError,ErrorOk);
if CheckBox2.Checked then
begin
if Length(Memo1.Text)>140 then
Twitter.Update(Copy(Memo1.Text,1,140))
else
Twitter.Update(Memo1.Text);
end;
ModalResult:=mrOk;
Hide;
end;
procedure TfFFSender.FormShow(Sender: TObject);
begin
CheckBox2.Enabled:=Twitter.Authorized;
end;
end.