Exemplo n.º 1
0
 private void closeAllTagsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     currentTagsComboBox.Items.Clear();
     tagEditorPanel.Controls.Clear();
     CurrentTags.Clear();
     CurrentTag = null;
 }
 private void Create()
 {
     CurrentTags.Clear();
     tagDictionary.Clear();
     foreach (var device in myDevices.Values)
     {
         foreach (var tag in device.Collection.GetAllTags())
         {
             if (tagDictionary.ContainsKey(tag.Name))
             {
                 continue;
             }
             TagResult aTag = new TagResult(tag);
             tagDictionary.Add(tag.Name, aTag);
             tag.TagStatusChanged += Tag_TagStatusChanged;
             CurrentTags.Add(aTag);
         }
     }
     DeviceCount = myDevices.Count;
     Status      = LiveDataViewModelStatuses.Ready;
 }
 private void Create()
 {
     CurrentTags.Clear();
     tagDictionary.Clear();
     foreach (var device in myDevices.Values)
     {
         var readTags = from item in device.Collection.GetAllTags() where item.TagDirection == Kr.Communication.SmartModbusMaster.TagManagement.Types.Direction.Read select item;
         foreach (var tag in device.Collection.GetAllTags())
         {
             if (tagDictionary.ContainsKey(tag.Name))
             {
                 continue;
             }
             TagResult aTag = new TagResult(tag);
             tagDictionary.Add(tag.Name, aTag);
             tag.TagStatusChanged += Tag_TagStatusChanged;
             CurrentTags.Add(aTag);
         }
     }
     DeviceCount = myDevices.Count;
     Status      = LiveDataViewModelStatuses.Ready;
 }
Exemplo n.º 4
0
 private void OnNewSearch(object obj)
 {
     CurrentTags.Clear();
 }