-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy pathBScreenshotMenu.cs
68 lines (67 loc) · 1.82 KB
/
BScreenshotMenu.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace BMap.NET.WindowsForm
{
/// <summary>
/// 截图菜单
/// </summary>
partial class BScreenshotMenu : UserControl
{
public event ScreenshotDoneEventHandler ScreenshotDone;
public BScreenshotMenu()
{
InitializeComponent();
}
/// <summary>
/// 鼠标进入变色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void label1_MouseEnter(object sender, EventArgs e)
{
(sender as Label).BackColor = Color.Gray;
}
/// <summary>
/// 鼠标移出变色
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void label1_MouseLeave(object sender, EventArgs e)
{
(sender as Label).BackColor = Color.White;
}
/// <summary>
/// 鼠标点击
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void label1_Click(object sender, EventArgs e)
{
if ((sender as Label).Text == "确定")
{
if (ScreenshotDone != null)
{
ScreenshotDone(true);
}
}
else
{
if (ScreenshotDone != null)
{
ScreenshotDone(false);
}
}
}
}
/// <summary>
/// 表示处理截图完成事件的方法
/// </summary>
/// <param name="saved"></param>
delegate void ScreenshotDoneEventHandler(bool saved);
}