Теми рефератів
> Реферати > Курсові роботи > Звіти з практики > Курсові проекти > Питання та відповіді > Ессе > Доклади > Учбові матеріали > Контрольні роботи > Методички > Лекції > Твори > Підручники > Статті Контакти
Реферати, твори, дипломи, практика » Курсовые обзорные » Моделювання дошки Гальтона на C + + Borland Builder

Реферат Моделювання дошки Гальтона на C + + Borland Builder





)

# pragma resource "*. dfm "* Params;

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

__fastcall TParams :: TParams (TComponent * Owner)

: TForm (Owner)

{

}

// ---------------------------------------- ----------------------------------- __fastcall TParams :: FormActivate (TObject * Sender)

{-> Caption = "Кількість осередків для кульок (" + IntToStr (Form1-> UpDown1-> Min) + "-" + IntToStr (Form1-> UpDown1 -> Max) + "):

}

// ---------------------------------------- ----------------------------------- __fastcall TParams :: Button2Click (TObject * Sender)

{();

}

// ---------------------------------------- ----------------------------------- __fastcall TParams :: Edit1KeyPress (TObject * Sender, char & Key)

{((Key> = '0 ') && (Key <= '9') | | (Key == VK_BACK)) return; (Key == VK_RETURN) Edit2- > SetFocus (); Key = 0;

}

// ---------------------------------------- ----------------------------------- __fastcall TParams :: Edit2KeyPress (TObject * Sender, char & Key)

{((Key> = '0 ') && (Key <= '9') | | (Key == VK_BACK)) return; (Key == VK_RETURN) Button1- > SetFocus (); Key = 0;

}

// ---------------------------------------- ----------------------------------- __fastcall TParams :: Button1Click (TObject * Sender)

{kol; (StrToInt (Edit1-> Text) UpDown1-> Min)

{("Число вічок не менше" + IntToStr (Form1-> UpDown1-> Min) + "!"); -> SetFocus ();;

} (StrToInt (Edit1-> Text)> Form1-> UpDown1-> Max)

{-> Text = IntToStr (Form1-> UpDown1-> Max); ("Число осередків не більше" + IntToStr (Form1-> UpDown1-> Max) + "!"); -> SetFocus ();;

} = StrToInt (Edit1-> Text); -> UpDown1-> Position = kol; (Form1-> UpDown2-> Position> kol * kol)

{-> UpDown2-> Position = kol * kol; -> Edit2-> Text = IntToStr (kol * kol);

} -> UpDown2-> Max = kol * kol; -> Edit1-> Text = Edit1-> Text; (StrToInt (Edit2-> Text) UpDown2-> Min)

{("Число кульок не менш" + IntToStr (Form1-> UpDown2-> Min) + "!"); -> SetFocus ();;

} (StrToInt (Edit2-> Text)> Form1-> UpDown2-> Max)

{("При такому колічесвтом осередків число кульок не більше" + IntToStr (Form1-> UpDown2-> Max) + "!"); -> SetFocus (); ;

} -> UpDown2-> Position = StrToInt

}


Назад | сторінка 20 з 20





Схожі реферати:

  • Реферат на тему: Phonetic peculiarities of the popular science text
  • Реферат на тему: Grammar of the Text: its Basic Units and Main Features (based on the novel ...
  • Реферат на тему: Технології аналізу даних (Text Mining, Data Mining)
  • Реферат на тему: The Geographical Position of Ukraine
  • Реферат на тему: Число Пі