- gt; Color=clRed; - gt; Color=clRed;} (EConvertError amp; err )
{MessageDlg ( Перевірте введення даних raquo ;, mtError, TMsgDlgButtons () lt; lt; mbOK, 0);}
} __ fastcall TForm1 :: Button4Click (TObject * Sender)
{(RadioGroup1- gt; ItemIndex == 0)
{i=1; _kamera m; .clear ( moroz_kamera ); (StringGrid1- gt; Cells [0] [i]!= )
{_ kamera ob1(StringGrid1-gt;Cells[0][i],StrToInt(StringGrid1-gt;Cells[1][i]),StrToInt(StringGrid1-gt;Cells[2][i]),StrToInt(StringGrid1-gt;Cells[3][i]),StrToInt(StringGrid1-gt;Cells[4][i]),StringGrid1-gt;Cells[5][i]);.save(laquo;moroz_kameraraquo;);=i+1;
}
} (RadioGroup1- gt; ItemIndex == 1)
{i=1;m;.clear(laquo;holodilnikiraquo;);(StringGrid2-gt;Cells[0][i]!=laquo;raquo;)
{ob1(StringGrid2-gt;Cells[0][i],StrToInt(StringGrid2-gt;Cells[1][i]),StrToInt(StringGrid2-gt;Cells[2][i]),StrToInt(StringGrid2-gt;Cells[3][i]),StrToInt(StringGrid2-gt;Cells[4][i]),StringGrid2-gt;Cells[5][i]);.save(laquo;holodilnikiraquo;);=i+1;
}
} (RadioGroup1- gt; ItemIndex == 2)
{i=1; _pechi m; .clear ( microv_pechi ); (StringGrid3- gt; Cells [0] [i]!= )
{_ pechi ob1(StringGrid3-gt;Cells[0][i],StrToInt(StringGrid3-gt;Cells[1][i]),StrToInt(StringGrid3-gt;Cells[2][i]),StringGrid3-gt;Cells[3][i]);.save(laquo;microv_pechiraquo;);=i+1;
}
} (RadioGroup1- gt; ItemIndex == 3)
{i=1;m;.clear(laquo;pilesosraquo;);(StringGrid4-gt;Cells[0][i]!=laquo;raquo;)
{ob1(StringGrid4-gt;Cells[0][i],StrToInt(StringGrid4-gt;Cells[1][i]),StrToInt(StringGrid4-gt;Cells[2][i]),StrToInt(StringGrid4-gt;Cells[3][i]),StrToInt(StringGrid4-gt;Cells[4][i]),StrToInt(StringGrid4-gt;Cells[5][i]));.save(laquo;pilesosraquo;);=i+1;
}}
};
//завантажити
//---------------------------------------------------------------__ fastcall TForm1 :: Button5Click (TObject * Sender)
{(RadioGroup1- gt; ItemIndex == 0)
{_ kamera m; .load ( moroz_kamera , StringGrid1, j1);
} (RadioGroup1- gt; ItemIndex == 1)
{m; .load ( holodilniki , StringGrid2, j2);
} (RadioGroup1- gt; ItemIndex == 2)
{_ pechi m; .load ( microv_pechi , StringGrid3, j3);
} (RadioGroup1- gt; ItemIndex == 3)
{m; .load ( pilesos , StringGrid4, j4);
}}
//сорітровка по убиваніюsort_ub (TStringGrid * s, int a)
{b, c; e; (int i=1; s- gt; Cells [a] [i]!= raquo ;; i ++) (int j=i + 1; s- gt; Cells [a] [j]!= raquo ;; j ++)
{b=StrToInt (s- gt; Cells [a] [i]);=StrToInt (s- gt; Cells [a] [j]); (c gt; b)
{(int j1=0; j1 lt; s- gt; ColCount; j1 ++)//змінюються рядка
{= s- gt; Cells [j1] [i]; gt; Cells [j1] [i]=s- gt; Cells [j1] [j]; gt; Cells [j1] [j]=e;
//Form1- gt; Refresh ();
}}
}
}; sort_voz (TStringGrid * s, int a)
{b, c; e; (int i=1; s- gt; Cells [a] [i]!= raquo ;; i ++) (int j=i + 1; s- gt; Cells [a] [j]!= raquo ;; j ++)
{b=StrToInt (s- gt; Cells [a] [i]);=StrToInt (s- gt; Cells [a] [j]); (c lt; b)
{(int j1=0; j1 lt; s- gt; ColCount; j1 ++)
{= s- gt; Cells [j1] [i]; gt; Cells [j1] [i]=s- gt; Cells [j1] [j]; - gt; Cells [j1 ] [j]=e;
}}}};
//сортування за зростанням
void sort_voz (TStringGrid * s, int a)
{b, c; e; (int i=1; s- gt; Cells [a] [i]!= raquo ;; i ++) (int j=i + 1; s- gt; Cells [a] [j]!= raquo ;; j ++)
{b=StrToInt (s- gt; Cells [a] [i]);=StrToInt (s- gt; Cells [a] [j]); (c lt; b)
{(int j1=0; j1 lt; s- gt; ColCount; j1 ++)
{= s- gt; Cells [j1] [i]; gt; Cells [j1] [i]=s- gt; Cells [j1] [j]; gt; Cells [j1] [j]=e;
//Form1- gt; Refresh ();
}}
}
}; __ fastcall TForm1 :: Button7Click (TObject * Sender)
{= 0;=0;=0;=0;=0;=0;=0;=0; (int i=0; i lt; StringGrid1- gt; ColCount; i ++) (int j=1; j lt; StringGrid1- gt; RowCount; j ++) - gt; Cells [i] [j]= raquo ;;