/// <summary>
 ///     窗口加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     DirectoryLoad();
     _WriteXml();
     RightClick_ContextMenuLoad();
     helpSDHxml = helpSDHxml.Load();
     ListBox_LoadHistoryDirectory(
         AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "//pair.xml");
     SyncComboBox_LoadMethod();
     this.ListBox_Log.ItemsSource = Log.logData;
 }
        /// <summary>
        /// xml文件初始化
        /// </summary>
        /// <returns></returns>
        private HelpSDHxml Init()
        {
            XmlSerializer writer =
                new XmlSerializer(typeof(HelpSDHxml));

            var path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "//pair.xml";
            FileStream file;
            file = System.IO.File.OpenWrite(path);
            HelpSyncDirectoryHistory hsdh = new HelpSyncDirectoryHistory()
            {
                Id = 0,
                PairName = "Index",
                LeftDirectoryName = AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
                RightDirectoryName = AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
                LR =
                    AppDomain.CurrentDomain.SetupInformation.ApplicationBase + " < Sync > " +
                    AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
                SyncType = "Sync",
                SyncTypeId = 0
            };
            HelpSDHxml tmp = new HelpSDHxml();
            tmp.HelpSyncDirectoryHistories.Add(hsdh);
            writer.Serialize(file, tmp);
            file.Close();
            return tmp;
        }