3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

C# から、Growlを利用する

Last updated at Posted at 2012-08-18

Growlについては、以前こちらに書いた記事を参照のこと。

手順

  1. (Growlインストール済であることを前提とします)
  2. Growl公式サイト -> Developer Information -> [C#/VB.NET or any .NET compatible language] をクリックする
  3. Growl_NET_Connector_SDK.zip がダウンロードされるので、適当な場所に解凍
  4. C#開発環境で、プロジェクトファイル Growl_NET_Connector_SDK\Sample App\Csharp Example.csproj を開く(私は VisualStudioではなく SharpDevelop を使いました)
  5. プロジェクトのプロパティ -> コンパイル -> ターゲットCPU=32bit に変更
  6. Form1.cs -> Form1_Load() 内のコメントを以下のように変更する
Form1.cs
this.growl = new GrowlConnector();
//this.growl = new GrowlConnector("password");    // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password

Form1.cs
//this.growl = new GrowlConnector();
this.growl = new GrowlConnector("password");    // use this if you need to set a password - you can also pass null or an empty string to this constructor to use no password

成功!

あとはこのサンプルをよしなに再利用すれば良いのではなかろうか。

注意点

私は以下の点でつまづきました。

  • ビルド時にターゲットCPUは32bit CPUにする(Growlのライブラリが64bit対応していない)
  • Windows では、Growlに必ずpasswordを渡してあげないと通知されない

参考

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?