public void Show() { Thickness m = new Thickness(0, 0, screenX, screenY); if (screenX > screenY) { m.Left += 40; } else { m.Bottom -= 40; } switch (current) { case 0: pp.pivot.Visibility = Visibility.Visible; break; case 1: SettingPage.Create(parent, m); break; case 2: Abo.Create(parent, m); break; case 3: DownloadPage.Create(parent, m); break; } ShowBar(); }
public void Create(Canvas p, Thickness m) { parent = p; if (screenX > screenY) { m.Left += 40; } else { m.Bottom -= 40; } switch (current) { case 0: CreateMainPage(p, m); break; case 1: SettingPage.Create(parent, m); break; case 2: Abo.Create(parent, m); break; case 3: DownloadPage.Create(parent, m); break; } CreateBar(); }
static void ChangeCurrent(int index) { if (current == index) { return; } switch (current) { case 0: pp.pivot.Visibility = Visibility.Collapsed; break; case 1: SettingPage.Dispose(); break; case 2: Abo.Dispose(); break; case 3: DownloadPage.Dispose(); break; } Thickness m = new Thickness(0, 0, screenX, screenY); if (screenX > screenY) { m.Left += 40; } else { m.Bottom -= 40; } switch (index) { case 0: pp.pivot.Visibility = Visibility.Visible; break; case 1: SettingPage.Create(parent, m); break; case 2: Abo.Create(parent, m); break; case 3: DownloadPage.Create(parent, m); break; } current = index; }