|
@@ -12,7 +12,7 @@ using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Runtime.InteropServices;
|
|
|
using System.Text;
|
|
|
-
|
|
|
+using SenseShield;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
|
using static MeasureThread.ThreadStatusEventArgs;
|
|
@@ -284,57 +284,66 @@ namespace HOZProject
|
|
|
#region 窗体加载
|
|
|
private void FormHOZMain_Load(object sender, EventArgs e)
|
|
|
{
|
|
|
- //加载控件的点击事件
|
|
|
- this.Click += new EventHandler(FormHOZMain_Click);
|
|
|
- plFill.Click += new EventHandler(FormHOZMain_Click);
|
|
|
- plTop.Click += new EventHandler(FormHOZMain_Click);
|
|
|
- plLeft.Click += new EventHandler(FormHOZMain_Click);
|
|
|
- plLeftContent.Click += new EventHandler(FormHOZMain_Click);
|
|
|
- pbImage.Click += new EventHandler(FormHOZMain_Click);
|
|
|
-
|
|
|
- //加载窗口移动事件
|
|
|
- this.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
- this.plTop.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
- //新建
|
|
|
- NewCreate();
|
|
|
- //实例初始化窗体对象
|
|
|
- if (uControl_Init == null)
|
|
|
- {
|
|
|
- uControl_Init = new UControl_Init(this);
|
|
|
- uControl_Init.ReloadConfig();
|
|
|
- }
|
|
|
- logwin = new OTSMeasureOutputNlog();
|
|
|
- logwin.Show();
|
|
|
- logwin.Height = this.Height;
|
|
|
- logwin.Left = this.Left - logwin.Width;
|
|
|
- logwin.Top = this.Top;
|
|
|
-
|
|
|
- NLog.Config.LoggingRule lr = NLog.LogManager.Configuration.LoggingRules.FirstOrDefault(
|
|
|
- r => r.Targets.Any(
|
|
|
- t => "control" == t.Name
|
|
|
- )
|
|
|
- );
|
|
|
- if (lr != null)
|
|
|
+ try
|
|
|
{
|
|
|
-
|
|
|
+ // DogDecrypting.decrypting(100);//参数为许可号
|
|
|
+ //加载控件的点击事件
|
|
|
+ this.Click += new EventHandler(FormHOZMain_Click);
|
|
|
+ plFill.Click += new EventHandler(FormHOZMain_Click);
|
|
|
+ plTop.Click += new EventHandler(FormHOZMain_Click);
|
|
|
+ plLeft.Click += new EventHandler(FormHOZMain_Click);
|
|
|
+ plLeftContent.Click += new EventHandler(FormHOZMain_Click);
|
|
|
+ pbImage.Click += new EventHandler(FormHOZMain_Click);
|
|
|
+
|
|
|
+ //加载窗口移动事件
|
|
|
+ this.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
+ this.plTop.MouseDown += new MouseEventHandler(FormHOZMain_MouseDown);
|
|
|
+ //新建
|
|
|
+ NewCreate();
|
|
|
+ //实例初始化窗体对象
|
|
|
+ if (uControl_Init == null)
|
|
|
+ {
|
|
|
+ uControl_Init = new UControl_Init(this);
|
|
|
+ uControl_Init.ReloadConfig();
|
|
|
+ }
|
|
|
+ logwin = new OTSMeasureOutputNlog();
|
|
|
+ logwin.Show();
|
|
|
+ logwin.Height = this.Height;
|
|
|
+ logwin.Left = this.Left - logwin.Width;
|
|
|
+ logwin.Top = this.Top;
|
|
|
+
|
|
|
+ NLog.Config.LoggingRule lr = NLog.LogManager.Configuration.LoggingRules.FirstOrDefault(
|
|
|
+ r => r.Targets.Any(
|
|
|
+ t => "control" == t.Name
|
|
|
+ )
|
|
|
+ );
|
|
|
+ if (lr != null)
|
|
|
+ {
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
- log = NLog.LogManager.GetCurrentClassLogger();
|
|
|
- ConfigurationParameter();
|
|
|
- this.Left= this.Location.X + logwin.Width / 2;
|
|
|
+
|
|
|
+ log = NLog.LogManager.GetCurrentClassLogger();
|
|
|
+ ConfigurationParameter();
|
|
|
+ this.Left = this.Location.X + logwin.Width / 2;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ MessageBox.Show(ex.Message, "错误:", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
+ this.Close();
|
|
|
+ }
|
|
|
}
|
|
|
- #endregion
|
|
|
+ #endregion
|
|
|
|
|
|
- #region 创建切孔列表信息
|
|
|
- /// <summary>
|
|
|
- /// 创建切孔列表信息
|
|
|
- /// </summary>
|
|
|
- /// <param name="ListCutHole"></param>
|
|
|
- public void CreateCutHoleList(List<CutHole> ListCutHole)
|
|
|
+ #region 创建切孔列表信息
|
|
|
+ /// <summary>
|
|
|
+ /// 创建切孔列表信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="ListCutHole"></param>
|
|
|
+ public void CreateCutHoleList(List<CutHole> ListCutHole)
|
|
|
{
|
|
|
//清空左侧Panel中的切孔控件
|
|
|
ClearPanelControls();
|