using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

using BxlUniversalTestAPP.Content;
using BxlWinUniversalSDK;


// 빈 페이지 항목 템플릿은 http://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409 에 문서화되어 있습니다.

namespace BxlUniversalTestAPP
{
    /// <summary>
    /// 자체에서 사용하거나 프레임 내에서 탐색할 수 있는 빈 페이지입니다.
    /// </summary>
    public sealed partial class MainPage : Page
    {
        public static BxlUniversalSDK _BxlUniversalSDK;
        public static bool _ConnectedPrinter;

        public MainPage()
        {
            this.InitializeComponent();
            this.Loaded += MainPage_Loaded;

            _BxlUniversalSDK = new BxlUniversalSDK();
            _ConnectedPrinter = false;
        }

        private void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            MenuListView.SelectedIndex = 0;
        }

        private void SplitViewButton_Click(object sender, RoutedEventArgs e)
        {
            mainSplitview.IsPaneOpen = !mainSplitview.IsPaneOpen;
        }

        private void MenuListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            switch (MenuListView.SelectedIndex)
            {
                case 0:
                    mainContentPC.Content = new ConnectToPrinter();
                    mainSplitview.IsPaneOpen = false;
                    break;
                case 1:
                    mainContentPC.Content = new PrintingTest();
                    mainSplitview.IsPaneOpen = false;
                    break;
                case 2:
                    mainContentPC.Content = new PageMode();
                    mainSplitview.IsPaneOpen = false;
                    break;
                case 3:
                    mainContentPC.Content = new MSR();
                    mainSplitview.IsPaneOpen = false;
                    break;
                case 4:
                    mainContentPC.Content = new SCR();
                    mainSplitview.IsPaneOpen = false;
                    break;
            }
        }
    }
}
