Form1.cs
上传用户:lxycoco
上传日期:2022-07-21
资源大小:38457k
文件大小:25k
源码类别:

C#编程

开发平台:

Others

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Data;
  7. using System.IO;
  8. namespace Wrox.ProCSharp.FilesAndRegistry
  9. {
  10. /// <summary>
  11. /// Summary description for Form1.
  12. /// </summary>
  13. public class Form1 : System.Windows.Forms.Form
  14. {
  15. private string currentFolderPath;
  16. private System.Windows.Forms.Label label8;
  17. private System.Windows.Forms.Button buttonDisplay;
  18. private System.Windows.Forms.Button buttonUp;
  19. private System.Windows.Forms.TextBox textBoxLastWriteTime;
  20. private System.Windows.Forms.Label label2;
  21. private System.Windows.Forms.TextBox textBoxInput;
  22. private System.Windows.Forms.Label label1;
  23. private System.Windows.Forms.TextBox textBoxCreationTime;
  24. private System.Windows.Forms.ListBox listBoxFiles;
  25. private System.Windows.Forms.ListBox listBoxFolders;
  26. private System.Windows.Forms.GroupBox groupBox1;
  27. private System.Windows.Forms.Label label6;
  28. private System.Windows.Forms.TextBox textBoxLastAccessTime;
  29. private System.Windows.Forms.Label label5;
  30. private System.Windows.Forms.Label label3;
  31. private System.Windows.Forms.TextBox textBoxFileSize;
  32. private System.Windows.Forms.Label label7;
  33. private System.Windows.Forms.TextBox textBoxFileName;
  34. private System.Windows.Forms.Label label4;
  35. private System.Windows.Forms.TextBox textBoxFolder;
  36. private System.Windows.Forms.GroupBox groupBox2;
  37. private System.Windows.Forms.GroupBox groupBox3;
  38. private System.Windows.Forms.Label label9;
  39. private System.Windows.Forms.TextBox textBox1;
  40. private System.Windows.Forms.Label label10;
  41. private System.Windows.Forms.Label label11;
  42. private System.Windows.Forms.TextBox textBox2;
  43. private System.Windows.Forms.Label label12;
  44. private System.Windows.Forms.TextBox textBox3;
  45. private System.Windows.Forms.Label label13;
  46. private System.Windows.Forms.TextBox textBox4;
  47. private System.Windows.Forms.GroupBox groupBox4;
  48. private System.Windows.Forms.Button button1;
  49. private System.Windows.Forms.TextBox textBox5;
  50. private System.Windows.Forms.GroupBox groupBox5;
  51. private System.Windows.Forms.Label label14;
  52. private System.Windows.Forms.TextBox textBoxNewPath;
  53. private System.Windows.Forms.Button buttonDelete;
  54. private System.Windows.Forms.Button buttonCopyTo;
  55. private System.Windows.Forms.Button buttonMoveTo;
  56. /// <summary>
  57. /// Required designer variable.
  58. /// </summary>
  59. private System.ComponentModel.Container components = null;
  60. public Form1()
  61. {
  62. //
  63. // Required for Windows Form Designer support
  64. //
  65. InitializeComponent();
  66. //
  67. // TODO: Add any constructor code after InitializeComponent call
  68. //
  69. }
  70. /// <summary>
  71. /// Clean up any resources being used.
  72. /// </summary>
  73. protected override void Dispose( bool disposing )
  74. {
  75. if( disposing )
  76. {
  77. if (components != null) 
  78. {
  79. components.Dispose();
  80. }
  81. }
  82. base.Dispose( disposing );
  83. }
  84. protected void ClearAllFields()
  85. {
  86. listBoxFolders.Items.Clear();
  87. listBoxFiles.Items.Clear();
  88. textBoxFolder.Text = "";
  89. textBoxFolder.Text = "";
  90. textBoxFileName.Text = "";
  91. textBoxCreationTime.Text = "";
  92. textBoxLastAccessTime.Text = "";
  93. textBoxLastWriteTime.Text = "";
  94. textBoxFileSize.Text = "";
  95. }
  96. protected void DisplayFileInfo(string fileFullName)
  97. {
  98. FileInfo theFile = new FileInfo(fileFullName);
  99. if (!theFile.Exists)
  100. throw new FileNotFoundException("File not found: " + fileFullName);
  101. textBoxFileName.Text = theFile.Name;
  102. textBoxCreationTime.Text = theFile.CreationTime.ToLongTimeString();
  103. textBoxLastAccessTime.Text = theFile.LastAccessTime.ToLongDateString();
  104. textBoxLastWriteTime.Text = theFile.LastWriteTime.ToLongDateString();
  105. textBoxFileSize.Text = theFile.Length.ToString() + " bytes";
  106. // enable move, copy, delete buttons
  107. textBoxNewPath.Text = theFile.FullName;
  108. textBoxNewPath.Enabled = true;
  109. buttonCopyTo.Enabled = true;
  110. buttonDelete.Enabled = true;
  111. buttonMoveTo.Enabled = true;
  112. }
  113. protected void DisplayFolderList(string folderFullName)
  114. {
  115. DirectoryInfo theFolder = new DirectoryInfo(folderFullName);
  116. if (!theFolder.Exists)
  117. throw new DirectoryNotFoundException("Folder not found: " 
  118. + folderFullName);
  119. ClearAllFields();
  120. DisableMoveFeatures();
  121. textBoxFolder.Text = theFolder.FullName;
  122. currentFolderPath = theFolder.FullName; 
  123. // list all subfolders in folder
  124. foreach(DirectoryInfo nextFolder in theFolder.GetDirectories())
  125. listBoxFolders.Items.Add(nextFolder.Name);
  126. // list all files in folder
  127. foreach(FileInfo nextFile in theFolder.GetFiles())
  128. listBoxFiles.Items.Add(nextFile.Name);
  129. }
  130. protected void OnDisplayButtonClick(object sender, EventArgs e)
  131. {
  132. try
  133. {
  134. string folderPath = textBoxInput.Text;
  135. DirectoryInfo theFolder = new DirectoryInfo(folderPath);
  136. if (theFolder.Exists)
  137. {
  138. DisplayFolderList(theFolder.FullName);
  139. return;
  140. }
  141. FileInfo theFile = new FileInfo(folderPath);
  142. if (theFile.Exists)
  143. {
  144. DisplayFolderList(theFile.Directory.FullName);
  145. int index = listBoxFiles.Items.IndexOf(theFile.Name);
  146. listBoxFiles.SetSelected(index, true);
  147. return;
  148. }
  149. throw new FileNotFoundException("There is no file or folder with "
  150. + "this name: " + textBoxInput.Text);
  151. }
  152. catch(Exception ex)
  153. {
  154. MessageBox.Show(ex.Message);
  155. }
  156. }
  157. void DisableMoveFeatures()
  158. {
  159. textBoxNewPath.Text = "";
  160. textBoxNewPath.Enabled = false;
  161. buttonCopyTo.Enabled = false;
  162. buttonDelete.Enabled = false;
  163. buttonMoveTo.Enabled = false;
  164. }
  165. protected void OnListBoxFilesSelected(object sender, EventArgs e)
  166. {
  167. try
  168. {
  169. string selectedString = listBoxFiles.SelectedItem.ToString();
  170. string fullFileName = Path.Combine(currentFolderPath, selectedString);
  171. DisplayFileInfo(fullFileName);
  172. }
  173. catch(Exception ex)
  174. {
  175. MessageBox.Show(ex.Message);
  176. }
  177. }
  178. protected void OnListBoxFoldersSelected(object sender, EventArgs e)
  179. {
  180. try
  181. {
  182. string selectedString = listBoxFolders.SelectedItem.ToString();
  183. string fullPathName = Path.Combine(currentFolderPath, selectedString);
  184. DisplayFolderList(fullPathName);
  185. }
  186. catch(Exception ex)
  187. {
  188. MessageBox.Show(ex.Message);
  189. }
  190. }
  191. protected void OnUpButtonClick(object sender, EventArgs e)
  192. {
  193. try
  194. {
  195. string folderPath = new FileInfo(currentFolderPath).DirectoryName;
  196. DisplayFolderList(folderPath);
  197. }
  198. catch(Exception ex)
  199. {
  200. MessageBox.Show(ex.Message);
  201. }
  202. }
  203. protected void OnDeleteButtonClick(object sender, EventArgs e)
  204. {
  205. try
  206. {
  207. string filePath = Path.Combine(currentFolderPath, 
  208. textBoxFileName.Text);
  209. string query = "Really delete the filen" + filePath + "?";
  210. if (MessageBox.Show(query, 
  211. "Delete File?", MessageBoxButtons.YesNo) == DialogResult.Yes)
  212. {
  213. File.Delete(filePath);
  214. DisplayFolderList(currentFolderPath);
  215. }
  216. }
  217. catch(Exception ex)
  218. {
  219. MessageBox.Show("Unable to delete file. The following exception" 
  220. + " occurred:n" + ex.Message, "Failed");
  221. }
  222. }
  223. protected void OnMoveButtonClick(object sender, EventArgs e)
  224. {
  225. try
  226. {
  227. string filePath = Path.Combine(currentFolderPath, 
  228. textBoxFileName.Text);
  229. string query = "Really move the filen" + filePath + "nto " 
  230. + textBoxNewPath.Text + "?";
  231. if (MessageBox.Show(query, 
  232. "Move File?", MessageBoxButtons.YesNo) == DialogResult.Yes)
  233. {
  234. File.Move(filePath, textBoxNewPath.Text);
  235. DisplayFolderList(currentFolderPath);
  236. }
  237. }
  238. catch(Exception ex)
  239. {
  240. MessageBox.Show("Unable to move file. The following exception"
  241. + " occurred:n" + ex.Message, "Failed");
  242. }
  243. }
  244. protected void OnCopyButtonClick(object sender, EventArgs e)
  245. {
  246. try
  247. {
  248. string filePath = Path.Combine(currentFolderPath, 
  249. textBoxFileName.Text);
  250. string query = "Really copy the filen" + filePath + "nto " 
  251. + textBoxNewPath.Text + "?";
  252. if (MessageBox.Show(query, 
  253. "Copy File?", MessageBoxButtons.YesNo) == DialogResult.Yes)
  254. {
  255. File.Copy(filePath, textBoxNewPath.Text);
  256. DisplayFolderList(currentFolderPath);
  257. }
  258. }
  259. catch(Exception ex)
  260. {
  261. MessageBox.Show("Unable to copy file. The following exception" 
  262. + " occurred:n" + ex.Message, "Failed");
  263. }
  264. }
  265. #region Windows Form Designer generated code
  266. /// <summary>
  267. /// Required method for Designer support - do not modify
  268. /// the contents of this method with the code editor.
  269. /// </summary>
  270. private void InitializeComponent()
  271. {
  272. this.label8 = new System.Windows.Forms.Label();
  273. this.buttonDisplay = new System.Windows.Forms.Button();
  274. this.buttonUp = new System.Windows.Forms.Button();
  275. this.textBoxLastWriteTime = new System.Windows.Forms.TextBox();
  276. this.label2 = new System.Windows.Forms.Label();
  277. this.textBoxInput = new System.Windows.Forms.TextBox();
  278. this.label1 = new System.Windows.Forms.Label();
  279. this.textBoxCreationTime = new System.Windows.Forms.TextBox();
  280. this.listBoxFiles = new System.Windows.Forms.ListBox();
  281. this.listBoxFolders = new System.Windows.Forms.ListBox();
  282. this.groupBox1 = new System.Windows.Forms.GroupBox();
  283. this.groupBox5 = new System.Windows.Forms.GroupBox();
  284. this.label14 = new System.Windows.Forms.Label();
  285. this.textBoxNewPath = new System.Windows.Forms.TextBox();
  286. this.buttonDelete = new System.Windows.Forms.Button();
  287. this.buttonCopyTo = new System.Windows.Forms.Button();
  288. this.buttonMoveTo = new System.Windows.Forms.Button();
  289. this.label6 = new System.Windows.Forms.Label();
  290. this.label5 = new System.Windows.Forms.Label();
  291. this.label3 = new System.Windows.Forms.Label();
  292. this.textBoxFileSize = new System.Windows.Forms.TextBox();
  293. this.label7 = new System.Windows.Forms.Label();
  294. this.textBoxFileName = new System.Windows.Forms.TextBox();
  295. this.label4 = new System.Windows.Forms.Label();
  296. this.textBoxFolder = new System.Windows.Forms.TextBox();
  297. this.groupBox2 = new System.Windows.Forms.GroupBox();
  298. this.textBoxLastAccessTime = new System.Windows.Forms.TextBox();
  299. this.groupBox3 = new System.Windows.Forms.GroupBox();
  300. this.label9 = new System.Windows.Forms.Label();
  301. this.textBox1 = new System.Windows.Forms.TextBox();
  302. this.label10 = new System.Windows.Forms.Label();
  303. this.label11 = new System.Windows.Forms.Label();
  304. this.textBox2 = new System.Windows.Forms.TextBox();
  305. this.label12 = new System.Windows.Forms.Label();
  306. this.textBox3 = new System.Windows.Forms.TextBox();
  307. this.label13 = new System.Windows.Forms.Label();
  308. this.textBox4 = new System.Windows.Forms.TextBox();
  309. this.groupBox4 = new System.Windows.Forms.GroupBox();
  310. this.button1 = new System.Windows.Forms.Button();
  311. this.textBox5 = new System.Windows.Forms.TextBox();
  312. this.groupBox1.SuspendLayout();
  313. this.groupBox5.SuspendLayout();
  314. this.groupBox2.SuspendLayout();
  315. this.groupBox3.SuspendLayout();
  316. this.SuspendLayout();
  317. // 
  318. // label8
  319. // 
  320. this.label8.Location = new System.Drawing.Point(256, 104);
  321. this.label8.Name = "label8";
  322. this.label8.Size = new System.Drawing.Size(100, 16);
  323. this.label8.TabIndex = 14;
  324. this.label8.Text = "Folders";
  325. // 
  326. // buttonDisplay
  327. // 
  328. this.buttonDisplay.Location = new System.Drawing.Point(432, 24);
  329. this.buttonDisplay.Name = "buttonDisplay";
  330. this.buttonDisplay.TabIndex = 26;
  331. this.buttonDisplay.Text = "Display";
  332. this.buttonDisplay.Click += new System.EventHandler(this.OnDisplayButtonClick);
  333. // 
  334. // buttonUp
  335. // 
  336. this.buttonUp.Location = new System.Drawing.Point(408, 72);
  337. this.buttonUp.Name = "buttonUp";
  338. this.buttonUp.Size = new System.Drawing.Size(72, 24);
  339. this.buttonUp.TabIndex = 24;
  340. this.buttonUp.Text = "Up";
  341. this.buttonUp.Click += new System.EventHandler(this.OnUpButtonClick);
  342. // 
  343. // textBoxLastWriteTime
  344. // 
  345. this.textBoxLastWriteTime.Enabled = false;
  346. this.textBoxLastWriteTime.Location = new System.Drawing.Point(16, 112);
  347. this.textBoxLastWriteTime.Name = "textBoxLastWriteTime";
  348. this.textBoxLastWriteTime.Size = new System.Drawing.Size(184, 20);
  349. this.textBoxLastWriteTime.TabIndex = 16;
  350. this.textBoxLastWriteTime.Text = "";
  351. // 
  352. // label2
  353. // 
  354. this.label2.Location = new System.Drawing.Point(16, 104);
  355. this.label2.Name = "label2";
  356. this.label2.Size = new System.Drawing.Size(136, 16);
  357. this.label2.TabIndex = 22;
  358. this.label2.Text = "Files";
  359. // 
  360. // textBoxInput
  361. // 
  362. this.textBoxInput.Location = new System.Drawing.Point(16, 24);
  363. this.textBoxInput.Name = "textBoxInput";
  364. this.textBoxInput.Size = new System.Drawing.Size(408, 20);
  365. this.textBoxInput.TabIndex = 19;
  366. this.textBoxInput.Text = "";
  367. // 
  368. // label1
  369. // 
  370. this.label1.Location = new System.Drawing.Point(16, 8);
  371. this.label1.Name = "label1";
  372. this.label1.Size = new System.Drawing.Size(280, 16);
  373. this.label1.TabIndex = 20;
  374. this.label1.Text = "Enter name of folder to be examined and click Display";
  375. // 
  376. // textBoxCreationTime
  377. // 
  378. this.textBoxCreationTime.Enabled = false;
  379. this.textBoxCreationTime.Location = new System.Drawing.Point(232, 72);
  380. this.textBoxCreationTime.Name = "textBoxCreationTime";
  381. this.textBoxCreationTime.Size = new System.Drawing.Size(184, 20);
  382. this.textBoxCreationTime.TabIndex = 15;
  383. this.textBoxCreationTime.Text = "";
  384. // 
  385. // listBoxFiles
  386. // 
  387. this.listBoxFiles.Location = new System.Drawing.Point(16, 120);
  388. this.listBoxFiles.Name = "listBoxFiles";
  389. this.listBoxFiles.Size = new System.Drawing.Size(240, 134);
  390. this.listBoxFiles.TabIndex = 13;
  391. this.listBoxFiles.SelectedIndexChanged += new System.EventHandler(this.OnListBoxFilesSelected);
  392. // 
  393. // listBoxFolders
  394. // 
  395. this.listBoxFolders.Location = new System.Drawing.Point(264, 120);
  396. this.listBoxFolders.Name = "listBoxFolders";
  397. this.listBoxFolders.Size = new System.Drawing.Size(240, 134);
  398. this.listBoxFolders.TabIndex = 17;
  399. this.listBoxFolders.SelectedIndexChanged += new System.EventHandler(this.OnListBoxFoldersSelected);
  400. // 
  401. // groupBox1
  402. // 
  403. this.groupBox1.Controls.AddRange(new System.Windows.Forms.Control[] {
  404. this.groupBox5,
  405. this.label6,
  406. this.label5,
  407. this.label3,
  408. this.textBoxFileSize,
  409. this.label7,
  410. this.textBoxFileName,
  411. this.label4,
  412. this.textBoxFolder,
  413. this.groupBox2});
  414. this.groupBox1.Location = new System.Drawing.Point(8, 48);
  415. this.groupBox1.Name = "groupBox1";
  416. this.groupBox1.Size = new System.Drawing.Size(496, 464);
  417. this.groupBox1.TabIndex = 27;
  418. this.groupBox1.TabStop = false;
  419. this.groupBox1.Text = "Contents of folder";
  420. // 
  421. // groupBox5
  422. // 
  423. this.groupBox5.Controls.AddRange(new System.Windows.Forms.Control[] {
  424. this.label14,
  425. this.textBoxNewPath,
  426. this.buttonDelete,
  427. this.buttonCopyTo,
  428. this.buttonMoveTo});
  429. this.groupBox5.Location = new System.Drawing.Point(8, 368);
  430. this.groupBox5.Name = "groupBox5";
  431. this.groupBox5.Size = new System.Drawing.Size(480, 88);
  432. this.groupBox5.TabIndex = 13;
  433. this.groupBox5.TabStop = false;
  434. this.groupBox5.Text = "Move, Delete or Copy File";
  435. // 
  436. // label14
  437. // 
  438. this.label14.Location = new System.Drawing.Point(8, 56);
  439. this.label14.Name = "label14";
  440. this.label14.Size = new System.Drawing.Size(80, 16);
  441. this.label14.TabIndex = 4;
  442. this.label14.Text = "New Location";
  443. // 
  444. // textBoxNewPath
  445. // 
  446. this.textBoxNewPath.Location = new System.Drawing.Point(88, 56);
  447. this.textBoxNewPath.Name = "textBoxNewPath";
  448. this.textBoxNewPath.Size = new System.Drawing.Size(384, 20);
  449. this.textBoxNewPath.TabIndex = 5;
  450. this.textBoxNewPath.Text = "";
  451. // 
  452. // buttonDelete
  453. // 
  454. this.buttonDelete.Location = new System.Drawing.Point(168, 16);
  455. this.buttonDelete.Name = "buttonDelete";
  456. this.buttonDelete.TabIndex = 2;
  457. this.buttonDelete.Text = "Delete";
  458. this.buttonDelete.Click += new System.EventHandler(this.OnDeleteButtonClick);
  459. // 
  460. // buttonCopyTo
  461. // 
  462. this.buttonCopyTo.Location = new System.Drawing.Point(88, 16);
  463. this.buttonCopyTo.Name = "buttonCopyTo";
  464. this.buttonCopyTo.TabIndex = 1;
  465. this.buttonCopyTo.Text = "Copy To";
  466. this.buttonCopyTo.Click += new System.EventHandler(this.OnCopyButtonClick);
  467. // 
  468. // buttonMoveTo
  469. // 
  470. this.buttonMoveTo.Location = new System.Drawing.Point(8, 16);
  471. this.buttonMoveTo.Name = "buttonMoveTo";
  472. this.buttonMoveTo.TabIndex = 0;
  473. this.buttonMoveTo.Text = "Move To";
  474. this.buttonMoveTo.Click += new System.EventHandler(this.OnMoveButtonClick);
  475. // 
  476. // label6
  477. // 
  478. this.label6.Location = new System.Drawing.Point(24, 312);
  479. this.label6.Name = "label6";
  480. this.label6.Size = new System.Drawing.Size(120, 16);
  481. this.label6.TabIndex = 8;
  482. this.label6.Text = "Last modification time";
  483. // 
  484. // label5
  485. // 
  486. this.label5.Location = new System.Drawing.Point(240, 312);
  487. this.label5.Name = "label5";
  488. this.label5.Size = new System.Drawing.Size(100, 16);
  489. this.label5.TabIndex = 7;
  490. this.label5.Text = "Last access time";
  491. // 
  492. // label3
  493. // 
  494. this.label3.Location = new System.Drawing.Point(240, 264);
  495. this.label3.Name = "label3";
  496. this.label3.Size = new System.Drawing.Size(100, 16);
  497. this.label3.TabIndex = 5;
  498. this.label3.Text = "Creation time";
  499. // 
  500. // textBoxFileSize
  501. // 
  502. this.textBoxFileSize.Enabled = false;
  503. this.textBoxFileSize.Location = new System.Drawing.Point(24, 288);
  504. this.textBoxFileSize.Name = "textBoxFileSize";
  505. this.textBoxFileSize.Size = new System.Drawing.Size(184, 20);
  506. this.textBoxFileSize.TabIndex = 1;
  507. this.textBoxFileSize.Text = "";
  508. // 
  509. // label7
  510. // 
  511. this.label7.Location = new System.Drawing.Point(24, 264);
  512. this.label7.Name = "label7";
  513. this.label7.Size = new System.Drawing.Size(100, 16);
  514. this.label7.TabIndex = 10;
  515. this.label7.Text = "File Size";
  516. // 
  517. // textBoxFileName
  518. // 
  519. this.textBoxFileName.Enabled = false;
  520. this.textBoxFileName.Location = new System.Drawing.Point(80, 240);
  521. this.textBoxFileName.Name = "textBoxFileName";
  522. this.textBoxFileName.Size = new System.Drawing.Size(400, 20);
  523. this.textBoxFileName.TabIndex = 1;
  524. this.textBoxFileName.Text = "";
  525. // 
  526. // label4
  527. // 
  528. this.label4.Location = new System.Drawing.Point(16, 240);
  529. this.label4.Name = "label4";
  530. this.label4.Size = new System.Drawing.Size(64, 16);
  531. this.label4.TabIndex = 6;
  532. this.label4.Text = "File name";
  533. // 
  534. // textBoxFolder
  535. // 
  536. this.textBoxFolder.Enabled = false;
  537. this.textBoxFolder.Location = new System.Drawing.Point(8, 24);
  538. this.textBoxFolder.Name = "textBoxFolder";
  539. this.textBoxFolder.Size = new System.Drawing.Size(384, 20);
  540. this.textBoxFolder.TabIndex = 2;
  541. this.textBoxFolder.Text = "";
  542. // 
  543. // groupBox2
  544. // 
  545. this.groupBox2.Controls.AddRange(new System.Windows.Forms.Control[] {
  546. this.textBoxLastAccessTime,
  547. this.textBoxCreationTime,
  548. this.textBoxLastWriteTime});
  549. this.groupBox2.Location = new System.Drawing.Point(8, 216);
  550. this.groupBox2.Name = "groupBox2";
  551. this.groupBox2.Size = new System.Drawing.Size(480, 144);
  552. this.groupBox2.TabIndex = 11;
  553. this.groupBox2.TabStop = false;
  554. this.groupBox2.Text = "Details of Selected File";
  555. // 
  556. // textBoxLastAccessTime
  557. // 
  558. this.textBoxLastAccessTime.Enabled = false;
  559. this.textBoxLastAccessTime.Location = new System.Drawing.Point(232, 112);
  560. this.textBoxLastAccessTime.Name = "textBoxLastAccessTime";
  561. this.textBoxLastAccessTime.Size = new System.Drawing.Size(184, 20);
  562. this.textBoxLastAccessTime.TabIndex = 1;
  563. this.textBoxLastAccessTime.Text = "";
  564. // 
  565. // groupBox3
  566. // 
  567. this.groupBox3.Controls.AddRange(new System.Windows.Forms.Control[] {
  568. this.label9,
  569. this.textBox1,
  570. this.label10,
  571. this.label11,
  572. this.textBox2,
  573. this.label12,
  574. this.textBox3,
  575. this.label13,
  576. this.textBox4,
  577. this.groupBox4});
  578. this.groupBox3.Location = new System.Drawing.Point(8, 48);
  579. this.groupBox3.Name = "groupBox3";
  580. this.groupBox3.Size = new System.Drawing.Size(496, 432);
  581. this.groupBox3.TabIndex = 28;
  582. this.groupBox3.TabStop = false;
  583. this.groupBox3.Text = "Contents of folder";
  584. // 
  585. // label9
  586. // 
  587. this.label9.Location = new System.Drawing.Point(24, 384);
  588. this.label9.Name = "label9";
  589. this.label9.Size = new System.Drawing.Size(120, 16);
  590. this.label9.TabIndex = 8;
  591. this.label9.Text = "Last modification time";
  592. // 
  593. // textBox1
  594. // 
  595. this.textBox1.Enabled = false;
  596. this.textBox1.Location = new System.Drawing.Point(240, 400);
  597. this.textBox1.Name = "textBox1";
  598. this.textBox1.Size = new System.Drawing.Size(184, 20);
  599. this.textBox1.TabIndex = 1;
  600. this.textBox1.Text = "";
  601. // 
  602. // label10
  603. // 
  604. this.label10.Location = new System.Drawing.Point(240, 376);
  605. this.label10.Name = "label10";
  606. this.label10.Size = new System.Drawing.Size(100, 16);
  607. this.label10.TabIndex = 7;
  608. this.label10.Text = "Last access time";
  609. // 
  610. // label11
  611. // 
  612. this.label11.Location = new System.Drawing.Point(240, 328);
  613. this.label11.Name = "label11";
  614. this.label11.Size = new System.Drawing.Size(100, 16);
  615. this.label11.TabIndex = 5;
  616. this.label11.Text = "Creation time";
  617. // 
  618. // textBox2
  619. // 
  620. this.textBox2.Enabled = false;
  621. this.textBox2.Location = new System.Drawing.Point(24, 352);
  622. this.textBox2.Name = "textBox2";
  623. this.textBox2.Size = new System.Drawing.Size(184, 20);
  624. this.textBox2.TabIndex = 1;
  625. this.textBox2.Text = "";
  626. // 
  627. // label12
  628. // 
  629. this.label12.Location = new System.Drawing.Point(24, 328);
  630. this.label12.Name = "label12";
  631. this.label12.Size = new System.Drawing.Size(100, 16);
  632. this.label12.TabIndex = 10;
  633. this.label12.Text = "File Size";
  634. // 
  635. // textBox3
  636. // 
  637. this.textBox3.Enabled = false;
  638. this.textBox3.Location = new System.Drawing.Point(80, 304);
  639. this.textBox3.Name = "textBox3";
  640. this.textBox3.Size = new System.Drawing.Size(400, 20);
  641. this.textBox3.TabIndex = 1;
  642. this.textBox3.Text = "";
  643. // 
  644. // label13
  645. // 
  646. this.label13.Location = new System.Drawing.Point(16, 304);
  647. this.label13.Name = "label13";
  648. this.label13.Size = new System.Drawing.Size(64, 16);
  649. this.label13.TabIndex = 6;
  650. this.label13.Text = "File name";
  651. // 
  652. // textBox4
  653. // 
  654. this.textBox4.Enabled = false;
  655. this.textBox4.Location = new System.Drawing.Point(8, 24);
  656. this.textBox4.Name = "textBox4";
  657. this.textBox4.Size = new System.Drawing.Size(384, 20);
  658. this.textBox4.TabIndex = 2;
  659. this.textBox4.Text = "";
  660. // 
  661. // groupBox4
  662. // 
  663. this.groupBox4.Location = new System.Drawing.Point(8, 280);
  664. this.groupBox4.Name = "groupBox4";
  665. this.groupBox4.Size = new System.Drawing.Size(480, 144);
  666. this.groupBox4.TabIndex = 11;
  667. this.groupBox4.TabStop = false;
  668. this.groupBox4.Text = "If file selected ...";
  669. // 
  670. // button1
  671. // 
  672. this.button1.Location = new System.Drawing.Point(400, 72);
  673. this.button1.Name = "button1";
  674. this.button1.Size = new System.Drawing.Size(72, 24);
  675. this.button1.TabIndex = 23;
  676. this.button1.Text = "Up";
  677. // 
  678. // textBox5
  679. // 
  680. this.textBox5.Location = new System.Drawing.Point(16, 24);
  681. this.textBox5.Name = "textBox5";
  682. this.textBox5.Size = new System.Drawing.Size(408, 20);
  683. this.textBox5.TabIndex = 18;
  684. this.textBox5.Text = "";
  685. // 
  686. // Form1
  687. // 
  688. this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
  689. this.ClientSize = new System.Drawing.Size(520, 520);
  690. this.Controls.AddRange(new System.Windows.Forms.Control[] {
  691.   this.label8,
  692.   this.buttonDisplay,
  693.   this.buttonUp,
  694.   this.label2,
  695.   this.textBoxInput,
  696.   this.label1,
  697.   this.listBoxFiles,
  698.   this.listBoxFolders,
  699.   this.groupBox1,
  700.   this.groupBox3,
  701.   this.button1,
  702.   this.textBox5});
  703. this.Name = "Form1";
  704. this.Text = "FilePropertiesAndMovement Sample";
  705. this.groupBox1.ResumeLayout(false);
  706. this.groupBox5.ResumeLayout(false);
  707. this.groupBox2.ResumeLayout(false);
  708. this.groupBox3.ResumeLayout(false);
  709. this.ResumeLayout(false);
  710. }
  711. #endregion
  712. /// <summary>
  713. /// The main entry point for the application.
  714. /// </summary>
  715. [STAThread]
  716. static void Main() 
  717. {
  718. Application.Run(new Form1());
  719. }
  720. }
  721. }