Add Telegram bot integration for real-time alert notifications
- Implemented ITelegramNotificationService and TelegramNotificationService for sending alerts via Telegram. - Updated MonitoringSettings to include Telegram configuration options. - Enhanced AlertService to send alerts and resolutions through Telegram. - Added API endpoints for checking Telegram status and sending test alerts. - Updated README and TELEGRAM_SETUP.md with setup instructions and features. - Included example configuration in appsettings.telegram.example.json.
This commit is contained in:
@@ -154,8 +154,11 @@ namespace ResourceMonitorService.Services
|
||||
return false;
|
||||
|
||||
// Get screen dimensions
|
||||
var screenWidth = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
|
||||
var screenHeight = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
|
||||
var primaryScreen = System.Windows.Forms.Screen.PrimaryScreen;
|
||||
if (primaryScreen == null)
|
||||
return false;
|
||||
var screenWidth = primaryScreen.Bounds.Width;
|
||||
var screenHeight = primaryScreen.Bounds.Height;
|
||||
|
||||
// Check if window covers the entire screen
|
||||
var windowWidth = rect.Right - rect.Left;
|
||||
|
||||
Reference in New Issue
Block a user