@@ -156,6 +156,7 @@ def updateData(self):
156
156
if len (db .viewCommand ()) == 0 :
157
157
for dt in dbold .viewCommand ():
158
158
db .insertCommand (url = dt [18 ], datewanted = dt [2 ], timewanted = dt [3 ], hoursba = dt [4 ], seats = dt [5 ],reservation = dt [6 ],rundate = dt [7 ],runtime = dt [8 ], runnow = dt [9 ],account = dt [10 ], nonstop = dt [11 ], duration = dt [12 ],proxy = dt [13 ],retry = dt [14 ],minidle = dt [15 ],maxidle = dt [16 ])
159
+
159
160
messagebox .showinfo (title = 'Info' , message = 'the Data has updated...' )
160
161
161
162
class MainFrame (ttk .Frame ):
@@ -1114,21 +1115,25 @@ def __init__(self, window) -> None:
1114
1115
titleLabel = TitleLabel (self , text = "Proxy Form" )
1115
1116
namelabel = Label (self , text = "Name: " )
1116
1117
self .name = StringVar ()
1117
- nameentry = Entry (self , width = 60 , textvariable = self .name )
1118
- httplabel = Label (self , text = "Http: " )
1119
- self .http = StringVar ()
1120
- httpentry = Entry (self , width = 60 , textvariable = self .http )
1121
- httpslabel = Label (self , text = "Https: " )
1122
- self .https = StringVar ()
1123
- httpsentry = Entry (self , width = 60 , textvariable = self .https )
1124
-
1118
+ nameentry = Entry (self , width = 133 , textvariable = self .name )
1119
+ httplabel = Label (self , text = "Proxies: " )
1120
+ # self.http = StringVar()
1121
+ # httpentry = Entry(self, width=60, textvariable=self.http)
1122
+ self .httpentry = Text (self , width = 100 , height = 15 )
1123
+ # self.httpentry.insert()
1124
+
1125
+ # httpslabel = Label(self, text="Https: ")
1126
+ # self.https = StringVar()
1127
+ # httpsentry = Entry(self, width=60, textvariable=self.https)
1125
1128
1126
1129
style = ttk .Style ()
1127
1130
# style.theme_use("clam")
1128
1131
style .configure ("Fancy.TButton" , font = ("Cooper Black" , 12 ), foreground = "blue" , background = "green" )
1129
1132
1130
1133
closeButton = CloseButton (self )
1131
- saveButton = ttk .Button (self , text = 'Insert' , command = lambda :self .savelist (name = nameentry , http = httpentry , https = httpsentry ), style = "Fancy.TButton" )
1134
+ # saveButton = ttk.Button(self, text='Insert', command = lambda:self.savelist(name=nameentry, http=httpentry, https=httpsentry), style="Fancy.TButton")
1135
+ saveButton = ttk .Button (self , text = 'Insert' , command = lambda :self .savelist (name = nameentry , http = self .httpentry ), style = "Fancy.TButton" )
1136
+
1132
1137
removeButton = ttk .Button (self , text = 'Delete' , command = self .removeData , style = "Fancy.TButton" )
1133
1138
updateButton = ttk .Button (self , text = 'Update' , command = self .updateData , style = "Fancy.TButton" )
1134
1139
@@ -1137,9 +1142,10 @@ def __init__(self, window) -> None:
1137
1142
namelabel .grid (column = 0 , row = 2 , sticky = (W ,N ))
1138
1143
nameentry .grid (column = 0 , row = 2 , sticky = (E ,N ), padx = 30 )
1139
1144
httplabel .grid (column = 0 , row = 3 , sticky = (W ,N ))
1140
- httpentry .grid (column = 0 , row = 3 , sticky = (E ,N ), padx = 30 )
1141
- httpslabel .grid (column = 0 , row = 4 , sticky = (W ,N ))
1142
- httpsentry .grid (column = 0 , row = 4 , sticky = (E ,N ), padx = 30 )
1145
+ self .httpentry .grid (column = 0 , row = 3 , sticky = (E ,N ), padx = 30 )
1146
+ # httpslabel.grid(column = 0, row = 4, sticky=(W,N))
1147
+ # httpsentry.grid(column = 0, row = 4, sticky=(E,N), padx=30)
1148
+ # proxyentry.grid(column = 0, row = 4, sticky=(E,N), padx=30)
1143
1149
1144
1150
saveButton .grid (column = 0 , row = 5 , sticky = (N , E ), padx = 30 )
1145
1151
updateButton .grid (column = 0 , row = 5 , sticky = (N ))
@@ -1152,7 +1158,9 @@ def __init__(self, window) -> None:
1152
1158
1153
1159
1154
1160
def savelist (self , ** kwargs ):
1155
- db .insertProxy (name = kwargs ['name' ].get (),http = kwargs ['http' ].get (), https = kwargs ['https' ].get ())
1161
+ # db.insertProxy(name=kwargs['name'].get(),http=kwargs['http'].get(), https=kwargs['https'].get())
1162
+ db .insertProxy (name = kwargs ['name' ].get (),http = kwargs ['http' ].get ("1.0" ,END ), https = '' )
1163
+
1156
1164
self .viewData ()
1157
1165
messagebox .showinfo ("Message box" ,"Proxy list Saved" )
1158
1166
self .resetForm ()
@@ -1184,15 +1192,16 @@ def updateData(self):
1184
1192
if self .chosenRow == None :
1185
1193
messagebox .showerror ("Error!" , "Please Choose a Proxy Record to Update!" )
1186
1194
return
1187
- db .updateProxy (comid = self .chosenRow [0 ], name = self .name .get (), http = self .http .get (), https = self . https . get () )
1195
+ db .updateProxy (comid = self .chosenRow [0 ], name = self .name .get (), http = self .httpentry .get ("1.0" , END ), https = '' )
1188
1196
self .viewData ()
1189
1197
messagebox .showinfo ("Info" , "Proxy Updates.." )
1190
1198
self .resetForm ()
1191
1199
1192
1200
def resetForm (self ):
1193
1201
self .name .set ("" )
1194
- self .http .set ("" )
1195
- self .https .set ("" )
1202
+ # self.http.set("")
1203
+ # self.https.set("")
1204
+ self .httpentry .delete ("1.0" , END )
1196
1205
1197
1206
def tableOutputFrame (self ):
1198
1207
style = ttk .Style ()
@@ -1204,9 +1213,9 @@ def tableOutputFrame(self):
1204
1213
self .out .heading ("2" , text = "Name" )
1205
1214
self .out .column ("2" , width = 100 , stretch = "yes" )
1206
1215
self .out .heading ("3" , text = "HTTP" )
1207
- self .out .column ("3" , width = 100 , stretch = "yes" )
1216
+ self .out .column ("3" , width = 200 , stretch = "yes" )
1208
1217
self .out .heading ("4" , text = "HTTPS" )
1209
- self .out .column ("4" , width = 100 , stretch = "yes " )
1218
+ self .out .column ("4" , width = 0 , stretch = "no " )
1210
1219
1211
1220
self .out ['show' ] = 'headings'
1212
1221
self .out .bind ("<ButtonRelease-1>" , self .getData )
@@ -1221,8 +1230,11 @@ def getData(self, event):
1221
1230
self .selectedData = self .out .item (self .selectedRow )
1222
1231
self .chosenRow = self .selectedData ["values" ]
1223
1232
self .name .set (self .chosenRow [1 ])
1224
- self .http .set (self .chosenRow [2 ])
1225
- self .https .set (self .chosenRow [3 ])
1233
+ # self.http.set(self.chosenRow[2])
1234
+ self .httpentry .delete ("1.0" , END )
1235
+ self .httpentry .insert ("1.0" , self .chosenRow [2 ])
1236
+
1237
+ # self.https.set(self.chosenRow[3])
1226
1238
1227
1239
except IndexError as error :
1228
1240
pass
@@ -1417,6 +1429,7 @@ def showLog(self):
1417
1429
messagebox .showerror ("Error!" , "Please Choose a Bot Check Availability to show the Log File!" )
1418
1430
return
1419
1431
self .viewCheckBooking ()
1432
+ breakpoint ()
1420
1433
logfile = f"logs/checkbooking_{ self .chosenRow [0 ]} .log"
1421
1434
if Path (logfile ).exists ():
1422
1435
Popen (["notepad.exe" , logfile ])
0 commit comments