示例#1
0
文件: Index.cs 项目: Hua777/Voicemith
        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);
            }
        }
示例#2
0
文件: Index.cs 项目: Hua777/Voicemith
 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));
         }
     }
 }
示例#3
0
        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);
        }