This commit was manufactured by cvs2svn to create branch 'uc'.
[gnokii.git] / win32_makefile / gui_delphi / wapbook.pas
diff --git a/win32_makefile/gui_delphi/wapbook.pas b/win32_makefile/gui_delphi/wapbook.pas
new file mode 100644 (file)
index 0000000..8942c9a
--- /dev/null
@@ -0,0 +1,62 @@
+unit wapbook;\r
+\r
+interface\r
+\r
+uses\r
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,\r
+  Dialogs, StdCtrls, GnokiiAPI;\r
+\r
+type\r
+  TWAPBookForm = class(TForm)\r
+    Button1: TButton;\r
+    Button2: TButton;\r
+    Label1: TLabel;\r
+    Edit1: TEdit;\r
+    Label2: TLabel;\r
+    Edit2: TEdit;\r
+    procedure Button2Click(Sender: TObject);\r
+    procedure Button1Click(Sender: TObject);\r
+  private\r
+    { Private declarations }\r
+  public\r
+    { Public declarations }\r
+  end;\r
+\r
+var\r
+  WAPBookForm: TWAPBookForm;\r
+\r
+implementation\r
+\r
+uses MainUnit;\r
+\r
+{$R *.dfm}\r
+\r
+procedure TWAPBookForm.Button2Click(Sender: TObject);\r
+begin\r
+  WAPBookForm.Close;\r
+end;\r
+\r
+procedure TWAPBookForm.Button1Click(Sender: TObject);\r
+var i:integer;\r
+    book:GSM_WAPBookmark;\r
+begin\r
+  for i:=1 to 256 do book.adress[i]:=chr(0);\r
+  for i:=1 to 51 do book.title[i]:=chr(0);\r
+\r
+  for i:=1 to strlen(pchar(Edit1.text)) do\r
+    book.title[i]:=Edit1.Text[i];\r
+  for i:=1 to strlen(pchar(Edit2.text)) do\r
+    book.adress[i]:=Edit2.Text[i];\r
+\r
+  book.location:=bookmarknum2;\r
+  \r
+  MainForm.Timer2.enabled:=false;\r
+  GSM_SetWAPBookmark(@book);\r
+  MainForm.Timer2.enabled:=true;\r
+\r
+  MainForm.WAPBookTabSheetShow(nil);\r
+\r
+  WAPBookForm.Close;\r
+end;\r
+\r
+end.\r