OtherControl.xaml.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using GeekDesk.Constant;
  2. using GeekDesk.Util;
  3. using GeekDesk.ViewModel;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows;
  10. using System.Windows.Controls;
  11. using System.Windows.Data;
  12. using System.Windows.Documents;
  13. using System.Windows.Input;
  14. using System.Windows.Media;
  15. using System.Windows.Media.Imaging;
  16. using System.Windows.Navigation;
  17. using System.Windows.Shapes;
  18. namespace GeekDesk.Control.UserControls.Config
  19. {
  20. /// <summary>
  21. /// OtherControl.xaml 的交互逻辑
  22. /// </summary>
  23. public partial class OtherControl : UserControl
  24. {
  25. public OtherControl()
  26. {
  27. InitializeComponent();
  28. }
  29. private void SelfStartUpBox_Click(object sender, RoutedEventArgs e)
  30. {
  31. AppConfig appConfig = MainWindow.appData.AppConfig;
  32. RegisterUtil.SetSelfStarting(appConfig.SelfStartUp, Constants.MY_NAME);
  33. }
  34. /// <summary>
  35. /// 移动窗口
  36. /// </summary>
  37. /// <param name="sender"></param>
  38. /// <param name="e"></param>
  39. private void DragMove(object sender, System.Windows.Input.MouseButtonEventArgs e)
  40. {
  41. if (e.LeftButton == MouseButtonState.Pressed)
  42. {
  43. Window.GetWindow(this).DragMove();
  44. }
  45. }
  46. }
  47. }