Przeglądaj źródła

冲突解决

Lishi
pry 2 lat temu
rodzic
commit
dd997ae318
3 zmienionych plików z 10 dodań i 26 usunięć
  1. +2
    -2
      HKCardOUT/HKCardOUT.csproj
  2. +6
    -22
      HKCardOUT/ViewModels/RootViewModel.cs
  3. +2
    -2
      HKCardOUT/Views/AdWindow.xaml.cs

+ 2
- 2
HKCardOUT/HKCardOUT.csproj Wyświetl plik

@@ -14,9 +14,9 @@
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<PropertyGroup>
<!--<PropertyGroup>
<ApplicationManifest>App.manifest</ApplicationManifest>
</PropertyGroup>
</PropertyGroup>-->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;Core</DefineConstants>
</PropertyGroup>


+ 6
- 22
HKCardOUT/ViewModels/RootViewModel.cs Wyświetl plik

@@ -37,7 +37,6 @@ namespace HKCardOUT.ViewModels
this.Closed += RootViewModel_Closed;
ProcessCard();
InsertData();
LtensenScreen();
}

/// <summary>
@@ -165,7 +164,7 @@ namespace HKCardOUT.ViewModels
}
#endregion

#region 网络检查
#region 屏幕检查
private void AdOpen()
{
App.Current.Dispatcher.Invoke(new Action(() =>
@@ -173,6 +172,11 @@ namespace HKCardOUT.ViewModels
try
{
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++)
{
var win = new AdWindow(Ad[i].Ad, i);
@@ -290,25 +294,5 @@ namespace HKCardOUT.ViewModels
private static ConcurrentQueue<SaleLogDto> Stacks = new ConcurrentQueue<SaleLogDto>();
#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
}
}

+ 2
- 2
HKCardOUT/Views/AdWindow.xaml.cs Wyświetl plik

@@ -41,8 +41,8 @@ namespace HKCardOUT.Views
if (BindScreen != -1)
{
int[] NotchNum = new int[2];
if (bindScreen == 1) { NotchNum[0] = 1; NotchNum[1] = 2; }
if (bindScreen == 0) { NotchNum[0] = 5; NotchNum[1] = 6; }
if (bindScreen == 0) { NotchNum[0] = 1; NotchNum[1] = 2; }
if (bindScreen == 1) { NotchNum[0] = 5; NotchNum[1] = 6; }
if (bindScreen == 2) { NotchNum[0] = 3; NotchNum[1] = 4; }
(this.DataContext as AdWindowViewModel).InitData(NotchNum);



Ładowanie…
Anuluj
Zapisz