public bool IsVariable(string _str, ref tblController _tblcontroller, ref tblVariable _tblvariable, ref tblFormalParameter _tblformalparameter, ref string _subpropertytxt, ref byte _subproperty, ref bool _isrefernce)
        {
            string str   = "";
            int    count = 0;

            _str = _str.ToLower();
            string[] varname = _str.Split(new Char[] { '.' });
            _subproperty = 0;
            count        = varname.Length;
            // count = varname.Count();
            if (varname != null)
            {
                if (IsFCSName(varname[0], ref _tblcontroller))
                {
                    for (int i = 1; i < count; i++)
                    {
                        str += varname[i] + ".";
                    }
                    if (str != "")
                    {
                        str = str.Remove(str.Length - 1, 1);
                        if (_tblcontroller.GetGlobalPOU().IsVariable(str, ref _tblvariable, ref _isrefernce, ref _tblformalparameter, ref _subpropertytxt, ref _subproperty))
                        {
                        }
                    }
                }
            }
            return(false);
        }
        public override bool PostInsertTriger()
        {
            tblController tblcontroller = new tblController();

            tblcontroller.SolutionID     = this.SolutionID;
            tblcontroller.ControllerName = "USERDEFINED";
            tblcontroller.type           = (int)StationType.DUMMY;
            tblcontroller.Insert();

            return(true);
        }
 public bool IsFCSName(string _name, ref tblController _tblcontroller)
 {
     foreach (tblController tblcontroller in m_tblControllerCollection)
     {
         if (tblcontroller.ControllerName.ToLower() == _name.ToLower())
         {
             _tblcontroller = tblcontroller;
             return(true);
         }
     }
     return(false);
 }
        public tblPou GetGlobaltblPouObjectFromID(long id)
        {
            tblController tblcontroller = GetControllerobjectofPOUID(id);

            foreach (tblPou tblpou in tblcontroller.m_tblPouCollection)
            {
                if (tblpou.pouName == "GLOBAL")
                {
                    return(tblpou);
                }
            }
            return(null);
        }
        public tblPou GetPouFromID(long id)
        {
            tblController tblcontroller = GetControllerobjectofPOUID(id);

            foreach (tblPou tblpou in tblcontroller.m_tblPouCollection)
            {
                if (tblpou.pouID == id)
                {
                    return(tblpou);
                }
            }
            return(null);
        }
        public ItemType IsValidItem(string str)
        {
            int    len;
            string _str = str.ToLower();

            string[] parts = _str.Split(new Char[] { '.' });
            len = parts.Length;
            if (len != 0)
            {
                tblController _tblcontroller = null;
                if (IsFCSName(parts[0], ref _tblcontroller))
                {
                    if (len == 1)
                    {
                        return(ItemType.FCS);
                    }
                    else
                    {
                    }
                }
            }
            return(ItemType.UNKNOWN);
        }
Beispiel #7
0
 public tblUserAccessCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }
Beispiel #8
0
 public tblPouCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }
 public tblModbusServerCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }
Beispiel #10
0
 public bool Contains(tblController item)
 {
     return(List.Contains(item));
 }
Beispiel #11
0
 public int IndexOf(tblController item)
 {
     return(List.IndexOf(item));
 }
Beispiel #12
0
 public void Insert(int index, tblController item)
 {
     List.Insert(index, item);
     this.OntblControllerChanged(EventArgs.Empty);
 }
Beispiel #13
0
 public void Remove(tblController item)
 {
     List.Remove(item);
     this.OntblControllerChanged(EventArgs.Empty);
 }
Beispiel #14
0
 public void Add(tblController item)
 {
     List.Add(item);
     this.OntblControllerChanged(EventArgs.Empty);
 }
Beispiel #15
0
 public tblModbusClientCollection(tblController _parent)
 {
     _ControllerID_tblController = _parent;
 }