Пример #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;
        }
Пример #4
0
 public static void Back()
 {
     if (PageManageEx.Back())
     {
         return;
     }
     else
     {
         Setting.SaveDispose();
         DownloadPage.SaveMission(() => {
             Application.Current.Exit();
         });
     }
 }
Пример #5
0
        static void BarResize()
        {
            if (screenX > screenY)
            {
                menu.bk.Height      = screenY;
                menu.bk.Width       = 36;
                menu.bk.Margin      = menu.home.Margin = new Thickness(0, 0, 0, 0);
                menu.buff.Margin    = new Thickness(0, 40, 0, 0);
                menu.setting.Margin = new Thickness(0, 80, 0, 0);
                menu.about.Margin   = new Thickness(0, 120, 0, 0);
            }
            else
            {
                menu.bk.Width  = screenX;
                menu.bk.Height = 36;
                double dy = screenY - 36;
                menu.bk.Margin      = new Thickness(0, dy, 0, 0);
                dy                 -= 4;
                menu.home.Margin    = new Thickness(0, dy, 0, 0);
                menu.buff.Margin    = new Thickness(40, dy, 0, 0);
                menu.setting.Margin = new Thickness(80, dy, 0, 0);
                menu.about.Margin   = new Thickness(120, dy, 0, 0);
            }
            Thickness m = new Thickness(0, 0, screenX, screenY);

            if (screenX > screenY)
            {
                m.Left += 40;
            }
            else
            {
                m.Bottom -= 40;
            }
            switch (current)
            {
            case 1:
                SettingPage.ReSize(m);
                break;

            case 2:
                Abo.ReSize(m);
                break;

            case 3:
                DownloadPage.ReSize(m);
                break;
            }
        }
Пример #6
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();
        }