private void RecordPlay(object obj) { var item = obj as RequestForListDto; if (item == null) { return; } var serverIpAddress = ConfigurationManager.AppSettings["CallCenterIP"]; var fileName = _requestService.GetRecordFileNameByUniqueId(item.RecordUniqueId); _requestService.PlayRecord(serverIpAddress, fileName); /* * var localFileName = fileName.Replace("/raid/monitor/", $"\\\\{serverIpAddress}\\mixmonitor\\").Replace("/","\\"); * Process.Start(localFileName); */ }
private void RecordPlay(object obj) { var item = obj as RequestForListDto; if (item == null) { return; } var serverIpAddress = ConfigurationManager.AppSettings["CallCenterIP"]; var fileName = _requestService.GetRecordFileNameByUniqueId(item.RecordUniqueId); _requestService.PlayRecord(serverIpAddress, fileName); /* * var localFileName = fileName.Replace("/raid/monitor/", $"\\\\{serverIpAddress}\\mixmonitor\\").Replace("/","\\"); * var localFileNameMp3 = localFileName.Replace(".wav",".mp3"); * if(File.Exists(localFileNameMp3)) * Process.Start(localFileNameMp3); * else if(File.Exists(localFileNameMp3)) * Process.Start(localFileName); * else * MessageBox.Show($"Файл с записью недоступен!\r\n{localFileNameMp3}", "Ошибка"); */ }