Курсовая работа: Мониторинг ОС
if (FormPamyt.Pamyt1.Progress < 5) then FormPamyt.Pamyt1.ForeColor := clRed
else FormPamyt.Pamyt1.ForeColor := clActiveCaption;
if (FormPamyt.Pamyt2.Progress < 20) then FormPamyt.Pamyt2.ForeColor := clRed
else FormPamyt.Pamyt2.ForeColor := clActiveCaption;
Form1.Visible:=False;
FormPamyt.Visible:=True;
if (StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)>0)and(StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)<65536) then begin FormPamyt.OcenkaPamyati.Caption:='1';FormPamyt.Label6.Caption:='-балл (Очень слабая)';end;
if (StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)>63488)and(StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)<131072) then begin FormPamyt.OcenkaPamyati.Caption:='2';FormPamyt.Label6.Caption:='-балла (Слабая)';end;
if (StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)>129024)and(StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)<262144) then begin FormPamyt.OcenkaPamyati.Caption:='3';FormPamyt.Label6.Caption:='-балла (Нормальная)';end;
if (StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)>260096)and(StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)<524288) then begin FormPamyt.OcenkaPamyati.Caption:='4';FormPamyt.Label6.Caption:='-балла (Хорошая)';end;
if (StrToFloat(FormPamyt.PolnayaFizPamyt.Caption)>522240)then begin FormPamyt.OcenkaPamyati.Caption:='5';FormPamyt.Label6.Caption:='-баллов (Отличная)';end;
end;
procedure TForm1.Image4Click(Sender: TObject);
var
OsVersion: TOSVersionInfo;
PathArray:Array[0..255] of char;
begin
Form1.Visible:=False;
FormOS.Visible:=True;
//OS
OSVersion.dwOSVersionInfoSize := SizeOf(OSVersion);
if GetVersionEx(OSVersion) then
begin
FormOS.VersionLabel.Caption:= Format('%d.%d (%d.%s)',[OSVersion.dwMajorVersion, OSVersion.dwMinorVersion,(OSVersion.dwBuildNumber and $FFFF), OSVersion.szCSDVersion]);
case OSVersion.dwPlatformID of
VER_PLATFORM_WIN32s: FormOS.VersionNumberLabel.Caption := 'Windows 3.1';
VER_PLATFORM_WIN32_WINDOWS: FormOS.VersionNumberLabel.Caption := 'Windows 95';
VER_PLATFORM_WIN32_NT: FormOS.VersionNumberLabel.Caption := 'Windows NT';
else FormOS.VersionNumberLabel.Caption := '';