chr
2024-08-12 e9d7a5ef4c17e4804fb988dd193ff7d1fa36d52b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using DevComponents.DotNetBar.Controls;
using DevComponents.DotNetBar;
using System.Windows;
using System.Drawing;
 
namespace PdmAlert
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }
 
        private long _RunningAlertId = 0;
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            eDesktopAlertColor color = eDesktopAlertColor.Default;
            eAlertPosition position = eAlertPosition.BottomRight;
            DesktopAlert.Show("123", "\uf005", eSymbolSet.Awesome, Color.Empty, color, position, 10, ++_RunningAlertId, AlertClicked);
 
        }
        private void AlertClicked(long alertId)
        {
 
        }
 
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            var screeWidth = SystemParameters.WorkArea.Width;
            var sHeight = SystemParameters.WorkArea.Height;
 
            this.Left = screeWidth - this.Width;
            this.Top = sHeight - this.Height;
        }
 
        private void Hide_Click(object sender, RoutedEventArgs e)
        {
            this.Hide();
        }
 
    }
}