Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /Unit2.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations) (download) (as text)
Mon Jul 27 13:44:42 2015 UTC (8 years, 7 months ago) by yamat0jp
File MIME type: text/x-pascal
File size: 1417 byte(s)
最初のコミット
1 yamat0jp 1 unit Unit2;
2    
3     interface
4    
5     uses
6     System.SysUtils, System.Types, System.UITypes, System.Classes,
7     System.Variants,
8     FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls,
9     System.IniFiles, System.IOUtils, FMX.ExtCtrls;
10    
11     type
12     TForm2 = class(TForm)
13     ToolBar1: TToolBar;
14     SpeedButton1: TSpeedButton;
15     PopupBox1: TPopupBox;
16     procedure SpeedButton1Click(Sender: TObject);
17     procedure FormCreate(Sender: TObject);
18     procedure FormDestroy(Sender: TObject);
19     private
20     { private éŒž }
21     public
22     { public éŒž }
23     end;
24    
25     var
26     Form2: TForm2;
27    
28     implementation
29    
30     {$R *.fmx}
31    
32     uses Unit1;
33    
34     procedure TForm2.FormCreate(Sender: TObject);
35     var
36     s: TIniFile;
37     begin
38     s := TIniFile.Create(TPath.GetHomePath+TPath.DirectorySeparatorChar+'Setting.ini');
39     try
40     PopupBox1.ItemIndex := s.ReadInteger('Form2', 'MAX_DEPTH', 4);
41     Form1.TrackBar1.Value := s.ReadFloat('Form1', 'Volume', 0.5);
42     finally
43     s.Free;
44     end;
45     end;
46    
47     procedure TForm2.FormDestroy(Sender: TObject);
48     var
49     s: TIniFile;
50     begin
51     s := TIniFile.Create(TPath.GetHomePath+TPath.DirectorySeparatorChar+'Setting.ini');
52     try
53     s.WriteInteger('Form2', 'MAX_DEPTH', PopupBox1.ItemIndex);
54     s.WriteFloat('Form1', 'Volume', Form1.TrackBar1.Value);
55     finally
56     s.Free;
57     end;
58     end;
59    
60     procedure TForm2.SpeedButton1Click(Sender: TObject);
61     begin
62     Hide;
63     end;
64    
65     end.

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26