-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHyperLinkWindow.xaml.cs
45 lines (37 loc) · 1.31 KB
/
HyperLinkWindow.xaml.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
using System;
using System.Windows;
using System.Windows.Input;
namespace SkinText {
/// <summary>
/// Lógica de interacción para HyperLinkWindow.xaml
/// </summary>
public partial class HyperLinkWindow : Window {
public HyperLinkWindow() {
InitializeComponent();
}
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
private void Window_MouseDown(object sender, MouseButtonEventArgs e) {
if (Mouse.LeftButton == MouseButtonState.Pressed) {
try {
this.DragMove();
}
catch (Exception ex) {
#if DEBUG
MessageBox.Show("DEBUG: "+ex.ToString());
//throw;
#endif
//System.InvalidOperationException
//dragdrop with only leftclick
//dragdrop must be with pressed click
}
}
}
private void Window_ContentRendered(object sender, EventArgs e) {
}
private void BtnOk_Click(object sender, RoutedEventArgs e) {
this.DialogResult = true;
}
public string HyperNameResult => HyperName.Text;
public string HyperLinkResult => HyperLink.Text;
}
}