Ejemplo n.º 1
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false)
        {
            string strElement = ExportName;

            if (fIdentityOnly)
            {
                strElement += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(strElement, XMLParentElement);

            XMLDocument.CreateElement("FirearmType", m_eFirearmType, XMLThisElement);

            cCaliber.CurrentFirearmType = m_eFirearmType;

            m_Caliber.Export(XMLDocument, XMLThisElement, true);

            m_Bullet.Export(XMLDocument, XMLThisElement, true);
            m_Powder.Export(XMLDocument, XMLThisElement, true);
            m_Primer.Export(XMLDocument, XMLThisElement, true);
            m_Case.Export(XMLDocument, XMLThisElement, true);

            if (fIdentityOnly)
            {
                return;
            }

            if (m_ChargeList.Count > 0)
            {
                m_ChargeList.Export(XMLDocument, XMLThisElement);
            }
        }
Ejemplo n.º 2
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            XmlElement XMLThisElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

            XMLDocument.CreateElement("MuzzleVelocity", m_nMuzzleVelocity, XMLThisElement);
            XMLDocument.CreateElement("Pressure", m_nPressure, XMLThisElement);
            XMLDocument.CreateElement("Misfire", m_fMisfire, XMLThisElement);
            XMLDocument.CreateElement("Squib", m_fSquib, XMLThisElement);
        }
Ejemplo n.º 3
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            XmlElement XMLThisElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

            XMLDocument.CreateElement("TestDate", m_TestDate, XMLThisElement);

            if (m_Firearm != null)
            {
                m_Firearm.Export(XMLDocument, XMLThisElement, true);
            }

            XMLDocument.CreateElement("BarrelLength", m_dBarrelLength, XMLThisElement);
            XMLDocument.CreateElement("Twist", m_dTwist, XMLThisElement);
            XMLDocument.CreateElement("NumRounds", m_nNumRounds, XMLThisElement);
            XMLDocument.CreateElement("BestGroup", m_dBestGroup, XMLThisElement);
            XMLDocument.CreateElement("BestGroupRange", m_dBestGroupRange, XMLThisElement);
            XMLDocument.CreateElement("MuzzleVelocity", m_nMuzzleVelocity, XMLThisElement);

            if (!String.IsNullOrEmpty(m_strNotes))
            {
                XMLDocument.CreateElement("Notes", m_strNotes, XMLThisElement);
            }

            m_TestShotList.Export(XMLDocument, XMLThisElement);
        }
Ejemplo n.º 4
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public override void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false, bool fIncludeTransactions = true)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(strName);

            XMLParentElement.AppendChild(XMLThisElement);

            base.Export(XMLDocument, XMLThisElement, fIdentityOnly, fIncludeTransactions);

            XMLDocument.CreateElement("PartNumber", m_strPartNumber, XMLThisElement);

            if (fIdentityOnly)
            {
                return;
            }

            XMLDocument.CreateElement("Type", m_strType, XMLThisElement);
            XMLDocument.CreateElement("SelfCast", m_fSelfCast, XMLThisElement);
            XMLDocument.CreateElement("TopPunch", m_nTopPunch, XMLThisElement);
            XMLDocument.CreateElement("Diameter", m_dDiameter, XMLThisElement);
            XMLDocument.CreateElement("Length", m_dLength, XMLThisElement);
            XMLDocument.CreateElement("Weight", m_dWeight, XMLThisElement);
            XMLDocument.CreateElement("BallisticCoefficient", m_dBallisticCoefficient, XMLThisElement);

            m_BulletCaliberList.Export(XMLDocument, XMLThisElement);
        }
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlNode XMLParentNode)
        {
            XmlElement XMLThisElement = XMLDocument.CreateElement(ExportName, XMLParentNode);

            // Caliber Identity

            m_Caliber.Export(XMLDocument, XMLThisElement, true);

            // Primary

            XMLDocument.CreateElement("Primary", m_fPrimary, XMLThisElement);
        }
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            XmlElement XMLThisElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

            m_Caliber.Export(XMLDocument, XMLThisElement, true);

            m_Bullet.Export(XMLDocument, XMLThisElement, true);

            XMLDocument.CreateElement("COAL", m_dCOL, XMLThisElement);
            XMLDocument.CreateElement("CBTO", m_dCBTO, XMLThisElement);
            XMLDocument.CreateElement("Jump", m_dJump, XMLThisElement);
        }
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(strName, XMLParentElement);

            m_Caliber.Export(XMLDocument, XMLThisElement, true);

            XMLDocument.CreateElement("COAL", m_dCOL, XMLThisElement);
            XMLDocument.CreateElement("CBTO", m_dCBTO, XMLThisElement);
        }
