-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPreviewWindow.xaml.cs
54 lines (47 loc) · 1.41 KB
/
PreviewWindow.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
46
47
48
49
50
51
52
53
54
using System;
using System.Windows;
namespace SvgoAutoExe
{
/// <summary>
/// PreviewWindow.xaml の相互作用ロジック
/// </summary>
public partial class PreviewWindow : Window
{
private readonly MainWindow mainWindow;
public PreviewWindow(MainWindow mw)
{
mainWindow = mw;
InitializeComponent();
}
public void PreviewRefresh()
{
Dispatcher.Invoke(() =>
{
Browser.Navigate(new Uri(mainWindow.TextBoxDstFile.Text));
});
}
/// <summary>
/// 閉じるボタン押下時
/// </summary>
private void PreviewWindowClosing(object sender, System.ComponentModel.CancelEventArgs e)
{
e.Cancel = true; // インスタンスを残したままにしたいのでキャンセル
Hide();
mainWindow.ButtonPreview.IsChecked = false;
}
/// <summary>
/// 最前面に固定
/// </summary>
private void ButtonShowTopChecked(object sender, RoutedEventArgs e)
{
Topmost = true;
}
/// <summary>
/// 最前面の固定を解除
/// </summary>
private void ButtonShowTopUnChecked(object sender, RoutedEventArgs e)
{
Topmost = false;
}
}
}