Page_Menu.xaml.cs 2.72 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ThickTcpUiInWindow;

namespace FLY.Thick.Blowing.UI.Fix.Client
{
    /// <summary>
    /// Page_Menu.xaml 的交互逻辑
    /// </summary>
    public partial class Page_Menu : Page
    {
        TDGage gage;
        public Page_Menu()
        {
            InitializeComponent();
        }
        public void Init(TDGage gage) 
        {
            this.gage = gage;
31
            this.DataContext = this.gage;
潘栩锋's avatar
潘栩锋 committed
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
        }

        private void button_custom_Click(object sender, RoutedEventArgs e)
        {
            Page_Custom p = new Page_Custom();
            p.Init(gage);
            NavigationService.Navigate(p);
        }



        private void button_curve_Click(object sender, RoutedEventArgs e)
        {
            Page_Curve p = new Page_Curve();
            p.Init(gage.mSysParam.ServerIPEP);
            NavigationService.Navigate(p);
        }



        private void button_warning_Click(object sender, RoutedEventArgs e)
        {
            Page_WarningSystem p = new Page_WarningSystem();
            p.Init(gage.mSysParam.ServerIPEP);
            NavigationService.Navigate(p);
        }

        private void button_flyad_Click(object sender, RoutedEventArgs e)
        {
            Page_FlyAD p = new Page_FlyAD();
            p.Init(gage.mSysParam.ServerIPEP, gage.mDynArea, gage.mTDGageService);

            NavigationService.Navigate(p);
        }

        private void button_passwork_Click(object sender, RoutedEventArgs e)
        {
            if (Window_Password.Authorize(1))
            {
                Window_PasswordEdit w = new Window_PasswordEdit();
                w.Init(gage.mSysParam.ServerIPEP);
                w.Owner = FLY.ControlLibrary.COMMON.GetWindow(this);
                if (w.ShowDialog()==true) 
                {
                    
                }
            }
        }

        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_blowing_Click(object sender, RoutedEventArgs e)
        {
            Page_Blowing p = new Page_Blowing();
            p.Init(gage.mSysParam.ServerIPEP);
            NavigationService.Navigate(p);
        }
    }
}