sbbsctrl.cpp 5.04 KB
Newer Older
1
2
/* Synchronet Control Panel (GUI Borland C++ Builder Project for Win32) */

3
/* $Id: sbbsctrl.cpp,v 1.21 2018/07/24 01:11:30 rswindell Exp $ */
4
5
6
7
8

/****************************************************************************
 * @format.tab-size 4		(Plain Text/Source Code File Header)			*
 * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
 *																			*
9
 * Copyright Rob Swindell - http://www.synchro.net/copyright.html			*
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
 *																			*
 * This program is free software; you can redistribute it and/or			*
 * modify it under the terms of the GNU General Public License				*
 * as published by the Free Software Foundation; either version 2			*
 * of the License, or (at your option) any later version.					*
 * See the GNU General Public License for more details: gpl.txt or			*
 * http://www.fsf.org/copyleft/gpl.html										*
 *																			*
 * Anonymous FTP access to the most recent released source is available at	*
 * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
 *																			*
 * Anonymous CVS access to the development source and modification history	*
 * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
 * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
 *     (just hit return, no password is necessary)							*
 * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
 *																			*
 * For Synchronet coding style and modification guidelines, see				*
 * http://www.synchro.net/source.html										*
 *																			*
 * You are encouraged to submit any modifications (preferably in Unix diff	*
 * format) via e-mail to mods@synchro.net									*
 *																			*
 * Note: If this box doesn't appear square, then you need to fix your tabs.	*
 ****************************************************************************/

//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
USEFORM("MainFormUnit.cpp", MainForm);
USEFORM("CtrlPathDialogUnit.cpp", CtrlPathDialog);
USEFORM("TextFileEditUnit.cpp", TextFileEditForm);
USEFORM("TelnetFormUnit.cpp", TelnetForm);
USEFORM("FtpFormUnit.cpp", FtpForm);
USEFORM("MailFormUnit.cpp", MailForm);
USEFORM("NodeFormUnit.cpp", NodeForm);
USEFORM("StatsFormUnit.cpp", StatsForm);
USEFORM("AboutBoxFormUnit.cpp", AboutBoxForm);
USEFORM("StatsLogFormUnit.cpp", StatsLogForm);
USEFORM("CodeInputFormUnit.cpp", CodeInputForm);
USEFORM("ClientFormUnit.cpp", ClientForm);
51
USEFORM("SpyFormUnit.cpp", SpyForm);
52
USEFORM("UserListFormUnit.cpp", UserListForm);
53
USEFORM("UserMsgFormUnit.cpp", UserMsgForm);
54
USEFORM("PropertiesDlgUnit.cpp", PropertiesDlg);
55
USEFORM("EventsFormUnit.cpp", EventsForm);
56
USEFORM("ConfigWizardUnit.cpp", ConfigWizardForm);
57
USEFORM("ServicesFormUnit.cpp", ServicesForm);
rswindell's avatar
rswindell committed
58
59
60
61
USEFORM("TelnetCfgDlgUnit.cpp", TelnetCfgDlg);
USEFORM("MailCfgDlgUnit.cpp", MailCfgDlg);
USEFORM("FtpCfgDlgUnit.cpp", FtpCfgDlg);
USEFORM("ServicesCfgDlgUnit.cpp", ServicesCfgDlg);
62
USEFORM("PreviewFormUnit.cpp", PreviewForm);
63
USEFORM("WebFormUnit.cpp", WebForm);
64
USEFORM("WebCfgDlgUnit.cpp", WebCfgDlg);
65
USEFORM("LoginAttemptsFormUnit.cpp", LoginAttemptsForm);
66
USEFORM("C:\src\sbbs3\ctrl\SoundCfgDlgUnit.cpp", SoundCfgDlg);
67
68
//---------------------------------------------------------------------------
#include "MainFormUnit.h"
rswindell's avatar
rswindell committed
69
#include "SpyFormUnit.h"
70
#include "CtrlPathDialogUnit.h"
71
#include "sbbs_ini.h"   // sbbs_get_ini_fname
rswindell's avatar
rswindell committed
72
TSpyForm *SpyForms[MAX_NODES];
73
//---------------------------------------------------------------------------
74
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR cmd, int)
75
{
rswindell's avatar
rswindell committed
76
    memset(SpyForms,0,sizeof(SpyForms));
77
78
79
80
81
    try
    {
        Application->Initialize();
        Application->Title = "Synchronet Control Panel";
		Application->CreateForm(__classid(TMainForm), &MainForm);
82
83
         Application->CreateForm(__classid(TTelnetForm), &TelnetForm);
         Application->CreateForm(__classid(TFtpForm), &FtpForm);
rswindell's avatar
rswindell committed
84
         Application->CreateForm(__classid(TWebForm), &WebForm);
85
86
87
88
89
90
91
         Application->CreateForm(__classid(TMailForm), &MailForm);
         Application->CreateForm(__classid(TNodeForm), &NodeForm);
         Application->CreateForm(__classid(TStatsForm), &StatsForm);
         Application->CreateForm(__classid(TClientForm), &ClientForm);
         Application->CreateForm(__classid(TUserListForm), &UserListForm);
         Application->CreateForm(__classid(TEventsForm), &EventsForm);
         Application->CreateForm(__classid(TServicesForm), &ServicesForm);
92
         Application->CreateForm(__classid(TLoginAttemptsForm), &LoginAttemptsForm);
93
         Application->CreateForm(__classid(TSoundCfgDlg), &SoundCfgDlg);
94
95
         if(cmd[0] && isdir(cmd))
            SAFECOPY(MainForm->global.ctrl_dir,cmd);
96
         sbbs_get_ini_fname(MainForm->ini_file, MainForm->global.ctrl_dir);
97
         CreateMutex(NULL, FALSE, "sbbsctrl_running"); 	/* For use by Inno Setup */
rswindell's avatar
rswindell committed
98
		Application->Run();
99
100
101
102
103
104
105
106
    }
    catch (Exception &exception)
    {
             Application->ShowException(&exception);
    }
    return 0;
}
//---------------------------------------------------------------------------