Example #1
0
        /// <summary>
        /// 取消指令
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnClose_Click(object sender, EventArgs e)
        {
            tagDP.ServiceName = tagServiceName;
            tagDP.AutoRegist  = true;
            TagValues.Clear();
            TagValues.Add(unitNo + "_SPEC_ACTION", null);
            tagDP.Attach(TagValues);

            StringBuilder sb = new StringBuilder();

            sb.Append("RESET");
            sb.Append(",");
            sb.Append("999999");
            sb.Append(",");
            sb.Append("999999");
            sb.Append(",");
            sb.Append("999999");

            MessageBoxButtons btn = MessageBoxButtons.OKCancel;
            DialogResult      dr  = MessageBox.Show("确定要取消插料/退料指令操作吗?", "操作提示", btn);

            if (dr == DialogResult.OK)
            {
                tagDP.SetData(unitNo + " ", sb.ToString());
                MessageBox.Show("指令已清除");
            }
        }
Example #2
0
        void FrmCarEntry_Load(object sender, EventArgs e)
        {
            txtPacking.Text = PackingNo;

            tagDP.ServiceName = "iplature";
            tagDP.AutoRegist  = true;
            TagValues.Clear();
            TagValues.Add("EV_NEW_PARKING_CARARRIVE", null);
            tagDP.Attach(TagValues);

            this.Text = string.Format("{0}到位", carType);
            if (carType == "框架车")
            {
                txtDirection.Enabled       = false;
                txtDirection.Text          = "东";
                txtDirection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;

                cmbCarType.Enabled = false;
                //cmbCarType.SelectedText = "普通框架";
                cmbCarType.Text          = "普通框架";
                cmbCarType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            }
            else if (carType == "社会车")
            {
                txtDirection.Text = "";
                //cmbCarType.SelectedText = "一般社会车辆";
                cmbCarType.Text          = "一般社会车辆";
                cmbCarType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            }
            else
            {
                cmbCarType.Text          = "车辆出库车到位";
                cmbCarType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            }
            BindCarDrection();//绑定方向
            BindCarType(cmbCarType);
            //txtDirection.Text = "";
            if (PackingNo.Contains("Z3"))
            {
                labTips.Text = "朝4-1门为南,朝4-4门为北";
            }
            else if (PackingNo.Contains("Z5"))
            {
                labTips.Text = "朝7-1门为东,朝7-9门为西";
            }
        }
Example #3
0
        /// <summary>
        /// 遍历tag点获取值
        /// </summary>
        public void getTagValues()
        {
            try
            {
                //清空原来的map
                inDatas.Clear();
                //读所有鞍座tag点的值
                tagDataProvider.GetData(arrTagAdress, out inDatas);

                //为每个鞍座的tag点值属性赋值
                foreach (UnitSaddleBase theSaddle in dicSaddles.Values)
                {
                    theSaddle.TagVal_IsLocked             = get_value_x(theSaddle.TagAdd_IsLocked);
                    theSaddle.TagVal_IsOccupied           = get_value_x(theSaddle.TagAdd_IsOccupied);
                    theSaddle.TagVal_LockRequest_FEEDBACK = get_value_x(theSaddle.TagAdd_LockRequest_FEEDBACK);
                    theSaddle.TagVal_LockRequest_SET      = get_value_x(theSaddle.TagAdd_LockRequest_SET);
                }
            }
            catch (Exception er)
            {}
        }