Ejemplo n.º 8
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public override void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false, bool fIncludeTransactions = true)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(strName, XMLParentElement);

            base.Export(XMLDocument, XMLThisElement, fIdentityOnly, fIncludeTransactions);

            XMLDocument.CreateElement("Model", m_strModel, XMLThisElement);

            if (fIdentityOnly)
            {
                return;
            }

            XMLDocument.CreateElement("Size", m_eSize, XMLThisElement);
            XMLDocument.CreateElement("Standard", m_fStandard, XMLThisElement);
            XMLDocument.CreateElement("Magnum", m_fMagnum, XMLThisElement);
            XMLDocument.CreateElement("BenchRest", m_fBenchRest, XMLThisElement);
            XMLDocument.CreateElement("Military", m_fMilitary, XMLThisElement);
        }
Ejemplo n.º 9
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public override void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

            base.Export(XMLDocument, XMLThisElement, fIdentityOnly);

            if (fIdentityOnly)
            {
                return;
            }

            XMLDocument.CreateElement("Power", m_strPower, XMLThisElement);
            XMLDocument.CreateElement("Objective", m_strObjective, XMLThisElement);
            XMLDocument.CreateElement("TubeSize", m_nTubeSize.ToString(), XMLThisElement);
            XMLDocument.CreateElement("TubeMeasurement", m_eTubeMeasurement, XMLThisElement);
            XMLDocument.CreateElement("TurretClick", m_dTurretClick, XMLThisElement);
            XMLDocument.CreateElement("TurretType", m_eTurretType, XMLThisElement);
        }
Ejemplo n.º 10
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            XmlElement XMLElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

            foreach (cCharge Charge in this)
            {
                Charge.Export(XMLDocument, XMLElement);
            }
        }
Ejemplo n.º 11
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            XmlElement XMLThisElement = XMLDocument.CreateElement("Charge");

            XMLParentElement.AppendChild(XMLThisElement);

            // PowderWeight

            XmlElement XMLElement     = XMLDocument.CreateElement("PowderWeight");
            XmlText    XMLTextElement = XMLDocument.CreateTextNode(String.Format("{0}", m_dPowderWeight));

            XMLElement.AppendChild(XMLTextElement);

            XMLThisElement.AppendChild(XMLElement);

            // Fill Ratio

            XMLElement     = XMLDocument.CreateElement("FillRatio");
            XMLTextElement = XMLDocument.CreateTextNode(String.Format("{0}", m_dFillRatio));
            XMLElement.AppendChild(XMLTextElement);

            XMLThisElement.AppendChild(XMLElement);

            // Favorite

            XMLElement     = XMLDocument.CreateElement("Favorite");
            XMLTextElement = XMLDocument.CreateTextNode(m_fFavorite ? "Yes" : "-");
            XMLElement.AppendChild(XMLTextElement);

            XMLThisElement.AppendChild(XMLElement);

            // Reject

            XMLElement     = XMLDocument.CreateElement("Reject");
            XMLTextElement = XMLDocument.CreateTextNode(m_fReject ? "Yes" : "-");
            XMLElement.AppendChild(XMLTextElement);

            XMLThisElement.AppendChild(XMLElement);

            TestList.Export(XMLDocument, XMLThisElement);
        }
