#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 4.22
#  in conjunction with Tcl version 8.6
#    Apr 15, 2019 11:12:02 PM +0300  platform: Windows NT

import sys

try:
    import Tkinter as tk
except ImportError:
    import tkinter as tk

try:
    import ttk
    py3 = False
except ImportError:
    import tkinter.ttk as ttk
    py3 = True

import login_support

def vp_start_gui(my_socket):
    """Starting point when module is the main routine."""
    global val, w, root
    root = tk.Tk()
    root.resizable(False, False)
    root.bind('<Return>', login_support.finito)
    root.bind('<Key>', login_support.check_name)
    top = Toplevel1(root)
    login_support.init(root, top, my_socket)
    root.mainloop()
    return login_support.name

w = None
def create_Toplevel1(root, *args, **kwargs):
    """Starting point when module is imported by another program."""
    global w, w_win, rt
    rt = root
    w = tk.Toplevel(root)
    top = Toplevel1(w)
    login_support.init(w, top, *args, **kwargs)
    return w, top

def destroy_Toplevel1():
    global w
    w.destroy()
    w = None

class Toplevel1:
    def __init__(self, top=None):
        """This class configures and populates the toplevel window.
           top is the toplevel containing window."""
        _bgcolor = '#d9d9d9'  # X11 color: 'gray85'
        _fgcolor = '#000000'  # X11 color: 'black'
        _compcolor = '#d9d9d9' # X11 color: 'gray85'
        _ana1color = '#d9d9d9' # X11 color: 'gray85'
        _ana2color = '#ececec' # Closest X11 color: 'gray92'

        top.geometry("372x151+734+323")
        top.title("Login")
        top.configure(background="#d9d9d9")

        self.Label1 = tk.Label(top)
        self.Label1.place(relx=0.0, rely=0.0, height=41, width=184)
        self.Label1.configure(background="#d9d9d9")
        self.Label1.configure(disabledforeground="#a3a3a3")
        self.Label1.configure(font="-family {Segoe UI} -size 12")
        self.Label1.configure(foreground="#000000")
        self.Label1.configure(text="""Please enter your name:""")
        self.Label1.configure(width=184)

        self.Text1 = tk.Text(top)
        self.Text1.place(relx=0.027, rely=0.199, relheight=0.159, relwidth=0.656)
        self.Text1.configure(background="white")
        self.Text1.configure(font="-family {Segoe UI} -size 9")
        self.Text1.configure(foreground="black")
        self.Text1.configure(highlightbackground="#d9d9d9")
        self.Text1.configure(highlightcolor="black")
        self.Text1.configure(insertbackground="black")
        self.Text1.configure(selectbackground="#c4c4c4")
        self.Text1.configure(selectforeground="black")
        self.Text1.configure(width=244)
        self.Text1.configure(wrap="word")

        self.Label2 = tk.Label(top)
        self.Label2.place(relx=0.161, rely=0.397, height=27, width=248)
        self.Label2.configure(background="#d9d9d9")
        self.Label2.configure(disabledforeground="#a3a3a3")
        self.Label2.configure(font="-family {Segoe UI} -size 12")
        self.Label2.configure(foreground="#000000")
        self.Label2.configure(text="""Username is only allwed to contain""")
        self.Label2.configure(width=248)

        self.Label3 = tk.Label(top)
        self.Label3.place(relx=0.138, rely=0.56, height=27, width=274)
        self.Label3.configure(background="#d9d9d9")
        self.Label3.configure(disabledforeground="#a3a3a3")
        self.Label3.configure(font="-family {Segoe UI} -size 12")
        self.Label3.configure(foreground="#000000")
        self.Label3.configure(text="""letters, numbers, periods and hyphens.""")
        self.Label3.configure(width=224)

        self.Button1 = tk.Button(top)
        self.Button1.place(relx=0.699, rely=0.728, height=34, width=107)
        self.Button1.configure(activebackground="#ececec")
        self.Button1.configure(activeforeground="#000000")
        self.Button1.configure(background="#d9d9d9")
        self.Button1.configure(command=login_support.finito)
        self.Button1.configure(disabledforeground="#a3a3a3")
        self.Button1.configure(foreground="#000000")
        self.Button1.configure(highlightbackground="#d9d9d9")
        self.Button1.configure(highlightcolor="black")
        self.Button1.configure(pady="0")
        self.Button1.configure(text="""Connect""")
        self.Button1.configure(width=107)
        self.Button1.config(state='disable')

if __name__ == '__main__':
    vp_start_gui(None)
