public void SuppleMentTxt(string filepath) { YML yml = new YML(filepath); using (FileStream fs = new FileStream(filepath, FileMode.Append, FileAccess.Write, FileShare.Write)) { using (StreamWriter sw = new StreamWriter(fs)) { if (!yml.boolnode("x")) { sw.WriteLine("\r\nx: 350"); } if (!yml.boolnode("y")) { sw.WriteLine("\r\ny: 350"); } if (!yml.boolnode("scale")) { sw.WriteLine("\r\nscale: 1.0"); } if (!yml.boolnode("text")) { sw.WriteLine("\r\ntext: "); } sw.Close(); } fs.Close(); } }
public void SuppleMentIm(string filepath) { YML yml = new YML(filepath); using (FileStream fs = new FileStream(filepath, FileMode.Append, FileAccess.Write, FileShare.Write)) { using (StreamWriter sw = new StreamWriter(fs)) { if (!yml.boolnode("image")) { sw.WriteLine("\r\nimage: 'https://yun.mc5173.com/images/2019/08/14/mc5173.png'"); } if (!yml.boolnode("x")) { sw.WriteLine("\r\nx: 350"); } if (!yml.boolnode("y")) { sw.WriteLine("\r\ny: 350"); } if (!yml.boolnode("width")) { sw.WriteLine("\r\nwidth: 48"); } if (!yml.boolnode("high")) { sw.WriteLine("\r\nhigh: 48"); } if (!yml.boolnode("xshow")) { sw.WriteLine("\r\nxshow: 48"); } if (!yml.boolnode("yshow")) { sw.WriteLine("\r\nyshow: 48"); } if (!yml.boolnode("hovertext")) { sw.WriteLine("\r\nhovertext: ''"); } sw.Close(); } fs.Close(); } }
public void SuppleMentBt(string filepath) { YML yml = new YML(filepath); using (FileStream fs = new FileStream(filepath, FileMode.Append, FileAccess.Write, FileShare.Write)) { using (StreamWriter sw = new StreamWriter(fs)) { if (!yml.boolnode("id")) { sw.WriteLine("\r\nid: "); } if (!yml.boolnode("name")) { sw.WriteLine("\r\nname: ''"); } if (!yml.boolnode("url")) { sw.WriteLine("\r\nurl: 'https://yun.mc5173.com/images/2019/08/14/mc5173.png'"); } if (!yml.boolnode("url2")) { sw.WriteLine("\r\nurl2: 'https://yun.mc5173.com/images/2019/08/14/mc5173.png'"); } if (!yml.boolnode("x")) { sw.WriteLine("\r\nx: 350"); } if (!yml.boolnode("y")) { sw.WriteLine("\r\ny: 350"); } if (!yml.boolnode("width")) { sw.WriteLine("\r\nyshow: 48"); } if (!yml.boolnode("high")) { sw.WriteLine("\r\nhigh: 48"); } if (!yml.boolnode("commands")) { sw.WriteLine("\r\ncommands: "); } if (!yml.boolnode("asop")) { sw.WriteLine("\r\nasop: false"); } if (!yml.boolnode("close")) { sw.WriteLine("\r\nclose: false"); } if (!yml.boolnode("to")) { sw.WriteLine("\r\nto: '-'"); } sw.Close(); } fs.Close(); } }
public void SuppleMentGui(string filepath) { YML yml = new YML(filepath); using (FileStream fs = new FileStream(filepath, FileMode.Append, FileAccess.Write, FileShare.Write)) { using (StreamWriter sw = new StreamWriter(fs)) { if (!yml.boolnode("gui")) { sw.WriteLine("\r\ngui: 'https://yun.mc5173.com/images/2019/08/14/mc5173.png'"); } if (!yml.boolnode("x")) { sw.WriteLine("\r\nx: -1"); } if (!yml.boolnode("y")) { sw.WriteLine("\r\ny: -1"); } if (!yml.boolnode("width")) { sw.WriteLine("\r\nwidth: 512"); } if (!yml.boolnode("high")) { sw.WriteLine("\r\nhigh: 512"); } if (!yml.boolnode("xshow")) { sw.WriteLine("\r\nxshow: 512"); } if (!yml.boolnode("yshow")) { sw.WriteLine("\r\nyshow: 512"); } if (!yml.boolnode("image")) { sw.WriteLine("\r\nimage: "); } if (!yml.boolnode("text")) { sw.WriteLine("\r\ntext: "); } if (!yml.boolnode("buttons")) { sw.WriteLine("\r\nbuttons: "); } if (!yml.boolnode("slot")) { sw.WriteLine("\r\nslot: "); } sw.Close(); } fs.Close(); } }