イベント名が違うだけで、これも WinForms 時代と変わらないね。
This file contains 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
/// <summary> | |
/// DragOver イベント処理 | |
/// </summary> | |
/// <param name="sender">イベント発生元</param> | |
/// <param name="e">イベント引数</param> | |
private void Window_DragOver(object sender, DragEventArgs e) | |
{ | |
if (e.Data.GetDataPresent(DataFormats.FileDrop)) | |
{ | |
e.Effects = DragDropEffects.Copy; | |
e.Handled = true; | |
} | |
else | |
{ | |
e.Effects = DragDropEffects.None; | |
} | |
} | |
/// <summary> | |
/// Drop イベント処理 | |
/// </summary> | |
/// <param name="sender">イベント発生元</param> | |
/// <param name="e">イベント引数</param> | |
private void Window_Drop(object sender, DragEventArgs e) | |
{ | |
var paths = e.Data.GetData(DataFormats.FileDrop) as String[]; | |
if (paths != null) | |
{ | |
// do something... | |
} | |
} |
const じゃなくて readonly なのは理由があるのだろうか?
>const じゃなくて readonly なのは理由があるのだろうか?
返信削除そもそもは Windows API の ATOM かなんかだったような気がするなので、その登録文字列を真面目に取得しているとかかもです。
なるほど、定義してるわけじゃなくて初期化時にシステムから取得してるってことですか。それなら納得いきますね
返信削除用神の妻財は日に沖されて暗動で世こうを剋するけれど世こうは弱くて日が死の地、用神が生じる応こうは日と相合して独発も官鬼に変わり、本日は本人ではなく相手にお金が入るのではないかと思いました。
返信削除