-
Notifications
You must be signed in to change notification settings - Fork 2
/
ipvanish.py
46 lines (37 loc) · 1.44 KB
/
ipvanish.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/python3
import platform
from tabs import TabsLists
from pathlib import Path
from tkinter import *
from tkinter import ttk
from PIL import ImageTk
class IPVanishGUI:
def __init__(self, title):
self.directory = str(Path(__file__).parent)
self.IPVanish = Tk()
self.IPVanish.title(title)
self.IPVanish.resizable(False, False)
self.IPVanish.geometry('340x600')
def image(self, xplace, yplace, xpos, ypos, width, height, anchor):
image = ImageTk.PhotoImage(file=self.directory + '/assets/ipvanish-text-logo-white.png')
canvas = Canvas(self.IPVanish, width=width, height=height)
canvas.image = image
canvas.create_image(xpos, ypos, anchor=anchor, image=image)
canvas.place(x=xplace, y=yplace)
def add_styles(self, widget, height):
style = ttk.Style(self.IPVanish)
style.configure(style=widget, height=height)
def vpn_connection(self):
TabsLists(self.IPVanish)
def mainloop(self):
self.IPVanish.mainloop()
if __name__ == '__main__':
if platform.system() != "Linux":
print("IpVanish Client is designed to run on Linux Distributions Only.")
print("Please download the official IpVanish Windows Client instead.")
exit()
IPVanish = IPVanishGUI('IPVanish Client')
IPVanish.image(8, 20, 5, 5, 350, 80, NW)
IPVanish.add_styles('TNotebook', 50)
IPVanish.vpn_connection()
IPVanish.mainloop()