mirror of
https://github.com/ckaczor/wpf-notifyicon.git
synced 2026-01-19 17:29:00 -05:00
ADD Git attributes.
CHG End of line conversion.
This commit is contained in:
@@ -1,39 +1,39 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using Samples;
|
||||
using WindowsFormsSample.Properties;
|
||||
|
||||
namespace WindowsFormsSample
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
private TaskbarIcon notifyIcon;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
notifyIcon = new TaskbarIcon();
|
||||
notifyIcon.Icon = Resources.Led;
|
||||
notifyIcon.ToolTipText = "Left-click to open popup";
|
||||
notifyIcon.Visibility = Visibility.Visible;
|
||||
|
||||
notifyIcon.TrayPopup = new FancyPopup();
|
||||
}
|
||||
|
||||
protected override void OnClosed(EventArgs e)
|
||||
{
|
||||
base.OnClosed(e);
|
||||
|
||||
//the notify icon only closes automatically on WPF applications
|
||||
//-> dispose the notify icon manually
|
||||
notifyIcon.Dispose();
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using Hardcodet.Wpf.TaskbarNotification;
|
||||
using Samples;
|
||||
using WindowsFormsSample.Properties;
|
||||
|
||||
namespace WindowsFormsSample
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
private TaskbarIcon notifyIcon;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnLoad(EventArgs e)
|
||||
{
|
||||
base.OnLoad(e);
|
||||
notifyIcon = new TaskbarIcon();
|
||||
notifyIcon.Icon = Resources.Led;
|
||||
notifyIcon.ToolTipText = "Left-click to open popup";
|
||||
notifyIcon.Visibility = Visibility.Visible;
|
||||
|
||||
notifyIcon.TrayPopup = new FancyPopup();
|
||||
}
|
||||
|
||||
protected override void OnClosed(EventArgs e)
|
||||
{
|
||||
base.OnClosed(e);
|
||||
|
||||
//the notify icon only closes automatically on WPF applications
|
||||
//-> dispose the notify icon manually
|
||||
notifyIcon.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user