var
seyahatHedef, hedefGoruntule: TclStyleForm;
seyahatHedefPanel1, hedefGoruntulePanel1: TclProPanel;
today: TclDateTime;
tarih, hedefLabel: TClProLabel;
tarihYazi: String;
hedefUlke, hedefSehir, hedefGezi, hedefEsya, hedefAra: TclProEdit;
hedefZaman: TclDateTime;
gunH,ayH,yilH, dogruTarihH: TclString;
VerticalScrollBox: TclVertScrollBox;
seyahatHedefKayit, hedefGoruntuleButton: TClProButton;
database, password : String;
hedefListView : TClListView;
Qry : TClSQLiteQuery;
void HedefKayit;
{
try
Clomosy.DBSQLiteQuery.SQL.Text = 'INSERT INTO Goals (goal_country, goal_city, goal_date, goal_place, goal_item) VALUES ('+QuotedStr(hedefUlke.Text)+', '+QuotedStr(hedefSehir.Text)+',
'+QuotedStr(hedefZaman.Text)+','+QuotedStr(hedefGezi.Text)+','+QuotedStr(hedefEsya.Text)+')';
Clomosy.DBSQLiteQuery.OpenOrExecute;
ShowMessage('Seyahat Hedefleriniz Başarılı Bir Şekilde Eklenmiştir✅');
except
ShowMessage('Exception class: '+LastExceptionClassName+' Exception Message: ' +LastExceptionMessage);
}
}
void HedefGoruntuleSayfa;
{
hedefGoruntule=TclStyleForm.Create(self);
hedefGoruntule.SetFormBGImage(' https://i.pinimg.com/originals/6d/c4/9a/6dc49af11ec6d6147b27b950e1c090b9.jpg" rel="nofollow - https://i.pinimg.com/originals/6d/c4/9a/6dc49af11ec6d6147b27b950e1c090b9.jpg ');
hedefAra=hedefGoruntule.AddNewProEdit(hedefGoruntule, 'hedefAra', 'Ülke İsmi');
clComponent.SetupComponent(hedefAra,'{
"MarginTop":50,
"Width" :300,
"Height":40,
"TextColor":"#12366b",
"TextSize":20,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"#f8f8f8"
}');
hedefGoruntulePanel1=hedefGoruntule.AddNewProPanel(hedefGoruntule,'hedefGoruntulePanel1');
clComponent.SetupComponent(hedefGoruntulePanel1,
'{
"MarginTop":300,
"Width" :350,
"Height":500,
"RoundHeight":20,
"RoundWidth":20,
"BackGroundColor":"#f8f8f8"
}');
try
Qry = Clomosy.DBSQLiteQueryWith('SELECT goal_city, goal_city, goal_date, goal_place, goal_item FROM Goals WHERE goal_country = '+ QuotedStr(hedefAra.Text));
Qry.OpenOrExecute;
hedefGoruntulePanel1.clLoadListViewDataFromDataset(Qry);
except
ShowMessage('Exception class: '+LastExceptionClassName+' Exception Message: ' +LastExceptionMessage);
}
hedefGoruntule.Run;
}
{
seyahatHedef=TclStyleForm.Create(self);
seyahatHedef.SetFormBGImage(' https://i.pinimg.com/originals/6d/c4/9a/6dc49af11ec6d6147b27b950e1c090b9.jpg" rel="nofollow - https://i.pinimg.com/originals/6d/c4/9a/6dc49af11ec6d6147b27b950e1c090b9.jpg ');
Clomosy.DBSQLiteConnect(Clomosy.AppFilesPath + 'ClomosyDatabase.db3', '');
seyahatHedefPanel1=seyahatHedef.AddNewProPanel(seyahatHedef,'seyahatHedefPanel1');
clComponent.SetupComponent(seyahatHedefPanel1,
'{
"MarginBottom":100,
"MarginTop":100,
"Width" :350,
"Height":500,
"RoundHeight":20,
"RoundWidth":20,
"BackGroundColor":"null"
}');
VerticalScrollBox = seyahatHedef.AddNewVertScrollBox(seyahatHedefPanel1,'ScrollY');
VerticalScrollBox.Align = alMostTop;
VerticalScrollBox.Height = TForm(seyahatHedef).clientHeight;
hedefLabel=seyahatHedef.AddNewProLabel(seyahatHedef,'hedefLabel','Bu yıl için seyahat hedeflerini giriniz:');
clComponent.SetupComponent(hedefLabel,'{
"MarginTop":50,
"MarginBottom":700,
"Width" :400,
"Height":40,
"TextColor":"#133f87",
"TextSize":18,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#6f86d1",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"null"
}');
hedefUlke=seyahatHedef.AddNewProEdit(VerticalScrollBox, 'hedefUlke', 'Gitmeyi hedeflediğiniz ülke nedir?');
clComponent.SetupComponent(hedefUlke,'{
"MarginBottom": 1200,
"Width" :300,
"Height":40,
"TextColor":"#12366b",
"TextSize":20,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"#f8f8f8"
}');
hedefSehir=seyahatHedef.AddNewProEdit(VerticalScrollBox, 'hedefSehir', 'Gitmeyi hedeflediğiniz şehir nedir?');
clComponent.SetupComponent(hedefSehir,'{
"MarginBottom": 1100,
"Width" :300,
"Height":40,
"TextColor":"#12366b",
"TextSize":18,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"#f8f8f8"
}');
hedefZaman = seyahatHedef.AddNewProDateEdit(VerticalScrollBox, 'hedefZaman');
clComponent.SetupComponent(hedefZaman,'{
"MarginBottom":900,
"Width" :300,
"Height":40,
"TextColor":"#12366b",
"TextSize":18,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"#f8f8f8"
}');
hedefGezi=seyahatHedef.AddNewProEdit(VerticalScrollBox, 'hedefGezi', 'Gezmek istediğiniz yerler neler?');
clComponent.SetupComponent(hedefGezi,'{
"MarginBottom": 800,
"Width" :300,
"Height":40,
"TextColor":"#12366b",
"TextSize":18,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"#f8f8f8"
}');
hedefEsya=seyahatHedef.AddNewProEdit(VerticalScrollBox, 'hedefEsya', 'Seyahatinizde Almak istediğiniz eşyalar neler?');
clComponent.SetupComponent(hedefEsya,'{
"MarginBottom": 700,
"Width" :300,
"Height":40,
"TextColor":"#12366b",
"TextSize":18,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"#f8f8f8"
}');
tarih=seyahatHedef.AddNewProLabel(VerticalScrollBox,'tarih','Gitmek istediğiniz tarihi giriniz:');
clComponent.SetupComponent(tarih,'{
"MarginBottom":1000,
"Width" :300,
"Height":40,
"TextColor":"#12366b",
"TextSize":15,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"#f8f8f8"
}');
gunH = clGetStringTo(hedefZaman.Date,'.');
yilH = clGetStringAfter(hedefZaman.Date, '.');
ayH = clGetStringTo(yilH, '.');
yilH = clGetStringAfter(yilH, '.');
dogruTarihH = yilH + '-' + ayH + '-' + gunH;
seyahatHedefKayit=seyahatHedef.AddNewProButton(VerticalScrollBox, 'seyahatHedefKayit', 'Hedeflerinizi Kaydedin');
clComponent.SetupComponent(seyahatHedefKayit,'{
"MarginBottom":600,
"Width" :300,
"Height":40,
"TextColor":"#f3f3f3",
"TextSize":15,
"TextVerticalAlign":"center",
"TextHorizontalAlign":"center",
"TextBold":"yes",
"BorderColor":"#ffffff",
"RoundHeight":20,
"RoundWidth":20,
"BorderWidth":1,
"BackGroundColor":"null"
}');
seyahatHedef.AddNewEvent(seyahatHedefKayit,tbeOnClick,'HedefKayit');
hedefGoruntuleButton=seyahatHedef.AddNewProButton(VerticalScrollBox, 'hedefGoruntuleButton', 'Hedefleri Görüntüle');
clComponent.SetupComponent(hedefGoruntuleButton,'{
"MarginBottom":200,
"Width" :300,
"Height":40,
"TextColor":"#e4e0f3",
"TextSize":15,
"TextBold":"yes",
"BorderColor":"#6f86d1",
"RoundHeight":10,
"RoundWidth":10,
"BorderWidth":1,
"BackGroundColor":"null"
}');
seyahatHedef.AddNewEvent(hedefGoruntuleButton, tbeOnClick, 'HedefGoruntuleSayfa');
seyahatHedef.Run;
}