Exemple #1
0
        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;
        }
Exemple #2
0
        public void Hide()
        {
            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;
            }
            HideBar();
        }