From 7a3a6c4c85261cf30064352df79f412b12a287d5 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Tue, 10 Apr 2001 01:33:11 +0000 Subject: [PATCH] New Events window for separate Event Logging. --- src/sbbs3/ctrl/EventsFormUnit.cpp | 62 +++++++++++++++++++++++++++++++ src/sbbs3/ctrl/EventsFormUnit.dfm | 30 +++++++++++++++ src/sbbs3/ctrl/EventsFormUnit.h | 59 +++++++++++++++++++++++++++++ src/sbbs3/ctrl/sbbsctrl.bpr | 5 ++- src/sbbs3/ctrl/sbbsctrl.cpp | 2 + 5 files changed, 156 insertions(+), 2 deletions(-) create mode 100644 src/sbbs3/ctrl/EventsFormUnit.cpp create mode 100644 src/sbbs3/ctrl/EventsFormUnit.dfm create mode 100644 src/sbbs3/ctrl/EventsFormUnit.h diff --git a/src/sbbs3/ctrl/EventsFormUnit.cpp b/src/sbbs3/ctrl/EventsFormUnit.cpp new file mode 100644 index 0000000000..57650898cb --- /dev/null +++ b/src/sbbs3/ctrl/EventsFormUnit.cpp @@ -0,0 +1,62 @@ +/* Synchronet Control Panel (GUI Borland C++ Builder Project for Win32) */ + +/* $Id$ */ + +/**************************************************************************** + * @format.tab-size 4 (Plain Text/Source Code File Header) * + * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * + * * + * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * * + * 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 +#include "MainFormUnit.h" +#include "EventsFormUnit.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TEventsForm *EventsForm; +//--------------------------------------------------------------------------- +__fastcall TEventsForm::TEventsForm(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- +void __fastcall TEventsForm::FormShow(TObject *Sender) +{ + MainForm->ViewEventsMenuItem->Checked=true; + +} +//--------------------------------------------------------------------------- +void __fastcall TEventsForm::FormHide(TObject *Sender) +{ + MainForm->ViewEventsMenuItem->Checked=false; +} +//--------------------------------------------------------------------------- diff --git a/src/sbbs3/ctrl/EventsFormUnit.dfm b/src/sbbs3/ctrl/EventsFormUnit.dfm new file mode 100644 index 0000000000..4496be0ea1 --- /dev/null +++ b/src/sbbs3/ctrl/EventsFormUnit.dfm @@ -0,0 +1,30 @@ +object EventsForm: TEventsForm + Left = 491 + Top = 178 + Width = 559 + Height = 391 + Caption = 'Events' + Color = clBtnFace + DragKind = dkDock + DragMode = dmAutomatic + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + OnHide = FormHide + OnShow = FormShow + PixelsPerInch = 120 + TextHeight = 16 + object Log: TMemo + Left = 0 + Top = 0 + Width = 551 + Height = 359 + Align = alClient + ReadOnly = True + ScrollBars = ssBoth + TabOrder = 0 + end +end diff --git a/src/sbbs3/ctrl/EventsFormUnit.h b/src/sbbs3/ctrl/EventsFormUnit.h new file mode 100644 index 0000000000..9606aa9746 --- /dev/null +++ b/src/sbbs3/ctrl/EventsFormUnit.h @@ -0,0 +1,59 @@ +/* Synchronet Control Panel (GUI Borland C++ Builder Project for Win32) */ + +/* $Id$ */ + +/**************************************************************************** + * @format.tab-size 4 (Plain Text/Source Code File Header) * + * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * + * * + * Copyright 2000 Rob Swindell - http://www.synchro.net/copyright.html * + * * + * 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. * + ****************************************************************************/ + +//--------------------------------------------------------------------------- + +#ifndef EventsFormUnitH +#define EventsFormUnitH +//--------------------------------------------------------------------------- +#include <Classes.hpp> +#include <Controls.hpp> +#include <StdCtrls.hpp> +#include <Forms.hpp> +//--------------------------------------------------------------------------- +class TEventsForm : public TForm +{ +__published: // IDE-managed Components + TMemo *Log; + void __fastcall FormShow(TObject *Sender); + void __fastcall FormHide(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TEventsForm(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TEventsForm *EventsForm; +//--------------------------------------------------------------------------- +#endif diff --git a/src/sbbs3/ctrl/sbbsctrl.bpr b/src/sbbs3/ctrl/sbbsctrl.bpr index cb6d95d2da..48d41c0784 100644 --- a/src/sbbs3/ctrl/sbbsctrl.bpr +++ b/src/sbbs3/ctrl/sbbsctrl.bpr @@ -10,7 +10,7 @@ NodeFormUnit.obj StatsFormUnit.obj AboutBoxFormUnit.obj StatsLogFormUnit.obj CodeInputFormUnit.obj ClientFormUnit.obj SpyFormUnit.obj ..\ringbuf.obj UserListFormUnit.obj UserMsgFormUnit.obj - PropertiesDlgUnit.obj"/> + PropertiesDlgUnit.obj EventsFormUnit.obj"/> <RESFILES value="sbbsctrl.res"/> <IDLFILES value=""/> <IDLGENFILES value=""/> @@ -20,7 +20,8 @@ TelnetFormUnit.dfm FtpFormUnit.dfm MailFormUnit.dfm NodeFormUnit.dfm StatsFormUnit.dfm AboutBoxFormUnit.dfm StatsLogFormUnit.dfm CodeInputFormUnit.dfm ClientFormUnit.dfm SpyFormUnit.dfm - UserListFormUnit.dfm UserMsgFormUnit.dfm PropertiesDlgUnit.dfm"/> + UserListFormUnit.dfm UserMsgFormUnit.dfm PropertiesDlgUnit.dfm + EventsFormUnit.dfm"/> <LIBFILES value="sbbs.lib mailsrvr.lib ftpsrvr.lib"/> <LIBRARIES value="VCLX50.lib bcbsmp50.lib IcsBcb50.lib vcl50.lib"/> <SPARELIBS value="vcl50.lib IcsBcb50.lib bcbsmp50.lib VCLX50.lib"/> diff --git a/src/sbbs3/ctrl/sbbsctrl.cpp b/src/sbbs3/ctrl/sbbsctrl.cpp index 15d8ae930b..4e231ccdb7 100644 --- a/src/sbbs3/ctrl/sbbsctrl.cpp +++ b/src/sbbs3/ctrl/sbbsctrl.cpp @@ -61,6 +61,7 @@ USEUNIT("emulvt.pas"); USEFORM("UserListFormUnit.cpp", UserListForm); USEFORM("UserMsgFormUnit.cpp", UserMsgForm); USEFORM("PropertiesDlgUnit.cpp", PropertiesDlg); +USEFORM("EventsFormUnit.cpp", EventsForm); //--------------------------------------------------------------------------- #include "MainFormUnit.h" #include "SpyFormUnit.h" @@ -82,6 +83,7 @@ WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) Application->CreateForm(__classid(TStatsForm), &StatsForm); Application->CreateForm(__classid(TClientForm), &ClientForm); Application->CreateForm(__classid(TUserListForm), &UserListForm); + Application->CreateForm(__classid(TEventsForm), &EventsForm); Application->Run(); } catch (Exception &exception) -- GitLab