Ejemplo n.º 12
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

                foreach (cTool Tool in this)
                {
                    Tool.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 13
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIncludeTransactions = true)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

                foreach (cBullet Bullet in this)
                {
                    Bullet.Export(XMLDocument, XMLElement, false, fIncludeTransactions);
                }
            }
        }
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

                foreach (cFirearmBullet FirearmBullet in this)
                {
                    FirearmBullet.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 15
0
        //============================================================================*
        // Export() - XML
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

                foreach (cBatchTest BatchTest in this)
                {
                    BatchTest.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 16
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

                foreach (cManufacturer Manufacturer in this)
                {
                    Manufacturer.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 17
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public override void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false, bool fIncludeTransactions = true)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(strName);

            XMLParentElement.AppendChild(XMLThisElement);

            base.Export(XMLDocument, XMLThisElement, fIdentityOnly, fIncludeTransactions);

            XMLDocument.CreateElement("PartNumber", m_strPartNumber, XMLThisElement);

            m_Caliber.Export(XMLDocument, XMLThisElement, true);

            if (fIdentityOnly)
            {
                return;
            }

            XMLDocument.CreateElement("Match", m_fMatch, XMLThisElement);
            XMLDocument.CreateElement("Military", m_fMilitary, XMLThisElement);
            XMLDocument.CreateElement("LargePrimer", m_fLargePrimer, XMLThisElement);
            XMLDocument.CreateElement("SmallPrimer", m_fSmallPrimer, XMLThisElement);
        }
Ejemplo n.º 18
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName);
                XMLParentElement.AppendChild(XMLElement);

                foreach (cTransaction Transaction in this)
                {
                    Transaction.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 19
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName);
                XMLParentElement.AppendChild(XMLElement);

                foreach (cAmmoTest AmmoTest in this)
                {
                    AmmoTest.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 20
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement("ChargeTests");
                XMLParentElement.AppendChild(XMLElement);

                foreach (cChargeTest ChargeTest in this)
                {
                    ChargeTest.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 21
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIncludeTransactions = true)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName);
                XMLParentElement.AppendChild(XMLElement);

                foreach (cCase Case in this)
                {
                    Case.Export(XMLDocument, XMLElement, false, fIncludeTransactions);
                }
            }
        }
Ejemplo n.º 22
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIncludeTests = true)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName);
                XMLParentElement.AppendChild(XMLElement);

                foreach (cBatch Batch in this)
                {
                    Batch.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 23
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public override void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false, bool fIncludeTransactions = true)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(strName, XMLParentElement);

            base.Export(XMLDocument, XMLThisElement, fIdentityOnly, fIncludeTransactions);

            XMLDocument.CreateElement("Type", m_strType, XMLThisElement);

            if (fIdentityOnly)
            {
                return;
            }

            XMLDocument.CreateElement("Shape", m_eShape, XMLThisElement);
        }
Ejemplo n.º 24
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName);
                XMLParentElement.AppendChild(XMLElement);

                foreach (cCaliber Caliber in this)
                {
                    Caliber.Export(XMLDocument, XMLElement);
                }
            }
        }
Ejemplo n.º 25
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public override void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

            base.Export(XMLDocument, XMLThisElement, fIdentityOnly);

            if (fIdentityOnly)
            {
                return;
            }

            XMLDocument.CreateElement("DotMOA", m_dDotMOA, XMLThisElement);
            XMLDocument.CreateElement("CowitnessHeight", m_dCowitnessHeight, XMLThisElement);
            XMLDocument.CreateElement("TubeDiameter", m_dTubeDiameter, XMLThisElement);
            XMLDocument.CreateElement("Battery", m_strBattery, XMLThisElement);
        }
Ejemplo n.º 26
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            if (Count > 0)
            {
                XmlElement XMLElement = XMLDocument.CreateElement(ExportName);
                XMLParentElement.AppendChild(XMLElement);

                foreach (cFirearm Firearm in this)
                {
                    if (Firearm.Validate())
                    {
                        Firearm.Export(XMLDocument, XMLElement);
                    }
                }
            }
        }
