星火微课系统客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

CreateAMicroLessonWindow.xaml.cs 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. 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.Forms;
  11. using System.Windows.Input;
  12. using System.Windows.Media;
  13. using System.Windows.Media.Imaging;
  14. using System.Windows.Navigation;
  15. using System.Windows.Shapes;
  16. namespace XHWK.WKTool
  17. {
  18. /// <summary>
  19. /// MainWindow.xaml 的交互逻辑
  20. /// </summary>
  21. public partial class CreateAMicroLessonWindow : Window
  22. {
  23. #region 字段
  24. private FolderBrowserDialog ofd;
  25. private DialogResult result;
  26. #endregion
  27. public CreateAMicroLessonWindow()
  28. {
  29. InitializeComponent();
  30. }
  31. #region 事件
  32. /// <summary>
  33. /// 关闭
  34. /// </summary>
  35. /// <param name="sender"></param>
  36. /// <param name="e"></param>
  37. private void btnDown_Click(object sender, RoutedEventArgs e)
  38. {
  39. }
  40. /// <summary>
  41. /// 浏览
  42. /// </summary>
  43. /// <param name="sender"></param>
  44. /// <param name="e"></param>
  45. private void btnBrowse_Click(object sender, RoutedEventArgs e)
  46. {
  47. string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
  48. ofd = new System.Windows.Forms.FolderBrowserDialog();
  49. result = ofd.ShowDialog();
  50. if (result == System.Windows.Forms.DialogResult.OK)
  51. {
  52. if (ofd.SelectedPath != "")
  53. {
  54. txbStoragePath.Text = ofd.SelectedPath;
  55. //string ApplicationData = ZConfig.dataPath + "fileStorageAddress.txt";
  56. //string temp = ofd.SelectedPath;
  57. //System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
  58. }
  59. }
  60. }
  61. /// <summary>
  62. /// 开始
  63. /// </summary>
  64. /// <param name="sender"></param>
  65. /// <param name="e"></param>
  66. private void btnStart_Click(object sender, RoutedEventArgs e)
  67. {
  68. XHMicroLessonSystemWindow win = new XHMicroLessonSystemWindow();
  69. //win.Topmost = true;
  70. win.Show();
  71. }
  72. /// <summary>
  73. /// 窗体移动
  74. /// </summary>
  75. /// <param name="sender"></param>
  76. /// <param name="e"></param>
  77. private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
  78. {
  79. DragMove();
  80. }
  81. #endregion
  82. }
  83. }