Beispiel #1
0
        public void SetConfig(ci _iActrId, string _sTitle, EN_MOVE_DIRECTION _iActrType, Control _wcParent /*, dgCheckSafe _CheckSafe*/)
        {
            m_sActrName = _sTitle;
            //bActivate = new bool [SML.CL]
            if (m_sActrName == null)
            {
                return;
            }
            m_sActrName = m_sActrName.Replace("_", " ");

            m_iActrId      = _iActrId;    //실린더 넘버
            lbCylNo.Text   = ((int)m_iActrId).ToString();
            lbCylName.Text = m_sActrName; //실린더 이름
            m_iType        = _iActrType;
            this.Parent    = _wcParent;
            this.Dock      = DockStyle.Fill;

            m_bPreCmd = true;
            //tmUpdate.Enabled = true;

            switch (m_iType)
            {
            default: iFwd = Left; sFwd = "LEFT"; iBwd = Right; sBwd = "RIGHT"; break;

            case EN_MOVE_DIRECTION.LR: sBwd = "LEFT"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "RIGHT"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.RL: sBwd = "RIGHT"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "LEFT"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.BF: sBwd = "FWD"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "BWD"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.FB: sBwd = "BWD"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "FWD"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.UD: sBwd = "UP"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "DN"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.DU: sBwd = "DN"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "UP"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.CA: sBwd = "CW"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "CCW"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.AC: sBwd = "CCW"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "CW"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.OC: sBwd = "OPEN"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "CLOSE"; btFwd.Click += new EventHandler(evFwd_Click); break;

            case EN_MOVE_DIRECTION.CO: sBwd = "CLOSE"; btBwd.Click += new EventHandler(evBwd_Click);
                sFwd = "OPEN"; btFwd.Click += new EventHandler(evFwd_Click); break;
            }

            btFwd.Text = sFwd;
            btBwd.Text = sBwd;
            //lbFwd.Text = sFwd;
            //lbBwd.Text = sBwd;
        }
Beispiel #2
0
        public void SetConfig(ci _iActrId, string _sTitle, EN_MOVE_DIRECTION _iActrType, Control _wcParent /*, dgCheckSafe _CheckSafe*/)
        {
            string sActrName;

            sActrName = _sTitle;
            if (sActrName == null)
            {
                return;
            }
            sActrName = sActrName.Replace("_", "");



            m_iActrId    = _iActrId;
            lbTitle.Text = sActrName;
            m_iType      = _iActrType;
            this.Parent  = _wcParent;
            //m_CheckSafe = _CheckSafe;

            m_bPreCmd = true;
            //btAction.ImageIndex = 1;
            //tmUpdate.Enabled = true;



            switch (m_iType)
            {
            default: iFwd = Right; sFwd = "RIGHT"; iBwd = Left; sBwd = "LEFT"; break;

            case EN_MOVE_DIRECTION.LR: iFwd = Right; sFwd = "RIGHT";
                iBwd = Left; sBwd = "LEFT"; break;

            case EN_MOVE_DIRECTION.RL: iFwd = Left; sFwd = "LEFT";
                iBwd = Right; sBwd = "RIGHT"; break;

            case EN_MOVE_DIRECTION.BF: iFwd = Left; sFwd = "Fwd";
                iBwd = Right; sBwd = "Bwd"; break;

            case EN_MOVE_DIRECTION.FB: iFwd = Right; sFwd = "Bwd";
                iBwd = Left; sBwd = "Fwd"; break;

            case EN_MOVE_DIRECTION.UD: iFwd = Down; sFwd = "DN";
                iBwd = Up; sBwd = "Up"; break;

            case EN_MOVE_DIRECTION.DU: iFwd = Up; sFwd = "UP";
                iBwd = Down; sBwd = "DN"; break;

            case EN_MOVE_DIRECTION.CA: iFwd = CCW; sFwd = "CCW";
                iBwd = CW; sBwd = "CW"; break;

            case EN_MOVE_DIRECTION.AC: iFwd = CW; sFwd = "CW";
                iBwd = CCW; sBwd = "CCW"; break;
            }

            if ((int)ML.CL_GetCmd(m_iActrId) == 0)
            {
                btAction.ImageIndex = iFwd; btAction.Text = sFwd;
            }
            else
            {
                btAction.ImageIndex = iBwd; btAction.Text = sBwd;
            }


            //btAction.ImageIndex = Right;
            //ImgLstBt.Images.SetKeyName(1, "Right");
        }
Beispiel #3
0
        public void SetConfig(ci _iActrId, string _sTitle, EN_MOVE_DIRECTION _iActrType, Control _wcParent /*, dgCheckSafe _CheckSafe*/)
        {
            m_sActrName = _sTitle;
            //bActivate = new bool [SML.CL]
            if (m_sActrName == null)
            {
                return;
            }
            m_sActrName = m_sActrName.Replace("_", " ");

            m_iActrId      = _iActrId;    //실린더 넘버
            lbCylNo.Text   = ((int)m_iActrId).ToString();
            lbCylName.Text = m_sActrName; //실린더 이름
            m_iType        = _iActrType;
            this.Parent    = _wcParent;

            m_bPreCmd        = true;
            tmUpdate.Enabled = true;

            switch (m_iType)
            {
            default: iFwd = Left; sFwd = "LEFT"; iBwd = Right; sBwd = "RIGHT"; break;

            case EN_MOVE_DIRECTION.LR: sFwd = "RIGHT";
                sBwd = "LEFT"; break;

            case EN_MOVE_DIRECTION.RL: sFwd = "LEFT";
                sBwd = "RIGHT"; break;

            case EN_MOVE_DIRECTION.BF: sFwd = "Fwd";
                sBwd = "Bwd"; break;

            case EN_MOVE_DIRECTION.FB: sFwd = "Bwd";
                sBwd = "Fwd"; break;

            case EN_MOVE_DIRECTION.UD: sFwd = "DN";
                sBwd = "Up"; break;

            case EN_MOVE_DIRECTION.DU: sFwd = "UP";
                sBwd = "DN"; break;

            case EN_MOVE_DIRECTION.CA: sFwd = "CCW";
                sBwd = "CW"; break;

            case EN_MOVE_DIRECTION.AC: sFwd = "CW";
                sBwd = "CCW"; break;

            case EN_MOVE_DIRECTION.CO: sFwd = "OPEN";
                sBwd = "CLOSE"; break;

            case EN_MOVE_DIRECTION.OC: sFwd = "CLOSE";
                sBwd = "OPEN"; break;
            }

            lbBwd.BackColor = Color.ForestGreen;
            lbFwd.BackColor = SystemColors.Control;

            if ((int)SM.CL_GetCmd(m_iActrId) == 0)
            {
                btFwd.Text = sFwd; btBwd.Text = sBwd;
            }
            else
            {
                btBwd.Text = sBwd; btFwd.Text = sFwd;
            }
        }