public override bool Equals(object obj)
        {
            TetServiceEntryWrapper wrapper = obj as TetServiceEntryWrapper;

            if (wrapper == null)
            {
                return(false);
            }

            if (wrapper._servicename != null)
            {
                if (_servicename != null)
                {
                    return(wrapper._servicename == _servicename);
                }
                else
                {
                    return(wrapper._servicename == _entry.servicename);
                }
            }
            else
            {
                if (_servicename != null)
                {
                    return(wrapper._entry.servicename == _servicename);
                }
                else
                {
                    return(_entry.servicename == wrapper._entry.servicename);
                }
            }
        }
Ejemplo n.º 2
0
        void serviceBrowser_OnServiceUpdated(ref TetServiceEntry serviceEntry)
        {
            TetServiceEntryWrapper wrapper = new TetServiceEntryWrapper(serviceEntry);

            if (!services.Contains(wrapper))
            {
                services.Add(wrapper);
            }
            else
            {
                services.Remove(wrapper);
                services.Add(wrapper);
            }
            UpdateEyetrackerCombo();
        }
Ejemplo n.º 3
0
        private void UpdateEyetrackerCombo()
        {
            eyetrackers.Items.Clear();
            TetServiceEntryWrapper selected = eyetrackers.SelectedItem as TetServiceEntryWrapper;

            foreach (TetServiceEntryWrapper eyetracker in services)
            {
                if (eyetracker.IsRunning)
                {
                    eyetrackers.Items.Add(eyetracker);
                }
            }

            if (eyetrackers.Items.Count == 0)
            {
                UpdateButtons();
                return;
            }

            if (selected != null)
            {
                int index = eyetrackers.Items.IndexOf(selected);
                if (index != -1)
                {
                    eyetrackers.SelectedIndex = index;
                }
                else
                {
                    eyetrackers.SelectedIndex = 0;
                }
            }
            else
            {
                eyetrackers.SelectedIndex = 0;
            }

            UpdateButtons();
        }
Ejemplo n.º 4
0
 void serviceBrowser_OnServiceUpdated(ref TetServiceEntry serviceEntry)
 {
     TetServiceEntryWrapper wrapper = new TetServiceEntryWrapper(serviceEntry);
     if (!services.Contains(wrapper))
     {
         services.Add(wrapper);
     }
     else
     {
         services.Remove(wrapper);
         services.Add(wrapper);
     }
     UpdateEyetrackerCombo();
 }