コード例 #1
0
        private void OptionClicked(object sender, RoutedEventArgs e)
        {
            KinectCircleButton circleButton = sender as KinectCircleButton;
            string             name         = circleButton.Name;
            int selectedIndex;

            switch (name)
            {
            case "img1":
                selectedIndex = 0;
                break;

            case "img2":
                selectedIndex = 1;
                break;

            case "img3":
                selectedIndex = 2;
                break;

            case "img4":
                selectedIndex = 3;
                break;

            default:
                selectedIndex = 0;
                break;
            }

            OddItemSelectedEventArgs eventArgs = new OddItemSelectedEventArgs(sender, selectedIndex, OddItemSelectedEvent);

            this.RaiseEvent(eventArgs);
        }
コード例 #2
0
 protected virtual void OnOddItemSelected(OddItemSelectedEventArgs e)
 {
     this.RaiseEvent(e);
 }