Accueil
ADSL AH4021 AH4222 Asphyre broadcom Classe CodeGear Cpp CppBuilder Delphi driver DSL embarcadero free Freeware Gratuit kernel linux Modem neufbox OpenSource OpenWRT Plugin SFR box TECOM

+ Tous les mots clés

Composant TVariable PDF Imprimer Envoyer
Note des utilisateurs: / 0
MauvaisTrès bien 
Mardi, 05 Mai 2009 13:04

Composant TVariable

On a parfois besoin d'une variable globale dans un projet qui permet de raliser des actions en fonction de son tat. Ce composant pour C++Builder est fait pour cela. C'est une version simple qui donne 10 variables globales (bool, integer, float et AnsiString) et qui appel une fonction que l'on dfini (OnChange). Ainsi, chaque changement de valeur, la fonction est excute.

J'ai donc intgr directement 10 variables de chaque type pour viter d'avoir des dizaines d'icnes de composants non visuels grer.

Voici le code corespondant cette 1re version simplifie.

Le fichier Variable.dcr permet d'avoir une icne reprsentant un V dans la palette de composants.

Variable.h :

//---------------------------------------------------------------------------

#ifndef VariableH
#define VariableH
//---------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Classes.hpp>
//---------------------------------------------------------------------------
class PACKAGE TVariable : public TComponent
{
private:
       AnsiString FAnsiStrVarTemp1, FAnsiStrVarTemp2, FAnsiStrVarTemp3, FAnsiStrVarTemp4, FAnsiStrVarTemp5;
       AnsiString FAnsiStrVarTemp6, FAnsiStrVarTemp7, FAnsiStrVarTemp8, FAnsiStrVarTemp9, FAnsiStrVarTemp10;
       int FIntVarTemp1, FIntVarTemp2, FIntVarTemp3, FIntVarTemp4, FIntVarTemp5;
       int FIntVarTemp6, FIntVarTemp7, FIntVarTemp8, FIntVarTemp9, FIntVarTemp10;
       float FFloatVarTemp1, FFloatVarTemp2, FFloatVarTemp3, FFloatVarTemp4, FFloatVarTemp5;
       float FFloatVarTemp6, FFloatVarTemp7, FFloatVarTemp8, FFloatVarTemp9, FFloatVarTemp10;
       bool FBoolVarTemp1, FBoolVarTemp2, FBoolVarTemp3, FBoolVarTemp4, FBoolVarTemp5;
       bool FBoolVarTemp6, FBoolVarTemp7, FBoolVarTemp8, FBoolVarTemp9, FBoolVarTemp10;
       TNotifyEvent FOnAnsiStrVarTemp1Change, FOnAnsiStrVarTemp2Change, FOnAnsiStrVarTemp3Change, FOnAnsiStrVarTemp4Change, FOnAnsiStrVarTemp5Change;
       TNotifyEvent FOnAnsiStrVarTemp6Change, FOnAnsiStrVarTemp7Change, FOnAnsiStrVarTemp8Change, FOnAnsiStrVarTemp9Change, FOnAnsiStrVarTemp10Change;
       TNotifyEvent FOnIntVarTemp1Change, FOnIntVarTemp2Change, FOnIntVarTemp3Change, FOnIntVarTemp4Change, FOnIntVarTemp5Change;
       TNotifyEvent FOnIntVarTemp6Change, FOnIntVarTemp7Change, FOnIntVarTemp8Change, FOnIntVarTemp9Change, FOnIntVarTemp10Change;
       TNotifyEvent FOnFloatVarTemp1Change, FOnFloatVarTemp2Change, FOnFloatVarTemp3Change, FOnFloatVarTemp4Change, FOnFloatVarTemp5Change;
       TNotifyEvent FOnFloatVarTemp6Change, FOnFloatVarTemp7Change, FOnFloatVarTemp8Change, FOnFloatVarTemp9Change, FOnFloatVarTemp10Change;
       TNotifyEvent FOnBoolVarTemp1Change, FOnBoolVarTemp2Change, FOnBoolVarTemp3Change, FOnBoolVarTemp4Change, FOnBoolVarTemp5Change;
       TNotifyEvent FOnBoolVarTemp6Change, FOnBoolVarTemp7Change, FOnBoolVarTemp8Change, FOnBoolVarTemp9Change, FOnBoolVarTemp10Change;

protected:
       virtual void __fastcall SetAnsiStrVarTemp1 ( AnsiString AAnsiStrVarTemp1);
       virtual void __fastcall SetAnsiStrVarTemp2 ( AnsiString AAnsiStrVarTemp2);
       virtual void __fastcall SetAnsiStrVarTemp3 ( AnsiString AAnsiStrVarTemp3);
       virtual void __fastcall SetAnsiStrVarTemp4 ( AnsiString AAnsiStrVarTemp4);
       virtual void __fastcall SetAnsiStrVarTemp5 ( AnsiString AAnsiStrVarTemp5);
       virtual void __fastcall SetAnsiStrVarTemp6 ( AnsiString AAnsiStrVarTemp6);
       virtual void __fastcall SetAnsiStrVarTemp7 ( AnsiString AAnsiStrVarTemp7);
       virtual void __fastcall SetAnsiStrVarTemp8 ( AnsiString AAnsiStrVarTemp8);
       virtual void __fastcall SetAnsiStrVarTemp9 ( AnsiString AAnsiStrVarTemp9);
       virtual void __fastcall SetAnsiStrVarTemp10 ( AnsiString AAnsiStrVarTemp10);
       virtual void __fastcall SetIntVarTemp1 ( int AIntVarTemp1);
       virtual void __fastcall SetIntVarTemp2 ( int AIntVarTemp2);
       virtual void __fastcall SetIntVarTemp3 ( int AIntVarTemp3);
       virtual void __fastcall SetIntVarTemp4 ( int AIntVarTemp4);
       virtual void __fastcall SetIntVarTemp5 ( int AIntVarTemp5);
       virtual void __fastcall SetIntVarTemp6 ( int AIntVarTemp6);
       virtual void __fastcall SetIntVarTemp7 ( int AIntVarTemp7);
       virtual void __fastcall SetIntVarTemp8 ( int AIntVarTemp8);
       virtual void __fastcall SetIntVarTemp9 ( int AIntVarTemp9);
       virtual void __fastcall SetIntVarTemp10 ( int AIntVarTemp10);
       virtual void __fastcall SetFloatVarTemp1 ( float AFloatVarTemp1);
       virtual void __fastcall SetFloatVarTemp2 ( float AFloatVarTemp2);
       virtual void __fastcall SetFloatVarTemp3 ( float AFloatVarTemp3);
       virtual void __fastcall SetFloatVarTemp4 ( float AFloatVarTemp4);
       virtual void __fastcall SetFloatVarTemp5 ( float AFloatVarTemp5);
       virtual void __fastcall SetFloatVarTemp6 ( float AFloatVarTemp6);
       virtual void __fastcall SetFloatVarTemp7 ( float AFloatVarTemp7);
       virtual void __fastcall SetFloatVarTemp8 ( float AFloatVarTemp8);
       virtual void __fastcall SetFloatVarTemp9 ( float AFloatVarTemp9);
       virtual void __fastcall SetFloatVarTemp10 ( float AFloatVarTemp10);
       virtual void __fastcall SetBoolVarTemp1 ( bool ABoolVarTemp1);
       virtual void __fastcall SetBoolVarTemp2 ( bool ABoolVarTemp2);
       virtual void __fastcall SetBoolVarTemp3 ( bool ABoolVarTemp3);
       virtual void __fastcall SetBoolVarTemp4 ( bool ABoolVarTemp4);
       virtual void __fastcall SetBoolVarTemp5 ( bool ABoolVarTemp5);
       virtual void __fastcall SetBoolVarTemp6 ( bool ABoolVarTemp6);
       virtual void __fastcall SetBoolVarTemp7 ( bool ABoolVarTemp7);
       virtual void __fastcall SetBoolVarTemp8 ( bool ABoolVarTemp8);
       virtual void __fastcall SetBoolVarTemp9 ( bool ABoolVarTemp9);
       virtual void __fastcall SetBoolVarTemp10 ( bool ABoolVarTemp10);

public:
       __fastcall TVariable(TComponent* Owner);
__published:
       __property AnsiString AnsiStrVarTemp1 = {read=FAnsiStrVarTemp1, write=SetAnsiStrVarTemp1};
       __property AnsiString AnsiStrVarTemp2 = {read=FAnsiStrVarTemp2, write=SetAnsiStrVarTemp2};
       __property AnsiString AnsiStrVarTemp3 = {read=FAnsiStrVarTemp3, write=SetAnsiStrVarTemp3};
       __property AnsiString AnsiStrVarTemp4 = {read=FAnsiStrVarTemp4, write=SetAnsiStrVarTemp4};
       __property AnsiString AnsiStrVarTemp5 = {read=FAnsiStrVarTemp5, write=SetAnsiStrVarTemp5};
       __property AnsiString AnsiStrVarTemp6 = {read=FAnsiStrVarTemp6, write=SetAnsiStrVarTemp6};
       __property AnsiString AnsiStrVarTemp7 = {read=FAnsiStrVarTemp7, write=SetAnsiStrVarTemp7};
       __property AnsiString AnsiStrVarTemp8 = {read=FAnsiStrVarTemp8, write=SetAnsiStrVarTemp8};
       __property AnsiString AnsiStrVarTemp9 = {read=FAnsiStrVarTemp9, write=SetAnsiStrVarTemp9};
       __property AnsiString AnsiStrVarTemp10 = {read=FAnsiStrVarTemp10, write=SetAnsiStrVarTemp10};
       __property int IntVarTemp1 = {read=FIntVarTemp1, write=SetIntVarTemp1, default=0};
       __property int IntVarTemp2 = {read=FIntVarTemp2, write=SetIntVarTemp2, default=0};
       __property int IntVarTemp3 = {read=FIntVarTemp3, write=SetIntVarTemp3, default=0};
       __property int IntVarTemp4 = {read=FIntVarTemp4, write=SetIntVarTemp4, default=0};
       __property int IntVarTemp5 = {read=FIntVarTemp5, write=SetIntVarTemp5, default=0};
       __property int IntVarTemp6 = {read=FIntVarTemp6, write=SetIntVarTemp6, default=0};
       __property int IntVarTemp7 = {read=FIntVarTemp7, write=SetIntVarTemp7, default=0};
       __property int IntVarTemp8 = {read=FIntVarTemp8, write=SetIntVarTemp8, default=0};
       __property int IntVarTemp9 = {read=FIntVarTemp9, write=SetIntVarTemp9, default=0};
       __property int IntVarTemp10 = {read=FIntVarTemp10, write=SetIntVarTemp10, default=0};
       __property float FloatVarTemp1 = {read=FFloatVarTemp1, write=SetFloatVarTemp1, default=0};
       __property float FloatVarTemp2 = {read=FFloatVarTemp2, write=SetFloatVarTemp2, default=0};
       __property float FloatVarTemp3 = {read=FFloatVarTemp3, write=SetFloatVarTemp3, default=0};
       __property float FloatVarTemp4 = {read=FFloatVarTemp4, write=SetFloatVarTemp4, default=0};
       __property float FloatVarTemp5 = {read=FFloatVarTemp5, write=SetFloatVarTemp5, default=0};
       __property float FloatVarTemp6 = {read=FFloatVarTemp6, write=SetFloatVarTemp6, default=0};
       __property float FloatVarTemp7 = {read=FFloatVarTemp7, write=SetFloatVarTemp7, default=0};
       __property float FloatVarTemp8 = {read=FFloatVarTemp8, write=SetFloatVarTemp8, default=0};
       __property float FloatVarTemp9 = {read=FFloatVarTemp9, write=SetFloatVarTemp9, default=0};
       __property float FloatVarTemp10 = {read=FFloatVarTemp10, write=SetFloatVarTemp10, default=0};
       __property bool BoolVarTemp1 = {read=FBoolVarTemp1, write=SetBoolVarTemp1, default=false};
       __property bool BoolVarTemp2 = {read=FBoolVarTemp2, write=SetBoolVarTemp2, default=false};
       __property bool BoolVarTemp3 = {read=FBoolVarTemp3, write=SetBoolVarTemp3, default=false};
       __property bool BoolVarTemp4 = {read=FBoolVarTemp4, write=SetBoolVarTemp4, default=false};
       __property bool BoolVarTemp5 = {read=FBoolVarTemp5, write=SetBoolVarTemp5, default=false};
       __property bool BoolVarTemp6 = {read=FBoolVarTemp6, write=SetBoolVarTemp6, default=false};
       __property bool BoolVarTemp7 = {read=FBoolVarTemp7, write=SetBoolVarTemp7, default=false};
       __property bool BoolVarTemp8 = {read=FBoolVarTemp8, write=SetBoolVarTemp8, default=false};
       __property bool BoolVarTemp9 = {read=FBoolVarTemp9, write=SetBoolVarTemp9, default=false};
       __property bool BoolVarTemp10 = {read=FBoolVarTemp10, write=SetBoolVarTemp10, default=false};
       __property TNotifyEvent OnAnsiStrVarTemp1Change = {read=FOnAnsiStrVarTemp1Change, write=FOnAnsiStrVarTemp1Change};
       __property TNotifyEvent OnAnsiStrVarTemp2Change = {read=FOnAnsiStrVarTemp2Change, write=FOnAnsiStrVarTemp2Change};
       __property TNotifyEvent OnAnsiStrVarTemp3Change = {read=FOnAnsiStrVarTemp3Change, write=FOnAnsiStrVarTemp3Change};
       __property TNotifyEvent OnAnsiStrVarTemp4Change = {read=FOnAnsiStrVarTemp4Change, write=FOnAnsiStrVarTemp4Change};
       __property TNotifyEvent OnAnsiStrVarTemp5Change = {read=FOnAnsiStrVarTemp5Change, write=FOnAnsiStrVarTemp5Change};
       __property TNotifyEvent OnAnsiStrVarTemp6Change = {read=FOnAnsiStrVarTemp6Change, write=FOnAnsiStrVarTemp6Change};
       __property TNotifyEvent OnAnsiStrVarTemp7Change = {read=FOnAnsiStrVarTemp7Change, write=FOnAnsiStrVarTemp7Change};
       __property TNotifyEvent OnAnsiStrVarTemp8Change = {read=FOnAnsiStrVarTemp8Change, write=FOnAnsiStrVarTemp8Change};
       __property TNotifyEvent OnAnsiStrVarTemp9Change = {read=FOnAnsiStrVarTemp9Change, write=FOnAnsiStrVarTemp9Change};
       __property TNotifyEvent OnAnsiStrVarTemp10Change = {read=FOnAnsiStrVarTemp10Change, write=FOnAnsiStrVarTemp10Change};
       __property TNotifyEvent OnIntVarTemp1Change = {read=FOnIntVarTemp1Change, write=FOnIntVarTemp1Change};
       __property TNotifyEvent OnIntVarTemp2Change = {read=FOnIntVarTemp2Change, write=FOnIntVarTemp2Change};
       __property TNotifyEvent OnIntVarTemp3Change = {read=FOnIntVarTemp3Change, write=FOnIntVarTemp3Change};
       __property TNotifyEvent OnIntVarTemp4Change = {read=FOnIntVarTemp4Change, write=FOnIntVarTemp4Change};
       __property TNotifyEvent OnIntVarTemp5Change = {read=FOnIntVarTemp5Change, write=FOnIntVarTemp5Change};
       __property TNotifyEvent OnIntVarTemp6Change = {read=FOnIntVarTemp6Change, write=FOnIntVarTemp6Change};
       __property TNotifyEvent OnIntVarTemp7Change = {read=FOnIntVarTemp7Change, write=FOnIntVarTemp7Change};
       __property TNotifyEvent OnIntVarTemp8Change = {read=FOnIntVarTemp8Change, write=FOnIntVarTemp8Change};
       __property TNotifyEvent OnIntVarTemp9Change = {read=FOnIntVarTemp9Change, write=FOnIntVarTemp9Change};
       __property TNotifyEvent OnIntVarTemp10Change = {read=FOnIntVarTemp10Change, write=FOnIntVarTemp10Change};
       __property TNotifyEvent OnFloatVarTemp1Change = {read=FOnFloatVarTemp1Change, write=FOnFloatVarTemp1Change};
       __property TNotifyEvent OnFloatVarTemp2Change = {read=FOnFloatVarTemp2Change, write=FOnFloatVarTemp2Change};
       __property TNotifyEvent OnFloatVarTemp3Change = {read=FOnFloatVarTemp3Change, write=FOnFloatVarTemp3Change};
       __property TNotifyEvent OnFloatVarTemp4Change = {read=FOnFloatVarTemp4Change, write=FOnFloatVarTemp4Change};
       __property TNotifyEvent OnFloatVarTemp5Change = {read=FOnFloatVarTemp5Change, write=FOnFloatVarTemp5Change};
       __property TNotifyEvent OnFloatVarTemp6Change = {read=FOnFloatVarTemp6Change, write=FOnFloatVarTemp6Change};
       __property TNotifyEvent OnFloatVarTemp7Change = {read=FOnFloatVarTemp7Change, write=FOnFloatVarTemp7Change};
       __property TNotifyEvent OnFloatVarTemp8Change = {read=FOnFloatVarTemp8Change, write=FOnFloatVarTemp8Change};
       __property TNotifyEvent OnFloatVarTemp9Change = {read=FOnFloatVarTemp9Change, write=FOnFloatVarTemp9Change};
       __property TNotifyEvent OnFloatVarTemp10Change = {read=FOnFloatVarTemp10Change, write=FOnFloatVarTemp10Change};
       __property TNotifyEvent OnBoolVarTemp1Change = {read=FOnBoolVarTemp1Change, write=FOnBoolVarTemp1Change};
       __property TNotifyEvent OnBoolVarTemp2Change = {read=FOnBoolVarTemp2Change, write=FOnBoolVarTemp2Change};
       __property TNotifyEvent OnBoolVarTemp3Change = {read=FOnBoolVarTemp3Change, write=FOnBoolVarTemp3Change};
       __property TNotifyEvent OnBoolVarTemp4Change = {read=FOnBoolVarTemp4Change, write=FOnBoolVarTemp4Change};
       __property TNotifyEvent OnBoolVarTemp5Change = {read=FOnBoolVarTemp5Change, write=FOnBoolVarTemp5Change};
       __property TNotifyEvent OnBoolVarTemp6Change = {read=FOnBoolVarTemp6Change, write=FOnBoolVarTemp6Change};
       __property TNotifyEvent OnBoolVarTemp7Change = {read=FOnBoolVarTemp7Change, write=FOnBoolVarTemp7Change};
       __property TNotifyEvent OnBoolVarTemp8Change = {read=FOnBoolVarTemp8Change, write=FOnBoolVarTemp8Change};
       __property TNotifyEvent OnBoolVarTemp9Change = {read=FOnBoolVarTemp9Change, write=FOnBoolVarTemp9Change};
       __property TNotifyEvent OnBoolVarTemp10Change = {read=FOnBoolVarTemp10Change, write=FOnBoolVarTemp10Change};
};
//---------------------------------------------------------------------------
#endif

