Полезное:
Как сделать разговор полезным и приятным
Как сделать объемную звезду своими руками
Как сделать то, что делать не хочется?
Как сделать погремушку
Как сделать так чтобы женщины сами знакомились с вами
Как сделать идею коммерческой
Как сделать хорошую растяжку ног?
Как сделать наш разум здоровым?
Как сделать, чтобы люди обманывали меньше
Вопрос 4. Как сделать так, чтобы вас уважали и ценили?
Как сделать лучше себе и другим людям
Как сделать свидание интересным?
Категории:
АрхитектураАстрономияБиологияГеографияГеологияИнформатикаИскусствоИсторияКулинарияКультураМаркетингМатематикаМедицинаМенеджментОхрана трудаПравоПроизводствоПсихологияРелигияСоциологияСпортТехникаФизикаФилософияХимияЭкологияЭкономикаЭлектроника
|
Продолжение приложения Б
procedure ShiftPlan(var data, plan, potential: TData); function IsOver(x,y: integer): integer; procedure AddRemoveLine(i1, i2: integer); end; var Form1: TForm1; implementation {$R *.dfm} uses size; procedure TForm1.Button1Click(Sender: TObject); var index, s: integer; begin if Size_f1.ShowModal () <> mrOk then exit; s:= StrToInt(Size_f1.Cols_e1.Text); StringGrid1.ColCount:= s + 2; for index:= 1 to s do StringGrid1.Cells[index+1,0]:= IntToStr(index); s:= StrToInt(Size_f1.Rows_e1.Text); StringGrid1.RowCount:= s + 2; for index:= 1 to s do StringGrid1.Cells[0, index+1]:= IntToStr(index); end; procedure TForm1.StringGrid1KeyPress(Sender: TObject; var Key: Char); begin if (StringGrid1.Col = 1) and (StringGrid1.Row = 1) then begin Key:= #0; exit; end; if (Key < '0') or (Key > '9') then Key:= #0; end; Продолжение приложения Б
procedure TForm1.FormCreate(Sender: TObject); begin StringGrid1.Cells[1,0]:= 'Ìàãàçèíû'; StringGrid1.Cells[0,1]:= 'Ñêëàäû'; StringGrid1.Cells[1,1]:= 'Íàëè÷èå/Ïîòðåáíîñòü'; FillChar(fData, sizeof(fData), 0); fFigures:= TList.Create; fLines:= TList.Create; fMouseState:= 0; end; procedure TForm1.Button2Click(Sender: TObject); function GetInt(x, y: integer): integer; begin Result:= StrToInt(StringGrid1.Cells[ x, y ]); end; var index, index2, s, old_s: integer; data, plan, potential: TData; begin Memo1.Lines.Clear; data:= TData.Create; data.Width:= StringGrid1.ColCount-2; data.Height:= StringGrid1.RowCount-2; for index:= 0 to data.Height-1 do for index2:= 0 to data.Width-1 do data.Arr[index2,index]:= GetInt(index2+2, index+2); for index:= 0 to data.Width-1 do data.Top[index]:= GetInt(index+2, 1); for index:= 0 to data.Height-1 do data.Left[index]:= GetInt(1, index+2); plan:= TData.Create; potential:= TData.Create;
|