Ejemplo n.º 27
0
		//============================================================================*
		// Export() - XML Document
		//============================================================================*

		public virtual void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false, bool fIncludeTransactions = true)
			{
			XMLDocument.CreateElement("SupplyType", m_eType, XMLParentElement);
			XMLDocument.CreateElement("FirearmType", m_eFirearmType, XMLParentElement);
			XMLDocument.CreateElement("Manufacturer", m_Manufacturer.Name, XMLParentElement);

			if (fIdentityOnly)
				return;

			XMLDocument.CreateElement("CrossUse", m_fCrossUse, XMLParentElement);
			XMLDocument.CreateElement("MinStockLevel", m_dMinimumStockLevel, XMLParentElement);
			XMLDocument.CreateElement("Quantity", m_dQuantity, XMLParentElement);
			XMLDocument.CreateElement("Cost", m_dCost, XMLParentElement);
			XMLDocument.CreateElement("Checked", m_fChecked, XMLParentElement);

			if (fIncludeTransactions)
				TransactionList.Export(XMLDocument, XMLParentElement);
			}
Ejemplo n.º 28
0
        //============================================================================*
        // Export() - XML Document
        //============================================================================*

        public override void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement, bool fIdentityOnly = false, bool fIncludeTransactions = true)
        {
            string strName = ExportName;

            if (fIdentityOnly)
            {
                strName += "Identity";
            }

            XmlElement XMLThisElement = XMLDocument.CreateElement(strName, XMLParentElement);

            base.Export(XMLDocument, XMLThisElement, fIdentityOnly, fIncludeTransactions);

            if (String.IsNullOrEmpty(m_strPartNumber))
            {
                m_strPartNumber = m_strType;
            }

            XMLDocument.CreateElement("PartNumber", m_strPartNumber, XMLThisElement);

            if (fIdentityOnly)
            {
                return;
            }

            XMLDocument.CreateElement("Type", m_strType, XMLThisElement);

            m_Caliber.Export(XMLDocument, XMLThisElement, true);

            XMLDocument.CreateElement("BatchID", m_nBatchID, XMLThisElement);
            XMLDocument.CreateElement("Reload", m_fReload, XMLThisElement);
            XMLDocument.CreateElement("BulletDiameter", m_dBulletDiameter, XMLThisElement);
            XMLDocument.CreateElement("BulletWeight", m_dBulletWeight, XMLThisElement);
            XMLDocument.CreateElement("BallisticCoefficient", m_dBallisticCoefficient, XMLThisElement);

            m_TestList.Export(XMLDocument, XMLThisElement);
        }
Ejemplo n.º 29
0
        //============================================================================*
        // Export()
        //============================================================================*

        public void Export(cRWXMLDocument XMLDocument, XmlElement XMLParentElement)
        {
            XmlElement XMLThisElement = XMLDocument.CreateElement(ExportName, XMLParentElement);

            XMLDocument.CreateElement("TransactionType", m_eTransactionType, XMLThisElement);

            m_Supply.Export(XMLDocument, XMLThisElement, true);

            XMLDocument.CreateElement("Source", m_strSource, XMLThisElement);
            XMLDocument.CreateElement("Date", m_Date, XMLThisElement);
            XMLDocument.CreateElement("Quantity", m_dQuantity, XMLThisElement);
            XMLDocument.CreateElement("Cost", m_dCost, XMLThisElement);
            XMLDocument.CreateElement("Tax", m_dTax, XMLThisElement);
            XMLDocument.CreateElement("Shipping", m_dShipping, XMLThisElement);
            XMLDocument.CreateElement("BatchID", m_nBatchID, XMLThisElement);
            XMLDocument.CreateElement("Archived", m_fArchived, XMLThisElement);
            XMLDocument.CreateElement("ApplyTax", m_fApplyTax, XMLThisElement);
            XMLDocument.CreateElement("AutoTrans", m_fAutoTrans, XMLThisElement);
            XMLDocument.CreateElement("Checked", m_fChecked, XMLThisElement);
        }
