Mavzu : Mobil qurilmalar uchun operatsion tizimlarning qiyosiy tahlili




Download 1,5 Mb.
bet10/12
Sana13.05.2024
Hajmi1,5 Mb.
#228180
1   ...   4   5   6   7   8   9   10   11   12
Bog'liq
Mobil qurilmalar uchun operatsion tizimlarning qiyosiy tahlili

System.TypInfo,
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants,
FMX.Types, FMX.Controls, FMX.Forms, FMX.Dialogs, FMX.StdCtrls,
FMX.Effects,
FMX.Objects, FMX.Layouts, FMX.Media; type
TFlashLightForm = class(TForm)
FlashLight: TImage;
ImageOn: TImage;
FlashLightShadow: TShadowEffect;
Light: TImage;
ImageOff: TImage;
ContainerLayout: TLayout;
Camera: TCameraComponent;
GlowEffect1: TGlowEffect; LayoutButtons: TLayout; procedure FormCreate(Sender: TObject); procedure ImageOffClick(Sender: TObject); procedure ImageOnClick(Sender: TObject); private procedure SetFlashlightState(Active : Boolean); public
{ Public declarations } end; var
FlashLightForm: TFlashLightForm; implementation {$R *.fmx} procedure TFlashLightForm.SetFlashlightState(Active : Boolean); begin if Active then begin
Camera.TorchMode := TTorchMode.ModeOn; end else
Camera.TorchMode := TTorchMode.ModeOff; end;
procedure TFlashLightForm.FormCreate(Sender: TObject); begin
ImageOff.Enabled := Camera.HasFlash; Camera.Active := True; end; procedure TFlashLightForm.ImageOffClick(Sender: TObject); begin
ImageOff.Visible := False;
ImageOn.Visible := True;
SetFlashlightState(True); Light.Visible := True; end; procedure TFlashLightForm.ImageOnClick(Sender: TObject); begin
ImageOff.Visible := True;
ImageOn.Visible := False;
SetFlashlightState(False); Light.Visible := False; end; end.
Dasturning ko’rinishi quyidagicha:

Dastur sinovdan o’tkazish jarayonida yoki qurilmaga o’rnatilganidan so’ng, ekran markazidagi power tugmasining belgisiga o’xshash tugmani bosilganda qurilmaning yoritgichi faollashadi. Ikkinchi marta bosish esa, o’sha yoritgich faoliyatini to’xtatishga xizmat qiladi.

Download 1,5 Mb.
1   ...   4   5   6   7   8   9   10   11   12




Download 1,5 Mb.

Bosh sahifa
Aloqalar

    Bosh sahifa



Mavzu : Mobil qurilmalar uchun operatsion tizimlarning qiyosiy tahlili

Download 1,5 Mb.