diff --git a/SoM_PrnControl.csproj b/SoM_PrnControl.csproj
index ad54d4e..15dd0c6 100644
--- a/SoM_PrnControl.csproj
+++ b/SoM_PrnControl.csproj
@@ -6,7 +6,7 @@
True
net461
True
- AnyCPU;x86
+ AnyCPU;x86;x64
12.0
diff --git a/SoM_PrnControl.sln b/SoM_PrnControl.sln
index 96a4da6..3e1a935 100644
--- a/SoM_PrnControl.sln
+++ b/SoM_PrnControl.sln
@@ -1,24 +1,30 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
-VisualStudioVersion = 17.14.36401.2 d17.14
+VisualStudioVersion = 17.14.36401.2
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SoM_PrnControl", "SoM_PrnControl.csproj", "{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Debug|x64.ActiveCfg = Debug|x64
+ {4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Debug|x64.Build.0 = Debug|x64
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Debug|x86.ActiveCfg = Debug|x86
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Debug|x86.Build.0 = Debug|x86
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Release|x64.ActiveCfg = Release|x64
+ {4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Release|x64.Build.0 = Release|x64
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Release|x86.ActiveCfg = Release|x86
{4CF6E170-C8BE-2FA3-5F92-585EDECDC4F9}.Release|x86.Build.0 = Release|x86
EndGlobalSection
diff --git a/qk30ic/Form1.cs b/qk30ic/Form1.cs
index cf739d6..8ed0396 100644
--- a/qk30ic/Form1.cs
+++ b/qk30ic/Form1.cs
@@ -1,16 +1,26 @@
#define TRACE
#define DEBUG
+using Citizen.LayoutUtilities.Printing;
+using com.citizen.sdk.LabelPrint;
+using MySql.Data.MySqlClient;
+using PCSC;
+using PCSC.Exceptions;
+using PCSC.Iso7816;
+using SoM_PrnControl;
+using SoM_PrnControl.YoyakuServiceReference;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
+using System.Drawing.Printing;
using System.Dynamic;
using System.Globalization;
using System.IO;
using System.IO.Ports;
using System.Linq;
+using System.Management;
using System.Net;
using System.Net.NetworkInformation;
using System.Reflection;
@@ -21,14 +31,6 @@ using System.Text.RegularExpressions;
using System.Threading;
using System.Windows.Forms;
using System.Xml;
-using Citizen.LayoutUtilities.Printing;
-using com.citizen.sdk.LabelPrint;
-using MySql.Data.MySqlClient;
-using PCSC;
-using PCSC.Exceptions;
-using PCSC.Iso7816;
-using SoM_PrnControl;
-using SoM_PrnControl.YoyakuServiceReference;
namespace qk30ic;
@@ -2904,10 +2906,8 @@ public class Form1 : Form
form2.BackgroundImage = backgroundImage5;
RemoveHomeButton();
Application.DoEvents();
- // 立刻结束程序
- Environment.Exit(0);
num = SO_PrnOut();
- //num = SO_PrnOut_EpsonNetwork();
+ SO_PrnInit_Epson();
Debug.WriteLine(" --処理印刷\u3000 result " + num);
if (num != 0)
{
@@ -3015,9 +3015,10 @@ public class Form1 : Form
Application.Exit();
}
- private void SO_FullScreen(int msgn, int mode)
+ /*private void SO_FullScreen(int msgn, int mode)
{
- try
+
+ try
{
if (!string.IsNullOrWhiteSpace(str_Confile[msgn]) && str_Confile[msgn].Length > 2)
{
@@ -3052,9 +3053,50 @@ public class Form1 : Form
Application.Exit();
Console.WriteLine("Exit");
}
+ }*/
+ private void SO_FullScreen(int msgn, int mode)
+ {
+
+ try
+ {
+ if (!string.IsNullOrWhiteSpace(str_Confile[msgn]) && str_Confile[msgn].Length > 2)
+ {
+ int num = str_Confile[msgn].Length;
+ string text = str_Confile[msgn];
+ if (num > 6)
+ {
+ num = 6;
+ text = str_Confile[9].Substring(0, 6);
+ }
+ int num2 = 300 - (num - 3) * 40;
+ int num3 = 110 + (num - 3) * 110;
+ if (mode == 0)
+ {
+ form2.Show();
+ }
+ form2.label1.Text = text;
+ Bitmap backgroundImage = new Bitmap(AppDomain.CurrentDomain.BaseDirectory + "\\pic1.png");
+ form2.BackgroundImage = backgroundImage;
+ Debug.WriteLine("ラベル表示名: " + text);
+ form2.Text = "駐ID: " + str_Confile[6] + " LOG:" + str_Confile[8] + " DBG:" + str_Confile[5];
+ form2.label1.TextAlign = ContentAlignment.MiddleCenter;
+ form2.TopMost = true;
+ form2.WindowState = FormWindowState.Maximized;
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("★★_ERROR_イメージリソースエラー:" + ex.Message + " --> " + ex);
+ MessageBox.Show("起動に必要なイメージリソースが見つかりません。正しくセットアップしてください。", "リソースエラー", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ Close();
+ Application.Exit();
+ Console.WriteLine("Exit");
+ }
}
- public string GetGIP(string url)
+
+
+ public string GetGIP(string url)
{
string input = "";
try
@@ -3470,7 +3512,9 @@ public class Form1 : Form
private uint SO_WriteLog(int type)
{
- uint result = 0u;
+
+
+ uint result = 0u;
string text = "";
string text2 = Convert.ToString(DateTime.Now);
string text3 = DateTime.Now.ToString("yyyyMMdd");
@@ -3503,10 +3547,13 @@ public class Form1 : Form
int num = 0;
int num2 = -1;
int num3 = -1;
- if (MFresult == 10 && MFCODE != "")
+ Debug.WriteLine("★MFresult:" + MFresult);
+ Debug.WriteLine("★MFCODE:" + MFCODE);
+ if (MFresult == 10 && MFCODE != "")
{
num3 = CheckNewContract(MFCODE);
- switch (num3)
+ Debug.WriteLine("★num3:" +num3);
+ switch (num3)
{
case 0:
Console.WriteLine("SOMPR-110に進む");
@@ -4996,44 +5043,43 @@ public class Form1 : Form
private bool SO_PrnInit()
- {
- if (DEBUG_MODE == "1")
- {
- return true;
- }
- try
- {
- int num = 0;
- short num2 = 0;
- for (num2 = 1; num2 <= 9; num2++)
- {
- printerPortName = "USB00" + Convert.ToString(num2);
- Debug.WriteLine(printerPortName + "が接続されているか確認しています。");
- printer.Disconnect();
- num = printer.Connect(3, printerPortName);
- Debug.WriteLine("返り値:" + Convert.ToString(num));
- if (num == 0)
- {
- break;
- }
- }
- if (num != 0)
- {
- return SO_PrnGetStatus();
- }
- Debug.WriteLine("コネクト確認までクリア");
- return SO_PrnGetStatus();
- }
- catch (Exception ex)
- {
- Debug.WriteLine("★★_ERROR_25");
- MessageBox.Show("プリンタの初期化に失敗しました。PCを起動後にプリンタの電源を入れてください。", "プリンタ初期化エラー", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- Trace.WriteLine(ex.Message);
- return false;
- }
- }
-
-
+ {
+ if (DEBUG_MODE == "1")
+ {
+ return true;
+ }
+ try
+ {
+ int num = 0;
+ short num2 = 0;
+ for (num2 = 1; num2 <= 9; num2++)
+ {
+ printerPortName = "USB00" + Convert.ToString(num2);
+ Debug.WriteLine(printerPortName + "が接続されているか確認しています。");
+ printer.Disconnect();
+ num = printer.Connect(3, printerPortName);
+ Debug.WriteLine("返り値:" + Convert.ToString(num));
+ if (num == 0)
+ {
+ break;
+ }
+ }
+ if (num != 0)
+ {
+ return SO_PrnGetStatus();
+ }
+ Debug.WriteLine("コネクト確認までクリア");
+ return SO_PrnGetStatus();
+ }
+ catch (Exception ex)
+ {
+ Debug.WriteLine("★★_ERROR_25");
+ MessageBox.Show("プリンタの初期化に失敗しました。PCを起動後にプリンタの電源を入れてください。", "プリンタ初期化エラー", MessageBoxButtons.OK, MessageBoxIcon.Hand);
+ Trace.WriteLine(ex.Message);
+ return false;
+ }
+ }
+
@@ -5131,7 +5177,7 @@ public class Form1 : Form
return true;
}
ERRORINFO = "PrinterCheck Error\u3000戻り値=" + num + " プリンタステータス =(PrinterCheck Error)";
- return false;
+ return false;
}
private uint SO_PrnLabeEdit(uint type)
diff --git a/qk30ic/Form1.resx b/qk30ic/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/qk30ic/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file