-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMainWindow.xaml.vb
More file actions
37 lines (30 loc) · 1.25 KB
/
MainWindow.xaml.vb
File metadata and controls
37 lines (30 loc) · 1.25 KB
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
Imports System.Windows
Imports DevExpress.Data
Namespace InteractiveNotifications
Public Partial Class MainWindow
Inherits Window
Public Sub New()
RegisterApplication()
Me.InitializeComponent()
End Sub
Public Shared Sub SendActivatorMessage(ByVal arguments As String)
MessageBox.Show("Activator invoked! Notification id = " & arguments)
End Sub
Public Shared ReadOnly Property ApplicationID As String
Get
Return String.Format("InteractiveNotifications_{0}", AssemblyInfo.VersionShort.Replace(".", "_"))
End Get
End Property
Public Shared ReadOnly Property ApplicationName As String
Get
Return "Interactive Notifications"
End Get
End Property
Private Sub RegisterApplication()
If Not ShellHelper.IsApplicationShortcutExist(ApplicationName) Then
ShellHelper.RegisterComServer(GetType(CustomNotificationActivator))
Call ShellHelper.TryCreateShortcut(ApplicationID, ApplicationName, Nothing, GetType(CustomNotificationActivator))
End If
End Sub
End Class
End Namespace