private void ReadLang() { string langfile = "lang"; if (File.Exists(langfile)) { string readtoend = File.ReadAllText(langfile, Functs.GetEncoding(langfile)); CB_Lang.SelectedItem = readtoend; File.Delete(langfile); } }
private void BTN_Import_Click(object sender, EventArgs e) { if (OFD.ShowDialog() == DialogResult.OK) { if (CB_ClearLyric.Checked) { TB_OLyric.Text = ""; } foreach (string file in OFD.FileNames) { if (TB_OLyric.Text.Length >= 2 && TB_OLyric.Text.Substring(TB_OLyric.Text.Length - 2, 2) != "\r\n") { TB_OLyric.Text += "\r\n"; } TB_OLyric.Text += File.ReadAllText(file, Functs.GetEncoding(file)); } } }
public TmpUst(string ustfile, bool ispath = false) { string readtoend = ustfile; _FilePath = ustfile; if (ispath) { if (File.Exists(ustfile)) { readtoend = File.ReadAllText(ustfile, Functs.GetEncoding(ustfile)); } else { readtoend = ""; } } Parse(readtoend); }