예제 #1
0
        public void ButtonDeletePTZPresetAsync(object sender, Windows.UI.Xaml.RoutedEventArgs e)

        //     public Windows.Foundation.IAsyncOperation<Boolean> ButtonDeletePTZPresetAsync(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            Windows.Foundation.IAsyncOperation <Boolean> ret = null;
            Button send = sender as Button;

            if (send != null)
            {
                send.IsEnabled = false;
            }

            //   int Idx = this.Presets.SelectedIndex;

            PTZPresetItem preset = this.Presets.getSelectecItem();

            if (preset == null)
            {
                return;
            }

            ret = this.RemovePresetAsync(preset.Token);


            if (send != null)
            {
                send.IsEnabled = true;
            }
            return;
        }
예제 #2
0
        public void ButtonSetPTZPresetAsync(object sender, Windows.UI.Xaml.RoutedEventArgs e)
        {
            Windows.Foundation.IAsyncOperation <Boolean> ret = null;
            Button send = sender as Button;

            if (send != null)
            {
                send.IsEnabled = false;
            }

            // int Idx = this.Presets.SelectedIndex;
            PTZPresetItem preset = this.Presets.getSelectecItem();

            /*if (preset.Token == "HomeToken")
             * {
             *  ret = this.SetHomePositionAsync();
             * }
             * else
             */
            {
                if (preset == null)
                {
                    return;
                }

                ret = this.setPTZPresetAsync(preset.Token);
            }
            if (send != null)
            {
                send.IsEnabled = true;
            }
            //       return ret;
        }
예제 #3
0
 public bool deletePresetItem(PTZPresetItem item)
 {
     return(true);
 }