修订版 | 24e354c30ee47213e1e12a3528d6b0be44dc172d (tree) |
---|---|
时间 | 2020-08-30 14:58:22 |
作者 | Kazuhiro Fujieda <fujieda@user...> |
Commiter | Kazuhiro Fujieda |
QuestPanelのダブルクリックの自前実装をやめる
@@ -31,7 +31,7 @@ namespace KancolleSniffer.Test | ||
31 | 31 | [TestInitialize] |
32 | 32 | public void Initialize() |
33 | 33 | { |
34 | - _panel.CreateLabels(Lines, (obj, e) => { }); | |
34 | + _panel.CreateLabels(Lines); | |
35 | 35 | } |
36 | 36 | |
37 | 37 | /// <summary> |
@@ -16,12 +16,10 @@ using System; | ||
16 | 16 | using System.Collections.Generic; |
17 | 17 | using System.Drawing; |
18 | 18 | using System.Linq; |
19 | -using System.Threading.Tasks; | |
20 | 19 | using System.Windows.Forms; |
21 | 20 | using KancolleSniffer.Notification; |
22 | 21 | using KancolleSniffer.Util; |
23 | 22 | using KancolleSniffer.View; |
24 | -using Clipboard = KancolleSniffer.Util.Clipboard; | |
25 | 23 | |
26 | 24 | namespace KancolleSniffer |
27 | 25 | { |
@@ -128,7 +126,7 @@ namespace KancolleSniffer | ||
128 | 126 | private void SetupQuestPanel() |
129 | 127 | { |
130 | 128 | int prevHeight = questPanel.Height; |
131 | - questPanel.CreateLabels(Config.QuestLines, labelQuest_DoubleClick); | |
129 | + questPanel.CreateLabels(Config.QuestLines); | |
132 | 130 | Height += questPanel.Height - prevHeight; |
133 | 131 | } |
134 | 132 |
@@ -446,20 +444,5 @@ namespace KancolleSniffer | ||
446 | 444 | { |
447 | 445 | labelClearQuest.BackColor = DefaultBackColor; |
448 | 446 | } |
449 | - | |
450 | - private void labelQuest_DoubleClick(object sender, EventArgs e) | |
451 | - { | |
452 | - var label = (Label)sender; | |
453 | - if (string.IsNullOrEmpty(label.Text)) | |
454 | - return; | |
455 | - Clipboard.SetText(label.Text); | |
456 | - _tooltipCopy.Active = true; | |
457 | - _tooltipCopy.Show("コピーしました。", label); | |
458 | - Task.Run(async () => | |
459 | - { | |
460 | - await Task.Delay(1000); | |
461 | - _tooltipCopy.Active = false; | |
462 | - }); | |
463 | - } | |
464 | 447 | } |
465 | 448 | } |
\ No newline at end of file |
@@ -42,7 +42,7 @@ namespace KancolleSniffer.View | ||
42 | 42 | public override Control[] Controls => new Control[] {Color, Count, Progress, Name}; |
43 | 43 | } |
44 | 44 | |
45 | - public void CreateLabels(int lines, EventHandler onDoubleClick) | |
45 | + public void CreateLabels(int lines) | |
46 | 46 | { |
47 | 47 | _lines = LimitLines(lines); |
48 | 48 | _labels = new QuestLabels[_lines]; |
@@ -75,7 +75,6 @@ namespace KancolleSniffer.View | ||
75 | 75 | TextAlign = ContentAlignment.MiddleRight |
76 | 76 | } |
77 | 77 | }; |
78 | - _labels[i].Name.DoubleClick += onDoubleClick; | |
79 | 78 | _labels[i].Arrange(this); |
80 | 79 | } |
81 | 80 | ResumeLayout(); |