public static bool VerificaConfiguracaoPastasXml() { try { belIsolated objbelIsolated = new belIsolated(); RegistryKey key = Registry.CurrentConfig.OpenSubKey("hlp\\Config_xml"); if (belStatic.bClickOnce) { if (key != null) { if (objbelIsolated.BuscarArquivo("LOCAL_XML", belIsolated.Lugar.Local) == "") { belStatic.Pasta_xmls_Configs = key.GetValue("Caminho_xmls", "").ToString(); objbelIsolated.SalvarArquivo("LOCAL_XML", belStatic.Pasta_xmls_Configs, belIsolated.Lugar.Local); } else { belStatic.Pasta_xmls_Configs = objbelIsolated.BuscarArquivo("LOCAL_XML", belIsolated.Lugar.Local); } return true; } else { if (objbelIsolated.BuscarArquivo("LOCAL_XML", belIsolated.Lugar.Local) == "") { return false; } else { belStatic.Pasta_xmls_Configs = objbelIsolated.BuscarArquivo("LOCAL_XML", belIsolated.Lugar.Local); return true; } } } else { if (key != null) { belStatic.Pasta_xmls_Configs = key.GetValue("Caminho_xmls", "").ToString(); return true; } else { return false; } } } catch (Exception) { return false; } }
public frmGerarXml() { InitializeComponent(); try { belStaticPastas.Pasta_StartupPath = Application.StartupPath; belStatic.bClickOnce = false; if (ApplicationDeployment.IsNetworkDeployed) { belStatic.bClickOnce = true; } string sVisualGera = ""; if (belStatic.bClickOnce) { belIsolated objIsolated = new belIsolated(); sVisualGera = objIsolated.BuscarArquivo(_VISUAL, belIsolated.Lugar.Local); } else { sVisualGera = belRegedit.BuscaNomeSkin(); } SetVisualandBackColor(sVisualGera); } catch (Exception ex) { throw ex; } }