public void Run()
 {
     this.Children.Add(loading = new Loading() { Z = 999999 });
     loading.Show();
     this.Width = Application.Current.Host.Content.ActualWidth;
     this.Height = Application.Current.Host.Content.ActualHeight;
     this.Children.Add(music = new MediaPlayer() { Loop = true, Uri = "Login" }); music.Play();
     this.Children.Add(head = new EntityObject() { Source = GlobalMethod.GetImage("UI/LoginBack.jpg", UriType.Project), Stretch = Stretch.Fill, IsVisible = false, Z = 6, });
     this.Children.Add(backgroundFirst = new LoginBackground());
     this.Children.Add(backgroundSecond = new LoginBackground());
     this.Children.Add(foot = new EntityObject() { Source = GlobalMethod.GetImage("UI/LoginBack.jpg", UriType.Project), Stretch = Stretch.Fill, IsVisible = false, Z = 6, });
     LoginBackground.Interval = 110000;
     backgroundFirst.Run(BackgourndIndex.First, 0, -(Application.Current.IsRunningOutOfBrowser ? 2172 : backgroundFirst.RealWidth));
     backgroundSecond.Run(BackgourndIndex.Second, backgroundSecond.RealWidth - 1, -(Application.Current.IsRunningOutOfBrowser ? 2172 : backgroundFirst.RealWidth));
     //下载动画信息包
     ParallelDownloader downloader = new ParallelDownloader();
     downloader.OpenReadCompleted += new OpenReadCompletedEventHandler(animationInfo_OpenReadCompleted);
     downloader.OpenReadAsync(GlobalMethod.WebPath("Animation/Info.xml"), DownloadPriority.Highest, null, false, 0);
 }
 void GameStart(object sender, MouseButtonEventArgs e)
 {
     this.Children.Remove(sender as WindowBase);
     backgroundFirst.Dispose(backgroundFirst, null); this.Children.Remove(backgroundFirst); backgroundFirst = null;
     backgroundSecond.Dispose(backgroundSecond, null); this.Children.Remove(backgroundSecond); backgroundSecond = null;
     head.Dispose(head, null);
     foot.Dispose(foot, null);
     ClearCloud();
     music.Stop(); this.Children.Remove(music);
     this.Children.Remove(loading); loading = null;
     this.Children.Remove(loginTip); loginTip = null;
     base.Dispose(this,null);
     if (Completed != null) { Completed(this, null); }
 }