from tkinter import *
'''
These are user interfaces that were not used, but may be found useful.
They were not used because the pijuice battery does not support tkinter.
Instead, the status.txt output was used.
'''

'''
This screen displays the average PM2.5 and PM10 from a successful data pull.
@Author: <NAME>
'''
class SuccessScreen(Tk):
    def __init__(self,pm25,pm10):
        Tk.__init__(self)
        self.pm10 = pm10
        self.pm25 = pm25
        self.makeScreen()
        
    def makeScreen(self):
        self.title("PM Data Logger")
        mainframe = Frame(self)
        mainframe.configure(bg = 'blue')
        mainframe.pack(fill = BOTH, expand = True, pady = 5)

        title_text = Label(mainframe, text = "Data Pull Complete.", bg = 'blue', fg = 'white', font = 'Helvetica 36 bold')
        title_text.pack(fill = BOTH, expand = True, pady = 10)

        pm25_label = Label(mainframe, text = "Average PM 2.5 Concentration: " + self.pm25, bg = 'blue', fg = 'white', font = 'Helvetica 24 bold')
        pm25_label.pack(fill = BOTH, expand = True, pady = 10)

        pm10_label = Label(mainframe, text = "Average PM 10 Concentration: " + self.pm10, bg = 'blue', fg = 'white', font = 'Helvetica 24 bold')
        pm10_label.pack(fill = BOTH, expand = True, pady = 10)

        quit_but = Button(mainframe, text = "Close Window", bg = 'White', fg = 'blue', font = 'Helvetica 24 bold')
        quit_but['command'] = self.destroy
        quit_but.pack(expand = True, pady = 5)

'''
This screen will display when something goes wrong.
@Author: <NAME>
'''
class FailedScreen(Tk):
    def __init__(self):
        Tk.__init__(self)
        self.makeScreen()

    def makeScreen(self):
        self.title("PM Data Logger")
        mainframe = Frame(self)
        mainframe.configure(bg = 'blue')
        mainframe.pack(fill = BOTH, expand = True, pady = 5)

        title_text = Label(mainframe, text = "Data Pull Failed. Try Again", bg = 'blue', fg = 'white', font = 'Helvetica 36 bold')
        title_text.pack(fill = BOTH, expand = True, pady = 10)

        quit_but = Button(mainframe, text = "Close Window", bg = 'White', fg = 'blue', font = 'Helvetica 24 bold')
        quit_but['command'] = self.destroy
        quit_but.pack(expand = True, pady = 5)
        

from tkinter import *
'''
These are user interfaces that were not used, but may be found useful.
They were not used because the pijuice battery does not support tkinter.
Instead, the status.txt output was used.
'''

'''
This screen displays the average PM2.5 and PM10 from a successful data pull.
@Author: <NAME>
'''
class SuccessScreen(Tk):
    def __init__(self,pm25,pm10):
        Tk.__init__(self)
        self.pm10 = pm10
        self.pm25 = pm25
        self.makeScreen()
        
    def makeScreen(self):
        self.title("PM Data Logger")
        mainframe = Frame(self)
        mainframe.configure(bg = 'blue')
        mainframe.pack(fill = BOTH, expand = True, pady = 5)

        title_text = Label(mainframe, text = "Data Pull Complete.", bg = 'blue', fg = 'white', font = 'Helvetica 36 bold')
        title_text.pack(fill = BOTH, expand = True, pady = 10)

        pm25_label = Label(mainframe, text = "Average PM 2.5 Concentration: " + self.pm25, bg = 'blue', fg = 'white', font = 'Helvetica 24 bold')
        pm25_label.pack(fill = BOTH, expand = True, pady = 10)

        pm10_label = Label(mainframe, text = "Average PM 10 Concentration: " + self.pm10, bg = 'blue', fg = 'white', font = 'Helvetica 24 bold')
        pm10_label.pack(fill = BOTH, expand = True, pady = 10)

        quit_but = Button(mainframe, text = "Close Window", bg = 'White', fg = 'blue', font = 'Helvetica 24 bold')
        quit_but['command'] = self.destroy
        quit_but.pack(expand = True, pady = 5)

'''
This screen will display when something goes wrong.
@Author: <NAME>
'''
class FailedScreen(Tk):
    def __init__(self):
        Tk.__init__(self)
        self.makeScreen()

    def makeScreen(self):
        self.title("PM Data Logger")
        mainframe = Frame(self)
        mainframe.configure(bg = 'blue')
        mainframe.pack(fill = BOTH, expand = True, pady = 5)

        title_text = Label(mainframe, text = "Data Pull Failed. Try Again", bg = 'blue', fg = 'white', font = 'Helvetica 36 bold')
        title_text.pack(fill = BOTH, expand = True, pady = 10)

        quit_but = Button(mainframe, text = "Close Window", bg = 'White', fg = 'blue', font = 'Helvetica 24 bold')
        quit_but['command'] = self.destroy
        quit_but.pack(expand = True, pady = 5)
        

These are user interfaces that were not used, but may be found useful. They were not used because the pijuice battery does not support tkinter. Instead, the status.txt output was used. This screen displays the average PM2.5 and PM10 from a successful data pull. @Author: <NAME> This screen will display when something goes wrong. @Author: <NAME>