示例#1
0
        static void Main(string[] args)
        {
            StartApp();

            var list = GetListByArgs(args);

            var engine = new SubEngine();

            foreach (var key in list.Keys)
            {
                try
                {
                    var fileContent = engine.LoadSrtFile(key);
                    engine.StripHtml(fileContent);
                    engine.SaveFile(fileContent, list[key]);
                    Console.WriteLine($"HTML tags were removed for {key}");
                }
                catch (Exception ex)
                {
                    Console.WriteLine($"Convert error for {key}");
                    Console.WriteLine(ex.Message);
                }
            }

            ExitApp();
        }
示例#2
0
 private void btRemoveHtmTag_Click(object sender, EventArgs e)
 {
     try
     {
         engine.StripHtml(fileContent);
         lblErrmsg.Text = $"HTML tags were removed for { tbSource.Text} .";
     }
     catch (Exception ex)
     {
         lblErrmsg.Text = $"Convert error for {tbSource.Text}"
                          + ex.Message;
     }
     BindGrid();
 }