Ejemplo n.º 1
0
 /// <summary>
 /// Starts the DirectX Client.
 /// </summary>
 public override void Start()
 {
     this.hostForm    = new HostForm();
     this.controlHost = new ControlHost(this.hostForm);
     this.jukeBox     = new Jukebox();
     InitializeClient();
     this.MiniMap = new MiniMap(this.controlHost);
     this.controlHost.Refresh();
     InitializeConsole(new Console(this.controlHost));
     base.Start();
     DoMainLoop();
 }
        /// <summary>
        /// Updates the dialog with the new percentage complete of the loading
        /// operation and shows the new status message to the user.
        /// </summary>
        /// <param name="percent"></param>
        /// <param name="status"></param>
        public void UpdatePercent(int percent, string status)
        {
            progressBar.PercentComplete = percent;
            progressLabel.Text          = status;

            //force a refresh here, since it's likely nothing is
            //being drawn if the cpu is busy with other things...
            DirectXClientApplication app = (DirectXClientApplication)ClientApplication.Instance;
            ControlHost graphics         = app.CreateGraphics();

            graphics.Refresh();
            if (percent == 100)
            {
                Close();
            }
        }