Laman

31 Maret, 2011

*TIMER*
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "naomi.h"
int dtk_a=1;   //Label1
int dtk_b=1;   //Label2
int mnt_a=1;   //Label3
int mnt_b=1;   //Label11
int jam_a=1;   //Label12
int jam_b=1;   //Label13


//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
Label1->Caption=dtk_a;
dtk_a++;
   if(Label1->Caption==9)
    {
     dtk_a=0;
    }
if(Label1->Caption==0)
  {
  Label2->Caption=dtk_b;
  dtk_b++;
    if(Label2->Caption==5)
    {
     dtk_b=0;
    }
    //
   if(Label2->Caption==0)
  {
    Label3->Caption=mnt_a;
    mnt_a++;
    if(Label3->Caption==9)
      {
       mnt_a=0;
      }
    //
    if(Label3->Caption==0)
    {
      Label11->Caption=mnt_b;
      mnt_b++;
      if(Label11->Caption==5)
      {
       mnt_b=0;
      }
     if (Label11->Caption==0)
     {
      Label12->Caption=jam_a;
      jam_a++;
      if(Label12->Caption==3)
      {
       jam_a=0;
      }
      if (Label12->Caption==0)
      {
       Label13->Caption=jam_b;
       jam_b++;
       if(Label13->Caption==2)
       {
       jam_a=0;
       }
      }

     }

    }
  }

  }
}
//---------------------------------------------------------------------------