public static void Serialize(WebDevInfo info) { var list = new List <WebDevInfo>() { info }; string xmlString = Serializer.Serialize <WebDevInfo>(list); File.WriteAllText(FileName, xmlString); }
private void FrmWebDev_Load(object sender, EventArgs e) { WebDevInfo info = WebDevBuilderSerializer.Deserialize(); WebDevServerBuilder.WebDev_WebServer_Exe = info.ExeName; WebDevServerBuilder.WebDev_WebServer_Path = info.Path; DevenvCommand.MSBuildFileFullPath = info.VSDevenvFileFullPath; txtWebDev.Text = info.GetFullName(); txtVSDev.Text = info.VSDevenvFileFullPath.Trim('"'); SiteList = SiteSerialize.Deserialize(); BindSites(); }
private void btnUpdate_Click(object sender, EventArgs e) { WebDevInfo info = new WebDevInfo(); info.Path = WebDevServerBuilder.WebDev_WebServer_Path; info.ExeName = WebDevServerBuilder.WebDev_WebServer_Exe; info.SetFullName(txtWebDev.Text.Trim()); info.VSDevenvFileFullPath = txtVSDev.Text.Trim(); WebDevBuilderSerializer.Serialize(info); WebDevServerBuilder.WebDev_WebServer_Exe = info.ExeName; WebDevServerBuilder.WebDev_WebServer_Path = info.Path; DevenvCommand.MSBuildFileFullPath = info.VSDevenvFileFullPath; MSBuildCommand.MSBuildFileFullPath = info.VSDevenvFileFullPath; }
public static void Serialize(WebDevInfo info) { var list = new List<WebDevInfo>() { info }; string xmlString = Serializer.Serialize<WebDevInfo>(list); File.WriteAllText(FileName, xmlString); }