private void Btn_add_m3u8_Click(object sender, RoutedEventArgs e)
 {
     Microsoft.Win32.OpenFileDialog openFileDialog = new Microsoft.Win32.OpenFileDialog
     {
         FileName         = "",
         Filter           = "M3u files (*.m3u8; *.m3u) | *.m3u8; *.m3u",
         InitialDirectory = core.LastDir
     };
     openFileDialog.ShowDialog();
     if (openFileDialog.FileName != string.Empty)
     {
         string         str      = File.ReadAllText(openFileDialog.FileName);
         List <Channel> channels = core.ParseM3u8(str, SpecificLinkTypes.NO);
         core.Add_channels(channels);
         string directoryName = Path.GetDirectoryName(openFileDialog.FileName);
         core.LastDir = directoryName;
         RegistryStore.SetRegistry("LastDir", directoryName);
     }
     txt_search.Text     = string.Empty;
     radio_all.IsChecked = true;
     FilterResults();
     if (core.Channel_Full.Count > 0)
     {
         btn_reset.IsEnabled = true;
     }
     else
     {
         btn_reset.IsEnabled = false;
     }
 }
        private void LoadFromRegistry()
        {
            RegistryStore registryStore = new RegistryStore();

            core.Vlc_Location = registryStore.Vlc_Location;
            core.UserAgent    = registryStore.UserAgent;
            core.NumTries     = registryStore.NumTries;
            core.TimeOut      = registryStore.Timeout;
            core.NumThreads   = registryStore.NumThreads;
            core.LastDir      = registryStore.LastDir;
        }