First commit 18/07/2000
This commit is contained in:
		
							
								
								
									
										56
									
								
								Apagar.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								Apagar.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,56 @@
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
#include <vcl.h>
 | 
			
		||||
#pragma hdrstop
 | 
			
		||||
 | 
			
		||||
#include "Apagar.h"
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
#pragma package(smart_init)
 | 
			
		||||
#pragma resource "*.dfm"
 | 
			
		||||
TForm1 *Form1;
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
__fastcall TForm1::TForm1(TComponent* Owner)
 | 
			
		||||
    : TForm(Owner)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
void __fastcall TForm1::Timer1Timer(TObject *Sender)
 | 
			
		||||
{
 | 
			
		||||
 if ( CheckBox1->Checked )
 | 
			
		||||
 {
 | 
			
		||||
   TDateTime hm = TDateTime::CurrentTime();
 | 
			
		||||
   unsigned short h, m, s, ss;
 | 
			
		||||
   hm.DecodeTime( &h, &m, &s, &ss );
 | 
			
		||||
   if ( h == Edit1->Text.ToInt() && m >= Edit2->Text.ToInt() )
 | 
			
		||||
   {
 | 
			
		||||
 | 
			
		||||
     if (!ExitWindowsEx(EWX_SHUTDOWN | EWX_FORCE | EWX_POWEROFF, 0))
 | 
			
		||||
 {
 | 
			
		||||
    ShowMessage( "Error Cerrando el EQUIPO\nIntente cierre manual" );
 | 
			
		||||
 }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 }
 | 
			
		||||
}
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
void __fastcall TForm1::Edit2Change(TObject *Sender)
 | 
			
		||||
{
 | 
			
		||||
  try {
 | 
			
		||||
  if ( Edit2->Text.ToInt() < 0 || Edit2->Text.ToInt() >59 ) Edit2->Text = "0";
 | 
			
		||||
  } catch(...) {                                            Edit2->Text = "0";
 | 
			
		||||
                                                            Edit2->SelStart= 0;
 | 
			
		||||
                                                            Edit2->SelLength= 1;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
void __fastcall TForm1::Edit1Change(TObject *Sender)
 | 
			
		||||
{
 | 
			
		||||
  try {
 | 
			
		||||
  if ( Edit1->Text.ToInt() < 0 || Edit1->Text.ToInt() > 23 ) Edit1->Text = "0";
 | 
			
		||||
  } catch(...) {                                            Edit1->Text = "0";
 | 
			
		||||
                                                            Edit1->SelStart= 0;
 | 
			
		||||
                                                            Edit1->SelLength= 1;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								Apagar.dfm
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								Apagar.dfm
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										31
									
								
								Apagar.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								Apagar.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,31 @@
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
#ifndef ApagarH
 | 
			
		||||
#define ApagarH
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
#include <Classes.hpp>
 | 
			
		||||
#include <Controls.hpp>
 | 
			
		||||
#include <StdCtrls.hpp>
 | 
			
		||||
#include <Forms.hpp>
 | 
			
		||||
#include <ComCtrls.hpp>
 | 
			
		||||
#include <ExtCtrls.hpp>
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
class TForm1 : public TForm
 | 
			
		||||
{
 | 
			
		||||
__published:	// IDE-managed Components
 | 
			
		||||
    TCheckBox *CheckBox1;
 | 
			
		||||
    TTimer *Timer1;
 | 
			
		||||
        TComboBox *Edit2;
 | 
			
		||||
        TComboBox *Edit1;
 | 
			
		||||
        TShape *Shape3;
 | 
			
		||||
        TShape *Shape4;
 | 
			
		||||
    void __fastcall Timer1Timer(TObject *Sender);
 | 
			
		||||
        void __fastcall Edit2Change(TObject *Sender);
 | 
			
		||||
        void __fastcall Edit1Change(TObject *Sender);
 | 
			
		||||
private:	// User declarations
 | 
			
		||||
public:		// User declarations
 | 
			
		||||
    __fastcall TForm1(TComponent* Owner);
 | 
			
		||||
};
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
extern PACKAGE TForm1 *Form1;
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
#endif
 | 
			
		||||
							
								
								
									
										121
									
								
								AutoOff.bpr
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										121
									
								
								AutoOff.bpr
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,121 @@
 | 
			
		||||
<?xml version='1.0' encoding='utf-8' ?>
 | 
			
		||||
<!-- C++Builder XML Project -->
 | 
			
		||||
<PROJECT>
 | 
			
		||||
  <MACROS>
 | 
			
		||||
    <VERSION value="BCB.05.03"/>
 | 
			
		||||
    <PROJECT value="AutoOff.exe"/>
 | 
			
		||||
    <OBJFILES value="AutoOff.obj Apagar.obj"/>
 | 
			
		||||
    <RESFILES value="AutoOff.res"/>
 | 
			
		||||
    <IDLFILES value=""/>
 | 
			
		||||
    <IDLGENFILES value=""/>
 | 
			
		||||
    <DEFFILE value=""/>
 | 
			
		||||
    <RESDEPEN value="$(RESFILES) Apagar.dfm"/>
 | 
			
		||||
    <LIBFILES value=""/>
 | 
			
		||||
    <LIBRARIES value="inet50.lib CDopping.lib JD_soft.lib vclbde50.lib vcldb50.lib vcl50.lib"/>
 | 
			
		||||
    <SPARELIBS value="vcl50.lib vcldb50.lib vclbde50.lib JD_soft.lib CDopping.lib inet50.lib"/>
 | 
			
		||||
    <PACKAGES value="vclx50.bpi vcl50.bpi vcldb50.bpi vclbde50.bpi vcldbx50.bpi qrpt50.bpi 
 | 
			
		||||
      teeui50.bpi vclsmp50.bpi teedb50.bpi tee50.bpi nmfast50.bpi inetdb50.bpi 
 | 
			
		||||
      inet50.bpi JD_soft.bpi CDopping.bpi bcbsmp50.bpi dclocx50.bpi ibsmp50.bpi 
 | 
			
		||||
      QSElFrm.bpi"/>
 | 
			
		||||
    <PATHCPP value=".;"/>
 | 
			
		||||
    <PATHPAS value=".;"/>
 | 
			
		||||
    <PATHRC value=".;"/>
 | 
			
		||||
    <PATHASM value=".;"/>
 | 
			
		||||
    <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
 | 
			
		||||
    <RELEASELIBPATH value="$(BCB)\lib\release"/>
 | 
			
		||||
    <LINKER value="ilink32"/>
 | 
			
		||||
    <USERDEFINES value=""/>
 | 
			
		||||
    <SYSDEFINES value="NO_STRICT"/>
 | 
			
		||||
    <MAINSOURCE value="AutoOff.cpp"/>
 | 
			
		||||
    <INCLUDEPATH value="$(BCB)\include;$(BCB)\include\vcl"/>
 | 
			
		||||
    <LIBPATH value="..\componentes;"..\jd soft";..\componentes\cdopping;$(BCB)\lib\obj;$(BCB)\lib"/>
 | 
			
		||||
    <WARNINGS value="-w-par -w-8027 -w-8026"/>
 | 
			
		||||
    <WARNOPTSTR value=""/>
 | 
			
		||||
  </MACROS>
 | 
			
		||||
  <OPTIONS>
 | 
			
		||||
    <IDLCFLAGS value="-src_suffix cpp -I$(BCB)\include -I$(BCB)\include\vcl -boa"/>
 | 
			
		||||
    <CFLAG1 value="-Od -H=c:\PROGRAM\CBUILDER\CBUILD~1\lib\vcl35.csm -Hc -Vx -Ve -X- -r- -a8 
 | 
			
		||||
      -b- -k -y -v -vi- -c -tW -Tkh30000 -tWM"/>
 | 
			
		||||
    <CFLAG2 value=""/>
 | 
			
		||||
    <CFLAG3 value=""/>
 | 
			
		||||
    <PFLAGS value="-$YD -$W -$O- -v -M -JPHNE"/>
 | 
			
		||||
    <RFLAGS value=""/>
 | 
			
		||||
    <AFLAGS value="/mx /w2 /zd"/>
 | 
			
		||||
    <LFLAGS value="-D"" -aa -Tpe -x -Gn -v"/>
 | 
			
		||||
    <IFLAGS value=""/>
 | 
			
		||||
  </OPTIONS>
 | 
			
		||||
  <LINKER>
 | 
			
		||||
    <ALLOBJ value="c0w32.obj sysinit.obj $(OBJFILES)"/>
 | 
			
		||||
    <ALLRES value="$(RESFILES)"/>
 | 
			
		||||
    <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cp32mt.lib"/>
 | 
			
		||||
  </LINKER>
 | 
			
		||||
  <IDEOPTIONS>
 | 
			
		||||
[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=3082
 | 
			
		||||
CodePage=1252
 | 
			
		||||
 | 
			
		||||
[Version Info Keys]
 | 
			
		||||
CompanyName=
 | 
			
		||||
FileDescription=
 | 
			
		||||
FileVersion=1.0.0.0
 | 
			
		||||
InternalName=
 | 
			
		||||
LegalCopyright=
 | 
			
		||||
LegalTrademarks=
 | 
			
		||||
OriginalFilename=
 | 
			
		||||
ProductName=
 | 
			
		||||
ProductVersion=1.0.0.0
 | 
			
		||||
Comments=
 | 
			
		||||
 | 
			
		||||
[HistoryLists\hlIncludePath]
 | 
			
		||||
Count=1
 | 
			
		||||
Item0=$(BCB)\include;$(BCB)\include\vcl
 | 
			
		||||
 | 
			
		||||
[HistoryLists\hlLibraryPath]
 | 
			
		||||
Count=1
 | 
			
		||||
Item0=..\componentes;..\jd soft;..\componentes\cdopping;$(BCB)\lib\obj;$(BCB)\lib
 | 
			
		||||
 | 
			
		||||
[HistoryLists\hlDebugSourcePath]
 | 
			
		||||
Count=1
 | 
			
		||||
Item0=$(BCB)\source\vcl
 | 
			
		||||
 | 
			
		||||
[HistoryLists\hlConditionals]
 | 
			
		||||
Count=1
 | 
			
		||||
Item0=_RTLDLL
 | 
			
		||||
 | 
			
		||||
[Debugging]
 | 
			
		||||
DebugSourceDirs=$(BCB)\source\vcl
 | 
			
		||||
 | 
			
		||||
[Parameters]
 | 
			
		||||
RunParams=
 | 
			
		||||
HostApplication=
 | 
			
		||||
RemoteHost=
 | 
			
		||||
RemotePath=
 | 
			
		||||
RemoteDebug=0
 | 
			
		||||
 | 
			
		||||
[Compiler]
 | 
			
		||||
ShowInfoMsgs=0
 | 
			
		||||
LinkDebugVcl=0
 | 
			
		||||
LinkCGLIB=0
 | 
			
		||||
 | 
			
		||||
[CORBA]
 | 
			
		||||
AddServerUnit=1
 | 
			
		||||
AddClientUnit=1
 | 
			
		||||
PrecompiledHeaders=1
 | 
			
		||||
 | 
			
		||||
[Language]
 | 
			
		||||
ActiveLang=
 | 
			
		||||
ProjectLang=
 | 
			
		||||
RootDir=
 | 
			
		||||
  </IDEOPTIONS>
 | 
			
		||||
</PROJECT>
 | 
			
		||||
							
								
								
									
										21
									
								
								AutoOff.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								AutoOff.cpp
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,21 @@
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
#include <vcl.h>
 | 
			
		||||
#pragma hdrstop
 | 
			
		||||
USERES("AutoOff.res");
 | 
			
		||||
USEFORM("Apagar.cpp", Form1);
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
 | 
			
		||||
{
 | 
			
		||||
    try
 | 
			
		||||
    {
 | 
			
		||||
        Application->Initialize();
 | 
			
		||||
        Application->CreateForm(__classid(TForm1), &Form1);
 | 
			
		||||
        Application->Run();
 | 
			
		||||
    }
 | 
			
		||||
    catch (Exception &exception)
 | 
			
		||||
    {
 | 
			
		||||
        Application->ShowException(&exception);
 | 
			
		||||
    }
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
//---------------------------------------------------------------------------
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								AutoOff.exe
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								AutoOff.exe
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
							
								
								
									
										
											BIN
										
									
								
								AutoOff.res
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								AutoOff.res
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user