void BeginLoadPage(string path) { laTitle.Text = "Loading..."; laText.Text = "Loading path: " + path; lbItems.Items.Clear(); Application.DoEvents(); string url = tbHost.Text; if (url.EndsWith("/")) url = url.Substring(0, url.Length - 1); url += path; Page page = null; try { WebClient wc = new WebClient(); string respo = wc.DownloadString(url); page = new Page(); page.ParseXML(respo); } catch (Exception z) { MessageBox.Show(z.ToString()); } if (page != null) { RandomColorPage rcp = new RandomColorPage(); rcp.CreateControl(); rcp.BindPage(page); if (goingforward) ucAnimator.BeginAnimateNext(rcp); else ucAnimator.BeginAnimateBack(rcp); } else { if (goingforward) ucAnimator.BeginAnimateNext(null); else ucAnimator.BeginAnimateBack(null); } // BindPage(page); }
private void buAnim3_Click(object sender, EventArgs e) { RandomColorPage page = new RandomColorPage(); ucAnimator.BeginAnimateReplace(page); }