33import os
44from object_execute import Object_execute
55
6- class Dominio ():
6+
7+ class Dominio :
78 def __init__ (self ):
89 self .descricao = "Domínio:"
9- self .definicao = ' dominio'
10+ self .definicao = " dominio"
1011 self .valor = ""
1112
1213
13- class Usuario () :
14+ class Usuario :
1415 def __init__ (self ):
1516 self .descricao = "Usuario:"
16- self .definicao = ' usuario'
17+ self .definicao = " usuario"
1718 self .valor = ""
1819
1920
20- class Senha () :
21+ class Senha :
2122 def __init__ (self ):
2223 self .descricao = "Senha:"
23- self .definicao = ' senha'
24+ self .definicao = " senha"
2425 self .valor = ""
2526
2627
@@ -43,41 +44,82 @@ def change_gui(self, window, values):
4344 self .window = window
4445 self .values = values
4546 estado = self .values [self .definicao ]
46- window [self .dominio .definicao ].update (
47- disabled = not estado )
48- window [self .usuario .definicao ].update (
49- disabled = not estado )
50- window [self .senha .definicao ].update (
51- disabled = not estado )
47+ window [self .dominio .definicao ].update (disabled = not estado )
48+ window [self .usuario .definicao ].update (disabled = not estado )
49+ window [self .senha .definicao ].update (disabled = not estado )
5250
5351 def gui (self ):
5452 dominio = [
55- [sg .Checkbox (self .descricao ,
56- key = self .definicao , size = (24 , 1 ), enable_events = True )],
57- [sg .Text (self .dominio .descricao , justification = 'left' , size = (9 , 1 )), sg .Input (
58- '' , key = self .dominio .definicao , background_color = 'white' , border_width = 1 , justification = 'left' , size = (15 , 1 ), disabled = True )],
59- [sg .Text (self .usuario .descricao , justification = 'left' , size = (9 , 1 )), sg .Input (
60- '' , key = self .usuario .definicao , background_color = 'white' , border_width = 1 , justification = 'left' , size = (15 , 1 ), disabled = True )],
61- [sg .Text (self .senha .descricao , justification = 'left' , size = (9 , 1 )), sg .Input (
62- '' , key = self .senha .definicao , password_char = '*' , background_color = 'white' , border_width = 1 , justification = 'left' , size = (15 , 1 ), disabled = True )],
63- [sg .Input ("" ,key = self .definicao + "status" , background_color = "White" , border_width = 1 , justification = 'left' , disabled = True , size = (30 , 1 )),]
53+ [
54+ sg .Checkbox (
55+ self .descricao , key = self .definicao , size = (24 , 1 ), enable_events = True
56+ )
57+ ],
58+ [
59+ sg .Text (self .dominio .descricao , justification = "left" , size = (9 , 1 )),
60+ sg .Input (
61+ "" ,
62+ key = self .dominio .definicao ,
63+ background_color = "white" ,
64+ border_width = 1 ,
65+ justification = "left" ,
66+ size = (15 , 1 ),
67+ disabled = True ,
68+ ),
69+ ],
70+ [
71+ sg .Text (self .usuario .descricao , justification = "left" , size = (9 , 1 )),
72+ sg .Input (
73+ "" ,
74+ key = self .usuario .definicao ,
75+ background_color = "white" ,
76+ border_width = 1 ,
77+ justification = "left" ,
78+ size = (15 , 1 ),
79+ disabled = True ,
80+ ),
81+ ],
82+ [
83+ sg .Text (self .senha .descricao , justification = "left" , size = (9 , 1 )),
84+ sg .Input (
85+ "" ,
86+ key = self .senha .definicao ,
87+ password_char = "*" ,
88+ background_color = "white" ,
89+ border_width = 1 ,
90+ justification = "left" ,
91+ size = (15 , 1 ),
92+ disabled = True ,
93+ ),
94+ ],
95+ [
96+ sg .Input (
97+ "" ,
98+ key = self .definicao + "status" ,
99+ background_color = "White" ,
100+ border_width = 1 ,
101+ justification = "left" ,
102+ disabled = True ,
103+ size = (30 , 1 ),
104+ ),
105+ ],
64106 ]
65- return [sg .Frame (' Domínio:' , dominio , font = ' Any 12' , title_color = ' black' )]
107+ return [sg .Frame (" Domínio:" , dominio , font = " Any 12" , title_color = " black" )]
66108
67109
68110class Citrixcleanup (Object_execute ):
69-
70111 def define_param (self ):
71112 self .descricao = "Limpar registro do Citrix"
72113 self .definicao = "citrixcleanup"
73114
74115 def thread_configurar (self ):
75116 self .reportar ("Removendo registro" )
76- self .executar ("reg delete HKEY_LOCAL_MACHINE\\ SOFTWARE\\ Microsoft\\ MSLicensing /f" )
117+ self .executar (
118+ "reg delete HKEY_LOCAL_MACHINE\\ SOFTWARE\\ Microsoft\\ MSLicensing /f"
119+ )
77120
78121
79122class Limpezageral (Object_execute ):
80-
81123 def define_param (self ):
82124 self .descricao = "Limpar diretório Arcom"
83125 self .definicao = "limpezageral"
@@ -89,7 +131,6 @@ def thread_configurar(self):
89131
90132
91133class Reniciar (Object_execute ):
92-
93134 def define_param (self ):
94135 self .descricao = "Reniciar cpu após execução"
95136 self .definicao = "reniciar"
@@ -100,7 +141,6 @@ def thread_configurar(self):
100141
101142
102143class OpenvpnStart (Object_execute ):
103-
104144 def define_param (self ):
105145 self .descricao = "Ativar openvpn"
106146 self .definicao = "openvpnstart"
@@ -112,7 +152,6 @@ def thread_configurar(self):
112152
113153
114154class OpenvpnStop (Object_execute ):
115-
116155 def define_param (self ):
117156 self .descricao = "Desativar openvpn"
118157 self .definicao = "openvpnstop"
0 commit comments