|
@@ -37,7 +37,6 @@ namespace HKCardOUT.ViewModels |
|
|
this.Closed += RootViewModel_Closed; |
|
|
this.Closed += RootViewModel_Closed; |
|
|
ProcessCard(); |
|
|
ProcessCard(); |
|
|
InsertData(); |
|
|
InsertData(); |
|
|
LtensenScreen(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary> |
|
|
/// <summary> |
|
@@ -165,7 +164,7 @@ namespace HKCardOUT.ViewModels |
|
|
} |
|
|
} |
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
#region 网络检查 |
|
|
|
|
|
|
|
|
#region 屏幕检查 |
|
|
private void AdOpen() |
|
|
private void AdOpen() |
|
|
{ |
|
|
{ |
|
|
App.Current.Dispatcher.Invoke(new Action(() => |
|
|
App.Current.Dispatcher.Invoke(new Action(() => |
|
@@ -173,6 +172,11 @@ namespace HKCardOUT.ViewModels |
|
|
try |
|
|
try |
|
|
{ |
|
|
{ |
|
|
var SC = System.Windows.Forms.Screen.AllScreens.Count(); |
|
|
var SC = System.Windows.Forms.Screen.AllScreens.Count(); |
|
|
|
|
|
while (SC<3) |
|
|
|
|
|
{ |
|
|
|
|
|
SC = System.Windows.Forms.Screen.AllScreens.Count(); |
|
|
|
|
|
Thread.Sleep(1000); |
|
|
|
|
|
} |
|
|
for (int i = 0; i < SC; i++) |
|
|
for (int i = 0; i < SC; i++) |
|
|
{ |
|
|
{ |
|
|
var win = new AdWindow(Ad[i].Ad, i); |
|
|
var win = new AdWindow(Ad[i].Ad, i); |
|
@@ -290,25 +294,5 @@ namespace HKCardOUT.ViewModels |
|
|
private static ConcurrentQueue<SaleLogDto> Stacks = new ConcurrentQueue<SaleLogDto>(); |
|
|
private static ConcurrentQueue<SaleLogDto> Stacks = new ConcurrentQueue<SaleLogDto>(); |
|
|
#endregion |
|
|
#endregion |
|
|
|
|
|
|
|
|
#region 屏幕监听 |
|
|
|
|
|
private void LtensenScreen() |
|
|
|
|
|
{ |
|
|
|
|
|
ThreadManage.GetInstance().StartLong(() => |
|
|
|
|
|
{ |
|
|
|
|
|
var scCount = System.Windows.Forms.Screen.AllScreens.Count(); |
|
|
|
|
|
if (scCount >= 3) |
|
|
|
|
|
{ |
|
|
|
|
|
var pc = Process.GetProcesses().Where(t => t.ProcessName.Equals("HKLinsten")).FirstOrDefault(); |
|
|
|
|
|
if (pc == null) |
|
|
|
|
|
{ |
|
|
|
|
|
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "HKLinsten.exe"); |
|
|
|
|
|
Process.Start(path); |
|
|
|
|
|
App.Current.Dispatcher.Invoke(() => App.Current.Shutdown(0)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
Thread.Sleep(10000); |
|
|
|
|
|
}, "屏幕监听", true); |
|
|
|
|
|
} |
|
|
|
|
|
#endregion |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |