| 9 |
IWContainer, IWHTMLContainer, IWHTML40Container, IWRegion, IWDBStdCtrls, |
IWContainer, IWHTMLContainer, IWHTML40Container, IWRegion, IWDBStdCtrls, |
| 10 |
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompLabel, |
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompLabel, |
| 11 |
IWCompGrids, IWCompText, IWCompTabControl, IWCompButton, IWCompEdit, |
IWCompGrids, IWCompText, IWCompTabControl, IWCompButton, IWCompEdit, |
| 12 |
IWHTMLControls, IWCompExtCtrls, UserSessionUnit, PngImage, Data.DB, |
IWHTMLControls, IWCompExtCtrls, PngImage, Data.DB, |
| 13 |
IWCompListbox, IWBaseComponent, IWBaseHTMLComponent, IWBaseHTML40Component, |
IWCompListbox, IWBaseComponent, IWBaseHTMLComponent, IWBaseHTML40Component, |
| 14 |
IWCompMenu, Vcl.Menus, System.Variants, Unit8, Vcl.Dialogs; |
IWCompMenu, Vcl.Menus, System.Variants, Vcl.Dialogs, System.UITypes, Unit8; |
| 15 |
|
|
| 16 |
type |
type |
| 17 |
TIWForm1 = class(TIWAppForm) |
TIWForm1 = class(TIWAppForm) |
|
IWFrame1: TIWFrame1; |
|
| 18 |
IWTemplateProcessorHTML1: TIWTemplateProcessorHTML; |
IWTemplateProcessorHTML1: TIWTemplateProcessorHTML; |
| 19 |
IWLabel1: TIWLabel; |
IWLabel1: TIWLabel; |
| 20 |
IWDBLabel1: TIWDBLabel; |
IWDBLabel1: TIWDBLabel; |
| 47 |
IWFrame8: TIWFrame8; |
IWFrame8: TIWFrame8; |
| 48 |
IWLink4: TIWLink; |
IWLink4: TIWLink; |
| 49 |
IWLink3: TIWLink; |
IWLink3: TIWLink; |
| 50 |
|
IWLink5: TIWLink; |
| 51 |
|
IWFrame1: TIWFrame1; |
| 52 |
procedure IWAppFormRender(Sender: TObject); |
procedure IWAppFormRender(Sender: TObject); |
| 53 |
procedure IWLink2Click(Sender: TObject); |
procedure IWLink2Click(Sender: TObject); |
| 54 |
procedure IWAppFormCreate(Sender: TObject); |
procedure IWAppFormCreate(Sender: TObject); |
| 59 |
procedure IWFrame8IWLink1Click(Sender: TObject); |
procedure IWFrame8IWLink1Click(Sender: TObject); |
| 60 |
procedure IWLink4Click(Sender: TObject); |
procedure IWLink4Click(Sender: TObject); |
| 61 |
procedure IWLink3Click(Sender: TObject); |
procedure IWLink3Click(Sender: TObject); |
| 62 |
|
procedure IWLink5Click(Sender: TObject); |
| 63 |
private |
private |
| 64 |
Filter: Boolean; |
Filter: Boolean; |
| 65 |
function GetPage: Boolean; |
function GetPage: Boolean; |
| 66 |
procedure SetPage(const Value: Boolean); |
procedure SetPage(const Value: Boolean); |
| 67 |
procedure LoadImage; |
procedure LoadImage; |
| 68 |
procedure ClearImage; |
procedure ClearImage; |
| 69 |
|
function GetThumbnail: Boolean; |
| 70 |
|
procedure SetThumbnail(const Value: Boolean); |
| 71 |
|
property Thumbnail: Boolean read GetThumbnail write SetThumbnail; |
| 72 |
public |
public |
| 73 |
property Page: Boolean read GetPage write SetPage; |
property Page: Boolean read GetPage write SetPage; |
| 74 |
end; |
end; |
| 75 |
|
|
| 76 |
|
var |
| 77 |
|
IWForm1: TIWForm1; |
| 78 |
|
|
| 79 |
implementation |
implementation |
| 80 |
|
|
| 81 |
{$R *.dfm} |
{$R *.dfm} |
| 82 |
|
|
| 83 |
uses Unit3, ServerController, Unit6, Unit4, Unit9; |
uses Unit3, ServerController, Unit6, Unit4, Unit9, Unit10; |
| 84 |
|
|
| 85 |
procedure TIWForm1.ClearImage; |
procedure TIWForm1.ClearImage; |
| 86 |
var |
var |
| 98 |
result := UserSession.FPage; |
result := UserSession.FPage; |
| 99 |
end; |
end; |
| 100 |
|
|
| 101 |
|
function TIWForm1.GetThumbnail: Boolean; |
| 102 |
|
begin |
| 103 |
|
result := UserSession.FThumbnail; |
| 104 |
|
end; |
| 105 |
|
|
| 106 |
procedure TIWForm1.IWAppFormCreate(Sender: TObject); |
procedure TIWForm1.IWAppFormCreate(Sender: TObject); |
| 107 |
const |
const |
| 108 |
i = 120; |
i = 120; |
| 109 |
var |
var |
| 110 |
s: Integer; |
s: Integer; |
| 111 |
begin |
begin |
| 112 |
|
IWForm1 := Self; |
| 113 |
Page := UserSession.FPage; |
Page := UserSession.FPage; |
| 114 |
|
Thumbnail := UserSession.FThumbnail; |
| 115 |
s := DM.FDTable3.FieldByName('BGCOLOR').AsInteger; |
s := DM.FDTable3.FieldByName('BGCOLOR').AsInteger; |
| 116 |
IWLabel2.BGColor := s; |
IWLabel2.BGColor := s; |
| 117 |
IWLabel3.BGColor := s; |
IWLabel3.BGColor := s; |
| 284 |
|
|
| 285 |
procedure TIWForm1.IWFrame8IWLink1Click(Sender: TObject); |
procedure TIWForm1.IWFrame8IWLink1Click(Sender: TObject); |
| 286 |
begin |
begin |
| 287 |
UserSession.Thumbnail := true; |
Thumbnail := true; |
|
IWFrame8.Visible := false; |
|
|
IWGrid1.Visible := true; |
|
| 288 |
end; |
end; |
| 289 |
|
|
| 290 |
procedure TIWForm1.IWGrid1CellClick(ASender: TObject; |
procedure TIWForm1.IWGrid1CellClick(ASender: TObject; |
| 291 |
const ARow, AColumn: Integer); |
const ARow, AColumn: Integer); |
| 292 |
begin |
begin |
| 293 |
UserSession.Thumbnail := false; |
Thumbnail := false; |
|
IWFrame8.Visible := true; |
|
| 294 |
IWFrame8.IWEdit1.Text := '1'; |
IWFrame8.IWEdit1.Text := '1'; |
|
IWLabel6.Visible := false; |
|
|
IWGrid1.Visible := false; |
|
| 295 |
UserSession.Serial := Integer(IWGrid1.Cell[ARow, AColumn].Tag); |
UserSession.Serial := Integer(IWGrid1.Cell[ARow, AColumn].Tag); |
| 296 |
end; |
end; |
| 297 |
|
|
| 298 |
procedure TIWForm1.IWLink1Click(Sender: TObject); |
procedure TIWForm1.IWLink1Click(Sender: TObject); |
| 299 |
begin |
begin |
| 300 |
with TUserForm.Create(WebApplication) do |
TUserForm.Create(WebApplication).Show; |
|
begin |
|
|
Form := Self; |
|
|
Show; |
|
|
end; |
|
| 301 |
end; |
end; |
| 302 |
|
|
| 303 |
procedure TIWForm1.IWLink2Click(Sender: TObject); |
procedure TIWForm1.IWLink2Click(Sender: TObject); |
| 304 |
begin |
begin |
| 305 |
if Page = true then |
if Page = true then |
| 306 |
begin |
begin |
| 307 |
if DM.FDTable1.Locate('EMAIL;PASSWORD', |
if DM.FDTable1.Locate('EMAIL;PASSWORD', |
| 308 |
VarArrayOf([IWEdit2.Text, IWEdit3.Text]), [loCaseInsensitive]) = true |
VarArrayOf([IWEdit2.Text, IWEdit3.Text]), [loCaseInsensitive]) = true then |
| 309 |
then |
begin |
| 310 |
begin |
Page := false; |
| 311 |
Page := false; |
UserSession.user_number := DM.FDTable1.FieldByName('NUMBER').AsInteger; |
| 312 |
UserSession.user_number := DM.FDTable1.FieldByName('NUMBER') |
IWEdit2.Text := ''; |
| 313 |
.AsInteger; |
end; |
| 314 |
IWEdit2.Text := ''; |
IWEdit3.Text := ''; |
| 315 |
end; |
end |
| 316 |
IWEdit3.Text := ''; |
else |
| 317 |
end |
begin |
| 318 |
else |
UserSession.user_number := 0; |
| 319 |
begin |
Page := true; |
| 320 |
DM.FDTable1.Filtered := false; |
end; |
|
Page := true; |
|
|
UserSession.user_number := 0; |
|
|
end; |
|
| 321 |
end; |
end; |
| 322 |
|
|
| 323 |
procedure TIWForm1.IWLink3Click(Sender: TObject); |
procedure TIWForm1.IWLink3Click(Sender: TObject); |
| 334 |
TCartForm.Create(WebApplication).Show; |
TCartForm.Create(WebApplication).Show; |
| 335 |
end; |
end; |
| 336 |
|
|
| 337 |
|
procedure TIWForm1.IWLink5Click(Sender: TObject); |
| 338 |
|
begin |
| 339 |
|
TIWForm10.Create(WebApplication).Show; |
| 340 |
|
end; |
| 341 |
|
|
| 342 |
procedure TIWForm1.LoadImage; |
procedure TIWForm1.LoadImage; |
| 343 |
var |
var |
| 344 |
s: TStream; |
s: TStream; |
| 353 |
ClearImage; |
ClearImage; |
| 354 |
png := TPngImage.Create; |
png := TPngImage.Create; |
| 355 |
try |
try |
| 356 |
if UserSession.Thumbnail = true then |
if Thumbnail = true then |
| 357 |
begin |
begin |
| 358 |
i := DM.FDTable2.RecordCount div IWGrid1.ColumnCount; |
i := DM.FDTable2.RecordCount div IWGrid1.ColumnCount; |
| 359 |
if DM.FDTable2.RecordCount mod IWGrid1.ColumnCount > 0 then |
if DM.FDTable2.RecordCount mod IWGrid1.ColumnCount > 0 then |
| 467 |
begin |
begin |
| 468 |
IWLabel1.Caption := 'ようこそゲスト様'; |
IWLabel1.Caption := 'ようこそゲスト様'; |
| 469 |
IWLink2.Caption := 'ログイン'; |
IWLink2.Caption := 'ログイン'; |
| 470 |
|
Thumbnail := true; |
| 471 |
|
IWText1.Text := ''; |
| 472 |
|
DM.FDTable2.Filtered := false; |
| 473 |
|
Filter := false; |
| 474 |
end; |
end; |
| 475 |
end; |
end; |
| 476 |
|
|
| 477 |
|
procedure TIWForm1.SetThumbnail(const Value: Boolean); |
| 478 |
|
begin |
| 479 |
|
UserSession.FThumbnail := Value; |
| 480 |
|
IWGrid1.Visible := Value; |
| 481 |
|
IWFrame8.Visible := not Value; |
| 482 |
|
end; |
| 483 |
|
|
| 484 |
initialization |
initialization |
| 485 |
|
|
| 486 |
TIWForm1.SetAsMainForm; |
TIWForm1.SetAsMainForm; |