Files
FeedCenter/Application/MainWindow/Header.cs
Chris Kaczor b5f570688d More modernization
- Split generic "common" libraries into specific libraries
- Use other packages in lieu of custom code
- General cleanup
2023-04-05 16:06:38 -04:00

33 lines
970 B
C#

using CKaczor.InstalledBrowsers;
using FeedCenter.Properties;
using System.Windows;
using System.Windows.Input;
namespace FeedCenter
{
public partial class MainWindow
{
private void HandleHeaderLabelMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
{
// Ignore if the window is locked
if (Settings.Default.WindowLocked)
return;
// Start dragging
DragMove();
}
private void HandleCloseButtonClick(object sender, RoutedEventArgs e)
{
// Close the window
Close();
}
private void HandleFeedLabelMouseDown(object sender, MouseButtonEventArgs e)
{
// Open the link for the current feed on a left double click
if (e.ClickCount == 2 && e.ChangedButton == MouseButton.Left)
InstalledBrowser.OpenLink(Settings.Default.Browser, _currentFeed.Link);
}
}
}