Ejemplo n.º 30
0
        //============================================================================*
        // CreateShareFile()
        //============================================================================*

        private void CreateShareFile()
        {
            //----------------------------------------------------------------------------*
            // Gather all the needed info to store the loads to be shared
            //----------------------------------------------------------------------------*

            cManufacturerList ShareManufacturerList = new cManufacturerList();
            cCaliberList      ShareCaliberList      = new cCaliberList();
            cBulletList       ShareBulletList       = new cBulletList();
            cCaseList         ShareCaseList         = new cCaseList();
            cPowderList       SharePowderList       = new cPowderList();
            cPrimerList       SharePrimerList       = new cPrimerList();

            cLoadList ShareLoadList = new cLoadList();

            foreach (ListViewItem Item in m_LoadDataListView.CheckedItems)
            {
                cLoad Load = (cLoad)Item.Tag;

                if (Load != null && Load.Bullet != null && Load.Case != null && Load.Powder != null && Load.Primer != null)
                {
                    foreach (cBulletCaliber BulletCaliber in Load.Bullet.BulletCaliberList)
                    {
                        ShareCaliberList.AddCaliber(BulletCaliber.Caliber);
                    }

                    ShareManufacturerList.AddManufacturer(Load.Bullet.Manufacturer);
                    ShareBulletList.AddBullet(Load.Bullet);

                    ShareManufacturerList.AddManufacturer(Load.Case.Manufacturer);
                    ShareCaseList.AddCase(Load.Case);

                    ShareManufacturerList.AddManufacturer(Load.Powder.Manufacturer);
                    SharePowderList.AddPowder(Load.Powder);

                    ShareManufacturerList.AddManufacturer(Load.Primer.Manufacturer);
                    SharePrimerList.AddPrimer(Load.Primer);

                    ShareLoadList.Add(Load);
                }
            }

            //----------------------------------------------------------------------------*
            // Now create a cRWXMLDocument and export the load data to it
            //----------------------------------------------------------------------------*

            cRWXMLDocument XMLDocument = new cRWXMLDocument(m_DataFiles);

            XmlElement MainElement = XMLDocument.CreateElement("Body");

            XMLDocument.AppendChild(MainElement);

            XmlText XMLTextElement = XMLDocument.CreateTextNode(String.Format("{0} Load Data Share File Export", Application.ProductName));

            MainElement.AppendChild(XMLTextElement);

            ShareManufacturerList.Export(XMLDocument, MainElement);
            ShareBulletList.Export(XMLDocument, MainElement, false);
            ShareCaliberList.Export(XMLDocument, MainElement);
            ShareCaseList.Export(XMLDocument, MainElement, false);
            SharePowderList.Export(XMLDocument, MainElement, false);
            SharePrimerList.Export(XMLDocument, MainElement, false);

            ShareLoadList.Export(XMLDocument, MainElement);

            //----------------------------------------------------------------------------*
            // Save the Exported XML Share File
            //----------------------------------------------------------------------------*

            SaveFileDialog SaveDialog = new SaveFileDialog();

            SaveDialog.AddExtension     = true;
            SaveDialog.CheckPathExists  = true;
            SaveDialog.DefaultExt       = "xml";
            SaveDialog.FileName         = String.Format("{0} Load Data Share File - {1}{2}{3}", Application.ProductName, DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
            SaveDialog.Filter           = "XML Files {*.xml)|*.xml";
            SaveDialog.InitialDirectory = Path.Combine(m_DataFiles.GetDataPath(), "Share");
            SaveDialog.OverwritePrompt  = true;
            SaveDialog.Title            = String.Format("Export Load Data");
            SaveDialog.ValidateNames    = true;

            if (SaveDialog.ShowDialog() == DialogResult.OK)
            {
                XMLDocument.Save(SaveDialog.OpenFile());
            }
        }