Пример #1
0
 private void OnControllerChanged(object sender, ControllerChangedArgs e)
 {
     if (e.WasInserted)
     {
         this.Add(e.Controller);
     }
 }
Пример #2
0
        private void OnControllerChanged(object sender, ControllerChangedArgs e)
        {
            var args = e;

            switch (args.ControllerId)
            {
            case ControllerId.Controller1:
                this.Controller1 = args.Controller;
                break;

            case ControllerId.Controller2:
                this.Controller2 = args.Controller;
                break;

            case ControllerId.Unknown:
            default:
                throw new InvalidOperationException();
            }
        }