Ejemplo n.º 1
0
 public static void LoadConfigurationFromXMLFile(IWin32Window owner)
 {
     if (File.Exists(_fullConfigFilePath))
     {
         XmlDocument configDocument = new XmlDocument();
         configDocument.Load(_fullConfigFilePath);
         _lcid = Convert.ToInt32(configDocument.FirstChild.ChildNodes[0].InnerText);
         _connectToDocumentation = Convert.ToBoolean(configDocument.FirstChild.ChildNodes[1].InnerText);
         _saveSettings = Convert.ToBoolean(configDocument.FirstChild.ChildNodes[2].InnerText);
     }
     else
     { 
         FormOptions dialog = new FormOptions();
         dialog.ShowDialog(owner);
     }
 }
Ejemplo n.º 2
0
 private void buttonOptions_Click(object sender, EventArgs e)
 {
     try
     {
         FormOptions dialog = new FormOptions();
         if (DialogResult.OK == dialog.ShowDialog(this))
             ApplyConfiguration();
     }
     catch(Exception exception)
     {
         FormError.Show(this, null, exception.Message, exception);  
     }
 }