private void Init()
        {
            Setting setting = this.GetConfigInfo();


            this.ResizeMode = ResizeMode.CanMinimize;

            this.Operate.Content = START;

            /*
             * 0: 时
             * 1: 分
             * 2: 秒
             */
            this.TimerType = setting.TimerType;

            if (setting.WindowPosition == null)
            {
                WindowStartupLocation = WindowStartupLocation.CenterScreen;
            }
            else
            {
                this.Top  = setting.WindowPosition.Top;
                this.Left = setting.WindowPosition.Left;
            }

            TimerInput.Text = setting.SetTime.ToString();

            if (this.TimerType == 0)
            {
                this.Hour.IsChecked = true;
            }
            else if (this.TimerType == 1)
            {
                this.Minute.IsChecked = true;
            }
            else
            {
                this.Second.IsChecked = true;
            }

            this.Hour.Checked   += (object sender, RoutedEventArgs e) => this.RadioButtonEventHandle(sender, e);
            this.Minute.Checked += (object sender, RoutedEventArgs e) => this.RadioButtonEventHandle(sender, e);
            this.Second.Checked += (object sender, RoutedEventArgs e) => this.RadioButtonEventHandle(sender, e);

            this.btnAbout.Click += BtnAbout_Click;

            Dict = new Dictionary <int, TimerTypeEmum>();
            this.Dict.Add(0, TimerTypeEmum.Hour);
            this.Dict.Add(1, TimerTypeEmum.Minute);
            this.Dict.Add(2, TimerTypeEmum.Second);

            this.ShutdownTimer = new ShutdownTimer();
            this.Dep           = Dep.GetInstance();
            this.Dep.Event    += Dep_Event;
        }
 public ShutdownTimer()
 {
     this.Timer = new Timer();
     this.Dep   = Dep.GetInstance();
 }