12 4

12 4



unit Unitl;

interface

uses

Forms,


Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Dialogs, StdCtrls, ExtCtrls, Grids, ComCtrls, Math, Gauges;

typa

TForml = class{TForm)

StatusBarl: TStatusBar;

StringGridl: TStringGrid;

Buttonl: TButton;

RadioGroupl: TRadioGroup;

Gaugel: TGauge;

procedurę FormCreate{Sender: TObject); procedurę ButtonlClick(Sender: TObject); procedur© RadioGrouplClick(Sender: TObject); private

procedurę Dodatnie; procedurę Ujemne;

{ Private declarations } public

{ Public declarations } end; const N = 4; var

Forml: TForml; implementation var

X : array[1..N,1..N] of integer;

{$R *.dfm}

procedur© TForml.Dodatnie; var

i,j : integer; sd : integer; begin

sd:= 0;

for i:=l to N do for j:=l to N do

if X[i,j] > 0 then Inc(sd);

Gaugel.MaxValue:=16;

Gaugel.MinValue:=0;

Gaugel.Progress:=sd;

Gaugel.Visible:=True; end;

procedur© TForml.Uj emne; var

i,j : integer; sd : integer; begin

sd:=0;

for i:=1 to N do for j:=1 to N do

if X[i,j] < 0 then Inc(sd);

Gaugel.MaxValue:=16;

Gaugel.MinValue:=0;

Gaugel,Progress:=sd;

Gaugel.Visible:=True; end;

procedurę TForml.FormCreate{Sender: TObject);

begin

Randomize;

StatusBarl.Panels[1].Text:=DateTimeToStr(Now); end;

procedurę TForml.ButtonlClick(Sender; TObject);


Wyszukiwarka

Podobne podstrony:
5 (1810) Rozdział 1. ♦ Projektowanie aplikacji w Delphi 2006 13 unit Unitl; interface uses Windows,
11ccw07 / Eudora Light - [John Doe, 04:23 PM 7/12/96 , My comments] I =-l £ile Edit Mailbox Message
f1 13 Options Cursor Colors in Forms Window Colors in Lists TracęGeneral Fonts W Standard Joolbar W
unit Name:_ Score:_/ 20 pointsSHORT TEST 12 AI UNIT 12 SHORT TEST 12 B I UNIT 12 2 Hiemaii whois ca
ntmail8 I »$- Skrzynka odbiorcza - Windows Messaging ■ _
Rys. 2. Zmiany graficznego interfejsu systemu Microsoft Windows (kolejno wersje: 1.0. 3.1. 98.
58914 img042 (12) Unit 18Vocabulary 1 2 5,940 3 750 4 810 5 7,540 6 6,100 7 840 8 1,000 2 1 total ov
f2 44 Microsoft Developer Studio - QSEND File Edit View insert Build Jools Window Help B-01 qsend cl
f2 45 ^ Microsoft Developer Studio - QSEND File Edit View insert Build Jools Window Help B-01 qsend

więcej podobnych podstron