예제 #1
0
 protected override void Dispose(bool disposing)
 {
     if (OpenFileDialog != null)
     {
         OpenFileDialog.Dispose();
         OpenFileDialog = null;
     }
     if (Configuartion != null)
     {
         Configuartion.Dispose();
         Configuartion = null;
     }
     base.Dispose(disposing);
 }
예제 #2
0
 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;
     }
 }