root / HAgent / Horizon(TCP, HTTP) / Horizon / ContentSelect.xaml.cs
이력 | 보기 | 이력해설 | 다운로드 (2.49 KB)
1 | 40 | HKM | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.IO; |
||
4 | using System.Linq; |
||
5 | using System.Net; |
||
6 | using System.Text; |
||
7 | using System.Threading.Tasks; |
||
8 | using System.Windows; |
||
9 | using System.Windows.Controls; |
||
10 | using System.Windows.Data; |
||
11 | using System.Windows.Documents; |
||
12 | using System.Windows.Input; |
||
13 | using System.Windows.Media; |
||
14 | using System.Windows.Media.Imaging; |
||
15 | using System.Windows.Shapes; |
||
16 | |||
17 | namespace Horizon |
||
18 | { |
||
19 | /// <summary> |
||
20 | /// ContentSelect.xaml에 대한 상호 작용 논리 |
||
21 | /// </summary> |
||
22 | public partial class ContentSelect : Window |
||
23 | { |
||
24 | //public List<string> GetFTPList(string targetURI, string userID, string password) |
||
25 | //{ |
||
26 | |||
27 | // Console.WriteLine("1"); |
||
28 | // FtpWebRequest ftpWebRequest = WebRequest.Create(targetURI) as FtpWebRequest; |
||
29 | |||
30 | // Console.WriteLine("2"); |
||
31 | // ftpWebRequest.Method = WebRequestMethods.Ftp.ListDirectory; |
||
32 | |||
33 | // Console.WriteLine("3"); |
||
34 | // ftpWebRequest.Credentials = new NetworkCredential(userID, password); |
||
35 | |||
36 | // Console.WriteLine("4"); |
||
37 | // StreamReader streamReader = new StreamReader(ftpWebRequest.GetResponse().GetResponseStream()); |
||
38 | |||
39 | // Console.WriteLine("5"); |
||
40 | // List<string> list = new List<string>(); |
||
41 | // while (true) |
||
42 | // { |
||
43 | // string fileName = streamReader.ReadLine(); |
||
44 | |||
45 | // if (string.IsNullOrEmpty(fileName)) |
||
46 | // { |
||
47 | // break; |
||
48 | // } |
||
49 | // list.Add(fileName); |
||
50 | // } |
||
51 | // streamReader.Close(); |
||
52 | |||
53 | // return list; |
||
54 | //} |
||
55 | public ContentSelect() |
||
56 | { |
||
57 | InitializeComponent(); |
||
58 | } |
||
59 | |||
60 | private void Button_Click(object sender, RoutedEventArgs e) |
||
61 | { |
||
62 | if (FileList.SelectedIndex != -1) |
||
63 | { |
||
64 | // ((ContentCheck)).contentname.= (string)FileList.SelectedItem; |
||
65 | } |
||
66 | } |
||
67 | |||
68 | private void Button_Click_1(object sender, RoutedEventArgs e) |
||
69 | { |
||
70 | this.Close(); |
||
71 | } |
||
72 | |||
73 | private void Window_Loaded(object sender, RoutedEventArgs e) |
||
74 | { |
||
75 | string[] ProjectName = UpdateClient.GetProjectList("ftp://192.168.0.12:9001"); |
||
76 | foreach (var project in ProjectName) |
||
77 | { |
||
78 | FileList.Items.Add(project); |
||
79 | } |
||
80 | //GetFTPList("ftp://192.168.0.12:9001", "FTPUser", "1234"); |
||
81 | } |
||
82 | } |
||
83 | } |