リビジョン | c087ae45c1d4089b91a603ecb66e09f8c7695817 (tree) |
---|---|
日時 | 2017-08-14 01:31:13 |
作者 | Kimura Youichi <kim.upsilon@bucy...> |
コミッター | Kimura Youichi |
EventViewerDialog.EventListでEnterキーを押した場合にダブルクリックと同様の動作とする
@@ -91,6 +91,7 @@ | ||
91 | 91 | this.EventList.CacheVirtualItems += new System.Windows.Forms.CacheVirtualItemsEventHandler(this.EventList_CacheVirtualItems); |
92 | 92 | this.EventList.RetrieveVirtualItem += new System.Windows.Forms.RetrieveVirtualItemEventHandler(this.EventList_RetrieveVirtualItem); |
93 | 93 | this.EventList.DoubleClick += new System.EventHandler(this.EventList_DoubleClick); |
94 | + this.EventList.KeyDown += new System.Windows.Forms.KeyEventHandler(this.EventList_KeyDown); | |
94 | 95 | // |
95 | 96 | // ColumnHeader1 |
96 | 97 | // |
@@ -102,6 +102,12 @@ namespace OpenTween | ||
102 | 102 | private async void EventList_DoubleClick(object sender, EventArgs e) |
103 | 103 | => await this.OpenEventStatusOrUser(); |
104 | 104 | |
105 | + private async void EventList_KeyDown(object sender, KeyEventArgs e) | |
106 | + { | |
107 | + if (e.KeyData == Keys.Enter) | |
108 | + await this.OpenEventStatusOrUser(); | |
109 | + } | |
110 | + | |
105 | 111 | private async Task OpenEventStatusOrUser() |
106 | 112 | { |
107 | 113 | if (this.EventList.SelectedIndices.Count == 0) |