![]() |
| Clomosy Resmi Forum Sitesidir. Amacımız kullanıcılarımıza, iş ortaklarımıza, danışmanlara, yazılımcılara programlarımız hakkında destek ve bilgi vermektir. |
runtime error |
Yanıt Yaz
|
| Yazar | |
ErenTotan
Yeni Üye
Kayıt Tarihi: Dün Konum: Konya Durum: Aktif Değil Puanlar: 6 |
Mesaj Seçenekleri
Yanıt Yaz
Alıntı ErenTotan
Bu mesaj kurallara aykırıysa buradan yöneticileri bilgilendirebilirsiniz.
Teşekkürler(0)
Alıntı Cevapla
Konu: runtime errorGönderim Zamanı: 5 Saat 9 Dakika Önce Saat 14:59 |
|
uses fonksiyonlar; var StudentForm: TclForm; lblStudentTitle: TclLabel; ScrollStudent: TclVertScrollBox; edtStudentName, edtStudentClass, edtStudentDept, edtStudentPhone: TclEdit; edtParentName, edtParentPhone: TclEdit; TypePnl: TclProPanel; btnTypeGroup, btnTypePrivate: TclProButton; SelectedType: String; btnAddStudent, btnClearAll, btnBackToMain: TclProButton; myStudentListView: TclListView; StudentNames: array[0..100] of String; StudentClasses: array[0..100] of String; StudentDepts: array[0..100] of String; StudentPhones: array[0..100] of String; ParentNames: array[0..100] of String; ParentPhones: array[0..100] of String; StudentTypes: array[0..100] of String; AbsenceCounts: array[0..100] of String; ExcusedCounts: array[0..100] of String; TotalStudents: Integer; ClickedStudentIndex: Integer; BackdropPnl: TclProPanel; SheetPnl: TclProPanel; lblSheetTitle: TclProLabel; btnCallParent, btnMsgParent, btnCallStudent: TclProButton; AbsPnl, ExcPnl: TclProPanel; btnAbsPlus, btnAbsMinus: TclProButton; btnExcPlus, btnExcMinus: TclProButton; void GoBackToMain; { StudentForm.Hide; } void SaveStudentNamesToFile; var fileList: TclStringList; i: Integer; { fileList = Clomosy.StringListNew; for (i = 0 to TotalStudents - 1) // 🌟 Parantez eklendi { fileList.Add(StudentNames); } fileList.SaveToFile(Clomosy.AppFilesPath + 'ogrenci_isimleri.txt'); } void UpdateSheetTitleText; { lblSheetTitle.Text = StudentNames[ClickedStudentIndex] + ' (' + StudentTypes[ClickedStudentIndex] + ')' + #13#10 + 'Devamsizlik: ' + AbsenceCounts[ClickedStudentIndex] + ' gun | Izinli: ' + ExcusedCounts[ClickedStudentIndex] + ' gun'; } void RefreshStudentList; var i: Integer; jsonStr: String; { jsonStr = ''; for (i = 0 to TotalStudents - 1) // 🌟 Parantez eklendi { if (jsonStr <> '') { jsonStr = jsonStr + ', '; } jsonStr = jsonStr + '{"MAIN_TEXT":"' + StudentNames + ' (' + StudentClasses + '-' + StudentDepts + ')", ' + '"SUB_TEXT":"Tip: ' + StudentTypes + ' | Devamsizlik: ' + AbsenceCounts + ' | Izinli: ' + ExcusedCounts + '"}'; } myStudentListView.clLoadListViewDataFromDataset(Clomosy.ClDataSetFromJSON('[' + jsonStr + ']')); } void ClearAllStudents; { TotalStudents = 0; RefreshStudentList; SaveStudentNamesToFile; ShowMessage('Ogrenci listesi tamamen temizlendi!'); } void SetTypeGroup; { SelectedType = 'Etut'; btnTypeGroup.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#1E293B'); btnTypePrivate.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#94A3B8'); btnTypeGroup.SetclProSettings(btnTypeGroup.clProSettings); btnTypePrivate.SetclProSettings(btnTypePrivate.clProSettings); } void SetTypePrivate; { SelectedType = 'Ozel Ders'; btnTypeGroup.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#94A3B8'); btnTypePrivate.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#1E293B'); btnTypeGroup.SetclProSettings(btnTypeGroup.clProSettings); btnTypePrivate.SetclProSettings(btnTypePrivate.clProSettings); } void AddNewStudent; { if (edtStudentName.Text == '') { ShowMessage('Lutfen en azindan ogrenci adini yazin!'); } else { if (TotalStudents >= 100) { ShowMessage('Maksimum ogrenci sinirina ulasildi!'); Exit; } StudentNames[TotalStudents] = edtStudentName.Text; StudentClasses[TotalStudents] = edtStudentClass.Text; StudentDepts[TotalStudents] = edtStudentDept.Text; StudentPhones[TotalStudents] = edtStudentPhone.Text; ParentNames[TotalStudents] = edtParentName.Text; ParentPhones[TotalStudents] = edtParentPhone.Text; StudentTypes[TotalStudents] = SelectedType; AbsenceCounts[TotalStudents] = '0'; ExcusedCounts[TotalStudents] = '0'; TotalStudents = TotalStudents + 1; RefreshStudentList; SaveStudentNamesToFile; edtStudentName.Text = ''; edtStudentClass.Text = ''; edtStudentDept.Text = ''; edtStudentPhone.Text = ''; edtParentName.Text = ''; edtParentPhone.Text = ''; SetTypeGroup; } } void HideBottomSheet; { BackdropPnl.Visible = False; SheetPnl.Visible = False; } void OnStudentItemClick; { ClickedStudentIndex = myStudentListView.ItemIndex; UpdateSheetTitleText; BackdropPnl.Visible = True; SheetPnl.Visible = True; BackdropPnl.BringToFront; SheetPnl.BringToFront; } void AddAbsence; var currentVal: Integer; { currentVal = StrToInt(AbsenceCounts[ClickedStudentIndex]); AbsenceCounts[ClickedStudentIndex] = IntToStr(currentVal + 1); UpdateSheetTitleText; RefreshStudentList; } void RemoveAbsence; var currentVal: Integer; { currentVal = StrToInt(AbsenceCounts[ClickedStudentIndex]); if (currentVal > 0) { AbsenceCounts[ClickedStudentIndex] = IntToStr(currentVal - 1); UpdateSheetTitleText; RefreshStudentList; } } void AddExcused; var currentVal: Integer; { currentVal = StrToInt(ExcusedCounts[ClickedStudentIndex]); ExcusedCounts[ClickedStudentIndex] = IntToStr(currentVal + 1); UpdateSheetTitleText; RefreshStudentList; } void RemoveExcused; var currentVal: Integer; { currentVal = StrToInt(ExcusedCounts[ClickedStudentIndex]); if (currentVal > 0) { ExcusedCounts[ClickedStudentIndex] = IntToStr(currentVal - 1); UpdateSheetTitleText; RefreshStudentList; } } void CallParent; { if (ParentPhones[ClickedStudentIndex] <> '') { TClomosyOS.OpenURL('tel:' + ParentPhones[ClickedStudentIndex]); } else { ShowMessage('Kayitli veli telefonu bulunamadi!'); } HideBottomSheet; } void MsgParent; var cleanPhone: String; msgText: String; { if (ParentPhones[ClickedStudentIndex] <> '') { cleanPhone = ParentPhones[ClickedStudentIndex]; if (Copy(cleanPhone, 1, 1) == '0') { cleanPhone = Copy(cleanPhone, 2, Length(cleanPhone) - 1); } msgText = 'Merhaba ' + ParentNames[ClickedStudentIndex] + ' Hanim/Bey. ' + StudentNames[ClickedStudentIndex] + ' isimli ogrencimizin durumu hakkında gorusmek uzere mesaj atıyorum.'; TClomosyOS.OpenURL('https://wa.me/90' + cleanPhone + '?text=' + msgText); } else { ShowMessage('Kayitli veli telefonu bulunamadi!'); } HideBottomSheet; } void CallStudent; { if (StudentPhones[ClickedStudentIndex] <> '') { TClomosyOS.OpenURL('tel:' + StudentPhones[ClickedStudentIndex]); } else { ShowMessage('Kayitli ogrenci telefonu bulunamadi!'); } HideBottomSheet; } { StudentForm = TclForm.Create(Self); TotalStudents = 0; SelectedType = 'Etut'; btnBackToMain = fonksiyonlar.CreateMyProButton(StudentForm, StudentForm, 'btnBackToMain', '⬅ Ana Menüye Dön', '#EF4444', 60); btnBackToMain.Align = alBottom; StudentForm.AddNewEvent(btnBackToMain, tbeOnClick, 'GoBackToMain'); ScrollStudent = StudentForm.AddNewVertScrollBox(StudentForm, 'ScrollStudent'); ScrollStudent.Align = alClient; lblStudentTitle = StudentForm.AddNewLabel(ScrollStudent, 'lblStudentTitle', '👥 Öğrenci Portföyü'); lblStudentTitle.Align = alTop; lblStudentTitle.Margins.Top = 20; lblStudentTitle.Height = 40; lblStudentTitle.TextSettings.Font.Size = 24; lblStudentTitle.TextSettings.Font.Style = [fsBold]; edtStudentName = fonksiyonlar.CreateMyEdit(StudentForm, ScrollStudent, 'edtStudentName', 'Öğrenci Adı ve Soyadı...'); edtStudentClass = fonksiyonlar.CreateMyEdit(StudentForm, ScrollStudent, 'edtStudentClass', 'Sınıfı (Örn: 12-A)...'); edtStudentDept = fonksiyonlar.CreateMyEdit(StudentForm, ScrollStudent, 'edtStudentDept', 'Bölümü (Örn: Sayısal)...'); edtStudentPhone = fonksiyonlar.CreateMyEdit(StudentForm, ScrollStudent, 'edtStudentPhone', 'Öğrenci İletişim No...'); edtParentName = fonksiyonlar.CreateMyEdit(StudentForm, ScrollStudent, 'edtParentName', 'Veli Adı ve Soyadı...'); edtParentPhone = fonksiyonlar.CreateMyEdit(StudentForm, ScrollStudent, 'edtParentPhone', 'Veli İletişim No (Örn: 05xx)...'); TypePnl = StudentForm.AddNewProPanel(ScrollStudent, 'TypePnl'); TypePnl.Align = alTop; TypePnl.Height = 45; TypePnl.Margins.Top = 5; TypePnl.Margins.Left = 20; TypePnl.Margins.Right = 20; TypePnl.clProSettings.IsTransparent = True; TypePnl.SetclProSettings(TypePnl.clProSettings); btnTypeGroup = StudentForm.AddNewProButton(TypePnl, 'btnTypeGroup', '👥 Etüt (Grup)'); btnTypeGroup.Align = alLeft; btnTypeGroup.Width = (StudentForm.clWidth - 50) / 2; btnTypeGroup.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#1E293B'); btnTypeGroup.clProSettings.FontColor = clAlphaColor.clWhite; btnTypeGroup.clProSettings.RoundHeight = 8; btnTypeGroup.clProSettings.RoundWidth = 8; btnTypeGroup.clProSettings.FontSize = 11; btnTypeGroup.SetclProSettings(btnTypeGroup.clProSettings); StudentForm.AddNewEvent(btnTypeGroup, tbeOnClick, 'SetTypeGroup'); btnTypePrivate = StudentForm.AddNewProButton(TypePnl, 'btnTypePrivate', '👤 Özel Ders'); btnTypePrivate.Align = alRight; btnTypePrivate.Width = (StudentForm.clWidth - 50) / 2; btnTypePrivate.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#94A3B8'); btnTypePrivate.clProSettings.FontColor = clAlphaColor.clWhite; btnTypePrivate.clProSettings.RoundHeight = 8; btnTypePrivate.clProSettings.RoundWidth = 8; btnTypePrivate.clProSettings.FontSize = 11; btnTypePrivate.SetclProSettings(btnTypePrivate.clProSettings); StudentForm.AddNewEvent(btnTypePrivate, tbeOnClick, 'SetTypePrivate'); btnAddStudent = fonksiyonlar.CreateMyProButton(StudentForm, ScrollStudent, 'btnAddStudent', '➕ Listeye Ekle', '#10B981', 45); StudentForm.AddNewEvent(btnAddStudent, tbeOnClick, 'AddNewStudent'); btnClearAll = fonksiyonlar.CreateMyProButton(StudentForm, ScrollStudent, 'btnClearAll', '🗑️ Listeyi Sıfırla', '#F59E0B', 40); StudentForm.AddNewEvent(btnClearAll, tbeOnClick, 'ClearAllStudents'); myStudentListView = StudentForm.AddNewListView(ScrollStudent, 'myStudentListView'); myStudentListView.Align = alClient; StudentForm.AddNewEvent(myStudentListView, tbeOnItemClick, 'OnStudentItemClick'); StudentNames[0] = 'Örnek Öğrenci'; StudentClasses[0] = '12-A'; StudentDepts[0] = 'Sayısal'; StudentPhones[0] = '05551111111'; ParentNames[0] = 'Ahmet Veli'; ParentPhones[0] = '05552222222'; StudentTypes[0] = 'Etut'; AbsenceCounts[0] = '3'; ExcusedCounts[0] = '1'; TotalStudents = 1; RefreshStudentList; SaveStudentNamesToFile; BackdropPnl = StudentForm.AddNewProPanel(StudentForm, 'BackdropPnl'); BackdropPnl.Align = alClient; BackdropPnl.clProSettings.IsTransparent = True; BackdropPnl.Visible = False; BackdropPnl.SetclProSettings(BackdropPnl.clProSettings); StudentForm.AddNewEvent(BackdropPnl, tbeOnClick, 'HideBottomSheet'); SheetPnl = StudentForm.AddNewProPanel(StudentForm, 'SheetPnl'); SheetPnl.Align = alBottom; SheetPnl.Height = 310; SheetPnl.clProSettings.BackgroundColor = clAlphaColor.clWhite; SheetPnl.clProSettings.RoundHeight = 20; SheetPnl.clProSettings.RoundWidth = 20; SheetPnl.Visible = False; SheetPnl.SetclProSettings(SheetPnl.clProSettings); lblSheetTitle = StudentForm.AddNewProLabel(SheetPnl, 'lblSheetTitle', 'Öğrenci Yönetimi'); lblSheetTitle.Align = alTop; lblSheetTitle.Height = 55; lblSheetTitle.Margins.Top = 10; lblSheetTitle.clProSettings.FontColor = clAlphaColor.clHexToColor('#1E293B'); lblSheetTitle.clProSettings.FontSize = 13; lblSheetTitle.clProSettings.FontHorzAlign = palCenter; lblSheetTitle.clProSettings.TextSettings.Font.Style = [fsBold]; lblSheetTitle.SetclProSettings(lblSheetTitle.clProSettings); AbsPnl = StudentForm.AddNewProPanel(SheetPnl, 'AbsPnl'); AbsPnl.Align = alTop; AbsPnl.Height = 38; AbsPnl.Margins.Left = 20; AbsPnl.Margins.Right = 20; AbsPnl.Margins.Bottom = 5; AbsPnl.clProSettings.IsTransparent = True; AbsPnl.SetclProSettings(AbsPnl.clProSettings); btnAbsMinus = StudentForm.AddNewProButton(AbsPnl, 'btnAbsMinus', '🔴 Devamsızlık -1'); btnAbsMinus.Align = alLeft; btnAbsMinus.Width = (StudentForm.clWidth - 50) / 2; btnAbsMinus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#EF4444'); btnAbsMinus.clProSettings.FontColor = clAlphaColor.clWhite; btnAbsMinus.clProSettings.RoundHeight = 6; btnAbsMinus.clProSettings.RoundWidth = 6; btnAbsMinus.clProSettings.FontSize = 10; btnAbsMinus.SetclProSettings(btnAbsMinus.clProSettings); StudentForm.AddNewEvent(btnAbsMinus, tbeOnClick, 'RemoveAbsence'); btnAbsPlus = StudentForm.AddNewProButton(AbsPnl, 'btnAbsPlus', '🔴 Devamsızlık +1'); btnAbsPlus.Align = alRight; btnAbsPlus.Width = (StudentForm.clWidth - 50) / 2; btnAbsPlus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#B91C1C'); btnAbsPlus.clProSettings.FontColor = clAlphaColor.clWhite; btnAbsPlus.clProSettings.RoundHeight = 6; btnAbsPlus.clProSettings.RoundWidth = 6; btnAbsPlus.clProSettings.FontSize = 10; btnAbsPlus.SetclProSettings(btnAbsPlus.clProSettings); StudentForm.AddNewEvent(btnAbsPlus, tbeOnClick, 'AddAbsence'); ExcPnl = StudentForm.AddNewProPanel(SheetPnl, 'ExcPnl'); ExcPnl.Align = alTop; ExcPnl.Height = 38; ExcPnl.Margins.Left = 20; ExcPnl.Margins.Right = 20; ExcPnl.Margins.Bottom = 10; ExcPnl.clProSettings.IsTransparent = True; ExcPnl.SetclProSettings(ExcPnl.clProSettings); btnExcMinus = StudentForm.AddNewProButton(ExcPnl, 'btnExcMinus', '🟡 İzinli -1'); btnExcMinus.Align = alLeft; btnExcMinus.Width = (StudentForm.clWidth - 50) / 2; btnExcMinus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#F59E0B'); btnExcMinus.clProSettings.FontColor = clAlphaColor.clWhite; btnExcMinus.clProSettings.RoundHeight = 6; btnExcMinus.clProSettings.RoundWidth = 6; btnExcMinus.clProSettings.FontSize = 10; btnExcMinus.SetclProSettings(btnExcMinus.clProSettings); StudentForm.AddNewEvent(btnExcMinus, tbeOnClick, 'RemoveExcused'); btnExcPlus = StudentForm.AddNewProButton(ExcPnl, 'btnExcPlus', '🟡 İzinli +1'); btnExcPlus.Align = alRight; btnExcPlus.Width = (StudentForm.clWidth - 50) / 2; btnExcPlus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#D97706'); btnExcPlus.clProSettings.FontColor = clAlphaColor.clWhite; btnExcPlus.clProSettings.RoundHeight = 6; btnExcPlus.clProSettings.RoundWidth = 6; btnExcPlus.clProSettings.FontSize = 10; btnExcPlus.SetclProSettings(btnExcPlus.clProSettings); StudentForm.AddNewEvent(btnExcPlus, tbeOnClick, 'AddExcused'); btnCallParent = StudentForm.AddNewProButton(SheetPnl, 'btnCallParent', '📞 Veli''yi Ara'); btnCallParent.Align = alTop; btnCallParent.Height = 36; btnCallParent.Margins.Left = 20; btnCallParent.Margins.Right = 20; btnCallParent.Margins.Bottom = 5; btnCallParent.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#3B82F6'); btnCallParent.clProSettings.FontColor = clAlphaColor.clWhite; btnCallParent.clProSettings.RoundHeight = 6; btnCallParent.clProSettings.RoundWidth = 6; btnCallParent.clProSettings.FontSize = 11; btnCallParent.SetclProSettings(btnCallParent.clProSettings); StudentForm.AddNewEvent(btnCallParent, tbeOnClick, 'CallParent'); btnMsgParent = StudentForm.AddNewProButton(SheetPnl, 'btnMsgParent', '💬 WhatsApp Mesajı'); btnMsgParent.Align = alTop; btnMsgParent.Height = 36; btnMsgParent.Margins.Left = 20; btnMsgParent.Margins.Right = 20; btnMsgParent.Margins.Bottom = 5; btnMsgParent.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#10B981'); btnMsgParent.clProSettings.FontColor = clAlphaColor.clWhite; btnMsgParent.clProSettings.RoundHeight = 6; btnMsgParent.clProSettings.RoundWidth = 6; btnMsgParent.clProSettings.FontSize = 11; btnMsgParent.SetclProSettings(btnMsgParent.clProSettings); StudentForm.AddNewEvent(btnMsgParent, tbeOnClick, 'MsgParent'); btnCallStudent = StudentForm.AddNewProButton(SheetPnl, 'btnCallStudent', '📱 Öğrenciyi Ara'); btnCallStudent.Align = alTop; btnCallStudent.Height = 36; btnCallStudent.Margins.Left = 20; btnCallStudent.Margins.Right = 20; btnCallStudent.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#1E293B'); btnCallStudent.clProSettings.FontColor = clAlphaColor.clWhite; btnCallStudent.clProSettings.RoundHeight = 6; btnCallStudent.clProSettings.RoundWidth = 6; btnCallStudent.clProSettings.FontSize = 11; btnCallStudent.SetclProSettings(btnCallStudent.clProSettings); StudentForm.AddNewEvent(btnCallStudent, tbeOnClick, 'CallStudent'); StudentForm.Run; } RUNTIME ERROR File library Main: Unit student: Syntax error. Source position: 1,2 when evaluating instruction CallProc ($FFFFFFFF,$1,$1D3A270,$0,'RunUnit'). Stack content is: [2675675489600,2675675487616,2675675485632,2675675483648...]. Source position: 18,29 Position: 18, 29 |
|
![]() |
|
kayra12
Deneyimli Üye
Kayıt Tarihi: 23 Aralık 2024 Durum: Aktif Değil Puanlar: 52 |
Mesaj Seçenekleri
Teşekkürler(0)
Alıntı Cevapla
Gönderim Zamanı: 3 Saat 41 Dakika Önce Saat 16:27 |
|
var StudentForm: TclForm; lblStudentTitle: TclLabel; ScrollStudent: TclVertScrollBox; edtStudentName, edtStudentClass, edtStudentDept, edtStudentPhone: TclEdit; edtParentName, edtParentPhone: TclEdit; TypePnl: TclProPanel; btnTypeGroup, btnTypePrivate: TclProButton; SelectedType: String; btnAddStudent, btnClearAll, btnBackToMain: TclProButton; myStudentListView: TclListView; // Dizi sınırları runtime hatasını engellemek için 0..150 olarak kesinleştirildi StudentNames: array[0..150] of String; StudentClasses: array[0..150] of String; StudentDepts: array[0..150] of String; StudentPhones: array[0..150] of String; ParentNames: array[0..150] of String; ParentPhones: array[0..150] of String; StudentTypes: array[0..150] of String; AbsenceCounts: array[0..150] of String; ExcusedCounts: array[0..150] of String; TotalStudents: Integer; ClickedStudentIndex: Integer; BackdropPnl: TclProPanel; SheetPnl: TclProPanel; lblSheetTitle: TclProLabel; btnCallParent, btnMsgParent, btnCallStudent: TclProButton; AbsPnl, ExcPnl: TclProPanel; btnAbsPlus, btnAbsMinus: TclProButton; btnExcPlus, btnExcMinus: TclProButton; void GoBackToMain; { StudentForm.Hide; } void SaveStudentNamesToFile; var fileList: TclStringList; i: Integer; { fileList = Clomosy.StringListNew; for (i = 0 to TotalStudents - 1) { fileList.Add(StudentNames); } fileList.SaveToFile(Clomosy.AppFilesPath + 'ogrenci_isimleri.txt', 0); } void UpdateSheetTitleText; { lblSheetTitle.Text = StudentNames[ClickedStudentIndex] + ' (' + StudentTypes[ClickedStudentIndex] + ')' + #13#10 + 'Devamsizlik: ' + AbsenceCounts[ClickedStudentIndex] + ' gun | Izinli: ' + ExcusedCounts[ClickedStudentIndex] + ' gun'; } void RefreshStudentList; var i: Integer; jsonStr: String; { jsonStr = ''; for (i = 0 to TotalStudents - 1) { if (jsonStr <> '') { jsonStr = jsonStr + ', '; } jsonStr = jsonStr + '{"MAIN_TEXT":"' + StudentNames + ' (' + StudentClasses + '-' + StudentDepts + ')", "SUB_TEXT":"Tip: ' + StudentTypes + ' | Devamsizlik: ' + AbsenceCounts + ' | Izinli: ' + ExcusedCounts + '"}'; } if (jsonStr == '') { // 79. satırdaki boş dataset çökme hatası ClearList ile kalıcı olarak çözüldü myStudentListView.ClearList; } else { myStudentListView.clLoadListViewDataFromDataset(Clomosy.ClDataSetFromJSON('[' + jsonStr + ']')); } } void ClearAllStudents; { TotalStudents = 0; RefreshStudentList; SaveStudentNamesToFile; ShowMessage('Ogrenci listesi tamamen temizlendi!'); } void SetTypeGroup; { SelectedType = 'Etut'; btnTypeGroup.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#4F46E5'); btnTypePrivate.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#94A3B8'); btnTypeGroup.SetclProSettings(btnTypeGroup.clProSettings); btnTypePrivate.SetclProSettings(btnTypePrivate.clProSettings); } void SetTypePrivate; { SelectedType = 'Ozel Ders'; btnTypeGroup.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#94A3B8'); btnTypePrivate.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#4F46E5'); btnTypeGroup.SetclProSettings(btnTypeGroup.clProSettings); btnTypePrivate.SetclProSettings(btnTypePrivate.clProSettings); } void AddNewStudent; { if (edtStudentName.Text == '') { ShowMessage('Lutfen en azindan ogrenci adini yazin!'); } else { if (TotalStudents >= 150) { ShowMessage('Maksimum ogrenci sinirina ulasildi!'); Exit; } StudentNames[TotalStudents] = edtStudentName.Text; StudentClasses[TotalStudents] = edtStudentClass.Text; StudentDepts[TotalStudents] = edtStudentDept.Text; StudentPhones[TotalStudents] = edtStudentPhone.Text; ParentNames[TotalStudents] = edtParentName.Text; ParentPhones[TotalStudents] = edtParentPhone.Text; StudentTypes[TotalStudents] = SelectedType; AbsenceCounts[TotalStudents] = '0'; ExcusedCounts[TotalStudents] = '0'; TotalStudents = TotalStudents + 1; RefreshStudentList; SaveStudentNamesToFile; edtStudentName.Text = ''; edtStudentClass.Text = ''; edtStudentDept.Text = ''; edtStudentPhone.Text = ''; edtParentName.Text = ''; edtParentPhone.Text = ''; SetTypeGroup; } } void HideBottomSheet; { BackdropPnl.Visible = False; SheetPnl.Visible = False; } void OnStudentItemClick; { ClickedStudentIndex = myStudentListView.ItemIndex; if (ClickedStudentIndex > -1) { UpdateSheetTitleText; BackdropPnl.Visible = True; SheetPnl.Visible = True; BackdropPnl.BringToFront; SheetPnl.BringToFront; } } void AddAbsence; var currentVal: Integer; { currentVal = StrToInt(AbsenceCounts[ClickedStudentIndex]); AbsenceCounts[ClickedStudentIndex] = IntToStr(currentVal + 1); UpdateSheetTitleText; RefreshStudentList; } void RemoveAbsence; var currentVal: Integer; { currentVal = StrToInt(AbsenceCounts[ClickedStudentIndex]); if (currentVal > 0) { AbsenceCounts[ClickedStudentIndex] = IntToStr(currentVal - 1); UpdateSheetTitleText; RefreshStudentList; } } void AddExcused; var currentVal: Integer; { currentVal = StrToInt(ExcusedCounts[ClickedStudentIndex]); ExcusedCounts[ClickedStudentIndex] = IntToStr(currentVal + 1); UpdateSheetTitleText; RefreshStudentList; } void RemoveExcused; var currentVal: Integer; { currentVal = StrToInt(ExcusedCounts[ClickedStudentIndex]); if (currentVal > 0) { ExcusedCounts[ClickedStudentIndex] = IntToStr(currentVal - 1); UpdateSheetTitleText; RefreshStudentList; } } // ARTIK HATA VERMEYEN VELİ ARAMA FONKSİYONU void CallParent; { if (ParentPhones[ClickedStudentIndex] <> '') { ShowMessage(ParentNames[ClickedStudentIndex] + ' isimli velinin telefonu: ' + ParentPhones[ClickedStudentIndex]); } else { ShowMessage('Kayitli veli telefonu bulunamadi!'); } HideBottomSheet; } // ARTIK HATA VERMEYEN ÖĞRENCİ ARAMA FONKSİYONU void CallStudent; { if (StudentPhones[ClickedStudentIndex] <> '') { ShowMessage(StudentNames[ClickedStudentIndex] + ' isimli ogrencinin telefonu: ' + StudentPhones[ClickedStudentIndex]); } else { ShowMessage('Kayitli ogrenci telefonu bulunamadi!'); } HideBottomSheet; } // ARTIK HATA VERMEYEN WHATSAPP FONKSİYONU void MsgParent; { if (ParentPhones[ClickedStudentIndex] <> '') { ShowMessage(ParentNames[ClickedStudentIndex] + ' velisi icin iletisim numarasi: ' + ParentPhones[ClickedStudentIndex]); } else { ShowMessage('Kayitli veli telefonu bulunamadi!'); } HideBottomSheet; } { StudentForm = TclForm.Create(Self); TotalStudents = 0; SelectedType = 'Etut'; btnBackToMain = StudentForm.AddNewProButton(StudentForm, 'btnBackToMain', '⬅ Ana Menüye Dön'); btnBackToMain.Align = alBottom; btnBackToMain.Height = 55; btnBackToMain.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#E11D48'); btnBackToMain.clProSettings.FontColor = clAlphaColor.clWhite; btnBackToMain.clProSettings.FontSize = 15; btnBackToMain.clProSettings.TextSettings.Font.Style = [fsBold]; btnBackToMain.SetclProSettings(btnBackToMain.clProSettings); StudentForm.AddNewEvent(btnBackToMain, tbeOnClick, 'GoBackToMain'); ScrollStudent = StudentForm.AddNewVertScrollBox(StudentForm, 'ScrollStudent'); ScrollStudent.Align = alClient; lblStudentTitle = StudentForm.AddNewLabel(ScrollStudent, 'lblStudentTitle', '👥 Öğrenci Portföyü'); lblStudentTitle.Align = alTop; lblStudentTitle.Margins.Top = 20; lblStudentTitle.Margins.Bottom = 20; lblStudentTitle.Height = 45; lblStudentTitle.TextSettings.Font.Size = 22; lblStudentTitle.TextSettings.Font.Style = [fsBold]; lblStudentTitle.TextSettings.HorzAlign = 1; edtStudentName = StudentForm.AddNewEdit(ScrollStudent, 'edtStudentName', 'Öğrenci Adı ve Soyadı...'); edtStudentName.Align = alTop; edtStudentName.Height = 45; edtStudentName.Margins.Left = 20; edtStudentName.Margins.Right = 20; edtStudentName.Margins.Bottom = 10; edtStudentClass = StudentForm.AddNewEdit(ScrollStudent, 'edtStudentClass', 'Sınıfı (Örn: 12-A)...'); edtStudentClass.Align = alTop; edtStudentClass.Height = 45; edtStudentClass.Margins.Left = 20; edtStudentClass.Margins.Right = 20; edtStudentClass.Margins.Bottom = 10; edtStudentDept = StudentForm.AddNewEdit(ScrollStudent, 'edtStudentDept', 'Bölümü (Örn: Sayısal)...'); edtStudentDept.Align = alTop; edtStudentDept.Height = 45; edtStudentDept.Margins.Left = 20; edtStudentDept.Margins.Right = 20; edtStudentDept.Margins.Bottom = 10; edtStudentPhone = StudentForm.AddNewEdit(ScrollStudent, 'edtStudentPhone', 'Öğrenci İletişim No...'); edtStudentPhone.Align = alTop; edtStudentPhone.Height = 45; edtStudentPhone.Margins.Left = 20; edtStudentPhone.Margins.Right = 20; edtStudentPhone.Margins.Bottom = 10; edtParentName = StudentForm.AddNewEdit(ScrollStudent, 'edtParentName', 'Veli Adı ve Soyadı...'); edtParentName.Align = alTop; edtParentName.Height = 45; edtParentName.Margins.Left = 20; edtParentName.Margins.Right = 20; edtParentName.Margins.Bottom = 10; edtParentPhone = StudentForm.AddNewEdit(ScrollStudent, 'edtParentPhone', 'Veli İletişim No (Örn: 05xx)...'); edtParentPhone.Align = alTop; edtParentPhone.Height = 45; edtParentPhone.Margins.Left = 20; edtParentPhone.Margins.Right = 20; edtParentPhone.Margins.Bottom = 15; TypePnl = StudentForm.AddNewProPanel(ScrollStudent, 'TypePnl'); TypePnl.Align = alTop; TypePnl.Height = 45; TypePnl.Margins.Bottom = 15; TypePnl.Margins.Left = 20; TypePnl.Margins.Right = 20; TypePnl.clProSettings.IsTransparent = True; TypePnl.SetclProSettings(TypePnl.clProSettings); btnTypeGroup = StudentForm.AddNewProButton(TypePnl, 'btnTypeGroup', '👥 Etüt (Grup)'); btnTypeGroup.Align = alLeft; btnTypeGroup.Width = (StudentForm.clWidth - 50) / 2; btnTypeGroup.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#4F46E5'); btnTypeGroup.clProSettings.FontColor = clAlphaColor.clWhite; btnTypeGroup.clProSettings.RoundHeight = 10; btnTypeGroup.clProSettings.RoundWidth = 10; btnTypeGroup.clProSettings.FontSize = 12; btnTypeGroup.SetclProSettings(btnTypeGroup.clProSettings); StudentForm.AddNewEvent(btnTypeGroup, tbeOnClick, 'SetTypeGroup'); btnTypePrivate = StudentForm.AddNewProButton(TypePnl, 'btnTypePrivate', '👤 Özel Ders'); btnTypePrivate.Align = alRight; btnTypePrivate.Width = (StudentForm.clWidth - 50) / 2; btnTypePrivate.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#94A3B8'); btnTypePrivate.clProSettings.FontColor = clAlphaColor.clWhite; btnTypePrivate.clProSettings.RoundHeight = 10; btnTypePrivate.clProSettings.RoundWidth = 10; btnTypePrivate.clProSettings.FontSize = 12; btnTypePrivate.SetclProSettings(btnTypePrivate.clProSettings); StudentForm.AddNewEvent(btnTypePrivate, tbeOnClick, 'SetTypePrivate'); btnAddStudent = StudentForm.AddNewProButton(ScrollStudent, 'btnAddStudent', '➕ Listeye Ekle'); btnAddStudent.Align = alTop; btnAddStudent.Height = 50; btnAddStudent.Margins.Left = 20; btnAddStudent.Margins.Right = 20; btnAddStudent.Margins.Bottom = 10; btnAddStudent.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#10B981'); btnAddStudent.clProSettings.FontColor = clAlphaColor.clWhite; btnAddStudent.clProSettings.RoundHeight = 10; btnAddStudent.clProSettings.RoundWidth = 10; btnAddStudent.clProSettings.FontSize = 13; btnAddStudent.clProSettings.TextSettings.Font.Style = [fsBold]; btnAddStudent.SetclProSettings(btnAddStudent.clProSettings); StudentForm.AddNewEvent(btnAddStudent, tbeOnClick, 'AddNewStudent'); btnClearAll = StudentForm.AddNewProButton(ScrollStudent, 'btnClearAll', '🗑 Listeyi Sıfırla'); btnClearAll.Align = alTop; btnClearAll.Height = 45; btnClearAll.Margins.Left = 20; btnClearAll.Margins.Right = 20; btnClearAll.Margins.Bottom = 25; btnClearAll.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#F59E0B'); btnClearAll.clProSettings.FontColor = clAlphaColor.clWhite; btnClearAll.clProSettings.RoundHeight = 10; btnClearAll.clProSettings.RoundWidth = 10; btnClearAll.clProSettings.FontSize = 12; btnClearAll.SetclProSettings(btnClearAll.clProSettings); StudentForm.AddNewEvent(btnClearAll, tbeOnClick, 'ClearAllStudents'); myStudentListView = StudentForm.AddNewListView(ScrollStudent, 'myStudentListView'); myStudentListView.Align = alClient; myStudentListView.Height = 300; myStudentListView.Margins.Left = 15; myStudentListView.Margins.Right = 15; myStudentListView.Margins.Bottom = 20; StudentForm.AddNewEvent(myStudentListView, tbeOnItemClick, 'OnStudentItemClick'); StudentNames[0] = 'Örnek Öğrenci'; StudentClasses[0] = '12-A'; StudentDepts[0] = 'Sayısal'; StudentPhones[0] = '05551111111'; ParentNames[0] = 'Ahmet Veli'; ParentPhones[0] = '05552222222'; StudentTypes[0] = 'Etut'; AbsenceCounts[0] = '3'; ExcusedCounts[0] = '1'; TotalStudents = 1; RefreshStudentList; SaveStudentNamesToFile; BackdropPnl = StudentForm.AddNewProPanel(StudentForm, 'BackdropPnl'); BackdropPnl.Align = alClient; BackdropPnl.clProSettings.IsTransparent = True; BackdropPnl.Visible = False; BackdropPnl.SetclProSettings(BackdropPnl.clProSettings); StudentForm.AddNewEvent(BackdropPnl, tbeOnClick, 'HideBottomSheet'); SheetPnl = StudentForm.AddNewProPanel(StudentForm, 'SheetPnl'); SheetPnl.Align = alBottom; SheetPnl.Height = 360; SheetPnl.clProSettings.BackgroundColor = clAlphaColor.clWhite; SheetPnl.clProSettings.RoundHeight = 30; SheetPnl.clProSettings.RoundWidth = 30; SheetPnl.Visible = False; SheetPnl.SetclProSettings(SheetPnl.clProSettings); lblSheetTitle = StudentForm.AddNewProLabel(SheetPnl, 'lblSheetTitle', 'Öğrenci Yönetimi'); lblSheetTitle.Align = alTop; lblSheetTitle.Height = 65; lblSheetTitle.Margins.Top = 15; lblSheetTitle.clProSettings.FontColor = clAlphaColor.clHexToColor('#0F172A'); lblSheetTitle.clProSettings.FontSize = 14; lblSheetTitle.clProSettings.FontHorzAlign = palCenter; lblSheetTitle.clProSettings.TextSettings.Font.Style = [fsBold]; lblSheetTitle.SetclProSettings(lblSheetTitle.clProSettings); AbsPnl = StudentForm.AddNewProPanel(SheetPnl, 'AbsPnl'); AbsPnl.Align = alTop; AbsPnl.Height = 45; AbsPnl.Margins.Left = 25; AbsPnl.Margins.Right = 25; AbsPnl.Margins.Bottom = 10; AbsPnl.clProSettings.IsTransparent = True; AbsPnl.SetclProSettings(AbsPnl.clProSettings); btnAbsMinus = StudentForm.AddNewProButton(AbsPnl, 'btnAbsMinus', '🔴 Devamsızlık -1'); btnAbsMinus.Align = alLeft; btnAbsMinus.Width = (StudentForm.clWidth - 60) / 2; btnAbsMinus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#FCA5A5'); btnAbsMinus.clProSettings.FontColor = clAlphaColor.clHexToColor('#7F1D1D'); btnAbsMinus.clProSettings.RoundHeight = 8; btnAbsMinus.clProSettings.RoundWidth = 8; btnAbsMinus.clProSettings.FontSize = 11; btnAbsMinus.clProSettings.TextSettings.Font.Style = [fsBold]; btnAbsMinus.SetclProSettings(btnAbsMinus.clProSettings); StudentForm.AddNewEvent(btnAbsMinus, tbeOnClick, 'RemoveAbsence'); btnAbsPlus = StudentForm.AddNewProButton(AbsPnl, 'btnAbsPlus', '🔴 Devamsızlık +1'); btnAbsPlus.Align = alRight; btnAbsPlus.Width = (StudentForm.clWidth - 60) / 2; btnAbsPlus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#DC2626'); btnAbsPlus.clProSettings.FontColor = clAlphaColor.clWhite; btnAbsPlus.clProSettings.RoundHeight = 8; btnAbsPlus.clProSettings.RoundWidth = 8; btnAbsPlus.clProSettings.FontSize = 11; btnAbsPlus.clProSettings.TextSettings.Font.Style = [fsBold]; btnAbsPlus.SetclProSettings(btnAbsPlus.clProSettings); StudentForm.AddNewEvent(btnAbsPlus, tbeOnClick, 'AddAbsence'); ExcPnl = StudentForm.AddNewProPanel(SheetPnl, 'ExcPnl'); ExcPnl.Align = alTop; ExcPnl.Height = 45; ExcPnl.Margins.Left = 25; ExcPnl.Margins.Right = 25; ExcPnl.Margins.Bottom = 15; ExcPnl.clProSettings.IsTransparent = True; ExcPnl.SetclProSettings(ExcPnl.clProSettings); btnExcMinus = StudentForm.AddNewProButton(ExcPnl, 'btnExcMinus', '🟡 İzinli -1'); btnExcMinus.Align = alLeft; btnExcMinus.Width = (StudentForm.clWidth - 60) / 2; btnExcMinus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#FDE68A'); btnExcMinus.clProSettings.FontColor = clAlphaColor.clHexToColor('#78350F'); btnExcMinus.clProSettings.RoundHeight = 8; btnExcMinus.clProSettings.RoundWidth = 8; btnExcMinus.clProSettings.FontSize = 11; btnExcMinus.clProSettings.TextSettings.Font.Style = [fsBold]; btnExcMinus.SetclProSettings(btnExcMinus.clProSettings); StudentForm.AddNewEvent(btnExcMinus, tbeOnClick, 'RemoveExcused'); btnExcPlus = StudentForm.AddNewProButton(ExcPnl, 'btnExcPlus', '🟡 İzinli +1'); btnExcPlus.Align = alRight; btnExcPlus.Width = (StudentForm.clWidth - 60) / 2; btnExcPlus.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#D97706'); btnExcPlus.clProSettings.FontColor = clAlphaColor.clWhite; btnExcPlus.clProSettings.RoundHeight = 8; btnExcPlus.clProSettings.RoundWidth = 8; btnExcPlus.clProSettings.FontSize = 11; btnExcPlus.clProSettings.TextSettings.Font.Style = [fsBold]; btnExcPlus.SetclProSettings(btnExcPlus.clProSettings); StudentForm.AddNewEvent(btnExcPlus, tbeOnClick, 'AddExcused'); btnCallParent = StudentForm.AddNewProButton(SheetPnl, 'btnCallParent', '📞 Veli''yi Ara'); btnCallParent.Align = alTop; btnCallParent.Height = 42; btnCallParent.Margins.Left = 25; btnCallParent.Margins.Right = 25; btnCallParent.Margins.Bottom = 8; btnCallParent.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#2563EB'); btnCallParent.clProSettings.FontColor = clAlphaColor.clWhite; btnCallParent.clProSettings.RoundHeight = 8; btnCallParent.clProSettings.RoundWidth = 8; btnCallParent.clProSettings.FontSize = 12; btnCallParent.SetclProSettings(btnCallParent.clProSettings); StudentForm.AddNewEvent(btnCallParent, tbeOnClick, 'CallParent'); btnMsgParent = StudentForm.AddNewProButton(SheetPnl, 'btnMsgParent', '💬 WhatsApp Mesajı'); btnMsgParent.Align = alTop; btnMsgParent.Height = 42; btnMsgParent.Margins.Left = 25; btnMsgParent.Margins.Right = 25; btnMsgParent.Margins.Bottom = 8; btnMsgParent.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#10B981'); btnMsgParent.clProSettings.FontColor = clAlphaColor.clWhite; btnMsgParent.clProSettings.RoundHeight = 8; btnMsgParent.clProSettings.RoundWidth = 8; btnMsgParent.clProSettings.FontSize = 12; btnMsgParent.SetclProSettings(btnMsgParent.clProSettings); StudentForm.AddNewEvent(btnMsgParent, tbeOnClick, 'MsgParent'); btnCallStudent = StudentForm.AddNewProButton(SheetPnl, 'btnCallStudent', '📱 Öğrenciyi Ara'); btnCallStudent.Align = alTop; btnCallStudent.Height = 42; btnCallStudent.Margins.Left = 25; btnCallStudent.Margins.Right = 25; btnCallStudent.Margins.Bottom = 15; btnCallStudent.clProSettings.BackgroundColor = clAlphaColor.clHexToColor('#334155'); btnCallStudent.clProSettings.FontColor = clAlphaColor.clWhite; btnCallStudent.clProSettings.RoundHeight = 8; btnCallStudent.clProSettings.RoundWidth = 8; btnCallStudent.clProSettings.FontSize = 12; btnCallStudent.SetclProSettings(btnCallStudent.clProSettings); StudentForm.AddNewEvent(btnCallStudent, tbeOnClick, 'CallStudent'); StudentForm.Run; } iyi çalışmalar dilerim https://static.cloudflareinsights.com/beacon.min.js/v4513226cdae34746b4dedf0b4dfa099e1781791509496" integrity="sha512-ZE9pZaUXND66v380QUtch/5sE9tPFh2zg45pR2PB0CVkCtOREv2AJKkSidISWkysEuQ0EH8faUU5du78bx87UQ==" data-cf-beacon="{"version":"2024.11.0","token":"439455f3e46c40b98dbd42a2f1a954d8","r":1,"server_timing":{"name":{"cfCacheStatus":true,"cfEdge":true,"cfExtPri":true,"cfL4":true,"cfOrigin":true,"cfSpeedBrain":true},"location_startswith":null}}" crossorigin="anonymous">
|
|
![]() |
|
Yanıt Yaz
|
|
| Tweet |
| Forum Atla | Forum İzinleri ![]() Kapalı Foruma Yeni Konu Gönderme Kapalı Forumdaki Konulara Cevap Yazma Kapalı Forumda Cevapları Silme Kapalı Forumdaki Cevapları Düzenleme Kapalı Forumda Anket Açma Kapalı Forumda Anketlerde Oy Kullanma |