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