Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        public Reciever(ref DownloadHandler dlHandler, Client client)
        {
            file = Path.Combine(Application.StartupPath, Client.UPDATE_XML_NAME);
            this.dlHandler = dlHandler;
            this.client = client;

            load();
        }