ulist.pas

来自「This is source code for shedule time sho」· PAS 代码 · 共 143 行

PAS
143
字号
unit Ulist;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, IniFiles, ComCtrls, SUIListView, ExtCtrls, SUIForm, SUIButton,
  StdCtrls;

type
  TForm2 = class(TForm)
    suiForm1: TsuiForm;
    LV: TsuiListView;
    suiButton1: TsuiButton;
    Label1: TLabel;
    procedure suiButton1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;

implementation

uses UMain;

{$R *.dfm}






procedure TForm2.suiButton1Click(Sender: TObject);
begin
Close;
end;

procedure TForm2.FormShow(Sender: TObject);
var
ini:TiniFile;
begin
ini:=TiniFile.Create(ChangeFileExt(application.ExeName,'.ini'));
LV.Clear;
if ini.ReadBool('status','subuh',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:='solat subuh';
    subItems.Add(timetostr(ini.ReadTime('solat','subuh',time)));
    subItems.Add('banguuuuuu..n');
    end;
  end;
if ini.ReadBool('status','duhur',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:='solat dhuhur';
    subItems.Add(timetostr(ini.ReadTime('solat','duhur',time)));
    subItems.Add('Sholat dulu baru maem');
    end;
  end;
if ini.ReadBool('status','asar',false)=true then
  begin
   with LV.Items.Add do
     begin
     caption:='solat ashar';
     subItems.Add(timetostr(ini.ReadTime('solat','asar',time)));
     subItems.Add('Sholat dulu baru mandi');
     end;
  end;
if ini.ReadBool('status','magrib',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:='Solat Magrib';
    subItems.Add(timetostr(ini.ReadTime('solat','magrib',time)));
    subItems.Add('Solat di masjid ya?');
    end;
   end;
if ini.ReadBool('status','isya',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:='Sholat Isya';
    subItems.Add(timetostr(ini.ReadTime('solat','isya',time)));
    subItems.Add('Sebelum tidur solat dulu, ntar bangun jam 3 ');
    end;
  end;
if ini.ReadBool('status','duha',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:='Sholat duha';
    subItems.Add(timetostr(ini.ReadTime('solat','duha',time)));
    subItems.Add('Biar banyak rejekinya');
    end;
  end;
if ini.ReadBool('status','tahajud',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:='Sholat Tahajud';
    subItems.Add(timetostr(ini.ReadTime('solat','tahajud',time)));
    subItems.Add('Boleh Coding malam malam gini, tapi solat dulu');
    end;
  end;
if ini.ReadBool('status','janji1',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:=Form1.Othertex1.Text;
    subItems.Add(timetostr(ini.ReadTime('janjilain','janji1',time)));
    subItems.Add(' - ');
    end;
   end;
if ini.ReadBool('status','janji2',false)=true then
  begin
  with LV.Items.Add do
    begin
    caption:=Form1.Othertex2.Text;
    subItems.Add(timetostr(ini.ReadTime('janjilain','janji2',time)));
    subItems.Add(' - ');
    end;
  end;
ini.Free;
end;


procedure TForm2.FormDestroy(Sender: TObject);
begin
Form2.Free;
end;

end.


⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?