This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//delphiコード | |
procedure TForm1.FDConnection1BeforeConnect(Sender: TObject); | |
begin | |
{$IF DEFINED(iOS) or DEFINED(ANDROID)} | |
FDConnection1.Params.Values['Database'] := | |
TPath.Combine(TPath.GetDocumentsPath, 'IBLITETEST.GDB'); | |
{$ENDIF} | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
TForm1 = class(TForm) | |
Viewport3D1: TViewport3D; | |
Cube1: TCube; | |
LightMaterialSource1: TLightMaterialSource; | |
Light1: TLight; | |
Camera1: TCamera; | |
Dummy1: TDummy; | |
procedure Viewport3D1MouseDown(Sender: TObject; Button: TMouseButton; | |
Shift: TShiftState; X, Y: Single); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Delphiのコード | |
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; var KeyChar: Char; | |
Shift: TShiftState); | |
begin | |
{イベントハンドラ引数のKeyがvkReturnならリターンキーが押されている} | |
if Key = vkReturn then | |
begin | |
{NavigateメソッドはURLを開く} | |
WebBrowser1.Navigate(Edit1.Text); | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//delphiコード | |
procedure TForm1.FDConnection1BeforeConnect(Sender: TObject); | |
begin | |
{$IF DEFINED(iOS) or DEFINED(ANDROID)} | |
FDConnection1.Params.Values['Database'] := | |
TPath.Combine(TPath.GetDocumentsPath, 'sqltest.sdb'); | |
{$ENDIF} | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//delphiのコード | |
procedure TForm1.FormCreate(Sender: TObject); | |
begin | |
//REST要求を実行してJSONデータ取得 | |
RESTRequest1.Execute; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Delphiのコード | |
procedure TForm1.Sphere1Click(Sender: TObject); | |
begin | |
TAnimator.AnimateFloat(Light1, 'RotationAngle.Y', Light1.RotationAngle.Y-45, 0.5); | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for I := 0 to 10000 do | |
begin | |
// thread work | |
Canvas.BeginScene; | |
try | |
// drawing code | |
finally | |
Canvas.EndScene; | |
end; | |
end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type | |
子となるクラス定義識別子 = class(継承元となるクラス定義識別子) | |
public | |
//フィールド、メソッド… |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//まずは先週行ったprivate, publicを使っていないclass定義 | |
type | |
TDate = class //TDateというクラス定義識別子を、「 = class 」としてクラス定義 | |
Year, Month, Day: Integer; //クラスで保持するデータ(フィールド)の定義 | |
procedure SetValue(Y, M, D: Integer); //クラスに紐づいたメソッド | |
function UruuDoshi: Boolean; | |
end; //クラス定義もend;で締める |