Skip to content

Commit 15a9c0c

Browse files
committed
Get basic notification working.
1 parent 57c9828 commit 15a9c0c

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed

DesktopNotifier/DesktopNotifier.csproj

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>DesktopNotifier</RootNamespace>
1111
<AssemblyName>DesktopNotifier</AssemblyName>
12-
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
14+
<TargetFrameworkProfile />
1415
</PropertyGroup>
1516
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1617
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -32,14 +33,24 @@
3233
<WarningLevel>4</WarningLevel>
3334
</PropertyGroup>
3435
<ItemGroup>
36+
<Reference Include="CommandLine, Version=1.9.71.2, Culture=neutral, PublicKeyToken=de6f01bd326f8c32, processorArchitecture=MSIL">
37+
<HintPath>..\packages\CommandLineParser.1.9.71\lib\net40\CommandLine.dll</HintPath>
38+
<Private>True</Private>
39+
</Reference>
3540
<Reference Include="System" />
3641
<Reference Include="System.Data" />
42+
<Reference Include="System.Drawing" />
43+
<Reference Include="System.Windows.Forms" />
3744
<Reference Include="System.Xml" />
3845
</ItemGroup>
3946
<ItemGroup>
4047
<Compile Include="Program.cs" />
4148
<Compile Include="Properties\AssemblyInfo.cs" />
4249
</ItemGroup>
50+
<ItemGroup>
51+
<None Include="app.config" />
52+
<None Include="packages.config" />
53+
</ItemGroup>
4354
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
4455
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
4556
Other similar extension points exist, see Microsoft.Common.targets.

DesktopNotifier/Program.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Text;
4+
using System.Windows.Forms;
5+
using System.Drawing;
46

57
namespace DesktopNotifier
68
{
79
class Program
810
{
911
static void Main(string[] args)
1012
{
13+
14+
var notifyIcon = new NotifyIcon();
15+
notifyIcon.Icon = new Icon("C:\\Users\\Geoff\\boot-logo-3.ico");
16+
notifyIcon.BalloonTipTitle = "Boot";
17+
notifyIcon.BalloonTipText = "Hello, World!";
18+
notifyIcon.Visible = true;
19+
notifyIcon.ShowBalloonTip(10000);
1120
}
1221
}
1322
}

DesktopNotifier/app.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration>

DesktopNotifier/packages.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="CommandLineParser" version="1.9.71" targetFramework="net40" />
4+
</packages>

0 commit comments

Comments
 (0)