using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace WindowsFormsApplication5 { public partial class Form3 : Form { public string na; string passvalue1; public string passvalue { get { return na; } set { na = value; } } string filenamee = "prefix.txt"; public Form3() { InitializeComponent(); richTextBox1.Text = string.Empty; string[] strArr = File.ReadAllLines(Application.StartupPath + @"\\config\\" + na + @"\\" + filenamee); StringBuilder sb = new StringBuilder(); for (int i = 0; i < strArr.Length; i++) { sb.AppendLine(strArr[i]); } richTextBox1.Text = sb.ToString(); } private void button1_Click(object sender, EventArgs e) { } private void label1_Click(object sender, EventArgs e) { } private void button2_Click(object sender, EventArgs e) { } private void richTextBox1_TextChanged(object sender, EventArgs e) { } public void button1_Click_1(object sender, EventArgs e) { MessageBox.Show(na); File.WriteAllText(Application.StartupPath + @"\config\" + na + @"\" + filenamee, String.Empty); foreach (string line in richTextBox1.Lines) { using (StreamWriter writer = new StreamWriter(Application.StartupPath + @"\config\" + na + @"\" + filenamee, true)) { writer.WriteLine(line); } } MessageBox.Show("Save Complete"); } } }
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง