Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

38 rindas
1.1 KiB

  1. using Helper;
  2. using HKCardOUT.ViewModels;
  3. using System;
  4. using System.IO;
  5. using System.Linq;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Forms;
  9. using System.Windows.Media;
  10. namespace HKCardOUT.Views
  11. {
  12. public partial class RootView : HandyControl.Controls.Window
  13. {
  14. public RootView()
  15. {
  16. InitializeComponent();
  17. if (!StartEXE.IsExistKey("HKCardOUT"))
  18. {
  19. var Paths = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "HKCardOUT.exe");
  20. StartEXE.SelfRunning(true, "HKCardOUT", Paths);
  21. }
  22. //else if (StartEXE.IsExistKey("HKCardOUT"))
  23. //{
  24. // var Paths = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "HKCardOUT.exe");
  25. // StartEXE.SelfRunning(false, "HKCardOUT", Paths);
  26. //}
  27. this.Loaded += RootView_Loaded;
  28. }
  29. private void RootView_Loaded(object sender, RoutedEventArgs e)
  30. {
  31. (this.DataContext as RootViewModel).Main = this;
  32. HKControl.Main.GetInstance.Init();
  33. }
  34. }
  35. }