Created
April 19, 2016 11:15
-
-
Save mfakane/d8939bf39ab4d7c101856a1c8ceabffa to your computer and use it in GitHub Desktop.
Metasequoia.Sharp の Station プラグインのはりぼて
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.ComponentModel; | |
| using System.Linq; | |
| using Metasequoia; | |
| using Metasequoia.Sharp; | |
| namespace YourNameSpace | |
| { | |
| [DisplayName("StationSample\tCopyright (C) 2016, your name")] // プラグイン一覧に表示する情報 | |
| [StationPlugin(0xAB86CB1E, 0x0E94E0BC, "Station サンプル")] // 作者 ID, プラグイン ID, 項目名 | |
| public class MainPlugin : StationPlugin | |
| { | |
| bool isEnabled; | |
| public MainPlugin() | |
| { | |
| // 各種イベント時の処理、詳細は Metaseq SDK を参照 | |
| // 引数は e から、戻り値は e.Handled へ | |
| this.Initialize += (sender, e) => | |
| { | |
| // 初期化 | |
| }; | |
| this.Exit += (sender, e) => | |
| { | |
| // 終了 | |
| }; | |
| this.Activate += (sender, e) => | |
| { | |
| // 有効/無効の切り替え | |
| e.Handled = isEnabled = e.Value; | |
| }; | |
| this.IsActivated += (sender, e) => e.Handled = isEnabled; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment