using FLY.Thick.Base.UI;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Unity;

namespace FLY.Thick.FilmCasting.UI
{
    /// <summary>
    /// PgMenu.xaml 的交互逻辑
    /// </summary>
    public partial class PgMenu : Page
    {
        IUnityContainer container;
        public PgMenu()
        {
            InitializeComponent();

        }
        [InjectionMethod]
        public void Init(IUnityContainer container)
        {
            this.container = container;
        }


        private void button_grid_Click(object sender, RoutedEventArgs e)
        {
            PgGrid p = new PgGrid();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_initparam_Click(object sender, RoutedEventArgs e)
        {
            PgInitparam p = new PgInitparam();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_getsample_Click(object sender, RoutedEventArgs e)
        {
            PgGetSample p = new PgGetSample();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_bordersearch_Click(object sender, RoutedEventArgs e)
        {
            PgBorderSearch p = new PgBorderSearch();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_curve_Click(object sender, RoutedEventArgs e)
        {
            PgCurve p = new PgCurve();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_scancorr_Click(object sender, RoutedEventArgs e)
        {
            PgScanCorr p = new PgScanCorr();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_warning_Click(object sender, RoutedEventArgs e)
        {
            PgErrorTable p = new PgErrorTable();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }




        private void button_gageinfo_Click(object sender, RoutedEventArgs e)
        {
            PgGageInfo p = new PgGageInfo();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_flyad_Click(object sender, RoutedEventArgs e)
        {
            PgFlyAd p = new PgFlyAd();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_version_Click(object sender, RoutedEventArgs e)
        {
            //System.Diagnostics.Process.Start(@"版本说明.txt");
        }

        private void button_instruction_Click(object sender, RoutedEventArgs e)
        {
            System.Diagnostics.Process.Start(@"测厚仪说明书.pdf");
        }

        private void button_scanwarning_Click(object sender, RoutedEventArgs e)
        {
            PgScanWarning p = new PgScanWarning();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void btnBoltmapClick(object sender, RoutedEventArgs e)
        {
            PgBoltMap p = new PgBoltMap();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }

        private void button_reject_Click(object sender, RoutedEventArgs e)
        {
            PgReject p = new PgReject();
            container.BuildUp(p);
            NavigationService.Navigate(p);
        }
    }
}