Variable.cpp

  //---------------------------------------------------------------------------

#include <basepch.h>

#pragma hdrstop

#include "Variable.h"
#pragma package(smart_init)
//---------------------------------------------------------------------------
//  ValidCtrCheck est utilis pour vrifier que les composants crs n'ont
// aucune fonction virtuelle pure.
//

static inline void ValidCtrCheck(TVariable *)
{
       new TVariable(NULL);
}
//---------------------------------------------------------------------------
__fastcall TVariable::TVariable(TComponent* Owner)
       : TComponent(Owner)
{
}
//---------------------------------------------------------------------------
namespace Variable
{
       void __fastcall PACKAGE Register()
       {
                TComponentClass classes[1] = {__classid(TVariable)};
                RegisterComponents("Flyonsoft", classes, 0);
       }
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp1(AnsiString AAnsiStrVarTemp1)
{
FAnsiStrVarTemp1 = AAnsiStrVarTemp1;
if (FOnAnsiStrVarTemp1Change) FOnAnsiStrVarTemp1Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp2(AnsiString AAnsiStrVarTemp2)
{
FAnsiStrVarTemp2 = AAnsiStrVarTemp2;
if (FOnAnsiStrVarTemp2Change) FOnAnsiStrVarTemp2Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp3(AnsiString AAnsiStrVarTemp3)
{
FAnsiStrVarTemp3 = AAnsiStrVarTemp3;
if (FOnAnsiStrVarTemp3Change) FOnAnsiStrVarTemp3Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp4(AnsiString AAnsiStrVarTemp4)
{
FAnsiStrVarTemp4 = AAnsiStrVarTemp4;
if (FOnAnsiStrVarTemp4Change) FOnAnsiStrVarTemp4Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp5(AnsiString AAnsiStrVarTemp5)
{
FAnsiStrVarTemp5 = AAnsiStrVarTemp5;
if (FOnAnsiStrVarTemp5Change) FOnAnsiStrVarTemp5Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp6(AnsiString AAnsiStrVarTemp6)
{
FAnsiStrVarTemp6 = AAnsiStrVarTemp6;
if (FOnAnsiStrVarTemp6Change) FOnAnsiStrVarTemp6Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp7(AnsiString AAnsiStrVarTemp7)
{
FAnsiStrVarTemp7 = AAnsiStrVarTemp7;
if (FOnAnsiStrVarTemp7Change) FOnAnsiStrVarTemp7Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp8(AnsiString AAnsiStrVarTemp8)
{
FAnsiStrVarTemp8 = AAnsiStrVarTemp8;
if (FOnAnsiStrVarTemp8Change) FOnAnsiStrVarTemp8Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp9(AnsiString AAnsiStrVarTemp9)
{
FAnsiStrVarTemp9 = AAnsiStrVarTemp9;
if (FOnAnsiStrVarTemp9Change) FOnAnsiStrVarTemp9Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetAnsiStrVarTemp10(AnsiString AAnsiStrVarTemp10)
{
FAnsiStrVarTemp10 = AAnsiStrVarTemp10;
if (FOnAnsiStrVarTemp10Change) FOnAnsiStrVarTemp10Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp1(int AIntVarTemp1)
{
FIntVarTemp1 = AIntVarTemp1;
if (FOnIntVarTemp1Change) FOnIntVarTemp1Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp2(int AIntVarTemp2)
{
FIntVarTemp2 = AIntVarTemp2;
if (FOnIntVarTemp2Change) FOnIntVarTemp2Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp3(int AIntVarTemp3)
{
FIntVarTemp3 = AIntVarTemp3;
if (FOnIntVarTemp3Change) FOnIntVarTemp3Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp4(int AIntVarTemp4)
{
FIntVarTemp4 = AIntVarTemp4;
if (FOnIntVarTemp4Change) FOnIntVarTemp4Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp5(int AIntVarTemp5)
{
FIntVarTemp5 = AIntVarTemp5;
if (FOnIntVarTemp5Change) FOnIntVarTemp5Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp6(int AIntVarTemp6)
{
FIntVarTemp6 = AIntVarTemp6;
if (FOnIntVarTemp6Change) FOnIntVarTemp6Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp7(int AIntVarTemp7)
{
FIntVarTemp7 = AIntVarTemp7;
if (FOnIntVarTemp7Change) FOnIntVarTemp7Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp8(int AIntVarTemp8)
{
FIntVarTemp8 = AIntVarTemp8;
if (FOnIntVarTemp8Change) FOnIntVarTemp8Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp9(int AIntVarTemp9)
{
FIntVarTemp9 = AIntVarTemp9;
if (FOnIntVarTemp9Change) FOnIntVarTemp9Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetIntVarTemp10(int AIntVarTemp10)
{
FIntVarTemp10 = AIntVarTemp10;
if (FOnIntVarTemp10Change) FOnIntVarTemp10Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp1(float AFloatVarTemp1)
{
FFloatVarTemp1 = AFloatVarTemp1;
if (FOnFloatVarTemp1Change) FOnFloatVarTemp1Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp2(float AFloatVarTemp2)
{
FFloatVarTemp2 = AFloatVarTemp2;
if (FOnFloatVarTemp2Change) FOnFloatVarTemp2Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp3(float AFloatVarTemp3)
{
FFloatVarTemp3 = AFloatVarTemp3;
if (FOnFloatVarTemp3Change) FOnFloatVarTemp3Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp4(float AFloatVarTemp4)
{
FFloatVarTemp4 = AFloatVarTemp4;
if (FOnFloatVarTemp4Change) FOnFloatVarTemp4Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp5(float AFloatVarTemp5)
{
FFloatVarTemp5 = AFloatVarTemp5;
if (FOnFloatVarTemp5Change) FOnFloatVarTemp5Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp6(float AFloatVarTemp6)
{
FFloatVarTemp6 = AFloatVarTemp6;
if (FOnFloatVarTemp6Change) FOnFloatVarTemp6Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp7(float AFloatVarTemp7)
{
FFloatVarTemp7 = AFloatVarTemp7;
if (FOnFloatVarTemp7Change) FOnFloatVarTemp7Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp8(float AFloatVarTemp8)
{
FFloatVarTemp8 = AFloatVarTemp8;
if (FOnFloatVarTemp8Change) FOnFloatVarTemp8Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp9(float AFloatVarTemp9)
{
FFloatVarTemp9 = AFloatVarTemp9;
if (FOnFloatVarTemp9Change) FOnFloatVarTemp9Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetFloatVarTemp10(float AFloatVarTemp10)
{
FFloatVarTemp10 = AFloatVarTemp10;
if (FOnFloatVarTemp10Change) FOnFloatVarTemp10Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp1(bool ABoolVarTemp1)
{
FBoolVarTemp1 = ABoolVarTemp1;
if (FOnBoolVarTemp1Change) FOnBoolVarTemp1Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp2(bool ABoolVarTemp2)
{
FBoolVarTemp2 = ABoolVarTemp2;
if (FOnBoolVarTemp2Change) FOnBoolVarTemp2Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp3(bool ABoolVarTemp3)
{
FBoolVarTemp3 = ABoolVarTemp3;
if (FOnBoolVarTemp3Change) FOnBoolVarTemp3Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp4(bool ABoolVarTemp4)
{
FBoolVarTemp4 = ABoolVarTemp4;
if (FOnBoolVarTemp4Change) FOnBoolVarTemp4Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp5(bool ABoolVarTemp5)
{
FBoolVarTemp5 = ABoolVarTemp5;
if (FOnBoolVarTemp5Change) FOnBoolVarTemp5Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp6(bool ABoolVarTemp6)
{
FBoolVarTemp6 = ABoolVarTemp6;
if(FOnBoolVarTemp6Change) FOnBoolVarTemp6Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp7(bool ABoolVarTemp7)
{
FBoolVarTemp7 = ABoolVarTemp7;
if (FOnBoolVarTemp7Change) FOnBoolVarTemp7Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp8(bool ABoolVarTemp8)
{
FBoolVarTemp8 = ABoolVarTemp8;
if (FOnBoolVarTemp8Change) FOnBoolVarTemp8Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp9(bool ABoolVarTemp9)
{
FBoolVarTemp9 = ABoolVarTemp9;
if (FOnBoolVarTemp9Change) FOnBoolVarTemp9Change(this);
}
//---------------------------------------------------------------------------
void __fastcall TVariable::SetBoolVarTemp10(bool ABoolVarTemp10)
{
FBoolVarTemp10 = ABoolVarTemp10;
if (FOnBoolVarTemp10Change) FOnBoolVarTemp10Change(this);
}
//---------------------------------------------------------------------------

A venir : Mise jour du composant pour l'ajout des proprits OnBeforeChange et OnAfterChange.

CallBack | CodeGear | Cpp | CppBuilder | Delphi | embarcadero | free | Freeware | Gratuit | TVariable | Variable globale

Mise à jour le Mardi, 16 Juin 2009 13:31
 
Copyright © 2020 Flyonsoft. Tous droits réservés.
Vous pouvez réutiliser les codes sources fourni sur ce site mais vous devez y mettre un lien vers la page du code ou à défaut sur la page www.flyonsoft.com.