private void cmImportPlainText_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("執行後會變更現有資料表內的資料!\n 是否繼續?", "確認", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dr == System.Windows.Forms.DialogResult.No)
            {
                return;
            }


            OpenFileDialog fd = new OpenFileDialog();

            fd.Filter      = "*.tbak|*.tbak";
            fd.Multiselect = false;
            if (fd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(fd.FileName);

                XmlHelper         h    = new XmlHelper(doc.DocumentElement);
                List <XmlElement> list = new List <XmlElement>(h.GetElements("Command"));

                BatchImportForm bf = new BatchImportForm(list);
                bf.Completed += new EventHandler(bf_Completed);
                bf.ShowDialog();
            }
        }
        void dif_Completed(object sender, ExportEventArgs e)
        {
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(e.Result);

            XmlHelper         h    = new XmlHelper(doc.DocumentElement);
            List <XmlElement> list = new List <XmlElement>(h.GetElements("Command"));

            BatchImportForm bf = new BatchImportForm(list);

            bf.Completed += new EventHandler(bf_Completed);
            bf.ShowDialog();
        }
        void dif_Completed(object sender, ExportEventArgs e)
        {
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(e.Result);

            XmlHelper h = new XmlHelper(doc.DocumentElement);
            List<XmlElement> list = new List<XmlElement>(h.GetElements("Command"));

            BatchImportForm bf = new BatchImportForm(list);
            bf.Completed += new EventHandler(bf_Completed);
            bf.ShowDialog();
        }
        private void cmImportPlainText_Click(object sender, EventArgs e)
        {
            DialogResult dr = MessageBox.Show("執行後會變更現有資料表內的資料!\n 是否繼續?", "確認", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
            if (dr == System.Windows.Forms.DialogResult.No) return;


            OpenFileDialog fd = new OpenFileDialog();
            fd.Filter = "*.tbak|*.tbak";
            fd.Multiselect = false;
            if (fd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                XmlDocument doc = new XmlDocument();
                doc.Load(fd.FileName);

                XmlHelper h = new XmlHelper(doc.DocumentElement);
                List<XmlElement> list = new List<XmlElement>(h.GetElements("Command"));

                BatchImportForm bf = new BatchImportForm(list);
                bf.Completed += new EventHandler(bf_Completed);
                bf.ShowDialog();
            }
        }