Commit ac41f2a3 刘韬

1

1 个父辈 851aba11
using System;
using ConfigHelper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -10,48 +11,47 @@ namespace OnlineStore.Common
/// 记录配置的key
/// </summary>
public class Setting_Init
{ /// <summary>
/// 系统启动时自动启动料仓,=1时自动启动,并隐藏窗口,=0时不需要
/// </summary>
public static string App_AutoRun = "App_AutoRun";
/// <summary>
/// 系统主界面标题
/// </summary>
public static string App_Title = "App_Title";
/// <summary>
/// 摄像机名称
/// </summary>
public static string CameraName = "CameraName";
public static string Config_Pwd = "Config_Pwd";
public static string UseBuzzer = "UseBuzzer";
/// <summary>
/// 检测到料串自动入料
/// </summary>
public static string AutoInput = "AutoInput";
/// <summary>
/// 进出轴待机点位,进出轴在此位置时,升降和旋转才可以走
/// </summary>
public static string InoutDefaultPosition = "InoutDefaultPosition";
public static string LabelName = "LabelName";
public static string PrinterName = "PrinterName";
public static string NeedPrintLabel = "NeedPrintLabel";
public static string StickingPosJudgment = "StickingPosJudgment";
public static string GratingSignal = " GratingSignal";
/// <summary>
/// 启用贴标功能
/// </summary>
public static string UseLabel = "UseLabel";
public static string CodeType = "CodeType";
public static string CodeParamPath = "CodeParamPath";
public static string QRCodeCount = "QRCodeCount";
{
[MyConfigComment("软件是否自动启动")]
public static MyConfig<bool> App_AutoRun = false;
[MyConfigComment("软件窗口标题")]
public static MyConfig<string> App_Title = "SMD-BOX-XLC";
[MyConfigComment("软件语言")]
public static MyConfig<string> App_Language = "zh-CN";
[MyConfigComment("服务器识别ID")]
public static MyConfig<string> Server_CID = "";
[MyConfigComment("服务器地址")]
public static MyConfig<string> Server_Addr = "";
[MyConfigComment("是否启用蜂鸣器")]
public static MyConfig<bool> Device_EnableBuzzer = true;
[MyConfigComment("料仓类型")]
public static MyConfig<StoreType> Device_StoreType = StoreType.TypeA;
[MyConfigComment("左侧接驳台出入模式")]
public static MyConfig<InOutModeE> Device_LeftInoutMode = InOutModeE.Both;
[MyConfigComment("右侧接驳台出入模式")]
public static MyConfig<InOutModeE> Device_RightInoutMode = InOutModeE.Both;
[MyConfigComment("扫码识别类型")]
public static MyConfig<string[]> CodeScan_CodeType = new string[] { "QR Code" };
[MyConfigComment("扫码读码数量")]
public static MyConfig<int> CodeScan_CodeCount = 3;
[MyConfigComment("扫码读码匹配参数")]
public static MyConfig<string> CodeScan_ParamPath = "Conifg\\";
}
public enum StoreType
{
TypeA, TypeB
}
public enum InOutSideE { Left, Right }
public enum InOutDirectionE { NONE, IN, OUT }
public enum InOutModeE { Both,OnlyIN, OnlyOUT, Disable }
}
......@@ -11,7 +11,7 @@ namespace OnlineStore.Common
public class SMF
{
public static string DeviceType = "MIMO_PLUS";
static string _server = ConfigHelper.Config.Get("http_server");
static string _server = Setting_Init.Server_Addr;
static string server
{
get
......
<?xml version="1.0" encoding="UTF-8"?>
<config ver="10">
<item key="App_Title" ver="10" value="SMD-BOX-XLC" />
<item key="EnableBuzzer" ver="10" value="False" />
</config>
\ No newline at end of file
......@@ -148,9 +148,6 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<None Include="Config\general.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="packages.config" />
<None Include="Config\CameraB.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
......
......@@ -18,8 +18,8 @@ namespace DeviceLibrary
{
public class CodeManager
{
public static string CodeType = ConfigHelper.Config.Get(Setting_Init.CodeType,"QR Code");
private static int QRCodeCount = ConfigHelper.Config.Get(Setting_Init.QRCodeCount,3);
public static string[] codeArray = Setting_Init.CodeScan_CodeType;
private static int QRCodeCount = Setting_Init.CodeScan_CodeCount;
public static List<string> cameraNameList = new List<string>();
public static List<string> codeTypeList = new List<string>();
public static List<string> hikNameList = new List<string>();
......@@ -30,25 +30,13 @@ namespace DeviceLibrary
/// </summary>
public static void LoadConfig()
{
string nameStr = ConfigHelper.Config.Get(Setting_Init.CameraName);
codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender";
try
{
string[] nameArray = nameStr.Split(spiltChar);
foreach (string str in nameArray)
{
if (str.Trim().Equals(""))
{
continue;
}
//LogUtil.info("加载到配置摄像机名称:" + str.Trim());
cameraNameList.Add(str.Trim());
}
LoadCamera(false);
codeTypeList = new List<string>();
string[] codeArray = CodeType.Split(spiltChar);
foreach (string str in codeArray)
{
if (str.Trim().Equals(""))
......@@ -59,7 +47,7 @@ namespace DeviceLibrary
LogUtil.info("加载到配置二维码类型:" + str.Trim() + ",配置文件:" + file);
codeTypeList.Add(str.Trim());
}
CodeLibrary.HDCodeLearnHelper.LoadConfig("", CodeType);
CodeLibrary.HDCodeLearnHelper.LoadConfig("", string.Join("#", codeArray));
//如果未加载到配置相机,自动配置
if (cameraNameList.Count <= 0 && hikNameList.Count > 0)
......@@ -72,7 +60,7 @@ namespace DeviceLibrary
}
cameraStr = cameraStr.Substring(0, cameraStr.Length - 1);
//ConfigAppSettings.SaveValue(Setting_Init.CameraName, cameraStr);
LogUtil.info("未配置扫码相机,默认【" + Setting_Init.CameraName + "】=【" + cameraStr + "】");
LogUtil.info("加载到相机:【" + cameraStr + "】");
}
}
catch (Exception ex)
......@@ -81,53 +69,6 @@ namespace DeviceLibrary
}
}
/// <summary>
/// 初始化摄像机名称和二维码类型
/// </summary>
public static bool LoadSingle()
{
codeTypeList = new List<string>();
HDLogUtil.LogName = "RollingLogFileAppender";
try
{
codeTypeList = new List<string>();
string[] codeArray = CodeType.Split(spiltChar);
foreach (string str in codeArray)
{
if (str.Trim().Equals(""))
{
continue;
}
string file = GetCodeParamFilePath(str.Trim());
LogUtil.info("加载到配置二维码类型:" + str.Trim() + ",配置文件:" + file);
codeTypeList.Add(str.Trim());
}
CodeLibrary.HDCodeLearnHelper.LoadConfig("", CodeType);
LoadCamera(false);
//如果未加载到配置相机,自动配置
if (hikNameList.Count > 0)
{
cameraNameList = new List<string>(hikNameList);
string cameraStr = "";
foreach (string name in hikNameList)
{
cameraStr += name + spiltChar;
}
cameraStr = cameraStr.Substring(0, cameraStr.Length - 1);
//ConfigAppSettings.SaveValue(Setting_Init.CameraName, cameraStr);
LogUtil.info("未配置扫码相机,默认【" + Setting_Init.CameraName + "】=【" + cameraStr + "】");
return true;
}
return false;
}
catch (Exception ex)
{
LogUtil.error("解析摄像机配置出错:" + ex.StackTrace);
}
return false;
}
private static void LoadCamera(bool isReLoad)
{
......@@ -380,7 +321,7 @@ namespace DeviceLibrary
public static string GetCodeParamFilePath(string codePath)
{
string appPath = Application.StartupPath;
string path = Path.Combine(appPath, ConfigHelper.Config.Get(Setting_Init.CodeParamPath));
string path = Path.Combine(appPath, Setting_Init.CodeScan_ParamPath);
string filePath = Path.Combine(path, codePath + ".dcm");
if (File.Exists(filePath))
{
......
......@@ -24,8 +24,8 @@ namespace DeviceLibrary
_storeStatus = value;
}
}
static string server = ConfigHelper.Config.Get("http_server");
static string CID = ConfigHelper.Config.Get("CID");
static string server = Setting_Init.Server_Addr;
static string CID = Setting_Init.Server_CID;
int StoreID = 1;
string StoreName="";
......
......@@ -61,6 +61,11 @@ namespace DeviceLibrary
{
AxisBean Lift_Moto;
Name = "右侧出入口";
InOutSide = inOutSide;
InOutMode = inOutMode;
Config = _Config;
mainMachine = _mainMachine;
if (InOutSide == InOutSideE.Left)
{
Lift_Moto = new AxisBean(Config.Left_Lift_Moto, Name);
......@@ -102,16 +107,14 @@ namespace DeviceLibrary
{
Lift_Moto = new AxisBean(Config.Right_Lift_Moto, Name);
}
MoveInfo = new MoveInfo(Name);
MoveInfo.SetStateDelegate(State);
InOutSide = inOutSide;
InOutMode = inOutMode;
Config = _Config;
mainMachine = _mainMachine;
Lift = new LiftMonitor(IO_Lift_Up, IO_Lift_Down, DO_Lift_Break, Lift_Moto, Config.InLift_Moto_Speed, Config.InLift_Moto_DownSpeed);
Line = new LineRunMonitor(Name, Config.DOList[DO_Moto_Run].GetIOAddr(), Config.DOList[DO_Moto_Rev].GetIOAddr());
MoveInfo = new MoveInfo(Name);
InOutDeviceList.Add(inOutSide,this);
}
bool SafeCheck()
......@@ -249,7 +252,5 @@ namespace DeviceLibrary
}
public enum InOutSideE {Left,Right}
public enum InOutDirectionE { NONE,IN, OUT}
public enum InOutModeE {OnlyIN, OnlyOUT,Both }
}
using OnlineStore.LoadCSVLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.Linq;
......
using CodeLibrary;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
......
......@@ -70,7 +70,7 @@ namespace DeviceLibrary
public MainMachine(Robot_Config _config) {
Config = _config;
Config = _config;
StoreMoveInfo = new MoveInfo("行走机构");
StoreMoveInfo.SetStateDelegate(StoreState);
......@@ -92,8 +92,8 @@ namespace DeviceLibrary
ZAxis.interference += ZAxis_interference;
#endregion
LeftInOut = new InOutDevice(InOutSideE.Left, InOutModeE.Both, Config, this);
RightInOut = new InOutDevice(InOutSideE.Right, InOutModeE.Both, Config, this);
LeftInOut = new InOutDevice(InOutSideE.Left, Setting_Init.Device_LeftInoutMode, Config, this);
RightInOut = new InOutDevice(InOutSideE.Right, Setting_Init.Device_RightInoutMode, Config, this);
boxTransport = new BoxTransport(Config, this);
......
......@@ -15,7 +15,7 @@ namespace DeviceLibrary
{
public static MainMachine mainMachine;
public static Robot_Config Config;
public static StoreType StoreType = ConfigHelper.Config.Get<StoreType>("StoreType",StoreType.TypeA);
public static StoreType StoreType = Setting_Init.Device_StoreType;
public static bool IsLoadOk = true;
public static bool IsConfigMode = false;
public static bool InoutDebugMode = false;
......@@ -168,7 +168,5 @@ namespace DeviceLibrary
}
}
public enum StoreType {
TypeA,TypeB
}
}
......@@ -28,7 +28,9 @@ namespace DeviceLibrary
InitializeComponent();
crc.OpenResourceLog = true;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.CurrLanguage = ConfigHelper.Config.Get("Device_Default_Language", "zh-CN");
string lng = Setting_Init.App_Language;
if (lng!=null)
crc.CurrLanguage = lng;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
......
......@@ -20,7 +20,7 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// 中轴位置(旋转轴库位点)P2
/// </summary>
[CSVAttribute("旋转轴位置P2"), Editable(0)]
[CSVAttribute("行走机构位置P2"), Editable(0)]
public int XAxis_Position_P2 { get; set; }
/// <summary>
/// 升降轴(库位入料前点)P3
......
......@@ -32,6 +32,7 @@ namespace TheMachine
this.axisMoveControl1 = new DeviceLibrary.AxisMoveControl();
this.panel1 = new System.Windows.Forms.Panel();
this.configControl1 = new TheMachine.ConfigControl();
this.button1 = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
......@@ -45,6 +46,7 @@ namespace TheMachine
// panel1
//
this.panel1.AutoScroll = true;
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.axisMoveControl1);
this.panel1.Controls.Add(this.configControl1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
......@@ -58,10 +60,20 @@ namespace TheMachine
this.configControl1.Config = null;
this.configControl1.Location = new System.Drawing.Point(568, 3);
this.configControl1.Name = "configControl1";
this.configControl1.Size = new System.Drawing.Size(647, 452);
this.configControl1.Size = new System.Drawing.Size(647, 474);
this.configControl1.TabIndex = 1;
this.configControl1.Tag = "not";
//
// button1
//
this.button1.Location = new System.Drawing.Point(16, 409);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(197, 68);
this.button1.TabIndex = 2;
this.button1.Text = "使用IO点动";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// AxisControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -81,5 +93,6 @@ namespace TheMachine
private DeviceLibrary.AxisMoveControl axisMoveControl1;
private ConfigControl configControl1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button button1;
}
}
......@@ -38,5 +38,12 @@ namespace TheMachine
{
}
private void button1_Click(object sender, EventArgs e)
{
Frm_AxisMoveByIO frm_AxisMoveByIO = new Frm_AxisMoveByIO();
frm_AxisMoveByIO.LoadData(AxisBean.List);
frm_AxisMoveByIO.ShowDialog();
}
}
}
......@@ -22,7 +22,7 @@ namespace TheMachine
{
InitializeComponent();
this.FormClosing += Form1_FormClosing;
this.Text = Config.Get(Setting_Init.App_Title) +" "+ Config.Get("CID");
this.Text = Setting_Init.App_Title +" "+ Setting_Init.Server_CID;
t1.Interval = 1000;
t1.Tick += T1_Tick;
......@@ -95,7 +95,7 @@ namespace TheMachine
#endregion
LogUtil.info("开始初始化");
cb_EnableBuzzer.Checked = Config.Get("EnableBuzzer", true);
cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer;
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
AddForm("日志", lc);
......@@ -393,8 +393,8 @@ namespace TheMachine
private void cb_EnableBuzzer_CheckedChanged(object sender, EventArgs e)
{
Config.Set("EnableBuzzer", cb_EnableBuzzer.Checked);
AlarmBuzzer.Enable = cb_EnableBuzzer.Checked;
Setting_Init.Device_EnableBuzzer = cb_EnableBuzzer.Checked;
AlarmBuzzer.Enable = cb_EnableBuzzer.Checked;
}
private void btn_PauseBuzzer_Click(object sender, EventArgs e)
......

namespace TheMachine
{
partial class Frm_AxisMoveByIO
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.cmbAxis = new System.Windows.Forms.ComboBox();
this.comjSpeed = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// cmbAxis
//
this.cmbAxis.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbAxis.FormattingEnabled = true;
this.cmbAxis.Location = new System.Drawing.Point(83, 67);
this.cmbAxis.Name = "cmbAxis";
this.cmbAxis.Size = new System.Drawing.Size(246, 27);
this.cmbAxis.TabIndex = 0;
this.cmbAxis.SelectedIndexChanged += new System.EventHandler(this.cmbAxis_SelectedIndexChanged);
//
// comjSpeed
//
this.comjSpeed.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comjSpeed.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comjSpeed.FormattingEnabled = true;
this.comjSpeed.Location = new System.Drawing.Point(187, 131);
this.comjSpeed.Name = "comjSpeed";
this.comjSpeed.Size = new System.Drawing.Size(142, 29);
this.comjSpeed.TabIndex = 337;
this.comjSpeed.Tag = "not";
//
// label1
//
this.label1.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.Location = new System.Drawing.Point(80, 137);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(101, 17);
this.label1.TabIndex = 336;
this.label1.Text = "点动速度:";
this.label1.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// Frm_AxisMoveByIO
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(441, 298);
this.Controls.Add(this.comjSpeed);
this.Controls.Add(this.label1);
this.Controls.Add(this.cmbAxis);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "Frm_AxisMoveByIO";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Frm_AxisMoveByIO";
this.Load += new System.EventHandler(this.Frm_AxisMoveByIO_Load);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ComboBox cmbAxis;
private System.Windows.Forms.ComboBox comjSpeed;
private System.Windows.Forms.Label label1;
}
}
\ No newline at end of file
using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class Frm_AxisMoveByIO : Form
{
private List<AxisBean> axisList;
private AxisBean currentAxis;
private string PortName;
private short SlvAddr;
public Frm_AxisMoveByIO()
{
InitializeComponent();
}
public void LoadData(List<AxisBean> axisList)
{
//this.boxBean = equipBase;
this.axisList = axisList;
//axisList = new List<ConfigMoveAxis>(equipBase.Config.moveAxisList);
if (axisList.Count > 0)
{
cmbAxis.Items.Clear();
foreach (var a in axisList)
{
cmbAxis.Items.Add(crc.GetString(a.Config.ProName, a.Config.Explain));
}
cmbAxis.SelectedIndex = 0;
currentAxis = axisList[0];
PortName = axisList[0].Config.DeviceName;
SlvAddr = axisList[0].Config.GetAxisValue();
}
crc.LanguageProcess(this);
}
Thread td;
private void Frm_AxisMoveByIO_Load(object sender, EventArgs e)
{
td = new Thread(new ThreadStart(monitorio));
td.Start();
}
void monitorio() {
bool isrun = false;
while (!IsDisposed) {
Thread.Sleep(10);
if (!AxisManager.IsServeoOn(PortName, SlvAddr))
continue;
var Fwd = IOManager.IOValue(IO_Type.Axis_Fwd_Btn).Equals(IO_VALUE.HIGH);
var Rwd = IOManager.IOValue(IO_Type.Axis_Rwd_Btn).Equals(IO_VALUE.HIGH);
if ((Fwd && Rwd) || (!Fwd && !Rwd))
{
if (isrun)
{
isrun = false;
AxisManager.SuddenStop(currentAxis.Config);
}
}
else
{
if (!isrun)
{
isrun = true;
AxisMove(1* (Fwd?1:-1));
}
}
}
}
private void cmbAxis_SelectedIndexChanged(object sender, EventArgs e)
{
currentAxis = axisList[cmbAxis.SelectedIndex];
PortName = axisList[cmbAxis.SelectedIndex].Config.DeviceName;
SlvAddr = axisList[cmbAxis.SelectedIndex].Config.GetAxisValue();
int targetSpeed = currentAxis.Config.TargetSpeed;
comjSpeed.Items.Clear();
for (int i = 1; i <= 10; i++)
{
comjSpeed.Items.Add(targetSpeed * i / 10);
}
comjSpeed.SelectedIndex = 4;
open();
}
private void open()
{
//timer1.Start();
LogUtil.info("" + "点击【打开伺服】,【" + PortName + "_" + SlvAddr + "】 ");
AxisManager.ServoOn(PortName, SlvAddr);
}
private void AxisMove(int speed)
{
LogUtil.info("" + "【" + PortName + "_" + SlvAddr + "】点动: 速度:" + speed);
AxisManager.SpeedMove(PortName, SlvAddr, speed, 0, 0);
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -34,7 +34,6 @@ namespace TheMachine
this.cylinderButton1 = new TheMachine.CylinderButton();
this.cylinderButton5 = new TheMachine.CylinderButton();
this.cylinderButton9 = new TheMachine.CylinderButton();
this.cylinderButton10 = new TheMachine.CylinderButton();
this.btn_leftLiftUp = new System.Windows.Forms.Button();
this.btn_rightLiftUp = new System.Windows.Forms.Button();
this.btn_leftLinerun = new System.Windows.Forms.Button();
......@@ -46,6 +45,11 @@ namespace TheMachine
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.btn_leftLinerevrun = new System.Windows.Forms.Button();
this.btn_rightLinerevrun = new System.Windows.Forms.Button();
this.cylinderButton3 = new TheMachine.CylinderButton();
this.cylinderButton4 = new TheMachine.CylinderButton();
this.cylinderButton6 = new TheMachine.CylinderButton();
this.cylinderButton7 = new TheMachine.CylinderButton();
this.ioControl1 = new TheMachine.IOControl();
this.SuspendLayout();
//
// cylinderButton2
......@@ -54,7 +58,7 @@ namespace TheMachine
this.cylinderButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton2.IO_HIGH = "Camera_Led";
this.cylinderButton2.IO_LOW = null;
this.cylinderButton2.Location = new System.Drawing.Point(711, 173);
this.cylinderButton2.Location = new System.Drawing.Point(711, 162);
this.cylinderButton2.Name = "cylinderButton2";
this.cylinderButton2.Size = new System.Drawing.Size(150, 30);
this.cylinderButton2.TabIndex = 1;
......@@ -68,7 +72,7 @@ namespace TheMachine
this.cylinderButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton1.IO_HIGH = "Device_Led";
this.cylinderButton1.IO_LOW = null;
this.cylinderButton1.Location = new System.Drawing.Point(536, 173);
this.cylinderButton1.Location = new System.Drawing.Point(536, 162);
this.cylinderButton1.Name = "cylinderButton1";
this.cylinderButton1.Size = new System.Drawing.Size(150, 30);
this.cylinderButton1.TabIndex = 1;
......@@ -80,47 +84,33 @@ namespace TheMachine
//
this.cylinderButton5.BackColor = System.Drawing.Color.White;
this.cylinderButton5.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton5.IO_HIGH = "InStop_Up";
this.cylinderButton5.IO_LOW = "InStop_Down";
this.cylinderButton5.Location = new System.Drawing.Point(536, 209);
this.cylinderButton5.IO_HIGH = "Right_Door_Up";
this.cylinderButton5.IO_LOW = "Right_Door_Down";
this.cylinderButton5.Location = new System.Drawing.Point(536, 198);
this.cylinderButton5.Name = "cylinderButton5";
this.cylinderButton5.Size = new System.Drawing.Size(150, 30);
this.cylinderButton5.TabIndex = 1;
this.cylinderButton5.Tag = "not";
this.cylinderButton5.Text = "InStop_Up";
this.cylinderButton5.Text = "Right_Door_Up";
this.cylinderButton5.UseVisualStyleBackColor = false;
//
// cylinderButton9
//
this.cylinderButton9.BackColor = System.Drawing.Color.White;
this.cylinderButton9.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton9.IO_HIGH = "OutStop_Up";
this.cylinderButton9.IO_LOW = "OutStop_Down";
this.cylinderButton9.Location = new System.Drawing.Point(711, 209);
this.cylinderButton9.IO_HIGH = "Left_Door_Up";
this.cylinderButton9.IO_LOW = "Left_Door_Down";
this.cylinderButton9.Location = new System.Drawing.Point(711, 198);
this.cylinderButton9.Name = "cylinderButton9";
this.cylinderButton9.Size = new System.Drawing.Size(150, 30);
this.cylinderButton9.TabIndex = 1;
this.cylinderButton9.Tag = "not";
this.cylinderButton9.Text = "OutStop_Up";
this.cylinderButton9.Text = "Left_Door_Up";
this.cylinderButton9.UseVisualStyleBackColor = false;
//
// cylinderButton10
//
this.cylinderButton10.BackColor = System.Drawing.Color.White;
this.cylinderButton10.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton10.IO_HIGH = "OutExitStop_Up";
this.cylinderButton10.IO_LOW = "OutExitStop_Down";
this.cylinderButton10.Location = new System.Drawing.Point(711, 245);
this.cylinderButton10.Name = "cylinderButton10";
this.cylinderButton10.Size = new System.Drawing.Size(150, 30);
this.cylinderButton10.TabIndex = 1;
this.cylinderButton10.Tag = "not";
this.cylinderButton10.Text = "OutExitStop_Up";
this.cylinderButton10.UseVisualStyleBackColor = false;
//
// btn_leftLiftUp
//
this.btn_leftLiftUp.Location = new System.Drawing.Point(536, 302);
this.btn_leftLiftUp.Location = new System.Drawing.Point(536, 330);
this.btn_leftLiftUp.Name = "btn_leftLiftUp";
this.btn_leftLiftUp.Size = new System.Drawing.Size(150, 30);
this.btn_leftLiftUp.TabIndex = 2;
......@@ -130,7 +120,7 @@ namespace TheMachine
//
// btn_rightLiftUp
//
this.btn_rightLiftUp.Location = new System.Drawing.Point(711, 302);
this.btn_rightLiftUp.Location = new System.Drawing.Point(711, 330);
this.btn_rightLiftUp.Name = "btn_rightLiftUp";
this.btn_rightLiftUp.Size = new System.Drawing.Size(150, 30);
this.btn_rightLiftUp.TabIndex = 2;
......@@ -140,7 +130,7 @@ namespace TheMachine
//
// btn_leftLinerun
//
this.btn_leftLinerun.Location = new System.Drawing.Point(536, 391);
this.btn_leftLinerun.Location = new System.Drawing.Point(536, 419);
this.btn_leftLinerun.Name = "btn_leftLinerun";
this.btn_leftLinerun.Size = new System.Drawing.Size(150, 30);
this.btn_leftLinerun.TabIndex = 2;
......@@ -150,7 +140,7 @@ namespace TheMachine
//
// btn_leftLinestop
//
this.btn_leftLinestop.Location = new System.Drawing.Point(536, 461);
this.btn_leftLinestop.Location = new System.Drawing.Point(536, 489);
this.btn_leftLinestop.Name = "btn_leftLinestop";
this.btn_leftLinestop.Size = new System.Drawing.Size(150, 30);
this.btn_leftLinestop.TabIndex = 2;
......@@ -160,7 +150,7 @@ namespace TheMachine
//
// btn_rightLinerun
//
this.btn_rightLinerun.Location = new System.Drawing.Point(711, 391);
this.btn_rightLinerun.Location = new System.Drawing.Point(711, 419);
this.btn_rightLinerun.Name = "btn_rightLinerun";
this.btn_rightLinerun.Size = new System.Drawing.Size(150, 30);
this.btn_rightLinerun.TabIndex = 2;
......@@ -170,7 +160,7 @@ namespace TheMachine
//
// btn_rightLinestop
//
this.btn_rightLinestop.Location = new System.Drawing.Point(711, 461);
this.btn_rightLinestop.Location = new System.Drawing.Point(711, 489);
this.btn_rightLinestop.Name = "btn_rightLinestop";
this.btn_rightLinestop.Size = new System.Drawing.Size(150, 30);
this.btn_rightLinestop.TabIndex = 2;
......@@ -180,7 +170,7 @@ namespace TheMachine
//
// btn_leftLiftDown
//
this.btn_leftLiftDown.Location = new System.Drawing.Point(536, 338);
this.btn_leftLiftDown.Location = new System.Drawing.Point(536, 366);
this.btn_leftLiftDown.Name = "btn_leftLiftDown";
this.btn_leftLiftDown.Size = new System.Drawing.Size(150, 30);
this.btn_leftLiftDown.TabIndex = 2;
......@@ -190,7 +180,7 @@ namespace TheMachine
//
// btn_rightLiftDown
//
this.btn_rightLiftDown.Location = new System.Drawing.Point(711, 338);
this.btn_rightLiftDown.Location = new System.Drawing.Point(711, 366);
this.btn_rightLiftDown.Name = "btn_rightLiftDown";
this.btn_rightLiftDown.Size = new System.Drawing.Size(150, 30);
this.btn_rightLiftDown.TabIndex = 2;
......@@ -205,7 +195,7 @@ namespace TheMachine
//
// btn_leftLinerevrun
//
this.btn_leftLinerevrun.Location = new System.Drawing.Point(536, 425);
this.btn_leftLinerevrun.Location = new System.Drawing.Point(536, 453);
this.btn_leftLinerevrun.Name = "btn_leftLinerevrun";
this.btn_leftLinerevrun.Size = new System.Drawing.Size(150, 30);
this.btn_leftLinerevrun.TabIndex = 2;
......@@ -215,7 +205,7 @@ namespace TheMachine
//
// btn_rightLinerevrun
//
this.btn_rightLinerevrun.Location = new System.Drawing.Point(711, 425);
this.btn_rightLinerevrun.Location = new System.Drawing.Point(711, 453);
this.btn_rightLinerevrun.Name = "btn_rightLinerevrun";
this.btn_rightLinerevrun.Size = new System.Drawing.Size(150, 30);
this.btn_rightLinerevrun.TabIndex = 2;
......@@ -223,6 +213,72 @@ namespace TheMachine
this.btn_rightLinerevrun.UseVisualStyleBackColor = true;
this.btn_rightLinerevrun.Click += new System.EventHandler(this.btn_rightLinerevrun_Click);
//
// cylinderButton3
//
this.cylinderButton3.BackColor = System.Drawing.Color.White;
this.cylinderButton3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton3.IO_HIGH = "Right_M_Stop_Up";
this.cylinderButton3.IO_LOW = "Right_M_Stop_Down";
this.cylinderButton3.Location = new System.Drawing.Point(536, 234);
this.cylinderButton3.Name = "cylinderButton3";
this.cylinderButton3.Size = new System.Drawing.Size(150, 30);
this.cylinderButton3.TabIndex = 1;
this.cylinderButton3.Tag = "not";
this.cylinderButton3.Text = "Right_M_Stop_Up";
this.cylinderButton3.UseVisualStyleBackColor = false;
//
// cylinderButton4
//
this.cylinderButton4.BackColor = System.Drawing.Color.White;
this.cylinderButton4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton4.IO_HIGH = "Right_F_Stop_Up";
this.cylinderButton4.IO_LOW = "Right_F_Stop_Down";
this.cylinderButton4.Location = new System.Drawing.Point(536, 270);
this.cylinderButton4.Name = "cylinderButton4";
this.cylinderButton4.Size = new System.Drawing.Size(150, 30);
this.cylinderButton4.TabIndex = 1;
this.cylinderButton4.Tag = "not";
this.cylinderButton4.Text = "Right_F_Stop_Up";
this.cylinderButton4.UseVisualStyleBackColor = false;
//
// cylinderButton6
//
this.cylinderButton6.BackColor = System.Drawing.Color.White;
this.cylinderButton6.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton6.IO_HIGH = "Left_M_Stop_Up";
this.cylinderButton6.IO_LOW = "Left_M_Stop_Down";
this.cylinderButton6.Location = new System.Drawing.Point(711, 234);
this.cylinderButton6.Name = "cylinderButton6";
this.cylinderButton6.Size = new System.Drawing.Size(150, 30);
this.cylinderButton6.TabIndex = 1;
this.cylinderButton6.Tag = "not";
this.cylinderButton6.Text = "Left_M_Stop_Up";
this.cylinderButton6.UseVisualStyleBackColor = false;
//
// cylinderButton7
//
this.cylinderButton7.BackColor = System.Drawing.Color.White;
this.cylinderButton7.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.cylinderButton7.IO_HIGH = "Left_F_Stop_Up";
this.cylinderButton7.IO_LOW = "Left_F_Stop_Down";
this.cylinderButton7.Location = new System.Drawing.Point(711, 270);
this.cylinderButton7.Name = "cylinderButton7";
this.cylinderButton7.Size = new System.Drawing.Size(150, 30);
this.cylinderButton7.TabIndex = 1;
this.cylinderButton7.Tag = "not";
this.cylinderButton7.Text = "Left_F_Stop_Up";
this.cylinderButton7.UseVisualStyleBackColor = false;
//
// ioControl1
//
this.ioControl1.Config = null;
this.ioControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.ioControl1.Location = new System.Drawing.Point(0, 0);
this.ioControl1.Name = "ioControl1";
this.ioControl1.Size = new System.Drawing.Size(975, 539);
this.ioControl1.TabIndex = 3;
this.ioControl1.Tag = "not";
//
// IOControls
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -237,10 +293,14 @@ namespace TheMachine
this.Controls.Add(this.btn_leftLiftDown);
this.Controls.Add(this.btn_leftLiftUp);
this.Controls.Add(this.cylinderButton2);
this.Controls.Add(this.cylinderButton10);
this.Controls.Add(this.cylinderButton9);
this.Controls.Add(this.cylinderButton7);
this.Controls.Add(this.cylinderButton4);
this.Controls.Add(this.cylinderButton6);
this.Controls.Add(this.cylinderButton3);
this.Controls.Add(this.cylinderButton5);
this.Controls.Add(this.cylinderButton1);
this.Controls.Add(this.ioControl1);
this.Font = new System.Drawing.Font("新宋体", 9F);
this.Name = "IOControls";
this.Size = new System.Drawing.Size(975, 539);
......@@ -250,12 +310,11 @@ namespace TheMachine
#endregion
private IOControl ioControl1;
private CylinderButton cylinderButton1;
private CylinderButton cylinderButton2;
private CylinderButton cylinderButton5;
private CylinderButton cylinderButton9;
private CylinderButton cylinderButton10;
private System.Windows.Forms.Button btn_leftLiftUp;
private System.Windows.Forms.Button btn_rightLiftUp;
private System.Windows.Forms.Button btn_leftLinerun;
......@@ -267,5 +326,10 @@ namespace TheMachine
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.Button btn_leftLinerevrun;
private System.Windows.Forms.Button btn_rightLinerevrun;
private CylinderButton cylinderButton3;
private CylinderButton cylinderButton4;
private CylinderButton cylinderButton6;
private CylinderButton cylinderButton7;
private IOControl ioControl1;
}
}
......@@ -32,14 +32,14 @@ namespace TheMachine
_ = new Mutex(true, Application.ProductName, out bool ret);
if (!ret)
{
IntPtr formhwnd = FindWindow(null, Config.Get(Setting_Init.App_Title));
IntPtr formhwnd = FindWindow(null, Setting_Init.App_Title + " " + Setting_Init.Server_CID);
ShowWindow(formhwnd, SW_RESTORE);
SwitchToThisWindow(formhwnd, true);
//MessageBox.Show("该程序已经启动", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
//OnlineStore.Common.Setting_Init s = new Setting_Init();
Config.LoadMyConfig(Type.GetType("OnlineStore.Common.Setting_Init, MyCommon"));
Environment.CurrentDirectory = Application.StartupPath;
XmlConfigurator.Configure();
......
......@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("上海挚锦科技有限公司")]
[assembly: AssemblyProduct("XLC")]
[assembly: AssemblyCopyright("Copyright © 2021")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
......
......@@ -30,25 +30,107 @@ namespace TheMachine
private void InitializeComponent()
{
this.chbAutoRun = new System.Windows.Forms.CheckBox();
this.cb_leftmode = new System.Windows.Forms.ComboBox();
this.cb_rightmode = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label3 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// chbAutoRun
//
this.chbAutoRun.AutoSize = true;
this.chbAutoRun.Location = new System.Drawing.Point(3, 30);
this.chbAutoRun.Location = new System.Drawing.Point(20, 22);
this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(101, 19);
this.chbAutoRun.Size = new System.Drawing.Size(107, 20);
this.chbAutoRun.TabIndex = 1;
this.chbAutoRun.Text = "开机自启动";
this.chbAutoRun.UseVisualStyleBackColor = true;
//
// cb_leftmode
//
this.cb_leftmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_leftmode.FormattingEnabled = true;
this.cb_leftmode.Location = new System.Drawing.Point(198, 37);
this.cb_leftmode.Name = "cb_leftmode";
this.cb_leftmode.Size = new System.Drawing.Size(121, 24);
this.cb_leftmode.TabIndex = 2;
//
// cb_rightmode
//
this.cb_rightmode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_rightmode.FormattingEnabled = true;
this.cb_rightmode.Location = new System.Drawing.Point(198, 80);
this.cb_rightmode.Name = "cb_rightmode";
this.cb_rightmode.Size = new System.Drawing.Size(121, 24);
this.cb_rightmode.TabIndex = 2;
//
// label1
//
this.label1.Location = new System.Drawing.Point(23, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(156, 33);
this.label1.TabIndex = 3;
this.label1.Text = "左侧接驳台出入模式";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label2
//
this.label2.Location = new System.Drawing.Point(23, 75);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(156, 33);
this.label2.TabIndex = 3;
this.label2.Text = "右侧接驳台出入模式";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.button1);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.cb_leftmode);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.cb_rightmode);
this.groupBox1.Location = new System.Drawing.Point(20, 77);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(363, 204);
this.groupBox1.TabIndex = 4;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "接驳台出入模式选择";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(23, 154);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(176, 16);
this.label3.TabIndex = 5;
this.label3.Text = "*保存后需重启料仓生效";
//
// button1
//
this.button1.Location = new System.Drawing.Point(235, 148);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(84, 29);
this.button1.TabIndex = 4;
this.button1.Text = "保存";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// SettingControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.chbAutoRun);
this.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "SettingControl";
this.Size = new System.Drawing.Size(1024, 740);
this.Load += new System.EventHandler(this.SettingControl_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
......@@ -56,5 +138,12 @@ namespace TheMachine
#endregion
private System.Windows.Forms.CheckBox chbAutoRun;
private System.Windows.Forms.ComboBox cb_leftmode;
private System.Windows.Forms.ComboBox cb_rightmode;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Button button1;
}
}
......@@ -23,7 +23,7 @@ namespace TheMachine
InitializeComponent();
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
//chbAutoRun.Enabled = false;
chbAutoRun.Checked = Convert.ToBoolean(ConfigAppSettings.GetIntValue(Setting_Init.App_AutoRun));
chbAutoRun.Checked = Setting_Init.App_AutoRun;
this.chbAutoRun.CheckedChanged += new System.EventHandler(this.chbAutoRun_CheckedChanged);
//chbAutoRun.Enabled = true;
}
......@@ -37,7 +37,11 @@ namespace TheMachine
private void SettingControl_Load(object sender, EventArgs e)
{
cb_leftmode.Items.AddRange(InOutModeItem.Items);
cb_leftmode.SelectedIndex =(int)((InOutModeE)Setting_Init.Device_LeftInoutMode);
cb_rightmode.Items.AddRange(InOutModeItem.Items);
cb_rightmode.SelectedIndex = (int)((InOutModeE)Setting_Init.Device_RightInoutMode);
}
......@@ -66,15 +70,39 @@ namespace TheMachine
{
if (chbAutoRun.Checked)
{
ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 1);
Setting_Init.App_AutoRun=true;
AutoRun(Application.ExecutablePath, true);
}
else
{
ConfigAppSettings.SaveValue(Setting_Init.App_AutoRun, 0);
Setting_Init.App_AutoRun = false;
AutoRun(Application.ExecutablePath, false);
}
}
public class InOutModeItem {
public InOutModeE inOutModeItem = InOutModeE.Both;
public string Name = "";
static List<InOutModeItem> items = new List<InOutModeItem>();
public static InOutModeItem[] Items { get => items.ToArray(); }
public override string ToString()
{
return Name;
}
static InOutModeItem()
{
items.Add(new InOutModeItem { inOutModeItem= InOutModeE.Both,Name="双向" });
items.Add(new InOutModeItem { inOutModeItem= InOutModeE.OnlyIN,Name="仅入库" });
items.Add(new InOutModeItem { inOutModeItem= InOutModeE.OnlyOUT,Name= "仅出库" });
items.Add(new InOutModeItem { inOutModeItem= InOutModeE.Disable,Name="禁用" });
}
}
private void button1_Click(object sender, EventArgs e)
{
Setting_Init.Device_LeftInoutMode = ((InOutModeItem)cb_leftmode.SelectedItem).inOutModeItem;
Setting_Init.Device_RightInoutMode = ((InOutModeItem)cb_rightmode.SelectedItem).inOutModeItem;
}
}
}
......@@ -93,6 +93,12 @@
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Frm_AxisMoveByIO.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Frm_AxisMoveByIO.Designer.cs">
<DependentUpon>Frm_AxisMoveByIO.cs</DependentUpon>
</Compile>
<Compile Include="IOControls.cs">
<SubType>UserControl</SubType>
</Compile>
......@@ -147,6 +153,9 @@
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Frm_AxisMoveByIO.resx">
<DependentUpon>Frm_AxisMoveByIO.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="IOControls.resx">
<DependentUpon>IOControls.cs</DependentUpon>
</EmbeddedResource>
......
......@@ -212,6 +212,8 @@ namespace TheMachine
private void ConfigControl_Load(object sender, EventArgs e)
{
if (DesignMode)
return;
OnlineStore.CodeResourceControl.LanguageChangeEvent += CodeResourceControl_LanguageChange;
CodeResourceControl_LanguageChange(null,null);
}
......

namespace TheMachine.UC
{
partial class UserControl1
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
}
#endregion
}
}
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine.UC
{
public partial class UserControl1 : UserControl
{
public UserControl1()
{
InitializeComponent();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file
......@@ -167,6 +167,10 @@ namespace TheMachine
dataGridView1.Columns.Clear();
dataGridView1.Rows.Clear();
LoadPosCheck();
if (RobotManage.PositionNumList.Count == 0)
return;
Comparison<string> comparison = new Comparison<string>(PosCompare);
RobotManage.PositionNumList.Sort(comparison);
//store.PositionNumList.Reverse();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!