Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
derekhe committed Nov 6, 2021
1 parent 95bb82a commit b43cd56
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,31 @@ def create_cache_settings(self, parent):
ttk.Button(parent, text="Clear cache", command=self.clear_cache
).grid(column=4, row=row)

def create_help(self, parent):
row = 1
ttk.Label(parent, text="Please always check latest version").grid(column=1, row=row, sticky=(W, E))
ttk.Button(parent, text="Open Latest release page",
command=lambda: webbrowser.open("https://github.com/derekhe/msfs2020-google-map/releases")).grid(
column=2, row=row, sticky=(W, E))

row += 1
ttk.Label(parent, text="First time intro").grid(column=1, row=row, sticky=(W, E))
ttk.Button(parent, text="Open Introduction and Usage page",
command=lambda: webbrowser.open("https://www.youtube.com/watch?v=Lk7GK5XLTt8")).grid(column=2,
row=row,
sticky=(W, E))

row += 1
ttk.Label(parent, text="Discussion").grid(column=1, row=row, sticky=(W, E))
ttk.Button(parent, text="Open FlightSim.to homepage",
command=lambda: webbrowser.open(
"https://zh.flightsim.to/file/19345/msfs-2020-google-map-replacement")).grid(
column=2,
row=row, sticky=(W, E))

for child in parent.winfo_children():
child.grid_configure(padx=5, pady=5)

@staticmethod
def is_admin():
try:
Expand Down Expand Up @@ -241,31 +266,6 @@ def is_443_occupied():
result = sock.connect_ex(('127.0.0.1', 443))
return result == 0

def create_help(self, parent):
row = 1
ttk.Label(parent, text="Please always check latest version").grid(column=1, row=row, sticky=(W, E))
ttk.Button(parent, text="Open Latest release page",
command=lambda: webbrowser.open("https://github.com/derekhe/msfs2020-google-map/releases")).grid(
column=2, row=row, sticky=(W, E))

row += 1
ttk.Label(parent, text="First time intro").grid(column=1, row=row, sticky=(W, E))
ttk.Button(parent, text="Open Introduction and Usage page",
command=lambda: webbrowser.open("https://www.youtube.com/watch?v=Lk7GK5XLTt8")).grid(column=2,
row=row,
sticky=(W, E))

row += 1
ttk.Label(parent, text="Discussion").grid(column=1, row=row, sticky=(W, E))
ttk.Button(parent, text="Open FlightSim.to homepage",
command=lambda: webbrowser.open(
"https://zh.flightsim.to/file/19345/msfs-2020-google-map-replacement")).grid(
column=2,
row=row, sticky=(W, E))

for child in parent.winfo_children():
child.grid_configure(padx=5, pady=5)


if __name__ == '__main__':
root = Tk()
Expand Down

0 comments on commit b43cd56

Please sign in to comment.