示例#1
0
        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();
        }
示例#2
0
        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();
        }
示例#3
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;
        }