Quellcode gekürzt.
This commit is contained in:
		@@ -1,12 +1,10 @@
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
 | 
			
		||||
from tkinter import *
 | 
			
		||||
from tkinter import ttk
 | 
			
		||||
 | 
			
		||||
# --------------------------
 | 
			
		||||
# Model
 | 
			
		||||
# --------------------------
 | 
			
		||||
 | 
			
		||||
class TLight:
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        self.colors = {0: "red", 1: "yellow", 2: "green", 3: "yellow"}
 | 
			
		||||
@@ -27,7 +25,6 @@ class TLight:
 | 
			
		||||
# --------------------------
 | 
			
		||||
# Controller
 | 
			
		||||
# --------------------------
 | 
			
		||||
 | 
			
		||||
class TLightController:
 | 
			
		||||
    def __init__(self, app):
 | 
			
		||||
        self.app = app
 | 
			
		||||
@@ -41,11 +38,9 @@ class TLightController:
 | 
			
		||||
        color = self.tlight.get_color()
 | 
			
		||||
        self.app.change_light_display(color)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# --------------------------
 | 
			
		||||
# View / Main Application
 | 
			
		||||
# --------------------------
 | 
			
		||||
 | 
			
		||||
class TLightApp(Tk):
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        super().__init__()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user