static void Main(string[] args) { Console.WriteLine("Row Data Gateway Pattern"); MediaFinder finder = new MediaFinder(Connection_String); MediaGateway media = finder.Find(3); Console.WriteLine("Encontrado: " + media.Name); media.Name = "La voragine"; media.Update(); MediaGateway MediaG = new MediaGateway(Connection_String) { Name = "Semana", Type = MediaType.Magazine }; MediaG.Insert(); Console.ReadKey(); }
private void StartNextTask(List <FileAttrib> files) { var count = 0; for (var i = files.Count - 1; i > 0; i--) { count += i; } switch (_selectedTab) { case 1: fileDestroyerPGB.Maximum = count; fileDestroyerPGB.Value = 0; var fileAnalyzer = new FileHelper(files); fileAnalyzer.ProgressChanged += Report_ProgressChanged; fileAnalyzer.RunWorkerCompleted += Run_WorkCompleted; fileAnalyzer.RunWorkerAsync(); break; case 2: ImageProgressBar.Maximum = count; ImageProgressBar.Value = 0; var imageAnaylzer = new ImageAnalyzer(files); imageAnaylzer.ProgressChanged += Report_ProgressChanged; imageAnaylzer.RunWorkerCompleted += Run_WorkCompleted; imageAnaylzer.RunWorkerAsync(); break; case 3: audioDestroyerPBG.Maximum = count; audioDestroyerPBG.Value = 0; var audioAnalyzer = new MediaFinder(files); audioAnalyzer.ProgressChanged += Report_ProgressChanged; audioAnalyzer.RunWorkerCompleted += Run_WorkCompleted; audioAnalyzer.RunWorkerAsync(); break; } }