/// <summary> /// ボタンが押された時の処理 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Manager_KeyPushed(object sender, DeviceKeyEventArgs e) { if (this.SelectedMember != null && !this.SelectedMember.IsKeyLock) { this.SelectedMember.Model.DeviceGuid = e.InstanceID; this.SelectedMember.Model.Key = e.Key; } }
private void Manager_KeyPushed(object sender, DeviceKeyEventArgs e) { foreach (var team in this.Teams) { if (team.SetKey(e.InstanceID, e.Key)) { return; } } }
private void Manager_KeyPushed(object sender, DeviceKeyEventArgs e) { if (this.Receivable) { var member = this.Teams.SelectMany(t => t.Members).FirstOrDefault(m => m.Model.DeviceGuid == e.InstanceID && m.Model.Key == e.Key); if (member?.Parent?.Pushable ?? false) { this.pushSound.Play(); this.AnswerMember = member; this.SelectedMedia.Pause(); this.Receivable = false; } } }