private void Apply()
        {
            try
            {
                Properties.Settings.Default.WarningALL = uint.Parse(x0201.Text);
                Properties.Settings.Default.WarningUP  = uint.Parse(x0202.Text);
                Properties.Settings.Default.Save();

                bool result = false;
                if (x0101.IsChecked == true)
                {
                    result = AutoRun.Set(System.Windows.Forms.Application.ExecutablePath);
                }
                else
                {
                    result = AutoRun.Delete();
                }
                if (result == false)
                {
                    x0101.IsChecked = false;
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }
        }
        public MainWindow()
        {
            InitializeComponent();



            this.Closed += (a, b) =>
            {
                this.notifyIcon.Visible = false;
                FlowMonitor.GetMonitor().Close();
            };

            MakeIcon();


            if (!AutoRun.isHaveKey())
            {
                AutoRun.Set(System.Windows.Forms.Application.ExecutablePath);
            }



            timer.Elapsed += timer_Elapsed;

            // 统计
            analyticsBrowser.Navigate(new Uri("http://flowmonitor.jd-app.com/"));
        }