Προς το περιεχόμενο

Super deal στη C


georginos1989

Προτεινόμενες αναρτήσεις

  • Απαντ. 40
  • Δημ.
  • Τελ. απάντηση
Δημοσ.

>
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "Unit2.h"
#include "Unit1.h"
#include "Unit3.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit6.h"
#include<stdio.h>
#include<stdlib.h>

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
int *pflag;
int *pcounter;
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
       : TForm(Owner)
{
random();

pcounter=&counter;
flag=0;
pflag=&flag;
Edit3->Text="Select your case";



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





void TForm2::random(void)
{
int a[26]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},x=0,i,k=0,t=0,f=0;
int p[26]={1,2,5,10,25,50,75,100,200,300,400,500,750,1000,5000,10000,25000,50000,75000,100000,200000,300000,400000,500000,750000,1000000} ;
int posa[26]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}  ;
unsigned seed;
seed=time(NULL);
srand(seed);


while(k<26)
{
    f=0;
    x=rand()%27;

       for(i=0;i<k+1;i++)
       {
               if(x==a[i])
               {
                       f=-1;
               }

       }

    if(f==0)
    {
       a[k]=x;
       k++;
    }


}

for(i=0;i<26;i++)
{

       posa[i]=p[a[i]-1];
}
for(i=0;i<26;i++)
{
       StringGrid1->Cells[i][0]=posa[i];
      // Form5->StringGrid1->Cells[i][0]=posa[i];
}

}
void __fastcall TForm2::Panel29Click(TObject *Sender)
{

Panel29->Color=clRed;

if(*pflag==0)
       Edit2->Text="1";

if(*pflag==1)
{
Edit1->Text=StringGrid1->Cells[0][0];
if(Panel3->Caption==StringGrid1->Cells[0][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[0][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[0][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[0][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[0][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[0][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[0][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[0][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[0][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[0][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[0][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[0][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[0][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[0][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[0][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[0][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[0][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[0][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[0][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[0][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[0][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[0][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[0][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[0][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[0][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[0][0])
       Panel28->Color=clRed;
StringGrid1->Cells[0][0]=0;


}
*pflag=1;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel30Click(TObject *Sender)
{

Panel30->Color=clRed;

if(flag==0)
       Edit2->Text="2";

if(flag==1)
{
Edit1->Text=StringGrid1->Cells[1][0];
if(Panel3->Caption==StringGrid1->Cells[1][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[1][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[1][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[1][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[1][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[1][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[1][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[1][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[1][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[1][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[1][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[1][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[1][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[1][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[1][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[1][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[1][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[1][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[1][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[1][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[1][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[1][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[1][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[1][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[1][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[1][0])
       Panel28->Color=clRed;
StringGrid1->Cells[1][0]=0;
}
*pflag=1;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel31Click(TObject *Sender)
{

Panel31->Color=clRed;
if(*pflag==0)
       Edit2->Text="1";

if(*pflag==1)
{
Edit1->Text=StringGrid1->Cells[2][0];
if(Panel3->Caption==StringGrid1->Cells[2][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[2][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[2][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[2][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[2][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[2][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[2][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[2][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[2][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[2][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[2][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[2][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[2][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[2][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[2][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[2][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[2][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[2][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[2][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[2][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[2][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[2][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[2][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[2][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[2][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[2][0])
       Panel28->Color=clRed;
StringGrid1->Cells[2][0]=0;
}
*pflag=1;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel32Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[3][0];
Panel32->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[3][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[3][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[3][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[3][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[3][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[3][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[3][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[3][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[3][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[3][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[3][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[3][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[3][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[3][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[3][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[3][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[3][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[3][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[3][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[3][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[3][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[3][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[3][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[3][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[3][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[3][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel33Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[4][0];
Panel33->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[4][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[4][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[4][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[4][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[4][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[4][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[4][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[4][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[4][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[4][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[4][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[4][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[4][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[4][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[4][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[4][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[4][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[4][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[4][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[4][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[4][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[4][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[4][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[4][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[4][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[4][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel34Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[5][0];
Panel34->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[5][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[5][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[5][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[5][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[5][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[5][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[5][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[5][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[5][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[5][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[5][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[5][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[5][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[5][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[5][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[5][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[5][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[5][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[5][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[5][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[5][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[5][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[5][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[5][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[5][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[5][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel35Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[6][0];
Panel35->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[6][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[6][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[6][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[6][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[6][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[6][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[6][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[6][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[6][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[6][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[6][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[6][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[6][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[6][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[6][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[6][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[6][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[6][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[6][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[6][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[6][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[6][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[6][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[6][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[6][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[6][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel36Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[7][0];
Panel36->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[7][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[7][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[7][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[7][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[7][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[7][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[7][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[7][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[7][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[7][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[7][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[7][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[7][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[7][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[7][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[7][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[7][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[7][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[7][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[7][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[7][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[7][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[7][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[7][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[7][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[7][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel37Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[8][0];
Panel37->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[8][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[8][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[8][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[8][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[8][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[8][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[8][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[8][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[8][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[8][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[8][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[8][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[8][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[8][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[8][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[8][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[8][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[8][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[8][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[8][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[8][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[8][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[8][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[8][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[8][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[8][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel38Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[9][0];
Panel38->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[9][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[9][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[9][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[9][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[9][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[9][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[9][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[9][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[9][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[9][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[9][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[9][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[9][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[9][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[9][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[9][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[9][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[9][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[9][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[9][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[9][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[9][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[9][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[9][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[9][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[9][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel54Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[10][0];
Panel54->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[10][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[10][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[10][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[10][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[10][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[10][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[10][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[10][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[10][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[10][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[10][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[10][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[10][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[10][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[10][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[10][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[10][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[10][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[10][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[10][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[10][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[10][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[10][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[10][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[10][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[10][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel39Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[11][0];
Panel39->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[11][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[11][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[11][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[11][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[11][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[11][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[11][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[11][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[11][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[11][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[11][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[11][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[11][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[11][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[11][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[11][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[11][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[11][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[11][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[11][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[11][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[11][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[11][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[11][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[11][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[11][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel40Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[12][0];
Panel40->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[12][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[12][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[12][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[12][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[12][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[12][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[12][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[12][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[12][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[12][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[12][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[12][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[12][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[12][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[12][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[12][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[12][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[12][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[12][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[12][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[12][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[12][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[12][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[12][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[12][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[12][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel41Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[13][0];
Panel41->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[13][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[13][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[13][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[13][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[13][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[13][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[13][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[13][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[13][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[13][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[13][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[13][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[13][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[13][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[13][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[13][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[13][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[13][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[13][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[13][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[13][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[13][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[13][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[13][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[13][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[13][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel42Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[14][0];
Panel42->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[14][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[14][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[14][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[14][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[14][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[14][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[14][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[14][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[14][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[14][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[14][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[14][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[14][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[14][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[14][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[14][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[14][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[14][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[14][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[14][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[14][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[14][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[14][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[14][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[14][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[14][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel43Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[15][0];
Panel43->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[15][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[15][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[15][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[15][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[15][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[15][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[15][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[15][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[15][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[15][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[15][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[15][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[15][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[15][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[15][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[15][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[15][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[15][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[15][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[15][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[15][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[15][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[15][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[15][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[15][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[15][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel44Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[16][0];
Panel44->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[16][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[16][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[16][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[16][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[16][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[16][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[16][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[16][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[16][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[16][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[16][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[16][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[16][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[16][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[16][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[16][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[16][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[16][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[16][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[16][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[16][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[16][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[16][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[16][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[16][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[16][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel45Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[17][0];
Panel45->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[17][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[17][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[17][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[17][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[17][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[17][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[17][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[17][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[17][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[17][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[17][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[17][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[17][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[17][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[17][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[17][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[17][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[17][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[17][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[17][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[17][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[17][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[17][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[17][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[17][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[17][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel46Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[18][0];
Panel46->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[18][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[18][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[18][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[18][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[18][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[18][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[18][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[18][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[18][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[18][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[18][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[18][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[18][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[18][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[18][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[18][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[18][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[18][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[18][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[18][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[18][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[18][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[18][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[18][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[18][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[18][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel47Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[19][0];
Panel47->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[19][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[19][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[19][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[19][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[19][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[19][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[19][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[19][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[19][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[19][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[19][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[19][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[19][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[19][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[19][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[19][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[19][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[19][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[19][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[19][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[19][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[19][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[19][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[19][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[19][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[19][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel48Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[20][0];
Panel48->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[20][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[20][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[20][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[20][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[20][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[20][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[20][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[20][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[20][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[20][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[20][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[20][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[20][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[20][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[20][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[20][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[20][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[20][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[20][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[20][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[20][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[20][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[20][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[20][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[20][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[20][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel49Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[21][0];
Panel49->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[21][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[21][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[21][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[21][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[21][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[21][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[21][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[21][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[21][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[21][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[21][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[21][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[21][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[21][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[21][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[21][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[21][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[21][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[21][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[21][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[21][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[21][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[21][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[21][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[21][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[21][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel50Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[22][0];
Panel50->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[22][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[22][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[22][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[22][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[22][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[22][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[22][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[22][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[22][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[22][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[22][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[22][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[22][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[22][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[22][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[22][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[22][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[22][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[22][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[22][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[22][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[22][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[22][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[22][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[22][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[22][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel51Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[23][0];
Panel51->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[23][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[23][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[23][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[23][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[23][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[23][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[23][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[23][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[23][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[23][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[23][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[23][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[23][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[23][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[23][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[23][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[23][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[23][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[23][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[23][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[23][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[23][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[23][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[23][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[23][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[23][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel52Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[24][0];
Panel52->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[24][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[24][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[24][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[24][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[24][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[24][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[24][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[24][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[24][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[24][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[24][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[24][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[24][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[24][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[24][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[24][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[24][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[24][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[24][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[24][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[24][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[24][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[24][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[24][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[24][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[24][0])
       Panel28->Color=clRed;
}
//---------------------------------------------------------------------------

void __fastcall TForm2::Panel53Click(TObject *Sender)
{
Edit1->Text=StringGrid1->Cells[25][0];
Panel53->Color=clRed;
if(Panel3->Caption==StringGrid1->Cells[25][0])
       Panel3->Color=clRed;
else if(Panel4->Caption==StringGrid1->Cells[25][0])
       Panel4->Color=clRed;
else if(Panel5->Caption==StringGrid1->Cells[25][0])
       Panel5->Color=clRed;
else if(Panel6->Caption==StringGrid1->Cells[25][0])
       Panel6->Color=clRed;
else if(Panel7->Caption==StringGrid1->Cells[25][0])
       Panel7->Color=clRed;
else if(Panel8->Caption==StringGrid1->Cells[25][0])
       Panel8->Color=clRed;
else if(Panel9->Caption==StringGrid1->Cells[25][0])
       Panel9->Color=clRed;
else if(Panel10->Caption==StringGrid1->Cells[25][0])
       Panel10->Color=clRed;
else if(Panel11->Caption==StringGrid1->Cells[25][0])
       Panel11->Color=clRed;
else if(Panel12->Caption==StringGrid1->Cells[25][0])
       Panel12->Color=clRed;
else if(Panel13->Caption==StringGrid1->Cells[25][0])
       Panel13->Color=clRed;
else if(Panel14->Caption==StringGrid1->Cells[25][0])
       Panel14->Color=clRed;
else if(Panel15->Caption==StringGrid1->Cells[25][0])
       Panel15->Color=clRed;
else if(Panel16->Caption==StringGrid1->Cells[25][0])
       Panel16->Color=clRed;
else if(Panel17->Caption==StringGrid1->Cells[25][0])
       Panel17->Color=clRed;
else if(Panel18->Caption==StringGrid1->Cells[25][0])
       Panel18->Color=clRed;
else if(Panel19->Caption==StringGrid1->Cells[25][0])
       Panel19->Color=clRed;
else if(Panel20->Caption==StringGrid1->Cells[25][0])
       Panel20->Color=clRed;
else if(Panel21->Caption==StringGrid1->Cells[25][0])
       Panel21->Color=clRed;
else if(Panel22->Caption==StringGrid1->Cells[25][0])
       Panel22->Color=clRed;
else if(Panel23->Caption==StringGrid1->Cells[25][0])
       Panel23->Color=clRed;
else if(Panel24->Caption==StringGrid1->Cells[25][0])
       Panel24->Color=clRed;
else if(Panel25->Caption==StringGrid1->Cells[25][0])
       Panel25->Color=clRed;
else if(Panel26->Caption==StringGrid1->Cells[25][0])
       Panel26->Color=clRed;
else if(Panel27->Caption==StringGrid1->Cells[25][0])
       Panel27->Color=clRed;
else if(Panel28->Caption==StringGrid1->Cells[25][0])
       Panel28->Color=clRed;

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

 

Στα 3 πρώτα πανελ έχω βάλει παραπάνω if.. Το έκανα ετσι δοκιμάζοντας αν δουλεύει για να επιλέγεις την δικιά σου βαλίτσα στην αρχή ώστε να μην γίνεται κοκκινο και το ποσο και σου εμφανίζει το ποσό που έχει μεσα

 

---------- Προσθήκη στις 18:07 ---------- Προηγούμενο μήνυμα στις 17:04 ----------

 

Οποιος μπορεί να βοηθήσει.....

Δημοσ.

Ναι το έχω ως άσκηση μαζί με άλλα 3 παιδιά....

 

---------- Προσθήκη στις 19:39 ---------- Προηγούμενο μήνυμα στις 19:27 ----------

 

Γιατί ρωτάς?

Δημοσ.
Ναι το έχω ως άσκηση μαζί με άλλα 3 παιδιά....

 

---------- Προσθήκη στις 19:39 ---------- Προηγούμενο μήνυμα στις 19:27 ----------

 

Γιατί ρωτάς?

 

Γιατί φαίνεται από αυτά που γράφεις πως υπάρχει κάποιο deadline, φαίνεται δηλαδή πως βιάζεσαι, και οποιος βιάζεται σκοντάφτει :P. Τέλος πάντων, δεν βαρεθήκατε να γράφετε όλα αυτά τα if-else-if ? Ας τα βάζατε σε έναν πίνακα όλα τα Panels. Θα μπορούσατε να χρησιμοποιήσετε μετά ένα loop για να τσεκάρετε αυτό που θέλετε. Σου φαίνεται δύσκολο να συνεχίσεις γιατί η ομάδα σας έχει μπλέξει πολύ τον κώδικα. Σκέψου αύριο-μεθαύριο να σου πει ο καθηγητής σου πως θέλω να παίξω super-deal με 100 panels. Τί θα κάνεις ? Θα προσθέσεις άλλα πόσα if-then-else? Μήπως πρέπει να σκεφτείτε από την αρχή κάποια πράγματα; Στον προγραμματισμό συνήθως σπάνια πετυχαίνει το design με την πρώτη. Δυστυχώς δε μπορώ να σε βοηθήσω με τα events και τις callbacks γιατί δεν έχω τον borland, αλλά σου προτείνω να αλλάξετε λίγο την αρχιτεκτονική του προγράμματος. Αν πχ αύριο σας πει ο προφέσορας πως δεν του αρέσει η borland, και θέλει να χρησιμοποιήσει πχ Qt, τότε θα πρέπει ο κορμός του προγράμματος να είναι έτσι σχεδιασμένος ώστε να μη χρειάζεται αλλαγές. Ένα πρώτο βήμα θα μπορούσε να είναι ο διαχωρισμός του GUI από τη "λογική" του προγράμματος.

Δημοσ.

Εννοείς πίνακα χαρακτήρων?

 

---------- Προσθήκη στις 20:26 ---------- Προηγούμενο μήνυμα στις 20:11 ----------

 

και τι να περιέχει ο πινακας.. Πχ panel1,panel2... ή 1,2,....

 

---------- Προσθήκη στις 20:36 ---------- Προηγούμενο μήνυμα στις 20:26 ----------

 

Βάλαμε τόσες If γιατί θέλουμε όταν θα διαλέγεις ενα πανελ(βαλίτσα) να γίνεται κοκκινο και αντίστοιχο πανελ(ποσό)

Δημοσ.

Έχετε καμιά ιδέα με ποιόν τρόπο μπορώ να κάνω τις προσφορές του τραπεζίτη? Έχω δοκιμάσει τρόπους αλλά δεν βγαίνει καλό ποσό σε σχέση με ένα super deal που υπάρχει στο ιντερνετ...........

Δημοσ.

Έχετε καμιά ιδέα με ποιόν τρόπο μπορώ να κάνω τις προσφορές του τραπεζίτη? Έχω δοκιμάσει τρόπους αλλά δεν βγαίνει καλό ποσό σε σχέση με ένα super deal που υπάρχει στο ιντερνετ...........

Δημοσ.

εχεις βρει τον αλγοριθμο που βγαζει την προσφορα αναλογα με τα εναπομειναντα ποσα και τον αριθμο των κλειστων βαλιτσων; καπου πρεπει να υπαρχει

Δημοσ.

εχεις βρει τον αλγοριθμο που βγαζει την προσφορα αναλογα με τα εναπομειναντα ποσα και τον αριθμο των κλειστων βαλιτσων; καπου πρεπει να υπαρχει

Αρχειοθετημένο

Αυτό το θέμα έχει αρχειοθετηθεί και είναι κλειστό για περαιτέρω απαντήσεις.

  • Δημιουργία νέου...