Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /Unit2.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download) (as text)
Tue Jul 28 08:41:38 2015 UTC (8 years, 7 months ago) by yamat0jp
File MIME type: text/x-pascal
File size: 1654 byte(s)
Windowsでコンパイルするときはドライブオプションを指定して下さい(Form4)
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 yamat0jp 2 procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
20 yamat0jp 1 private
21     { private éŒž }
22     public
23     { public éŒž }
24     end;
25    
26     var
27     Form2: TForm2;
28    
29     implementation
30    
31     {$R *.fmx}
32    
33     uses Unit1;
34    
35 yamat0jp 2 procedure TForm2.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
36     begin
37     if Sender <> Form1 then
38     begin
39     CanClose:=false;
40     Hide;
41     end;
42     end;
43    
44 yamat0jp 1 procedure TForm2.FormCreate(Sender: TObject);
45     var
46     s: TIniFile;
47     begin
48     s := TIniFile.Create(TPath.GetHomePath+TPath.DirectorySeparatorChar+'Setting.ini');
49     try
50     PopupBox1.ItemIndex := s.ReadInteger('Form2', 'MAX_DEPTH', 4);
51     Form1.TrackBar1.Value := s.ReadFloat('Form1', 'Volume', 0.5);
52     finally
53     s.Free;
54     end;
55     end;
56    
57     procedure TForm2.FormDestroy(Sender: TObject);
58     var
59     s: TIniFile;
60     begin
61     s := TIniFile.Create(TPath.GetHomePath+TPath.DirectorySeparatorChar+'Setting.ini');
62     try
63     s.WriteInteger('Form2', 'MAX_DEPTH', PopupBox1.ItemIndex);
64     s.WriteFloat('Form1', 'Volume', Form1.TrackBar1.Value);
65     finally
66     s.Free;
67     end;
68     end;
69    
70     procedure TForm2.SpeedButton1Click(Sender: TObject);
71     begin
72     Hide;
73     end;
74    
75     end.

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