Пример #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);
 }