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 Ui(Connecting connecting) { this.connecting = connecting; InitializeComponent(); }