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.Converter;

using System.Net;

using FLY.Thick.Base.Common;
using FLY.Thick.Base.Client;
using FLY.Thick.Base.IService;
using Unity;

namespace ThickTcpUiInWindow
{
    /// <summary>
    /// Page_Initparam.xaml 的交互逻辑
    /// </summary>
    public partial class Page_Initparam : Page
    {
        IInitParamService mInitParamService;

        public Page_Initparam()
        {
            InitializeComponent();
        }
        [InjectionMethod]
        public void Init(IInitParamService initParamService) 
        {
            mInitParamService = initParamService;
            this.DataContext = mInitParamService;
        }
        private void Page_Loaded(object sender, RoutedEventArgs e)
        {

        }
        private void button_apply_Click(object sender, RoutedEventArgs e)
        {
            if (Window_Password.Authorize(2))
            {
                mInitParamService.Apply();
                FLY.ControlLibrary.Window_Tip.Show("应用成功",
                    null,
                    TimeSpan.FromSeconds(2));
            }
        }


        private void Page_UnLoaded(object sender, RoutedEventArgs e)
        {
        }
    }
}
