using Microsoft.Win32;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
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 System.Xml;
using System.Xml.Linq;
using Formatting = Newtonsoft.Json.Formatting;

namespace WpfApp1
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void btReadClick(object sender, RoutedEventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog();
            openFileDialog.Filter = "xmind文件|*.xmind";

            if (openFileDialog.ShowDialog()==true) 
            {
                string xmindPath = openFileDialog.FileName;
                string outDirPath = System.IO.Path.GetDirectoryName(xmindPath);
                if (Xmind2UnityConfigCore.XMindTypeExt.ToUnity(openFileDialog.FileName, null, true) == 0) {
                    MessageBox.Show($@"完成 输出到{outDirPath}\unity");
                }
            }
        }
    }


}
