static void Main(string[] args) { Application.SetCompatibleTextRenderingDefault(false); // Load embedded resources setupAssemblyResolve(); Connecting con = new Connecting(); Ui ui = new Ui(con); Client client = new Client(ui); ui.setClient(ref client); // Initialize the client then run the application client.initialize(() => { DownloadHandler dlHandler = client.getDownloadHandler(); if (dlHandler != null) { dlHandler.setProgressBar(ui.getDownloadProgressBar()); } client.update(); // Display main window ui.Show(); }); Application.Run(con); }
public Client(Ui ui) { this.ui = ui; dlHandler = new DownloadHandler(ui.getStatusLabel(), ui.getDownloadProgressBar()); reciever = new Reciever(ref dlHandler, this); Logger.log(Logger.TYPE.DEBUG, "Client successfully constructed."); }