-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.xaml
51 lines (48 loc) · 8.35 KB
/
App.xaml
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
47
48
49
50
51
<Application x:Class="RemoteController.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:desktop="clr-namespace:RemoteController.Desktop"
xmlns:vm="clr-namespace:RemoteController.ViewModels"
StartupUri="MainWindow.xaml"
ShutdownMode="OnExplicitShutdown">
<Application.Resources>
<ResourceDictionary>
<vm:MainViewModel x:Key="MainModel" />
<ContextMenu x:Shared="false"
x:Key="SysTrayMenu">
<MenuItem Header="Show Window"
Command="{Binding Open}" />
<Separator />
<MenuItem Header="Exit"
Command="{Binding Exit}" />
</ContextMenu>
<DrawingImage x:Key="AppIcon">
<DrawingImage.Drawing>
<GeometryDrawing Brush="{x:Static SystemParameters.WindowGlassBrush}"
Geometry="M 38,26.9167C 39.7489,26.9167 41.1667,28.3344 41.1667,30.0833L 47.5,30.0833C 49.2489,30.0833 50.6667,31.5011 50.6667,33.25L 50.6666,58.5834C 50.6666,60.3322 49.2489,61.75 47.5,61.75L 28.5,61.75C 26.7511,61.75 25.3333,60.3322 25.3333,58.5834L 25.3333,33.25C 25.3333,31.5011 26.7511,30.0833 28.5,30.0833L 34.8333,30.0833C 34.8333,28.3344 36.2511,26.9167 38,26.9167 Z M 38,17.4167C 32.5252,17.4167 27.8616,20.8901 26.0927,25.7534L 23.1159,24.6709C 25.327,18.5917 31.1565,14.25 38,14.25C 44.8435,14.25 50.6729,18.5917 52.8841,24.6709L 49.9073,25.7534C 48.1384,20.8901 43.4748,17.4167 38,17.4167 Z M 38,23.75C 35.2626,23.75 32.9308,25.4867 32.0463,27.9184L 29.0695,26.8359C 30.3962,23.1884 33.8939,20.5834 38,20.5834C 42.1061,20.5834 45.6038,23.1884 46.9304,26.8359L 43.9536,27.9184C 43.0692,25.4867 40.7374,23.75 38,23.75 Z M 30.875,39.5834C 29.5633,39.5834 28.5,40.6467 28.5,41.9584C 28.5,43.27 29.5633,44.3334 30.875,44.3334C 32.1867,44.3334 33.25,43.27 33.25,41.9584C 33.25,40.6467 32.1867,39.5834 30.875,39.5834 Z M 37.9999,39.5834C 36.6882,39.5834 35.6249,40.6468 35.6249,41.9584C 35.6249,43.2701 36.6882,44.3334 37.9999,44.3334C 39.3116,44.3334 40.3749,43.2701 40.3749,41.9584C 40.3749,40.6468 39.3116,39.5834 37.9999,39.5834 Z M 45.1249,39.5834C 43.8132,39.5834 42.7499,40.6467 42.7499,41.9584C 42.7499,43.2701 43.8132,44.3334 45.1249,44.3334C 46.4366,44.3334 47.4999,43.2701 47.4999,41.9584C 47.4999,40.6467 46.4366,39.5834 45.1249,39.5834 Z M 30.875,45.9167C 29.5633,45.9167 28.5,46.98 28.5,48.2917C 28.5,49.6034 29.5633,50.6667 30.875,50.6667C 32.1866,50.6667 33.25,49.6034 33.25,48.2917C 33.25,46.98 32.1866,45.9167 30.875,45.9167 Z M 37.9999,45.9167C 36.6883,45.9167 35.6249,46.98 35.6249,48.2917C 35.6249,49.6034 36.6883,50.6667 37.9999,50.6667C 39.3116,50.6667 40.3749,49.6034 40.3749,48.2917C 40.3749,46.98 39.3116,45.9167 37.9999,45.9167 Z M 45.125,45.9167C 43.8133,45.9167 42.75,46.98 42.75,48.2917C 42.75,49.6034 43.8133,50.6667 45.125,50.6667C 46.4366,50.6667 47.5,49.6034 47.5,48.2917C 47.5,46.98 46.4366,45.9167 45.125,45.9167 Z M 30.875,52.2501C 29.5633,52.2501 28.5,53.3134 28.5,54.6251C 28.5,55.9367 29.5633,57.0001 30.875,57.0001C 32.1866,57.0001 33.25,55.9367 33.25,54.6251C 33.25,53.3134 32.1866,52.2501 30.875,52.2501 Z M 38,52.2501C 36.6883,52.2501 35.625,53.3134 35.625,54.6251C 35.625,55.9367 36.6883,57.0001 38,57.0001C 39.3116,57.0001 40.375,55.9367 40.375,54.6251C 40.375,53.3134 39.3116,52.2501 38,52.2501 Z M 45.125,52.25C 43.8133,52.25 42.75,53.3133 42.75,54.625C 42.75,55.9367 43.8133,57 45.125,57C 46.4367,57 47.5,55.9367 47.5,54.625C 47.5,53.3133 46.4367,52.25 45.125,52.25 Z M 45.9166,34.8334L 42.75,34.8334C 41.8755,34.8334 41.1666,35.5422 41.1666,36.4167C 41.1666,37.2911 41.8755,38 42.75,38L 45.9166,38C 46.7911,38 47.5,37.2911 47.5,36.4167C 47.5,35.5422 46.7911,34.8334 45.9166,34.8334 Z M 38,34.8334L 30.0833,34.8334C 29.2089,34.8334 28.5,35.5422 28.5,36.4167C 28.5,37.2911 29.2089,38 30.0833,38L 38,38C 38.8744,38 39.5833,37.2911 39.5833,36.4167C 39.5833,35.5422 38.8744,34.8334 38,34.8334 Z" />
</DrawingImage.Drawing>
</DrawingImage>
<DrawingImage x:Key="AppIconDark">
<DrawingImage.Drawing>
<GeometryDrawing Brush="{x:Static SystemColors.ControlBrush}"
Geometry="M 38,26.9167C 39.7489,26.9167 41.1667,28.3344 41.1667,30.0833L 47.5,30.0833C 49.2489,30.0833 50.6667,31.5011 50.6667,33.25L 50.6666,58.5834C 50.6666,60.3322 49.2489,61.75 47.5,61.75L 28.5,61.75C 26.7511,61.75 25.3333,60.3322 25.3333,58.5834L 25.3333,33.25C 25.3333,31.5011 26.7511,30.0833 28.5,30.0833L 34.8333,30.0833C 34.8333,28.3344 36.2511,26.9167 38,26.9167 Z M 38,17.4167C 32.5252,17.4167 27.8616,20.8901 26.0927,25.7534L 23.1159,24.6709C 25.327,18.5917 31.1565,14.25 38,14.25C 44.8435,14.25 50.6729,18.5917 52.8841,24.6709L 49.9073,25.7534C 48.1384,20.8901 43.4748,17.4167 38,17.4167 Z M 38,23.75C 35.2626,23.75 32.9308,25.4867 32.0463,27.9184L 29.0695,26.8359C 30.3962,23.1884 33.8939,20.5834 38,20.5834C 42.1061,20.5834 45.6038,23.1884 46.9304,26.8359L 43.9536,27.9184C 43.0692,25.4867 40.7374,23.75 38,23.75 Z M 30.875,39.5834C 29.5633,39.5834 28.5,40.6467 28.5,41.9584C 28.5,43.27 29.5633,44.3334 30.875,44.3334C 32.1867,44.3334 33.25,43.27 33.25,41.9584C 33.25,40.6467 32.1867,39.5834 30.875,39.5834 Z M 37.9999,39.5834C 36.6882,39.5834 35.6249,40.6468 35.6249,41.9584C 35.6249,43.2701 36.6882,44.3334 37.9999,44.3334C 39.3116,44.3334 40.3749,43.2701 40.3749,41.9584C 40.3749,40.6468 39.3116,39.5834 37.9999,39.5834 Z M 45.1249,39.5834C 43.8132,39.5834 42.7499,40.6467 42.7499,41.9584C 42.7499,43.2701 43.8132,44.3334 45.1249,44.3334C 46.4366,44.3334 47.4999,43.2701 47.4999,41.9584C 47.4999,40.6467 46.4366,39.5834 45.1249,39.5834 Z M 30.875,45.9167C 29.5633,45.9167 28.5,46.98 28.5,48.2917C 28.5,49.6034 29.5633,50.6667 30.875,50.6667C 32.1866,50.6667 33.25,49.6034 33.25,48.2917C 33.25,46.98 32.1866,45.9167 30.875,45.9167 Z M 37.9999,45.9167C 36.6883,45.9167 35.6249,46.98 35.6249,48.2917C 35.6249,49.6034 36.6883,50.6667 37.9999,50.6667C 39.3116,50.6667 40.3749,49.6034 40.3749,48.2917C 40.3749,46.98 39.3116,45.9167 37.9999,45.9167 Z M 45.125,45.9167C 43.8133,45.9167 42.75,46.98 42.75,48.2917C 42.75,49.6034 43.8133,50.6667 45.125,50.6667C 46.4366,50.6667 47.5,49.6034 47.5,48.2917C 47.5,46.98 46.4366,45.9167 45.125,45.9167 Z M 30.875,52.2501C 29.5633,52.2501 28.5,53.3134 28.5,54.6251C 28.5,55.9367 29.5633,57.0001 30.875,57.0001C 32.1866,57.0001 33.25,55.9367 33.25,54.6251C 33.25,53.3134 32.1866,52.2501 30.875,52.2501 Z M 38,52.2501C 36.6883,52.2501 35.625,53.3134 35.625,54.6251C 35.625,55.9367 36.6883,57.0001 38,57.0001C 39.3116,57.0001 40.375,55.9367 40.375,54.6251C 40.375,53.3134 39.3116,52.2501 38,52.2501 Z M 45.125,52.25C 43.8133,52.25 42.75,53.3133 42.75,54.625C 42.75,55.9367 43.8133,57 45.125,57C 46.4367,57 47.5,55.9367 47.5,54.625C 47.5,53.3133 46.4367,52.25 45.125,52.25 Z M 45.9166,34.8334L 42.75,34.8334C 41.8755,34.8334 41.1666,35.5422 41.1666,36.4167C 41.1666,37.2911 41.8755,38 42.75,38L 45.9166,38C 46.7911,38 47.5,37.2911 47.5,36.4167C 47.5,35.5422 46.7911,34.8334 45.9166,34.8334 Z M 38,34.8334L 30.0833,34.8334C 29.2089,34.8334 28.5,35.5422 28.5,36.4167C 28.5,37.2911 29.2089,38 30.0833,38L 38,38C 38.8744,38 39.5833,37.2911 39.5833,36.4167C 39.5833,35.5422 38.8744,34.8334 38,34.8334 Z" />
</DrawingImage.Drawing>
</DrawingImage>
<!-- the application's NotifyIcon - started from App.xaml.cs. Declares its own view model. -->
<desktop:Traybar x:Key="SysTrayBar"
IconSource="{StaticResource AppIcon}"
ContextMenuOpening="OnTraybarContextMenuOpening"
ToolTipText="Double-click for window, right-click for menu"
DoubleClickCommand="{Binding Open}"
ContextMenu="{StaticResource SysTrayMenu}">
<!-- self-assign a data context (could also be done programmatically) -->
<desktop:Traybar.DataContext>
<vm:TrayViewModel />
</desktop:Traybar.DataContext>
</desktop:Traybar>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Dialogs/DialogResource.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>