private void RefreshEventsGroup(TagHandler Tags) { for (int i = 0; i < EvGroups.Count; i++) { //All the events are in evGroups //refresh from OPC all events (diferents OPCs) if (EvGroups[i].opcgroup.ServerName.Length > 1) { EvGroups[i].opcgroup.GetData(); Tags.RefreshFromGroup(EvGroups[i].opcgroup); } else { Tags.RefreshFromEvents(EvGroups[i].opcgroup); } } //Refresh the struc EVENTS (that contain inserts/updates) for (int i = 0; i < OPCEvents.Count; i++) { int indexer = Tags.SearchTag(OPCEvents[i].Tagevent); if (indexer != -1) { TagEvent evt = OPCEvents[i]; evt.Activated = Tags.Values[indexer].Activated; evt.Deactivated = Tags.Values[indexer].Deactivated; OPCEvents[i] = evt; } } }
private void RefreshWhereGroup(TagHandler Tags) { for (int i = 0; i < WhereGroups.Count; i++) { WhereGroups[i].opcgroup.GetData(); Tags.RefreshFromGroup(WhereGroups[i].opcgroup); } }
private void RefreshVarGroup(string tagevent, TagHandler Tags) { for (int i = 0; i < VarGroups.Count; i++) { if (VarGroups[i].tagEvent == tagevent) { VarGroups[i].opcgroup.GetData(); Tags.RefreshFromGroup(VarGroups[i].opcgroup); } } }