Exemplo n.º 1
0
        //---------------------------------------------------------------------------

        private void bnExportClick(object sender, EventArgs e)
        {
            IEnumerator itmodel = vtItems.SelectedObjects.GetEnumerator();

            if (itmodel != null && itmodel.MoveNext())
            {
                if (SaveDialog.ShowDialog() == DialogResult.OK)
                {
                    CXml xFile = new CXml();
                    if (xFile.OpenSaveXml(SaveDialog.FileName))
                    {
                        xFile.OpenTag("daoc_items", "", "");
                        do
                        {
                            CItem pItem = ((SItemLink)itmodel.Current).Item;
                            pItem.Save(xFile);
                        }while (itmodel.MoveNext());
                        xFile.CloseTag();
                        xFile.CloseXml();
                    }
                    vtItems.SelectedObjects = null;
                }
            }
        }