Exemple #1
0
        public string CreateSystemName()
        {
            var val = new StringTdmsAttributeValueBehavior(
                ecaAttributes.GetAttribute("A_System_Code"))
                      .GetValue();

            return((string.IsNullOrEmpty(val)) ? "-" : val);
        }
Exemple #2
0
        public override List <int> GetNumbers()
        {
            var result = new List <int>();

            attribute.Rows.ForEach(row => {
                int foo;
                string rowValue = new StringTdmsAttributeValueBehavior(row.Attributes["A_Block_Number"]).GetValue();
                if (int.TryParse(rowValue, out foo))
                {
                    result.Add(foo);
                }
            });

            return(result);
        }
        public override List <int> GetNumbers()
        {
            var result = new List <int>();

            GetBlocks().ForEach(block =>
            {
                int foo;
                string blockNumber = new StringTdmsAttributeValueBehavior(block.Attributes["A_Block_Number"]).GetValue();
                if (int.TryParse(blockNumber, out foo))
                {
                    result.Add(foo);
                }
            });

            return(result);
        }
        public override void Execute()
        {
            var guid = "{036AA823-3162-449B-9BE5-B7D7082FB19C}";

            //var guid = "{036AA823-3162-449B-9BE5-B7D7082FB19C}";
            //var guid = "{036AA823-3162-449B-9BE5-B7D7082FB19C}";
            guid = "{3B0C8DB2-4C16-4427-9FB8-BC469FDED910}";
            var kspp = application.GetObjectByGUID(guid);
            var rows = Utility.GetRowsSafe(kspp.Attributes[0]);
            var row  = rows.FirstOrDefault();

            var attribute = row.Attributes["A_Fl_Record"];

            var status = new BoolTdmsAttributeValueBehavior(attribute).GetValue();

            application.DebugPrint($"A_Fl_Record: {status}");

            var strValue = new StringTdmsAttributeValueBehavior(attribute).GetValue();

            application.DebugPrint($"A_Fl_Record: {strValue}");
        }