「Xamarin.Mac/NSApplicationのサブクラスを使う」の版間の差分
編集の要約なし |
153.174.184.145 (トーク) による版 6178 を取り消し |
||
| 26行目: | 26行目: | ||
{ | { | ||
base.AwakeFromNib(); | base.AwakeFromNib(); | ||
this.Delegate = new AppDelegate(); | |||
} | } | ||
| 45行目: | 46行目: | ||
===エントリポイントを書き換える=== | ===エントリポイントを書き換える=== | ||
Xamarin Studioで「空のプロジェクト」を作ると初期値でこんな感じになっている。 | |||
<source lang="csharp"> | <source lang="csharp"> | ||
static class MainClass | static class MainClass | ||
| 60行目: | 61行目: | ||
</source> | </source> | ||
これを以下のように書き換える。なお「空のプロジェクト」ではなく「Cocoa」を選ぶと最初からこうなっている。 | |||
<source lang="csharp"> | <source lang="csharp"> | ||
using System; | using System; | ||
| 74行目: | 76行目: | ||
} | } | ||
</source> | </source> | ||
==関連項目== | ==関連項目== | ||