Thread: [Ocs-comps-commits] OCS2/Samples/CLX/AddinManager/Simple/Plugins/Web MailForm.dfm,NONE,1.1 MailForm.
Brought to you by:
tectsoft
Update of /cvsroot/ocs-comps/OCS2/Samples/CLX/AddinManager/Simple/Plugins/Web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10593/Samples/CLX/AddinManager/Simple/Plugins/Web Added Files: MailForm.dfm MailForm.pas Web.cfg Web.conf Web.dof Web.dpr Web.kof Web.res Log Message: Initially added to source control --- NEW FILE: Web.kof --- [Compiler] A=8 B=0 C=1 D=1 E=0 F=0 G=1 H=1 I=1 J=0 K=0 L=1 M=0 N=1 O=0 P=1 Q=0 R=0 S=0 T=0 U=0 V=1 W=0 X=1 Y=1 Z=1 ShowHints=1 ShowWarnings=1 UnitAliases= [Linker] MapFile=0 OutputObjs=0 ConsoleApp=1 DebugInfo=0 RemoteSymbols=0 MinStackSize=16384 MaxStackSize=1048576 ImageBase=4194304 ExeDescription= DynamicLoader=/lib/ld-linux.so.2 [Directories] OutputDir= UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= SearchPath=/home/simon/orcka/source/ Packages=baseclx:visualclx:visualdbclx:dataclx:indy:orckak1 Conditionals=SHAREMEM DebugSourceDirs= UsePackages=0 [Parameters] RunParams= HostApplication=/home/simon/orcka/Samples/AddinManager/Simple/Plugins/Web/SimpleAddinManager Launcher=/usr/X11R6/bin/xterm -T KylixDebuggerOutput -e bash -i -c %debuggee% UseLauncher=0 DebugCWD= --- NEW FILE: Web.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: MailForm.dfm --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Web.dof --- [Compiler] A=1 B=0 C=1 D=1 E=0 F=0 G=1 H=1 I=1 J=1 K=0 L=1 M=0 N=1 O=1 P=1 Q=0 R=0 S=0 T=0 U=0 V=1 W=0 X=1 Y=1 Z=1 ShowHints=1 ShowWarnings=1 UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; [Linker] MapFile=0 OutputObjs=0 ConsoleApp=1 DebugInfo=0 RemoteSymbols=0 MinStackSize=16384 MaxStackSize=1048576 ImageBase=4194304 ExeDescription= [Directories] OutputDir= UnitOutputDir= PackageDLLOutputDir= PackageDCPOutputDir= SearchPath= Packages= Conditionals= DebugSourceDirs= UsePackages=0 [Parameters] RunParams= HostApplication= [Version Info] IncludeVerInfo=0 AutoIncBuild=0 MajorVer=1 MinorVer=0 Release=0 Build=0 Debug=0 PreRelease=0 Special=0 Private=0 DLL=0 Locale=1033 CodePage=1252 [Version Info Keys] CompanyName= FileDescription= FileVersion=1.0.0.0 InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion=1.0.0.0 Comments= --- NEW FILE: MailForm.pas --- unit MailForm; interface uses SysUtils, Classes, QGraphics, QControls, QForms, QDialogs, QStdCtrls, QExtCtrls, QComCtrls, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient, IdMessageClient, IdSMTP, IdMessage; type TForm1 = class(TForm) PageControl1: TPageControl; TabSheet2: TTabSheet; Memo1: TMemo; Panel1: TPanel; Label7: TLabel; Label8: TLabel; Label9: TLabel; Edit7: TEdit; Edit8: TEdit; Edit9: TEdit; Panel2: TPanel; Label11: TLabel; Button6: TButton; Edit10: TEdit; Edit4: TEdit; Label4: TLabel; Label2: TLabel; Edit2: TEdit; Label1: TLabel; Edit1: TEdit; Edit5: TEdit; Label5: TLabel; Label6: TLabel; Edit6: TEdit; IdSMTP1: TIdSMTP; IdMessage1: TIdMessage; procedure Button6Click(Sender: TObject); private { Private declarations } public { Public declarations } end; procedure SendEMail; implementation {$R *.dfm} procedure SendEMail; var Form1: TForm1; begin Form1 := TForm1.Create(nil); try Form1.ShowModal; finally Form1.Free; end; end; procedure TForm1.Button6Click(Sender: TObject); begin Screen.Cursor := crHourGlass; { Setup Sender Info } idSMTP1.Host := Edit1.Text; idSMTP1.Port := StrToInt(Edit2.Text); idSMTP1.UserID := Edit4.Text; { Connect } idSMTP1.Connect; { Setup message } IdMessage1.Sender.Address := Edit6.Text; IdMessage1.Sender.Name := Edit5.Text; IdMessage1.Subject := Edit10.Text; with IdMessage1.Recipients.Add do begin Name := Edit7.Text; Address := Edit7.Text; end; with IdMessage1.BCCList.Add do begin Name := Edit9.Text; Address := Edit9.Text; end; with IdMessage1.CCList.Add do begin Name := Edit8.Text; Address := Edit8.Text; end; IdMessage1.Body.Assign(Memo1.Lines); { Send } IdSMTP1.Send(IdMessage1); {Disconnect } idSMTP1.Disconnect; Screen.Cursor := crDefault; end; end. --- NEW FILE: Web.conf --- -$A8 -$B- -$C+ -$D+ -$E- -$F- -$G+ -$H+ -$I+ -$J- -$K- -$L+ -$M- -$N+ -$O- -$P+ -$Q- -$R- -$S- -$T- -$U- -$V+ -$W- -$X+ -$YD -$Z1 -cg -H+ -W+ -M -$M16384,1048576 -K$00400000 -U"/home/simon/orcka/source/" -O"/home/simon/orcka/source/" -I"/home/simon/orcka/source/" -R"/home/simon/orcka/source/" -DSHAREMEM --- NEW FILE: Web.dpr --- library Web; uses QForms, QDialogs, SysUtils, OrckaAddinManagerShared, MailForm in 'MailForm.pas' {Form1}; {$I OrckaDV.inc} {$SOPREFIX ''} type TWebPlugin = class private Service: TOToolServices; //mnuHelpSep: TOMenuItem; mnuHelpWeb: TOMenuItem; mnuHelpWebHome: TOMenuItem; mnuHelpWebBorland: TOMenuItem; //mnuHelpWebSep: TOMenuItem; //mnuHelpWebEMail: TOMenuItem; public constructor Create(AService: TOToolServices); destructor Destroy; override; procedure WebPage(Sender: TOMenuItem); procedure EMail(Sender: TOMenuItem); end; var WebPlugin: TWebPlugin; resourcestring sNoHelpMenu = 'The help menu could not be found'; procedure PluginExit; stdcall; begin //Application.Handle := nil; //WebPlugin.Free; end; function Plugin (InParams: TOrckaAddinManagerParams; var ExitProc: Pointer): Boolean; stdcall; begin //WebPlugin := TWebPlugin.Create(InParams.Service); //Application.Handle := InParams.AppHandle; //ExitProc := @PluginExit; Result := True; end; exports Plugin name OrckaAddinManagerExportProc; { TPluginInfo } constructor TWebPlugin.Create(AService: TOToolServices); var mnuHelp: TOMenuItem; begin Service := AService; {Get the Help menu} mnuHelp := Service.FindMenu('mnuHelp'); if not Assigned(mnuHelp) then raise Exception.Create(sNoHelpMenu); {Add Menu's} mnuHelpWeb := Service.InsertMenu(mnuHelp.GetItemCount - 1, mnuHelp, 'On the Web', nil); // mnuHelpSep := Service.InsertMenu(mnuHelp.GetItemCount -1, mnuHelp, '-', nil); mnuHelpWebHome := Service.InsertMenu(0, mnuHelpWeb, 'Orcka Home Page', WebPage); mnuHelpWebBorland := Service.InsertMenu(1, mnuHelpWeb, 'Borland Home Page', WebPage); // mnuHelpWebSep := Service.InsertMenu(2, mnuHelpWeb, '-', nil); // mnuHelpWebEMail := Service.InsertMenu(3, mnuHelpWeb, 'Send EMail', EMail); end; destructor TWebPlugin.Destroy; begin {RemoveMenu's} // Service.RemoveMenu(mnuHelpSep); Service.RemoveMenu(mnuHelpWeb); Service.RemoveMenu(mnuHelpWebHome); Service.RemoveMenu(mnuHelpWebBorland); // Service.RemoveMenu(mnuHelpWebSep); // Service.RemoveMenu(mnuHelpWebEMail); end; procedure TWebPlugin.EMail(Sender: TOMenuItem); begin SendEMail; end; procedure TWebPlugin.WebPage(Sender: TOMenuItem); var sURL: string; begin if Sender = mnuHelpWebBorland then sURL := 'http://www.borland.com' else sURL := 'http://www.orcka.com'; ShowMessage('Open ' + sURL); end; begin end. --- NEW FILE: Web.cfg --- -$A+ -$B- -$C+ -$D+ -$E- -$F- -$G+ -$H+ -$I+ -$J+ -$K- -$L+ -$M- -$N+ -$O+ -$P+ -$Q- -$R- -$S- -$T- -$U- -$V+ -$W- -$X+ -$YD -$Z1 -cg -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; -H+ -W+ -M -$M16384,1048576 -K$00400000 -LNd:\program files\borland\delphi4\Lib |