From 38b093644eec4d2540a6a8a89b0bfad3269b4876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Orhan?= <108335903+kubraorhan@users.noreply.github.com> Date: Tue, 28 May 2024 00:02:43 +0300 Subject: [PATCH 1/7] Add files via upload commit --- dataNotion.py | 323 ++++++++++++++++++++++++++++++++++++++++++++++++++ registered.db | Bin 0 -> 32768 bytes 2 files changed, 323 insertions(+) create mode 100644 dataNotion.py create mode 100644 registered.db diff --git a/dataNotion.py b/dataNotion.py new file mode 100644 index 00000000..57e45d37 --- /dev/null +++ b/dataNotion.py @@ -0,0 +1,323 @@ +import wx +import sqlite3 + +class NotionApp(wx.Frame): + def __init__(self, user_id, *args, **kwargs): + super(NotionApp, self).__init__(*args, **kwargs) + self.dark_mode = self.load_dark_mode_state() + self.init_ui() + self.conn = sqlite3.connect("registered.db") + self.create_tables() + self.user_id = user_id # Oturum açmış kullanıcı ID'si burada saklanıyor + self.show_notes() + + def load_dark_mode_state(self): + try: + with open("dark_mode.txt", "r") as file: + return file.read().strip() == "True" + except FileNotFoundError: + return False + + def toggle_dark_mode(self, event): + self.dark_mode = not self.dark_mode + self.apply_dark_mode() + self.save_dark_mode_state_to_db() + + def save_dark_mode_state_to_db(self): + cursor = self.conn.cursor() + cursor.execute("UPDATE settings SET dark_mode = ? WHERE id = 1", (int(self.dark_mode),)) + self.conn.commit() + + def create_tables(self): + cursor = self.conn.cursor() + cursor.execute(''' + CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + username TEXT NOT NULL, + password TEXT NOT NULL + ) + ''') + + cursor.execute(''' + CREATE TABLE IF NOT EXISTS notes ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + user_id INTEGER, + note TEXT, + checked INTEGER DEFAULT 0, + FOREIGN KEY(user_id) REFERENCES users(id) + ) + ''') + + cursor.execute(''' + CREATE TABLE IF NOT EXISTS settings ( + id INTEGER PRIMARY KEY, + dark_mode INTEGER + ) + ''') + self.conn.commit() + + def init_ui(self): + self.SetTitle("Welcome to TwelveB") + self.SetSize((500, 400)) + + panel = wx.Panel(self) + vbox = wx.BoxSizer(wx.VERTICAL) + + self.listbox = wx.CheckListBox(panel) + vbox.Add(self.listbox, proportion=1, flag=wx.EXPAND | wx.ALL, border=15) + + hbox = wx.BoxSizer(wx.HORIZONTAL) + self.text_ctrl = wx.TextCtrl(panel) + hbox.Add(self.text_ctrl, proportion=1, flag=wx.EXPAND) + add_button = wx.Button(panel, label="Ekle") + add_button.Bind(wx.EVT_BUTTON, self.on_add) + hbox.Add(add_button, flag=wx.LEFT, border=5) + vbox.Add(hbox, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + delete_button = wx.Button(panel, label="Sil") + delete_button.Bind(wx.EVT_BUTTON, self.on_delete) + vbox.Add(delete_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + edit_button = wx.Button(panel, label="Düzenle") + edit_button.Bind(wx.EVT_BUTTON, self.on_edit) + vbox.Add(edit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + exit_button = wx.Button(panel, label="Hesap Değiştir") + exit_button.Bind(wx.EVT_BUTTON, self.on_exit) + vbox.Add(exit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + dark_mode_button = wx.Button(panel, label="Dark Mode") + dark_mode_button.Bind(wx.EVT_BUTTON, self.toggle_dark_mode) + vbox.Add(dark_mode_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + panel.SetSizer(vbox) + + self.Bind(wx.EVT_CHECKLISTBOX, self.on_check) + + def apply_dark_mode(self): + # Dark mode aktifse arayüz renklerini değiştir + if self.dark_mode: + self.SetBackgroundColour(wx.Colour(25, 25, 25)) # Arka plan rengini değiştir + self.listbox.SetBackgroundColour(wx.Colour(25, 25, 25)) # Liste kutusunun arka plan rengini değiştir + self.listbox.SetForegroundColour(wx.Colour(500, 500, 500)) # Liste kutusunun metin rengini değiştir + else: + self.SetBackgroundColour(wx.NullColour) # Arka plan rengini varsayılana ayarla + self.listbox.SetBackgroundColour(wx.NullColour) # Liste kutusunun arka plan rengini varsayılana ayarla + self.listbox.SetForegroundColour(wx.NullColour) # Liste kutusunun metin rengini varsayılana ayarla + + self.Refresh() # Arayüzün yenilenmesini sağla + + def show_notes(self): + cursor = self.conn.cursor() + cursor.execute("SELECT note, checked FROM notes WHERE user_id=?", (self.user_id,)) + notes = cursor.fetchall() + + self.listbox.Clear() + for note, checked in notes: + self.listbox.Append(note) + if checked: + self.listbox.Check(self.listbox.GetCount() - 1) + + def get_current_user_id(self): + return self.user_id + + def on_add(self, event): + item = self.text_ctrl.GetValue() + if item: + user_id = self.get_current_user_id() # Kullanıcının ID'sini almak için bir yol bulunmalıdır + self.add_note(user_id, item) # Önce veritabanına ekleyin + self.show_notes() # Notları tekrar yükleyin + self.text_ctrl.Clear() + + def on_edit(self, event): + selection = self.listbox.GetSelection() + if selection != wx.NOT_FOUND: + current_note = self.listbox.GetString(selection) + dialog = wx.TextEntryDialog(self, "Notu Düzenle:", "Not Düzenleme") + dialog.SetValue(current_note) # Varsayılan değeri ayarla + if dialog.ShowModal() == wx.ID_OK: + new_note = dialog.GetValue() + if new_note and new_note != current_note: + self.edit_note(current_note, new_note) + self.show_notes() + dialog.Destroy() + + def edit_note(self, current_note, new_note): + cursor = self.conn.cursor() + cursor.execute("UPDATE notes SET note=? WHERE user_id=? AND note=?", (new_note, self.user_id, current_note)) + self.conn.commit() + + def add_note(self, user_id, note): + cursor = self.conn.cursor() + cursor.execute("INSERT INTO notes (user_id, note, checked) VALUES (?, ?, 0)", (user_id, note)) + self.conn.commit() + print("Not kaydedildi:", note) + + def on_delete(self, event): + selection = self.listbox.GetSelection() + if selection != wx.NOT_FOUND: + note = self.listbox.GetString(selection) + self.delete_note(note) + self.show_notes() + + def delete_note(self, note): + cursor = self.conn.cursor() + cursor.execute("DELETE FROM notes WHERE user_id=? AND note=?", (self.user_id, note)) + self.conn.commit() + + def on_exit(self, event): + self.Close(True) # Uygulamayı kapat + app = wx.GetApp() + login_dialog = LoginDialog(None) + login_dialog.ShowModal() + + def on_check(self, event): + index = event.GetInt() + note = self.listbox.GetString(index) + checked = self.listbox.IsChecked(index) + + cursor = self.conn.cursor() + cursor.execute("UPDATE notes SET checked=? WHERE user_id=? AND note=?", (int(checked), self.user_id, note)) + self.conn.commit() + print(f"Updated note '{note}' to {'checked' if checked else 'unchecked'}.") + +class LoginDialog(wx.Dialog): + def __init__(self, *args, **kwargs): + super(LoginDialog, self).__init__(*args, **kwargs) + self.init_ui() + + def init_ui(self): + self.SetTitle("Giriş Yap") + self.SetSize((400, 400)) + + panel = wx.Panel(self) + vbox = wx.BoxSizer(wx.VERTICAL) + + username_label = wx.StaticText(panel, label="Kullanıcı Adı:") + vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) + self.username_textctrl = wx.TextCtrl(panel) + vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + password_label = wx.StaticText(panel, label="Şifre:") + vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) + self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) + vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + login_button = wx.Button(panel, label="Giriş Yap") + login_button.Bind(wx.EVT_BUTTON, self.on_login) + vbox.Add(login_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + forgot_button = wx.Button(panel, label="Şifremi Unuttum") + forgot_button.Bind(wx.EVT_BUTTON, self.on_forgot_password) + vbox.Add(forgot_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + register_button = wx.Button(panel, label="Kayıt Ol") + register_button.Bind(wx.EVT_BUTTON, self.on_register) + vbox.Add(register_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.TOP, border=10) + + exit_application_button = wx.Button(panel, label="Uygulamayı Kapat") + exit_application_button.Bind(wx.EVT_BUTTON, self.on_exit_application) + vbox.Add(exit_application_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=10) + + panel.SetSizer(vbox) + + def on_exit_application(self, event): + self.Destroy() # Uygulama penceresini kapat + app = wx.GetApp() + app.ExitMainLoop() # Uygulamanın çalışmasını durdur + + def on_forgot_password(self, event): + username = wx.GetTextFromUser("Lütfen kullanıcı adınızı girin:", "Şifremi Unuttum") + if username: + conn = sqlite3.connect("registered.db") + cursor = conn.cursor() + cursor.execute("SELECT password FROM users WHERE username=?", (username,)) + user = cursor.fetchone() + if user: + wx.MessageBox(f"Şifreniz: {user[0]}", "Şifreniz", wx.OK | wx.ICON_INFORMATION) + else: + wx.MessageBox("Kullanıcı adı bulunamadı!", "Hata", wx.OK | wx.ICON_ERROR) + + def on_register(self, event): + register_dialog = RegisterDialog(None) + if register_dialog.ShowModal() == wx.ID_OK: + wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) + + def on_login(self, event): + def login(username, password): + conn = sqlite3.connect("registered.db") + cursor = conn.cursor() + cursor.execute("SELECT id FROM users WHERE username=? AND password=?", (username, password)) + user = cursor.fetchone() + conn.close() + + if user: + return user[0] + else: + return None + + username = self.username_textctrl.GetValue() + password = self.password_textctrl.GetValue() + user_id = login(username, password) + if user_id is not None: + app = wx.GetApp() + app.frame = NotionApp(user_id, None) + app.frame.show_notes() # Kullanıcının notlarını göster + app.frame.Show() + self.Destroy() + else: + wx.MessageBox("Kullanıcı adı veya şifre yanlış!", "Hata", wx.OK | wx.ICON_ERROR) + self.username_textctrl.Clear() + self.password_textctrl.Clear() + + def on_register(self, event): + register_dialog = RegisterDialog(None) + if register_dialog.ShowModal() == wx.ID_OK: + wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) + +class RegisterDialog(wx.Dialog): + def __init__(self, *args, **kwargs): + super(RegisterDialog, self).__init__(*args, **kwargs) + self.init_ui() + + def init_ui(self): + self.SetTitle("Kayıt Ol") + self.SetSize((350, 200)) + + panel = wx.Panel(self) + vbox = wx.BoxSizer(wx.VERTICAL) + + username_label = wx.StaticText(panel, label="Kullanıcı Adı:") + vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) + self.username_textctrl = wx.TextCtrl(panel) + vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + password_label = wx.StaticText(panel, label="Şifre:") + vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) + self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) + vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + register_button = wx.Button(panel, label="Kayıt Ol") + register_button.Bind(wx.EVT_BUTTON, self.on_register) + vbox.Add(register_button, flag=wx.EXPAND | wx.ALL, border=10) + + panel.SetSizer(vbox) + + def on_register(self, event): + username = self.username_textctrl.GetValue() + password = self.password_textctrl.GetValue() + if username and password: + conn = sqlite3.connect("registered.db") # Veritabanı burada açılıyor + cursor = conn.cursor() + cursor.execute("INSERT INTO users (username, password) VALUES (?, ?)", (username, password)) + conn.commit() + conn.close() # Veritabanı burada kapanıyor + self.EndModal(wx.ID_OK) + else: + wx.MessageBox("Kullanıcı adı ve şifre boş bırakılamaz!", "Hata", wx.OK | wx.ICON_ERROR) + +if __name__ == "__main__": + app = wx.App() + login_dialog = LoginDialog(None) + login_dialog.ShowModal() + app.MainLoop() \ No newline at end of file diff --git a/registered.db b/registered.db new file mode 100644 index 0000000000000000000000000000000000000000..6557dbe3cc883f5fc235b40b9a8f1f1516c8d510 GIT binary patch literal 32768 zcmeI5O-x+Z702I$@$eonyr^|DvMS5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96*vhG5|=)9 zFe4>db(}hkc_>$qX5ovzH({}$&8^4?g&}RJ3IxIxD}kSQ2@E5QBp{H}XH(zfi7KDn zp<9^*TvZOu`f^omsG{mW1B>h0Qc&i|ZH+Te*x(Y?0>7C<#K|Bn6zA|8=qj{nzFLLG z8e2AJ5g4l!;@+fy62gR?blNrPl4lYP2!EO4D6ugML43bM+RZmJDO8cIA zz)5e&sAZ}fY!P}W-kMB1GyR5P4iB?eWT`%?Oh6c(${=5b z7`Tr)rs>6k67zduy8u3twXu-9qskq?cWK;@Rr z^n5xP7C1j$pqZ=SdKd87l$q=EY+@X5@0X?)al@;CpXf(-{dma*_9}c_GNA5sP(X+O z8Xsa~Q7TgJI4s`P2aU{x#3ulD*L>Y5g-CYfCvx)B0vO)z&DRTyWXyu zt^NORUU(D{5g-CYfCvx)B0vO)01+SpM1Tko0V2>Mkh3mphr2%0tUp-4v?^VnS%-W6 z)ALEsy&k`((DQQcFS(!PZs+E5z1^R7|F%2o{%*^T9*F=EAOb{y2oM1xKm>>Y5qNP3 z^sCDruA5JB*~8HDxroSou`VJqaYfEoe-V-Se|-^=`8+QoGN0u|M5z1ksn6R#?L|c9 z^Sp@2{2~_-(f>Y5g-CYfCvx)B0vO)01^255cnTuMSy|; literal 0 HcmV?d00001 From b51f93a8b2615fb8924eec6f6c063ea020995267 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Orhan?= <108335903+kubraorhan@users.noreply.github.com> Date: Tue, 28 May 2024 00:03:19 +0300 Subject: [PATCH 2/7] Create a.py --- TwelveB/a.py | 1 + 1 file changed, 1 insertion(+) create mode 100644 TwelveB/a.py diff --git a/TwelveB/a.py b/TwelveB/a.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/TwelveB/a.py @@ -0,0 +1 @@ + From 2a8d925674891e0c7fae758ece1ca08361979737 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Orhan?= <108335903+kubraorhan@users.noreply.github.com> Date: Tue, 28 May 2024 00:04:28 +0300 Subject: [PATCH 3/7] Add files via upload --- TwelveB/registered.db | Bin 0 -> 32768 bytes TwelveB/twelveB.py | 323 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 323 insertions(+) create mode 100644 TwelveB/registered.db create mode 100644 TwelveB/twelveB.py diff --git a/TwelveB/registered.db b/TwelveB/registered.db new file mode 100644 index 0000000000000000000000000000000000000000..6557dbe3cc883f5fc235b40b9a8f1f1516c8d510 GIT binary patch literal 32768 zcmeI5O-x+Z702I$@$eonyr^|DvMS5hREePmY#?eCJN^JO#smy8U?s>((Vcmh;re}z z-^aK^78XtxRaaeEl`0jfQo^EDB~;1k0x63b)K%4X(Pg`+y6P%zH<7yO|Gr@`_#<)@ zJBrgYFwEn=d(OS*cmC(j40oPbxHcnW!B&FM<1ri6Uea`3yU3WPX&>Qk?B3h)_-))X zxVLV4>)>-9KhlQYc`KK@qh)e~nsqKWnEQ24(0#W1O81q|v7%E%fCvx)B0vO)01+Sp zMBrHv=zd?nkw11!|L{)Ci>~m4SS-i99PJ%+T$(S8Ef(0~*!WC=?KQK$PWFUb+DF=K zYIdX#{51XEo}aopHowHC3rnnT*ZTl#TK7NM{pGp&!qnufGHY4&v-!g1 z!hB)&Qeh#DCF+y*Q@V(Acl4L@`MmyN`yQ$kQ`EkP2(Rk@oj-L-{~(ukiEg>Y!N$&>n0D_*>FT8_l6MEE6v zX!iel=s>Iwo$T|uCk9~I-*Z+Q%pX6l-#wT5Eb&;BgHVd-!BOT?*2t#nU++HDkw1D= zUw4`l5OFO1aun@8W)2Ry+xi&oK9C{X7v!VbvU%t%dx0%l>OLUue$450C6N!_OQ++n z2icC69@a}ndVDu&v1)2#eH!hs*=<+(Ys%^&ZKNl@_Ig;qs5hf&N?u7dN`JH+NJZN8 zm^`Q@l16!x@XuT*qvfqhxhA~ftdY?yYm9#@o6$~Kv-m^ZM1f6@%}h*P9kvc- zv?I*{M$=(l$z-(SN0$;miCDo4MNJ(IkBnOF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 -0,0 +1,323 @@ +import wx +import sqlite3 + +class NotionApp(wx.Frame): + def __init__(self, user_id, *args, **kwargs): + super(NotionApp, self).__init__(*args, **kwargs) + self.dark_mode = self.load_dark_mode_state() + self.init_ui() + self.conn = sqlite3.connect("registered.db") + self.create_tables() + self.user_id = user_id # Oturum açmış kullanıcı ID'si burada saklanıyor + self.show_notes() + + def load_dark_mode_state(self): + try: + with open("dark_mode.txt", "r") as file: + return file.read().strip() == "True" + except FileNotFoundError: + return False + + def toggle_dark_mode(self, event): + self.dark_mode = not self.dark_mode + self.apply_dark_mode() + self.save_dark_mode_state_to_db() + + def save_dark_mode_state_to_db(self): + cursor = self.conn.cursor() + cursor.execute("UPDATE settings SET dark_mode = ? WHERE id = 1", (int(self.dark_mode),)) + self.conn.commit() + + def create_tables(self): + cursor = self.conn.cursor() + cursor.execute(''' + CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + username TEXT NOT NULL, + password TEXT NOT NULL + ) + ''') + + cursor.execute(''' + CREATE TABLE IF NOT EXISTS notes ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + user_id INTEGER, + note TEXT, + checked INTEGER DEFAULT 0, + FOREIGN KEY(user_id) REFERENCES users(id) + ) + ''') + + cursor.execute(''' + CREATE TABLE IF NOT EXISTS settings ( + id INTEGER PRIMARY KEY, + dark_mode INTEGER + ) + ''') + self.conn.commit() + + def init_ui(self): + self.SetTitle("Welcome to TwelveB") + self.SetSize((500, 400)) + + panel = wx.Panel(self) + vbox = wx.BoxSizer(wx.VERTICAL) + + self.listbox = wx.CheckListBox(panel) + vbox.Add(self.listbox, proportion=1, flag=wx.EXPAND | wx.ALL, border=15) + + hbox = wx.BoxSizer(wx.HORIZONTAL) + self.text_ctrl = wx.TextCtrl(panel) + hbox.Add(self.text_ctrl, proportion=1, flag=wx.EXPAND) + add_button = wx.Button(panel, label="Ekle") + add_button.Bind(wx.EVT_BUTTON, self.on_add) + hbox.Add(add_button, flag=wx.LEFT, border=5) + vbox.Add(hbox, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + delete_button = wx.Button(panel, label="Sil") + delete_button.Bind(wx.EVT_BUTTON, self.on_delete) + vbox.Add(delete_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + edit_button = wx.Button(panel, label="Düzenle") + edit_button.Bind(wx.EVT_BUTTON, self.on_edit) + vbox.Add(edit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + exit_button = wx.Button(panel, label="Hesap Değiştir") + exit_button.Bind(wx.EVT_BUTTON, self.on_exit) + vbox.Add(exit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + dark_mode_button = wx.Button(panel, label="Dark Mode") + dark_mode_button.Bind(wx.EVT_BUTTON, self.toggle_dark_mode) + vbox.Add(dark_mode_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) + + panel.SetSizer(vbox) + + self.Bind(wx.EVT_CHECKLISTBOX, self.on_check) + + def apply_dark_mode(self): + # Dark mode aktifse arayüz renklerini değiştir + if self.dark_mode: + self.SetBackgroundColour(wx.Colour(25, 25, 25)) # Arka plan rengini değiştir + self.listbox.SetBackgroundColour(wx.Colour(25, 25, 25)) # Liste kutusunun arka plan rengini değiştir + self.listbox.SetForegroundColour(wx.Colour(500, 500, 500)) # Liste kutusunun metin rengini değiştir + else: + self.SetBackgroundColour(wx.NullColour) # Arka plan rengini varsayılana ayarla + self.listbox.SetBackgroundColour(wx.NullColour) # Liste kutusunun arka plan rengini varsayılana ayarla + self.listbox.SetForegroundColour(wx.NullColour) # Liste kutusunun metin rengini varsayılana ayarla + + self.Refresh() # Arayüzün yenilenmesini sağla + + def show_notes(self): + cursor = self.conn.cursor() + cursor.execute("SELECT note, checked FROM notes WHERE user_id=?", (self.user_id,)) + notes = cursor.fetchall() + + self.listbox.Clear() + for note, checked in notes: + self.listbox.Append(note) + if checked: + self.listbox.Check(self.listbox.GetCount() - 1) + + def get_current_user_id(self): + return self.user_id + + def on_add(self, event): + item = self.text_ctrl.GetValue() + if item: + user_id = self.get_current_user_id() # Kullanıcının ID'sini almak için bir yol bulunmalıdır + self.add_note(user_id, item) # Önce veritabanına ekleyin + self.show_notes() # Notları tekrar yükleyin + self.text_ctrl.Clear() + + def on_edit(self, event): + selection = self.listbox.GetSelection() + if selection != wx.NOT_FOUND: + current_note = self.listbox.GetString(selection) + dialog = wx.TextEntryDialog(self, "Notu Düzenle:", "Not Düzenleme") + dialog.SetValue(current_note) # Varsayılan değeri ayarla + if dialog.ShowModal() == wx.ID_OK: + new_note = dialog.GetValue() + if new_note and new_note != current_note: + self.edit_note(current_note, new_note) + self.show_notes() + dialog.Destroy() + + def edit_note(self, current_note, new_note): + cursor = self.conn.cursor() + cursor.execute("UPDATE notes SET note=? WHERE user_id=? AND note=?", (new_note, self.user_id, current_note)) + self.conn.commit() + + def add_note(self, user_id, note): + cursor = self.conn.cursor() + cursor.execute("INSERT INTO notes (user_id, note, checked) VALUES (?, ?, 0)", (user_id, note)) + self.conn.commit() + print("Not kaydedildi:", note) + + def on_delete(self, event): + selection = self.listbox.GetSelection() + if selection != wx.NOT_FOUND: + note = self.listbox.GetString(selection) + self.delete_note(note) + self.show_notes() + + def delete_note(self, note): + cursor = self.conn.cursor() + cursor.execute("DELETE FROM notes WHERE user_id=? AND note=?", (self.user_id, note)) + self.conn.commit() + + def on_exit(self, event): + self.Close(True) # Uygulamayı kapat + app = wx.GetApp() + login_dialog = LoginDialog(None) + login_dialog.ShowModal() + + def on_check(self, event): + index = event.GetInt() + note = self.listbox.GetString(index) + checked = self.listbox.IsChecked(index) + + cursor = self.conn.cursor() + cursor.execute("UPDATE notes SET checked=? WHERE user_id=? AND note=?", (int(checked), self.user_id, note)) + self.conn.commit() + print(f"Updated note '{note}' to {'checked' if checked else 'unchecked'}.") + +class LoginDialog(wx.Dialog): + def __init__(self, *args, **kwargs): + super(LoginDialog, self).__init__(*args, **kwargs) + self.init_ui() + + def init_ui(self): + self.SetTitle("Giriş Yap") + self.SetSize((400, 400)) + + panel = wx.Panel(self) + vbox = wx.BoxSizer(wx.VERTICAL) + + username_label = wx.StaticText(panel, label="Kullanıcı Adı:") + vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) + self.username_textctrl = wx.TextCtrl(panel) + vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + password_label = wx.StaticText(panel, label="Şifre:") + vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) + self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) + vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + login_button = wx.Button(panel, label="Giriş Yap") + login_button.Bind(wx.EVT_BUTTON, self.on_login) + vbox.Add(login_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + forgot_button = wx.Button(panel, label="Şifremi Unuttum") + forgot_button.Bind(wx.EVT_BUTTON, self.on_forgot_password) + vbox.Add(forgot_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + register_button = wx.Button(panel, label="Kayıt Ol") + register_button.Bind(wx.EVT_BUTTON, self.on_register) + vbox.Add(register_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.TOP, border=10) + + exit_application_button = wx.Button(panel, label="Uygulamayı Kapat") + exit_application_button.Bind(wx.EVT_BUTTON, self.on_exit_application) + vbox.Add(exit_application_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=10) + + panel.SetSizer(vbox) + + def on_exit_application(self, event): + self.Destroy() # Uygulama penceresini kapat + app = wx.GetApp() + app.ExitMainLoop() # Uygulamanın çalışmasını durdur + + def on_forgot_password(self, event): + username = wx.GetTextFromUser("Lütfen kullanıcı adınızı girin:", "Şifremi Unuttum") + if username: + conn = sqlite3.connect("registered.db") + cursor = conn.cursor() + cursor.execute("SELECT password FROM users WHERE username=?", (username,)) + user = cursor.fetchone() + if user: + wx.MessageBox(f"Şifreniz: {user[0]}", "Şifreniz", wx.OK | wx.ICON_INFORMATION) + else: + wx.MessageBox("Kullanıcı adı bulunamadı!", "Hata", wx.OK | wx.ICON_ERROR) + + def on_register(self, event): + register_dialog = RegisterDialog(None) + if register_dialog.ShowModal() == wx.ID_OK: + wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) + + def on_login(self, event): + def login(username, password): + conn = sqlite3.connect("registered.db") + cursor = conn.cursor() + cursor.execute("SELECT id FROM users WHERE username=? AND password=?", (username, password)) + user = cursor.fetchone() + conn.close() + + if user: + return user[0] + else: + return None + + username = self.username_textctrl.GetValue() + password = self.password_textctrl.GetValue() + user_id = login(username, password) + if user_id is not None: + app = wx.GetApp() + app.frame = NotionApp(user_id, None) + app.frame.show_notes() # Kullanıcının notlarını göster + app.frame.Show() + self.Destroy() + else: + wx.MessageBox("Kullanıcı adı veya şifre yanlış!", "Hata", wx.OK | wx.ICON_ERROR) + self.username_textctrl.Clear() + self.password_textctrl.Clear() + + def on_register(self, event): + register_dialog = RegisterDialog(None) + if register_dialog.ShowModal() == wx.ID_OK: + wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) + +class RegisterDialog(wx.Dialog): + def __init__(self, *args, **kwargs): + super(RegisterDialog, self).__init__(*args, **kwargs) + self.init_ui() + + def init_ui(self): + self.SetTitle("Kayıt Ol") + self.SetSize((350, 200)) + + panel = wx.Panel(self) + vbox = wx.BoxSizer(wx.VERTICAL) + + username_label = wx.StaticText(panel, label="Kullanıcı Adı:") + vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) + self.username_textctrl = wx.TextCtrl(panel) + vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + password_label = wx.StaticText(panel, label="Şifre:") + vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) + self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) + vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) + + register_button = wx.Button(panel, label="Kayıt Ol") + register_button.Bind(wx.EVT_BUTTON, self.on_register) + vbox.Add(register_button, flag=wx.EXPAND | wx.ALL, border=10) + + panel.SetSizer(vbox) + + def on_register(self, event): + username = self.username_textctrl.GetValue() + password = self.password_textctrl.GetValue() + if username and password: + conn = sqlite3.connect("registered.db") # Veritabanı burada açılıyor + cursor = conn.cursor() + cursor.execute("INSERT INTO users (username, password) VALUES (?, ?)", (username, password)) + conn.commit() + conn.close() # Veritabanı burada kapanıyor + self.EndModal(wx.ID_OK) + else: + wx.MessageBox("Kullanıcı adı ve şifre boş bırakılamaz!", "Hata", wx.OK | wx.ICON_ERROR) + +if __name__ == "__main__": + app = wx.App() + login_dialog = LoginDialog(None) + login_dialog.ShowModal() + app.MainLoop() \ No newline at end of file From f18d05c515f5dd2f19177da029c11271e058b33e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Orhan?= <108335903+kubraorhan@users.noreply.github.com> Date: Tue, 28 May 2024 00:06:58 +0300 Subject: [PATCH 4/7] Rename TwelveB/a.py to Twelve_B --- TwelveB/a.py => Twelve_B | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename TwelveB/a.py => Twelve_B (100%) diff --git a/TwelveB/a.py b/Twelve_B similarity index 100% rename from TwelveB/a.py rename to Twelve_B From 857ef6bd33b1bbb4786487881034fcde363cf140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Orhan?= <108335903+kubraorhan@users.noreply.github.com> Date: Tue, 28 May 2024 00:26:20 +0300 Subject: [PATCH 5/7] Delete TwelveB directory --- TwelveB/registered.db | Bin 32768 -> 0 bytes TwelveB/twelveB.py | 323 ------------------------------------------ 2 files changed, 323 deletions(-) delete mode 100644 TwelveB/registered.db delete mode 100644 TwelveB/twelveB.py diff --git a/TwelveB/registered.db b/TwelveB/registered.db deleted file mode 100644 index 6557dbe3cc883f5fc235b40b9a8f1f1516c8d510..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI5O-x+Z702I$@$eonyr^|DvMS5hREePmY#?eCJN^JO#smy8U?s>((Vcmh;re}z z-^aK^78XtxRaaeEl`0jfQo^EDB~;1k0x63b)K%4X(Pg`+y6P%zH<7yO|Gr@`_#<)@ zJBrgYFwEn=d(OS*cmC(j40oPbxHcnW!B&FM<1ri6Uea`3yU3WPX&>Qk?B3h)_-))X zxVLV4>)>-9KhlQYc`KK@qh)e~nsqKWnEQ24(0#W1O81q|v7%E%fCvx)B0vO)01+Sp zMBrHv=zd?nkw11!|L{)Ci>~m4SS-i99PJ%+T$(S8Ef(0~*!WC=?KQK$PWFUb+DF=K zYIdX#{51XEo}aopHowHC3rnnT*ZTl#TK7NM{pGp&!qnufGHY4&v-!g1 z!hB)&Qeh#DCF+y*Q@V(Acl4L@`MmyN`yQ$kQ`EkP2(Rk@oj-L-{~(ukiEg>Y!N$&>n0D_*>FT8_l6MEE6v zX!iel=s>Iwo$T|uCk9~I-*Z+Q%pX6l-#wT5Eb&;BgHVd-!BOT?*2t#nU++HDkw1D= zUw4`l5OFO1aun@8W)2Ry+xi&oK9C{X7v!VbvU%t%dx0%l>OLUue$450C6N!_OQ++n z2icC69@a}ndVDu&v1)2#eH!hs*=<+(Ys%^&ZKNl@_Ig;qs5hf&N?u7dN`JH+NJZN8 zm^`Q@l16!x@XuT*qvfqhxhA~ftdY?yYm9#@o6$~Kv-m^ZM1f6@%}h*P9kvc- zv?I*{M$=(l$z-(SN0$;miCDo4MNJ(IkBnOFdmTs8j+)i>P)lcr8q-NIx8bPVqvN-x z=d{0i|Bp?7t?S2K?{%H*(mVgy`J2wQ&TF0hotpV4^QY#5IbwDie>Hw(_{LDj-@e$F za!xlQKm>>Y5g-CY;HxDtJCoJS^`qJnk3DX4pVjYUtBRHD+kSnU*`l!_LhOUuGGtZ3 zYCLRg`ApU~rO%2oba;J}tqNPLu%d7!dY+#?q?vcL1yQx7h~~rufDxz3rDh5z7q2XQ)U$xlL_2pX9E@|ufSqS8M#HXQHMaby(WBDoVb`eoR%@Ku)s;w#F~m4JVX96*vhG5|=)9 zFe4>db(}hkc_>$qX5ovzH({}$&8^4?g&}RJ3IxIxD}kSQ2@E5QBp{H}XH(zfi7KDn zp<9^*TvZOu`f^omsG{mW1B>h0Qc&i|ZH+Te*x(Y?0>7C<#K|Bn6zA|8=qj{nzFLLG z8e2AJ5g4l!;@+fy62gR?blNrPl4lYP2!EO4D6ugML43bM+RZmJDO8cIA zz)5e&sAZ}fY!P}W-kMB1GyR5P4iB?eWT`%?Oh6c(${=5b z7`Tr)rs>6k67zduy8u3twXu-9qskq?cWK;@Rr z^n5xP7C1j$pqZ=SdKd87l$q=EY+@X5@0X?)al@;CpXf(-{dma*_9}c_GNA5sP(X+O z8Xsa~Q7TgJI4s`P2aU{x#3ulD*L>Y5g-CYfCvx)B0vO)z&DRTyWXyu zt^NORUU(D{5g-CYfCvx)B0vO)01+SpM1Tko0V2>Mkh3mphr2%0tUp-4v?^VnS%-W6 z)ALEsy&k`((DQQcFS(!PZs+E5z1^R7|F%2o{%*^T9*F=EAOb{y2oM1xKm>>Y5qNP3 z^sCDruA5JB*~8HDxroSou`VJqaYfEoe-V-Se|-^=`8+QoGN0u|M5z1ksn6R#?L|c9 z^Sp@2{2~_-(f>Y5g-CYfCvx)B0vO)01^255cnTuMSy|; diff --git a/TwelveB/twelveB.py b/TwelveB/twelveB.py deleted file mode 100644 index 57e45d37..00000000 --- a/TwelveB/twelveB.py +++ /dev/null @@ -1,323 +0,0 @@ -import wx -import sqlite3 - -class NotionApp(wx.Frame): - def __init__(self, user_id, *args, **kwargs): - super(NotionApp, self).__init__(*args, **kwargs) - self.dark_mode = self.load_dark_mode_state() - self.init_ui() - self.conn = sqlite3.connect("registered.db") - self.create_tables() - self.user_id = user_id # Oturum açmış kullanıcı ID'si burada saklanıyor - self.show_notes() - - def load_dark_mode_state(self): - try: - with open("dark_mode.txt", "r") as file: - return file.read().strip() == "True" - except FileNotFoundError: - return False - - def toggle_dark_mode(self, event): - self.dark_mode = not self.dark_mode - self.apply_dark_mode() - self.save_dark_mode_state_to_db() - - def save_dark_mode_state_to_db(self): - cursor = self.conn.cursor() - cursor.execute("UPDATE settings SET dark_mode = ? WHERE id = 1", (int(self.dark_mode),)) - self.conn.commit() - - def create_tables(self): - cursor = self.conn.cursor() - cursor.execute(''' - CREATE TABLE IF NOT EXISTS users ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - username TEXT NOT NULL, - password TEXT NOT NULL - ) - ''') - - cursor.execute(''' - CREATE TABLE IF NOT EXISTS notes ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - user_id INTEGER, - note TEXT, - checked INTEGER DEFAULT 0, - FOREIGN KEY(user_id) REFERENCES users(id) - ) - ''') - - cursor.execute(''' - CREATE TABLE IF NOT EXISTS settings ( - id INTEGER PRIMARY KEY, - dark_mode INTEGER - ) - ''') - self.conn.commit() - - def init_ui(self): - self.SetTitle("Welcome to TwelveB") - self.SetSize((500, 400)) - - panel = wx.Panel(self) - vbox = wx.BoxSizer(wx.VERTICAL) - - self.listbox = wx.CheckListBox(panel) - vbox.Add(self.listbox, proportion=1, flag=wx.EXPAND | wx.ALL, border=15) - - hbox = wx.BoxSizer(wx.HORIZONTAL) - self.text_ctrl = wx.TextCtrl(panel) - hbox.Add(self.text_ctrl, proportion=1, flag=wx.EXPAND) - add_button = wx.Button(panel, label="Ekle") - add_button.Bind(wx.EVT_BUTTON, self.on_add) - hbox.Add(add_button, flag=wx.LEFT, border=5) - vbox.Add(hbox, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - delete_button = wx.Button(panel, label="Sil") - delete_button.Bind(wx.EVT_BUTTON, self.on_delete) - vbox.Add(delete_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - edit_button = wx.Button(panel, label="Düzenle") - edit_button.Bind(wx.EVT_BUTTON, self.on_edit) - vbox.Add(edit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - exit_button = wx.Button(panel, label="Hesap Değiştir") - exit_button.Bind(wx.EVT_BUTTON, self.on_exit) - vbox.Add(exit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - dark_mode_button = wx.Button(panel, label="Dark Mode") - dark_mode_button.Bind(wx.EVT_BUTTON, self.toggle_dark_mode) - vbox.Add(dark_mode_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - panel.SetSizer(vbox) - - self.Bind(wx.EVT_CHECKLISTBOX, self.on_check) - - def apply_dark_mode(self): - # Dark mode aktifse arayüz renklerini değiştir - if self.dark_mode: - self.SetBackgroundColour(wx.Colour(25, 25, 25)) # Arka plan rengini değiştir - self.listbox.SetBackgroundColour(wx.Colour(25, 25, 25)) # Liste kutusunun arka plan rengini değiştir - self.listbox.SetForegroundColour(wx.Colour(500, 500, 500)) # Liste kutusunun metin rengini değiştir - else: - self.SetBackgroundColour(wx.NullColour) # Arka plan rengini varsayılana ayarla - self.listbox.SetBackgroundColour(wx.NullColour) # Liste kutusunun arka plan rengini varsayılana ayarla - self.listbox.SetForegroundColour(wx.NullColour) # Liste kutusunun metin rengini varsayılana ayarla - - self.Refresh() # Arayüzün yenilenmesini sağla - - def show_notes(self): - cursor = self.conn.cursor() - cursor.execute("SELECT note, checked FROM notes WHERE user_id=?", (self.user_id,)) - notes = cursor.fetchall() - - self.listbox.Clear() - for note, checked in notes: - self.listbox.Append(note) - if checked: - self.listbox.Check(self.listbox.GetCount() - 1) - - def get_current_user_id(self): - return self.user_id - - def on_add(self, event): - item = self.text_ctrl.GetValue() - if item: - user_id = self.get_current_user_id() # Kullanıcının ID'sini almak için bir yol bulunmalıdır - self.add_note(user_id, item) # Önce veritabanına ekleyin - self.show_notes() # Notları tekrar yükleyin - self.text_ctrl.Clear() - - def on_edit(self, event): - selection = self.listbox.GetSelection() - if selection != wx.NOT_FOUND: - current_note = self.listbox.GetString(selection) - dialog = wx.TextEntryDialog(self, "Notu Düzenle:", "Not Düzenleme") - dialog.SetValue(current_note) # Varsayılan değeri ayarla - if dialog.ShowModal() == wx.ID_OK: - new_note = dialog.GetValue() - if new_note and new_note != current_note: - self.edit_note(current_note, new_note) - self.show_notes() - dialog.Destroy() - - def edit_note(self, current_note, new_note): - cursor = self.conn.cursor() - cursor.execute("UPDATE notes SET note=? WHERE user_id=? AND note=?", (new_note, self.user_id, current_note)) - self.conn.commit() - - def add_note(self, user_id, note): - cursor = self.conn.cursor() - cursor.execute("INSERT INTO notes (user_id, note, checked) VALUES (?, ?, 0)", (user_id, note)) - self.conn.commit() - print("Not kaydedildi:", note) - - def on_delete(self, event): - selection = self.listbox.GetSelection() - if selection != wx.NOT_FOUND: - note = self.listbox.GetString(selection) - self.delete_note(note) - self.show_notes() - - def delete_note(self, note): - cursor = self.conn.cursor() - cursor.execute("DELETE FROM notes WHERE user_id=? AND note=?", (self.user_id, note)) - self.conn.commit() - - def on_exit(self, event): - self.Close(True) # Uygulamayı kapat - app = wx.GetApp() - login_dialog = LoginDialog(None) - login_dialog.ShowModal() - - def on_check(self, event): - index = event.GetInt() - note = self.listbox.GetString(index) - checked = self.listbox.IsChecked(index) - - cursor = self.conn.cursor() - cursor.execute("UPDATE notes SET checked=? WHERE user_id=? AND note=?", (int(checked), self.user_id, note)) - self.conn.commit() - print(f"Updated note '{note}' to {'checked' if checked else 'unchecked'}.") - -class LoginDialog(wx.Dialog): - def __init__(self, *args, **kwargs): - super(LoginDialog, self).__init__(*args, **kwargs) - self.init_ui() - - def init_ui(self): - self.SetTitle("Giriş Yap") - self.SetSize((400, 400)) - - panel = wx.Panel(self) - vbox = wx.BoxSizer(wx.VERTICAL) - - username_label = wx.StaticText(panel, label="Kullanıcı Adı:") - vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) - self.username_textctrl = wx.TextCtrl(panel) - vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - password_label = wx.StaticText(panel, label="Şifre:") - vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) - self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) - vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - login_button = wx.Button(panel, label="Giriş Yap") - login_button.Bind(wx.EVT_BUTTON, self.on_login) - vbox.Add(login_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - forgot_button = wx.Button(panel, label="Şifremi Unuttum") - forgot_button.Bind(wx.EVT_BUTTON, self.on_forgot_password) - vbox.Add(forgot_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - register_button = wx.Button(panel, label="Kayıt Ol") - register_button.Bind(wx.EVT_BUTTON, self.on_register) - vbox.Add(register_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.TOP, border=10) - - exit_application_button = wx.Button(panel, label="Uygulamayı Kapat") - exit_application_button.Bind(wx.EVT_BUTTON, self.on_exit_application) - vbox.Add(exit_application_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=10) - - panel.SetSizer(vbox) - - def on_exit_application(self, event): - self.Destroy() # Uygulama penceresini kapat - app = wx.GetApp() - app.ExitMainLoop() # Uygulamanın çalışmasını durdur - - def on_forgot_password(self, event): - username = wx.GetTextFromUser("Lütfen kullanıcı adınızı girin:", "Şifremi Unuttum") - if username: - conn = sqlite3.connect("registered.db") - cursor = conn.cursor() - cursor.execute("SELECT password FROM users WHERE username=?", (username,)) - user = cursor.fetchone() - if user: - wx.MessageBox(f"Şifreniz: {user[0]}", "Şifreniz", wx.OK | wx.ICON_INFORMATION) - else: - wx.MessageBox("Kullanıcı adı bulunamadı!", "Hata", wx.OK | wx.ICON_ERROR) - - def on_register(self, event): - register_dialog = RegisterDialog(None) - if register_dialog.ShowModal() == wx.ID_OK: - wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) - - def on_login(self, event): - def login(username, password): - conn = sqlite3.connect("registered.db") - cursor = conn.cursor() - cursor.execute("SELECT id FROM users WHERE username=? AND password=?", (username, password)) - user = cursor.fetchone() - conn.close() - - if user: - return user[0] - else: - return None - - username = self.username_textctrl.GetValue() - password = self.password_textctrl.GetValue() - user_id = login(username, password) - if user_id is not None: - app = wx.GetApp() - app.frame = NotionApp(user_id, None) - app.frame.show_notes() # Kullanıcının notlarını göster - app.frame.Show() - self.Destroy() - else: - wx.MessageBox("Kullanıcı adı veya şifre yanlış!", "Hata", wx.OK | wx.ICON_ERROR) - self.username_textctrl.Clear() - self.password_textctrl.Clear() - - def on_register(self, event): - register_dialog = RegisterDialog(None) - if register_dialog.ShowModal() == wx.ID_OK: - wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) - -class RegisterDialog(wx.Dialog): - def __init__(self, *args, **kwargs): - super(RegisterDialog, self).__init__(*args, **kwargs) - self.init_ui() - - def init_ui(self): - self.SetTitle("Kayıt Ol") - self.SetSize((350, 200)) - - panel = wx.Panel(self) - vbox = wx.BoxSizer(wx.VERTICAL) - - username_label = wx.StaticText(panel, label="Kullanıcı Adı:") - vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) - self.username_textctrl = wx.TextCtrl(panel) - vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - password_label = wx.StaticText(panel, label="Şifre:") - vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) - self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) - vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - register_button = wx.Button(panel, label="Kayıt Ol") - register_button.Bind(wx.EVT_BUTTON, self.on_register) - vbox.Add(register_button, flag=wx.EXPAND | wx.ALL, border=10) - - panel.SetSizer(vbox) - - def on_register(self, event): - username = self.username_textctrl.GetValue() - password = self.password_textctrl.GetValue() - if username and password: - conn = sqlite3.connect("registered.db") # Veritabanı burada açılıyor - cursor = conn.cursor() - cursor.execute("INSERT INTO users (username, password) VALUES (?, ?)", (username, password)) - conn.commit() - conn.close() # Veritabanı burada kapanıyor - self.EndModal(wx.ID_OK) - else: - wx.MessageBox("Kullanıcı adı ve şifre boş bırakılamaz!", "Hata", wx.OK | wx.ICON_ERROR) - -if __name__ == "__main__": - app = wx.App() - login_dialog = LoginDialog(None) - login_dialog.ShowModal() - app.MainLoop() \ No newline at end of file From 57368195f743e57022f3c80f14de900b7d423d60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Orhan?= <108335903+kubraorhan@users.noreply.github.com> Date: Tue, 28 May 2024 00:26:37 +0300 Subject: [PATCH 6/7] Delete dataNotion.py --- dataNotion.py | 323 -------------------------------------------------- 1 file changed, 323 deletions(-) delete mode 100644 dataNotion.py diff --git a/dataNotion.py b/dataNotion.py deleted file mode 100644 index 57e45d37..00000000 --- a/dataNotion.py +++ /dev/null @@ -1,323 +0,0 @@ -import wx -import sqlite3 - -class NotionApp(wx.Frame): - def __init__(self, user_id, *args, **kwargs): - super(NotionApp, self).__init__(*args, **kwargs) - self.dark_mode = self.load_dark_mode_state() - self.init_ui() - self.conn = sqlite3.connect("registered.db") - self.create_tables() - self.user_id = user_id # Oturum açmış kullanıcı ID'si burada saklanıyor - self.show_notes() - - def load_dark_mode_state(self): - try: - with open("dark_mode.txt", "r") as file: - return file.read().strip() == "True" - except FileNotFoundError: - return False - - def toggle_dark_mode(self, event): - self.dark_mode = not self.dark_mode - self.apply_dark_mode() - self.save_dark_mode_state_to_db() - - def save_dark_mode_state_to_db(self): - cursor = self.conn.cursor() - cursor.execute("UPDATE settings SET dark_mode = ? WHERE id = 1", (int(self.dark_mode),)) - self.conn.commit() - - def create_tables(self): - cursor = self.conn.cursor() - cursor.execute(''' - CREATE TABLE IF NOT EXISTS users ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - username TEXT NOT NULL, - password TEXT NOT NULL - ) - ''') - - cursor.execute(''' - CREATE TABLE IF NOT EXISTS notes ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - user_id INTEGER, - note TEXT, - checked INTEGER DEFAULT 0, - FOREIGN KEY(user_id) REFERENCES users(id) - ) - ''') - - cursor.execute(''' - CREATE TABLE IF NOT EXISTS settings ( - id INTEGER PRIMARY KEY, - dark_mode INTEGER - ) - ''') - self.conn.commit() - - def init_ui(self): - self.SetTitle("Welcome to TwelveB") - self.SetSize((500, 400)) - - panel = wx.Panel(self) - vbox = wx.BoxSizer(wx.VERTICAL) - - self.listbox = wx.CheckListBox(panel) - vbox.Add(self.listbox, proportion=1, flag=wx.EXPAND | wx.ALL, border=15) - - hbox = wx.BoxSizer(wx.HORIZONTAL) - self.text_ctrl = wx.TextCtrl(panel) - hbox.Add(self.text_ctrl, proportion=1, flag=wx.EXPAND) - add_button = wx.Button(panel, label="Ekle") - add_button.Bind(wx.EVT_BUTTON, self.on_add) - hbox.Add(add_button, flag=wx.LEFT, border=5) - vbox.Add(hbox, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - delete_button = wx.Button(panel, label="Sil") - delete_button.Bind(wx.EVT_BUTTON, self.on_delete) - vbox.Add(delete_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - edit_button = wx.Button(panel, label="Düzenle") - edit_button.Bind(wx.EVT_BUTTON, self.on_edit) - vbox.Add(edit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - exit_button = wx.Button(panel, label="Hesap Değiştir") - exit_button.Bind(wx.EVT_BUTTON, self.on_exit) - vbox.Add(exit_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - dark_mode_button = wx.Button(panel, label="Dark Mode") - dark_mode_button.Bind(wx.EVT_BUTTON, self.toggle_dark_mode) - vbox.Add(dark_mode_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=15) - - panel.SetSizer(vbox) - - self.Bind(wx.EVT_CHECKLISTBOX, self.on_check) - - def apply_dark_mode(self): - # Dark mode aktifse arayüz renklerini değiştir - if self.dark_mode: - self.SetBackgroundColour(wx.Colour(25, 25, 25)) # Arka plan rengini değiştir - self.listbox.SetBackgroundColour(wx.Colour(25, 25, 25)) # Liste kutusunun arka plan rengini değiştir - self.listbox.SetForegroundColour(wx.Colour(500, 500, 500)) # Liste kutusunun metin rengini değiştir - else: - self.SetBackgroundColour(wx.NullColour) # Arka plan rengini varsayılana ayarla - self.listbox.SetBackgroundColour(wx.NullColour) # Liste kutusunun arka plan rengini varsayılana ayarla - self.listbox.SetForegroundColour(wx.NullColour) # Liste kutusunun metin rengini varsayılana ayarla - - self.Refresh() # Arayüzün yenilenmesini sağla - - def show_notes(self): - cursor = self.conn.cursor() - cursor.execute("SELECT note, checked FROM notes WHERE user_id=?", (self.user_id,)) - notes = cursor.fetchall() - - self.listbox.Clear() - for note, checked in notes: - self.listbox.Append(note) - if checked: - self.listbox.Check(self.listbox.GetCount() - 1) - - def get_current_user_id(self): - return self.user_id - - def on_add(self, event): - item = self.text_ctrl.GetValue() - if item: - user_id = self.get_current_user_id() # Kullanıcının ID'sini almak için bir yol bulunmalıdır - self.add_note(user_id, item) # Önce veritabanına ekleyin - self.show_notes() # Notları tekrar yükleyin - self.text_ctrl.Clear() - - def on_edit(self, event): - selection = self.listbox.GetSelection() - if selection != wx.NOT_FOUND: - current_note = self.listbox.GetString(selection) - dialog = wx.TextEntryDialog(self, "Notu Düzenle:", "Not Düzenleme") - dialog.SetValue(current_note) # Varsayılan değeri ayarla - if dialog.ShowModal() == wx.ID_OK: - new_note = dialog.GetValue() - if new_note and new_note != current_note: - self.edit_note(current_note, new_note) - self.show_notes() - dialog.Destroy() - - def edit_note(self, current_note, new_note): - cursor = self.conn.cursor() - cursor.execute("UPDATE notes SET note=? WHERE user_id=? AND note=?", (new_note, self.user_id, current_note)) - self.conn.commit() - - def add_note(self, user_id, note): - cursor = self.conn.cursor() - cursor.execute("INSERT INTO notes (user_id, note, checked) VALUES (?, ?, 0)", (user_id, note)) - self.conn.commit() - print("Not kaydedildi:", note) - - def on_delete(self, event): - selection = self.listbox.GetSelection() - if selection != wx.NOT_FOUND: - note = self.listbox.GetString(selection) - self.delete_note(note) - self.show_notes() - - def delete_note(self, note): - cursor = self.conn.cursor() - cursor.execute("DELETE FROM notes WHERE user_id=? AND note=?", (self.user_id, note)) - self.conn.commit() - - def on_exit(self, event): - self.Close(True) # Uygulamayı kapat - app = wx.GetApp() - login_dialog = LoginDialog(None) - login_dialog.ShowModal() - - def on_check(self, event): - index = event.GetInt() - note = self.listbox.GetString(index) - checked = self.listbox.IsChecked(index) - - cursor = self.conn.cursor() - cursor.execute("UPDATE notes SET checked=? WHERE user_id=? AND note=?", (int(checked), self.user_id, note)) - self.conn.commit() - print(f"Updated note '{note}' to {'checked' if checked else 'unchecked'}.") - -class LoginDialog(wx.Dialog): - def __init__(self, *args, **kwargs): - super(LoginDialog, self).__init__(*args, **kwargs) - self.init_ui() - - def init_ui(self): - self.SetTitle("Giriş Yap") - self.SetSize((400, 400)) - - panel = wx.Panel(self) - vbox = wx.BoxSizer(wx.VERTICAL) - - username_label = wx.StaticText(panel, label="Kullanıcı Adı:") - vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) - self.username_textctrl = wx.TextCtrl(panel) - vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - password_label = wx.StaticText(panel, label="Şifre:") - vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) - self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) - vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - login_button = wx.Button(panel, label="Giriş Yap") - login_button.Bind(wx.EVT_BUTTON, self.on_login) - vbox.Add(login_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - forgot_button = wx.Button(panel, label="Şifremi Unuttum") - forgot_button.Bind(wx.EVT_BUTTON, self.on_forgot_password) - vbox.Add(forgot_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - register_button = wx.Button(panel, label="Kayıt Ol") - register_button.Bind(wx.EVT_BUTTON, self.on_register) - vbox.Add(register_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM | wx.TOP, border=10) - - exit_application_button = wx.Button(panel, label="Uygulamayı Kapat") - exit_application_button.Bind(wx.EVT_BUTTON, self.on_exit_application) - vbox.Add(exit_application_button, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.BOTTOM, border=10) - - panel.SetSizer(vbox) - - def on_exit_application(self, event): - self.Destroy() # Uygulama penceresini kapat - app = wx.GetApp() - app.ExitMainLoop() # Uygulamanın çalışmasını durdur - - def on_forgot_password(self, event): - username = wx.GetTextFromUser("Lütfen kullanıcı adınızı girin:", "Şifremi Unuttum") - if username: - conn = sqlite3.connect("registered.db") - cursor = conn.cursor() - cursor.execute("SELECT password FROM users WHERE username=?", (username,)) - user = cursor.fetchone() - if user: - wx.MessageBox(f"Şifreniz: {user[0]}", "Şifreniz", wx.OK | wx.ICON_INFORMATION) - else: - wx.MessageBox("Kullanıcı adı bulunamadı!", "Hata", wx.OK | wx.ICON_ERROR) - - def on_register(self, event): - register_dialog = RegisterDialog(None) - if register_dialog.ShowModal() == wx.ID_OK: - wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) - - def on_login(self, event): - def login(username, password): - conn = sqlite3.connect("registered.db") - cursor = conn.cursor() - cursor.execute("SELECT id FROM users WHERE username=? AND password=?", (username, password)) - user = cursor.fetchone() - conn.close() - - if user: - return user[0] - else: - return None - - username = self.username_textctrl.GetValue() - password = self.password_textctrl.GetValue() - user_id = login(username, password) - if user_id is not None: - app = wx.GetApp() - app.frame = NotionApp(user_id, None) - app.frame.show_notes() # Kullanıcının notlarını göster - app.frame.Show() - self.Destroy() - else: - wx.MessageBox("Kullanıcı adı veya şifre yanlış!", "Hata", wx.OK | wx.ICON_ERROR) - self.username_textctrl.Clear() - self.password_textctrl.Clear() - - def on_register(self, event): - register_dialog = RegisterDialog(None) - if register_dialog.ShowModal() == wx.ID_OK: - wx.MessageBox("Kayıt başarıyla tamamlandı! Lütfen giriş yapın.", "Başarılı", wx.OK | wx.ICON_INFORMATION) - -class RegisterDialog(wx.Dialog): - def __init__(self, *args, **kwargs): - super(RegisterDialog, self).__init__(*args, **kwargs) - self.init_ui() - - def init_ui(self): - self.SetTitle("Kayıt Ol") - self.SetSize((350, 200)) - - panel = wx.Panel(self) - vbox = wx.BoxSizer(wx.VERTICAL) - - username_label = wx.StaticText(panel, label="Kullanıcı Adı:") - vbox.Add(username_label, flag=wx.LEFT | wx.TOP, border=10) - self.username_textctrl = wx.TextCtrl(panel) - vbox.Add(self.username_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - password_label = wx.StaticText(panel, label="Şifre:") - vbox.Add(password_label, flag=wx.LEFT | wx.TOP, border=10) - self.password_textctrl = wx.TextCtrl(panel, style=wx.TE_PASSWORD) - vbox.Add(self.password_textctrl, flag=wx.EXPAND | wx.LEFT | wx.RIGHT | wx.TOP, border=10) - - register_button = wx.Button(panel, label="Kayıt Ol") - register_button.Bind(wx.EVT_BUTTON, self.on_register) - vbox.Add(register_button, flag=wx.EXPAND | wx.ALL, border=10) - - panel.SetSizer(vbox) - - def on_register(self, event): - username = self.username_textctrl.GetValue() - password = self.password_textctrl.GetValue() - if username and password: - conn = sqlite3.connect("registered.db") # Veritabanı burada açılıyor - cursor = conn.cursor() - cursor.execute("INSERT INTO users (username, password) VALUES (?, ?)", (username, password)) - conn.commit() - conn.close() # Veritabanı burada kapanıyor - self.EndModal(wx.ID_OK) - else: - wx.MessageBox("Kullanıcı adı ve şifre boş bırakılamaz!", "Hata", wx.OK | wx.ICON_ERROR) - -if __name__ == "__main__": - app = wx.App() - login_dialog = LoginDialog(None) - login_dialog.ShowModal() - app.MainLoop() \ No newline at end of file From dc49a33463aedf09385c312d415a05126de6086e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=BCbra=20Orhan?= <108335903+kubraorhan@users.noreply.github.com> Date: Tue, 28 May 2024 00:26:47 +0300 Subject: [PATCH 7/7] Delete registered.db --- registered.db | Bin 32768 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 registered.db diff --git a/registered.db b/registered.db deleted file mode 100644 index 6557dbe3cc883f5fc235b40b9a8f1f1516c8d510..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 32768 zcmeI5O-x+Z702I$@$eonyr^|DvMS5hREePmY#?eCJN^JO#smy8U?s>((Vcmh;re}z z-^aK^78XtxRaaeEl`0jfQo^EDB~;1k0x63b)K%4X(Pg`+y6P%zH<7yO|Gr@`_#<)@ zJBrgYFwEn=d(OS*cmC(j40oPbxHcnW!B&FM<1ri6Uea`3yU3WPX&>Qk?B3h)_-))X zxVLV4>)>-9KhlQYc`KK@qh)e~nsqKWnEQ24(0#W1O81q|v7%E%fCvx)B0vO)01+Sp zMBrHv=zd?nkw11!|L{)Ci>~m4SS-i99PJ%+T$(S8Ef(0~*!WC=?KQK$PWFUb+DF=K zYIdX#{51XEo}aopHow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