diff --git a/Services/ImageService.cs b/Services/ImageService.cs index 50bee1e..415f0c0 100644 --- a/Services/ImageService.cs +++ b/Services/ImageService.cs @@ -43,6 +43,7 @@ namespace BackgroundBuilder.Services var compositeBmp = RenderComposite(overlay, background, OverlayOffset); SaveBitmap(compositeBmp, primaryPath); + SaveBitmap(compositeBmp, "\\\\SRV-DADOS\\Wallpaper$\\Wallpaper.png"); await Task.FromResult((primaryPath, savedOverlayPath)); } diff --git a/ViewModels/MainWindowViewModel.cs b/ViewModels/MainWindowViewModel.cs index a58aac5..dbafde8 100644 --- a/ViewModels/MainWindowViewModel.cs +++ b/ViewModels/MainWindowViewModel.cs @@ -165,6 +165,20 @@ namespace BackgroundBuilder.ViewModels && BackgroundImage is BitmapImage bg) { await _imageService.SaveAsync(overlay, bg, dlg.FileName, dlg.FileName.Replace(".png", "_1.png")); + MessageBox.Show( + "ConcluĂ­do!", + "Confirm Save", + MessageBoxButton.OK, + MessageBoxImage.Information); + //Open recently generated image + if (File.Exists(dlg.FileName)) + { + System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo + { + FileName = dlg.FileName, + UseShellExecute = true + }); + } } } @@ -259,25 +273,30 @@ namespace BackgroundBuilder.ViewModels { var ws = workbook.Worksheets.First(); var table = ws.Cell("B2").CurrentRegion; - + var nomeCol = table.Row(1).Search("Nome").First().Address.ColumnNumber; foreach (var row in table.Rows().Skip(1)) // Skip header { var contato = new Contato { - Ramal = row.Cell(3).GetString(), - Nome = row.Cell(1).GetString(), - Email = row.Cell(2).GetString(), - Area = row.Cell(4).GetString(), + Ramal = row.Cell(4).GetString(), + Nome = row.Cell(2).GetString(), + Email = row.Cell(3).GetString(), + Area = row.Cell(5).GetString(), IsComando = false }; ramais.Add(contato); } - table = ws.Cell("G2").CurrentRegion; + table = ws.Cell("H2").CurrentRegion; foreach (var row in table.Rows().Skip(1)) // Skip header { - ramais.Find(x => x.Nome == row.Cell(1).GetString()).Aniversario = row.Cell(2).GetDateTime(); + var name = row.Cell(1).GetString(); + var match = ramais.Find(x => x.Nome == name); + if (match is not null) + { + match.Aniversario = row.Cell(2).GetDateTime(); + } } } @@ -288,6 +307,11 @@ namespace BackgroundBuilder.ViewModels } await LoadRawAsync(); // Refresh UI + MessageBox.Show( + "ConcluĂ­do!", + "Confirm Save", + MessageBoxButton.OK, + MessageBoxImage.Information); } } } \ No newline at end of file