예제 #1
0
        /// <summary>
        /// Method for tapped event of device feature list item
        /// </summary>
        /// <param name="sender">Event sender</param>
        /// <param name="e">Event argument</param>
        private void OnItemTapped(object sender, ItemTappedEventArgs e)
        {
            FeatureItem item = (FeatureItem)e.Item;

            if (item.Name.Equals("Battery"))
            {
                // Show battery status
                BatterySample();
            }
            else if (item.Name.Equals("Display"))
            {
                // Show display status
                DisplaySample();
            }
            else if (item.Name.Equals("Haptic"))
            {
                // Vibrate during user input time
                HapticSample();
            }
            else if (item.Name.Equals("IR"))
            {
                // Transmit IR patterns
                IRSample();
            }
            else if (item.Name.Equals("Led"))
            {
                // Play and stop led
                LedSample();
            }
            else if (item.Name.Equals("Camera back flash"))
            {
                // Show camera back flash status
                BackflashSample();
            }
            else
            {
                // Unknown feature
                this.Navigation.PushAsync(new SimpleResult("Wrong operation"));
            }
        }
예제 #2
0
        /// <summary>
        /// Method for tapped event of device feature list item
        /// </summary>
        /// <param name="sender">Event sender</param>
        /// <param name="e">Event argument</param>
        private void OnItemTapped(object sender, ItemTappedEventArgs e)
        {
            FeatureItem item = (FeatureItem)e.Item;

            if (item.Name.Equals("날씨 "))
            {
//              weather();
            }
            else if (item.Name.Equals("낚시 도감 "))
            {
//              fishinggo();
            }
            else if (item.Name.Equals("균형도우미 "))
            {
//              level();
            }
            else
            {
                // Unknown feature
                this.Navigation.PushAsync(new SimpleResult("wrong function"));
            }
        }