markus / KCOM / UpdateWindow.xaml.cs @ f3c08420
이력 | 보기 | 이력해설 | 다운로드 (1.63 KB)
1 |
using System; |
---|---|
2 |
using System.Collections.Generic; |
3 |
using System.Diagnostics; |
4 |
using System.Linq; |
5 |
using System.Text; |
6 |
using System.Threading.Tasks; |
7 |
using System.Windows; |
8 |
using System.Windows.Controls; |
9 |
using System.Windows.Data; |
10 |
using System.Windows.Documents; |
11 |
using System.Windows.Input; |
12 |
using System.Windows.Media; |
13 |
using System.Windows.Media.Imaging; |
14 |
using System.Windows.Shapes; |
15 |
using Telerik.Windows.Controls; |
16 |
|
17 |
namespace KCOM |
18 |
{ |
19 |
/// <summary> |
20 |
/// UpdateWindow.xaml에 대한 상호 작용 논리 |
21 |
/// </summary> |
22 |
public partial class UpdateWindow : RadWindow |
23 |
{ |
24 |
public UpdateWindow(string updateurl) |
25 |
{ |
26 |
InitializeComponent(); |
27 |
|
28 |
this._updateurl = updateurl; |
29 |
} |
30 |
|
31 |
public event EventHandler<EventArgs> UpdatePassEvent; |
32 |
private string _updateurl; |
33 |
|
34 |
private void CallUpdateProcess(string updateurl) |
35 |
{ |
36 |
ProcessStartInfo proInfo = new ProcessStartInfo(); |
37 |
string smartupdaterpath = string.Empty; |
38 |
smartupdaterpath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "SmartUpdate.exe"); |
39 |
Process.Start(smartupdaterpath, updateurl); |
40 |
} |
41 |
|
42 |
private void btUpdate_Click(object sender, RoutedEventArgs e) |
43 |
{ |
44 |
CallUpdateProcess(_updateurl); |
45 |
} |
46 |
|
47 |
private void btPassUpdate_Click(object sender, RoutedEventArgs e) |
48 |
{ |
49 |
if (UpdatePassEvent != null) |
50 |
{ |
51 |
UpdatePassEvent(this, new EventArgs()); |
52 |
} |
53 |
} |
54 |
|
55 |
private void btCancel_Click(object sender, RoutedEventArgs e) |
56 |
{ |
57 |
this.DialogResult = false; |
58 |
} |
59 |
} |
60 |
} |