#! /usr/bin/env python3
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 7.6
#  in conjunction with Tcl version 8.6
#    Jun 27, 2023 10:38:06 AM +07  platform: Windows NT

import sys
import tkinter as tk
import tkinter.ttk as ttk
from tkinter.constants import *
import os.path
import webbrowser

_script = sys.argv[0]
_location = os.path.dirname(_script)


_bgcolor = '#d9d9d9'  # X11 color: 'gray85'
_fgcolor = '#000000'  # X11 color: 'black'
_compcolor = 'gray40' # X11 color: #666666
_ana1color = '#c3c3c3' # Closest X11 color: 'gray76'
_ana2color = 'beige' # X11 color: #f5f5dc
_tabfg1 = 'black' 
_tabfg2 = 'black' 
_tabbg1 = 'grey75' 
_tabbg2 = 'grey89' 
_bgmode = 'light' 

_style_code_ran = 0
def _style_code():
    global _style_code_ran
    if _style_code_ran:
       return
    style = ttk.Style()
    if sys.platform == "win32":
       style.theme_use('winnative')
    style.configure('.',background=_bgcolor)
    style.configure('.',foreground=_fgcolor)
    style.configure('.',font='TkDefaultFont')
    style.map('.',background =
       [('selected', _compcolor), ('active',_ana2color)])
    if _bgmode == 'dark':
       style.map('.',foreground =
         [('selected', 'white'), ('active','white')])
    else:
       style.map('.',foreground =
         [('selected', 'black'), ('active','black')])
    _style_code_ran = 1

class Toplevel1:
    def __init__(self, top=None):
        '''This class configures and populates the toplevel window.
           top is the toplevel containing window.'''

        top.geometry("912x710+0+0")
        top.minsize(112, 1)
        top.maxsize(1366, 746)
        top.resizable(1,  1)
        top.title("===[ Left: Stop-gap method | Right: Long-term solution ]===")
        top.configure(background="#ffffff")
        top.configure(highlightbackground="#d9d9d9")
        top.configure(highlightcolor="black")

        self.top = top

        _style_code()
        self.TSeparator1 = ttk.Separator(self.top)
        self.TSeparator1.place(relx=0.504, rely=0.028,  relheight=0.945)
        self.TSeparator1.configure(orient="vertical")
        self.Labelframe1 = tk.LabelFrame(self.top)
        self.Labelframe1.place(relx=0.022, rely=0.014, relheight=0.107
                , relwidth=0.458)
        self.Labelframe1.configure(relief='groove')
        self.Labelframe1.configure(foreground="#000000")
        self.Labelframe1.configure(text='''Proxy''')
        self.Labelframe1.configure(background="#ffffff")
        self.Labelframe1.configure(highlightbackground="#d9d9d9")
        self.Labelframe1.configure(highlightcolor="black")
        self.Label3 = tk.Label(self.Labelframe1)
        self.Label3.place(relx=0.024, rely=0.263, height=21, width=34
                , bordermode='ignore')
        self.Label3.configure(anchor='w')
        self.Label3.configure(background="#ffffff")
        self.Label3.configure(compound='left')
        self.Label3.configure(disabledforeground="#a3a3a3")
        self.Label3.configure(foreground="#000000")
        self.Label3.configure(text='''Web''')
        self.Label4 = tk.Label(self.Labelframe1)
        self.Label4.place(relx=0.12, rely=0.263, height=21, width=234
                , bordermode='ignore')
        self.Label4.configure(anchor='w')
        self.Label4.configure(background="#ffffff")
        self.Label4.configure(compound='left')
        self.Label4.configure(disabledforeground="#a3a3a3")
        self.Label4.configure(foreground="#ff8000")
        self.Label4.configure(text='''https://www.proxysite.com/''')
        self.Labelframe1_1 = tk.LabelFrame(self.top)
        self.Labelframe1_1.place(relx=0.526, rely=0.014, relheight=0.107
                , relwidth=0.457)
        self.Labelframe1_1.configure(relief='groove')
        self.Labelframe1_1.configure(foreground="#000000")
        self.Labelframe1_1.configure(text='''VPN''')
        self.Labelframe1_1.configure(background="#ffffff")
        self.Labelframe1_1.configure(highlightbackground="#d9d9d9")
        self.Labelframe1_1.configure(highlightcolor="black")
        self.Label1 = tk.Label(self.Labelframe1_1)
        self.Label1.place(relx=0.024, rely=0.263, height=21, width=54
                , bordermode='ignore')
        self.Label1.configure(anchor='w')
        self.Label1.configure(background="#ffffff")
        self.Label1.configure(compound='left')
        self.Label1.configure(disabledforeground="#a3a3a3")
        self.Label1.configure(foreground="#000000")
        self.Label1.configure(text='''MS-SSTP''')
        self.Label2 = tk.Label(self.Labelframe1_1)
        self.Label2.place(relx=0.168, rely=0.263, height=21, width=294
                , bordermode='ignore')
        self.Label2.configure(anchor='w')
        self.Label2.configure(background="#ffffff")
        self.Label2.configure(compound='left')
        self.Label2.configure(disabledforeground="#a3a3a3")
        self.Label2.configure(foreground="#ff8000")
        self.Label2.configure(text='''https://www.vpngate.net/en/''')

        
        self.Label2.bind("<Button-1>", lambda e: callback(self.Label2.cget("text")))
        self.Label4.bind("<Button-1>", lambda e: callback(self.Label4.cget("text")))

def main(*args):
    '''Main entry point for the application.'''
    global root
    root = tk.Tk()
    root.protocol( 'WM_DELETE_WINDOW' , root.destroy)
    # Creates a toplevel widget.
    global _top1, _w1
    _top1 = root
    _w1 = Toplevel1(_top1)
    root.mainloop()

def callback(url):
    webbrowser.open_new_tab(url)
    exit()


main()