protected override void Dispose(bool disposing) { if (OpenFileDialog != null) { OpenFileDialog.Dispose(); OpenFileDialog = null; } if (Configuartion != null) { Configuartion.Dispose(); Configuartion = null; } base.Dispose(disposing); }
internal void ReadConfiguration(string fileName) { try { FileInfo info = new FileInfo(fileName); if (!info.Exists) { throw new FileNotFoundException(fileName); } Configuartion.Clear(); Configuartion.EnforceConstraints = false; Configuartion.ReadXml(fileName, System.Data.XmlReadMode.IgnoreSchema); } finally { Configuartion.EnforceConstraints = true; } }