MainWindow.xaml.cs 1.38 KB
Newer Older
1 2
using FLY.Thick.Blowing360.Server;
using FLY.Thick.Blowing360.Server.OBJProxy;
潘栩锋's avatar
潘栩锋 committed
3
using Microsoft.Win32;
4 5
using System;
using System.Collections.Generic;
潘栩锋's avatar
潘栩锋 committed
6
using System.IO;
7
using System.Linq;
潘栩锋's avatar
潘栩锋 committed
8
using System.Reflection;
9 10 11 12 13 14 15 16 17 18
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Navigation;

namespace FLY.Thick.Blowing360.UI.Server
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
潘栩锋's avatar
潘栩锋 committed
19
    public partial class MainWindow : NavigationWindow
20 21 22 23 24 25 26
    {
        FLY.AppHelper.WindowNotifyIconHelper notifyiconhelper;
        TDGage mGage;
        OBJProxy mOBJProxy;
        public MainWindow()
        {
            InitializeComponent();
潘栩锋's avatar
潘栩锋 committed
27 28
            PgLoading p = new PgLoading();
            this.Navigate(p);
29 30 31 32 33

            this.Title = (new Misc.Ver() { SrcType = typeof(MainWindow) }).ToString();

            notifyiconhelper = new AppHelper.WindowNotifyIconHelper(this, this.Title);

潘栩锋's avatar
潘栩锋 committed
34 35 36 37 38 39 40 41
        }

        private async void NavigationWindow_Loaded(object sender, RoutedEventArgs _e)
        {
            mGage = new TDGage("Gage1");
            await mGage.Init();

            mOBJProxy = new OBJProxy(0, mGage);
42 43 44

            FObjBase.PollModule.Current.Start();

潘栩锋's avatar
潘栩锋 committed
45

潘栩锋's avatar
潘栩锋 committed
46 47 48 49 50 51 52
            this.Hide();
            PgMain p = new PgMain();
            p.Init(mGage);
            this.Navigate(p);
            this.NavigationService.RemoveBackEntry();


潘栩锋's avatar
潘栩锋 committed
53
        }
54 55
    }
}