Exemplo n.º 1
0
        public void setOne(int index, int[] colour)
        {
            //int[] previous = Eyes[index];
            //TODO: add checking to see if previous val == current val
            for (int i = 0; i < 3; i++)
            {
                Eyes[index][i] = colour[i];
            }
            EyesChangedEventArgs args = new EyesChangedEventArgs();

            args.Eyes = Eyes;
            OnEyesChanged(args);
        }
Exemplo n.º 2
0
 public void writeEyevals(object sender, EyesChangedEventArgs e)
 {
     eyelock.EnterWriteLock();
     try
     {
         Eyes = e.Eyes;
     }
     catch
     {
         Console.WriteLine("Escaped");
     }
     finally
     {
         eyelock.ExitWriteLock();
     }
 }
Exemplo n.º 3
0
        protected virtual void OnEyesChanged(EyesChangedEventArgs e)
        {
            EventHandler <EyesChangedEventArgs> handler = EyesChanged;

            handler?.Invoke(this, e);
        }