private void AddLedPattern(LedPatternSetting setting)
 {
     ListViewItem item = new ListViewItem
     {
         Text = setting.Name,
         Tag = setting
     };
     item.SubItems.Add(_ledFileService.GetLength(setting.FileName).ToString(@"mm\:ss\.fff"));
     _ledPatterns.Items.Add(item);
 }
 private void _ledAdd_Click(object sender, EventArgs e)
 {
     OpenFileDialog dlg = new OpenFileDialog
     {
         Filter = "LED Pattern Files (*.sosled)|*.sosled|All Files (*.*)|*.*"
     };
     if (dlg.ShowDialog(this) == DialogResult.OK)
     {
         string outputFileName = Path.Combine(Path.GetDirectoryName(_settings.FileName), Path.GetFileNameWithoutExtension(dlg.FileName) + ".sosled");
         File.Delete(outputFileName);
         File.Copy(dlg.FileName, outputFileName);
         var setting = new LedPatternSetting
         {
             FileName = outputFileName,
             Name = Path.GetFileNameWithoutExtension(outputFileName)
         };
         AddLedPattern(setting);
     }
 }