private void OnControllerChanged(object sender, ControllerChangedArgs e) { if (e.WasInserted) { this.Add(e.Controller); } }
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(); } }