Pineapple (CH4)
+ Idk Appicon i think, i was drunk yesterday
This commit is contained in:
@@ -338,7 +338,19 @@ class PfandCalculator:
|
|||||||
canvas.pack(side="left", fill="both", expand=True)
|
canvas.pack(side="left", fill="both", expand=True)
|
||||||
scrollbar.pack(side="right", fill="y")
|
scrollbar.pack(side="right", fill="y")
|
||||||
|
|
||||||
# Credit Section (Overall made nicer in Version 7.04.001) || Changed up a LOT in V8.05.501 (Pineapple)
|
"""
|
||||||
|
About / Information Section
|
||||||
|
|
||||||
|
Structure:
|
||||||
|
Main Credits
|
||||||
|
TGTG Credits
|
||||||
|
Updater Credits
|
||||||
|
µScan Credits
|
||||||
|
|
||||||
|
QuickInfo:
|
||||||
|
Basically create Toplevel Windows which display Details about each "Integration"
|
||||||
|
Use a image for each one (path -> images/versions)
|
||||||
|
"""
|
||||||
def create_credits(self, future_icons):
|
def create_credits(self, future_icons):
|
||||||
about_window = tk.Toplevel(self.root)
|
about_window = tk.Toplevel(self.root)
|
||||||
about_window.title("Über Programm")
|
about_window.title("Über Programm")
|
||||||
@@ -373,7 +385,7 @@ class PfandCalculator:
|
|||||||
label = tk.Label(
|
label = tk.Label(
|
||||||
about_window,
|
about_window,
|
||||||
text=(
|
text=(
|
||||||
"PfandApp V.8.15.000 - 'Pineapple'\n"
|
"PfandApp V.8.15.100 - 'Pineapple'\n"
|
||||||
"PaketVersion 1.1 ( PKG1.1 )\n\n"
|
"PaketVersion 1.1 ( PKG1.1 )\n\n"
|
||||||
"Erstellt mit TKinter, CV2, Numpy, PyZbar, TGTG-API, TKCalendar, Datetime\n"
|
"Erstellt mit TKinter, CV2, Numpy, PyZbar, TGTG-API, TKCalendar, Datetime\n"
|
||||||
),
|
),
|
||||||
@@ -755,7 +767,8 @@ class PfandCalculator:
|
|||||||
total = sum(self.quantities[product] * self.PRICES[product] for product in self.products) # get total
|
total = sum(self.quantities[product] * self.PRICES[product] for product in self.products) # get total
|
||||||
self.total_label.config(text=f"Gesamt: €{total:.2f}")
|
self.total_label.config(text=f"Gesamt: €{total:.2f}")
|
||||||
|
|
||||||
def load_deposit_history(self):
|
@staticmethod
|
||||||
|
def load_deposit_history():
|
||||||
try:
|
try:
|
||||||
with open('deposit_history.json', 'r') as f:
|
with open('deposit_history.json', 'r') as f:
|
||||||
return json.load(f)
|
return json.load(f)
|
||||||
@@ -1677,14 +1690,23 @@ class PfandCalculator:
|
|||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
app = PfandCalculator(root)
|
app = PfandCalculator(root)
|
||||||
|
|
||||||
if check_for_update is None:
|
#Icon (Version Pineapple | not really sure if this works yet!)
|
||||||
root.after(500, root.destroy) # We do a lil bit of Trolling here
|
#TODO: Check if this shit works (On Windows and Linux)
|
||||||
elif not check_for_update:
|
icon_path = os.path.join(os.getcwd(), "PfandApplication", "images", "versions", "pineapple.png")
|
||||||
|
ico = Image.open(icon_path)
|
||||||
|
photo = ImageTk.PhotoImage(ico)
|
||||||
|
root.iconphoto(False, photo)
|
||||||
|
|
||||||
|
|
||||||
|
if check_for_update is None: # If it's None then also pass (acts like False)
|
||||||
pass
|
pass
|
||||||
else:
|
|
||||||
|
elif not check_for_update: # If it isn't True pass
|
||||||
|
pass
|
||||||
|
|
||||||
|
else: # If is True then call the silent updater
|
||||||
root.after(1, run_silent_update)
|
root.after(1, run_silent_update)
|
||||||
|
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|
||||||
# Run AutoUpdates by default
|
|
||||||
if __name__ == "__main__": PfandCalculator.launch(True)
|
if __name__ == "__main__": PfandCalculator.launch(True)
|
||||||
|
|||||||
4
run.py
4
run.py
@@ -1,5 +1,5 @@
|
|||||||
from PfandApplication import main
|
from PfandApplication import main
|
||||||
if __name__ == "__main__": main.PfandCalculator.launch(False)
|
if __name__ == "__main__": main.PfandCalculator.launch(None)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -8,7 +8,7 @@ if __name__ == "__main__": main.PfandCalculator.launch(False)
|
|||||||
* *
|
* *
|
||||||
* True -> Auto-Update *
|
* True -> Auto-Update *
|
||||||
* False -> Dont Auto-Update *
|
* False -> Dont Auto-Update *
|
||||||
* None -> Idk check it :3 *
|
* None -> Act Like its False *
|
||||||
********************************************/
|
********************************************/
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Reference in New Issue
Block a user