markus / ConvertService / ServiceBase / ConnectionStringBuild / MainWindow.xaml.cs @ 8de0cf00
이력 | 보기 | 이력해설 | 다운로드 (2.15 KB)
1 | 53c9637d | taeseongkim | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Linq; |
||
4 | using System.Text; |
||
5 | using System.Threading.Tasks; |
||
6 | using System.Windows; |
||
7 | using System.Windows.Controls; |
||
8 | using System.Windows.Data; |
||
9 | using System.Windows.Documents; |
||
10 | using System.Windows.Input; |
||
11 | using System.Windows.Media; |
||
12 | using System.Windows.Media.Imaging; |
||
13 | using System.Windows.Navigation; |
||
14 | using System.Windows.Shapes; |
||
15 | d5096d58 | taeseongkim | using Markus.Service; |
16 | 53c9637d | taeseongkim | using Markus.Service.Extensions; |
17 | d5096d58 | taeseongkim | using Markus.Service.Helper; |
18 | using static Markus.Service.Extensions.Encrypt; |
||
19 | 53c9637d | taeseongkim | |
20 | namespace ConnectionStringBuild |
||
21 | { |
||
22 | /// <summary> |
||
23 | /// MainWindow.xaml에 대한 상호 작용 논리 |
||
24 | /// </summary> |
||
25 | public partial class MainWindow : Window |
||
26 | { |
||
27 | public MainWindow() |
||
28 | { |
||
29 | InitializeComponent(); |
||
30 | } |
||
31 | |||
32 | private void Button_Click(object sender, RoutedEventArgs e) |
||
33 | { |
||
34 | if(!string.IsNullOrWhiteSpace(txtDecrypt.Text) && string.IsNullOrWhiteSpace(txtEncrypt.Text)) |
||
35 | { |
||
36 | txtEncrypt.Text = Encrypt.AESEncrypter.Encrypt(txtDecrypt.Text); |
||
37 | } |
||
38 | else if (string.IsNullOrWhiteSpace(txtDecrypt.Text) && !string.IsNullOrWhiteSpace(txtEncrypt.Text)) |
||
39 | { |
||
40 | txtDecrypt.Text = Encrypt.AESEncrypter.Decrypt(txtEncrypt.Text); |
||
41 | } |
||
42 | |||
43 | } |
||
44 | 0a89a17f | taeseongkim | |
45 | private void ButtonTest_Click(object sender, RoutedEventArgs e) |
||
46 | { |
||
47 | try |
||
48 | { |
||
49 | using (Markus.Service.DataBase.ConvertDatabase database = new Markus.Service.DataBase.ConvertDatabase(txtDecrypt.Text)) |
||
50 | { |
||
51 | b92f142f | taeseongkim | var result = database.GetWaitConvertItems(new List<string>(),30).ToList(); |
52 | 0a89a17f | taeseongkim | |
53 | b92f142f | taeseongkim | txtLog.Text += "Test Ok" + result.Count().ToString(); |
54 | 0a89a17f | taeseongkim | } |
55 | } |
||
56 | catch (Exception ex) |
||
57 | { |
||
58 | txtLog.Text += ex.ToString(); |
||
59 | } |
||
60 | } |
||
61 | d5096d58 | taeseongkim | |
62 | private void ButtonTest2_Click(object sender, RoutedEventArgs e) |
||
63 | { |
||
64 | var convetContext = ObjectToBytesStringConvert.BytesStringToObject<ProcessContext>(AESEncrypter.Decrypt(txtEncrypt.Text)); |
||
65 | System.Diagnostics.Debug.WriteLine(convetContext.OriginFilePath); |
||
66 | } |
||
67 | 53c9637d | taeseongkim | } |
68 | } |