Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d3b82db6b0 | ||
d0e4fdbf6c | |||
c44aa83c64 | |||
|
d687732fad | ||
|
9e2e2d7aa4 | ||
|
63772e7d11 |
@ -3,6 +3,7 @@ from model.Protocol import *
|
||||
import traceback
|
||||
import os.path
|
||||
|
||||
|
||||
class AppController:
|
||||
def __init__(self, parser):
|
||||
self.parser = parser
|
||||
@ -19,8 +20,8 @@ class AppController:
|
||||
print("[AppController::on_sign]")
|
||||
try:
|
||||
if not self.connection.is_connected:
|
||||
print("[AppController::on_sign] connecting ... calling UnicastConnection::connect")
|
||||
self.connect(host, port, tls)
|
||||
print("[AppController::on_sign] connecting ... calling UnicastConnection::connect")
|
||||
self.connect(host, port, tls)
|
||||
if not register:
|
||||
message = self.parser.build_SIGNIN(login, passw)
|
||||
else:
|
||||
@ -42,7 +43,7 @@ class AppController:
|
||||
def get_filename_size_from_item(self, item):
|
||||
tokens = item.split('!')
|
||||
if len(tokens) == 2:
|
||||
return (tokens[0],tokens[1])
|
||||
return (tokens[0], tokens[1])
|
||||
else:
|
||||
return None
|
||||
|
||||
@ -118,7 +119,7 @@ class AppController:
|
||||
elif message_id == Protocol.PARSE_REMOVEFILEERROR:
|
||||
self.show_message("Error while erasing file.", True)
|
||||
|
||||
def show_message(self,message, is_error):
|
||||
def show_message(self, message, is_error):
|
||||
self.window_controller.show_message(message, is_error)
|
||||
|
||||
def connect(self, host, port, tls):
|
||||
|
@ -11,14 +11,15 @@ class MainWindow:
|
||||
self.root.title("SecCon - © Louis SWINNEN 2022")
|
||||
self.root.config(bd=5)
|
||||
self.host = tk.StringVar()
|
||||
self.host.set("127.0.0.1")
|
||||
self.host.set("ffe.labo.swilabus.com")
|
||||
self.passw = tk.StringVar()
|
||||
self.passw.set("aaaaa")
|
||||
self.login = tk.StringVar()
|
||||
self.login.set("aa")
|
||||
self.login.set("aaaaa")
|
||||
self.tls = tk.BooleanVar()
|
||||
self.tls.set(True)
|
||||
self.port = tk.IntVar()
|
||||
self.port.set(8500)
|
||||
self.port.set(8000)
|
||||
self.draw_window()
|
||||
|
||||
def start_main_loop(self):
|
||||
|
Loading…
Reference in New Issue
Block a user