示例#1
0
 private void presets_PresetDeleted(object sender, UserPresetEventArgs e)
 {
     try
     {
         client.DeletePreset(e.Item.Preset.ID);
     }
     catch (Exception ex)
     {
         ErrorLogger.DumpToDebug(ex);
     }
 }
示例#2
0
 private void presets_PresetRenamed(object sender, UserPresetEventArgs e)
 {
     try
     {
         ((MicrowaveTuningPreset)e.Item.Preset).AutoGenerated = false;
         client.UpdatePreset(e.Item.Preset);
     }
     catch (Exception ex)
     {
         ErrorLogger.DumpToDebug(ex);
     }
 }
示例#3
0
 private void ptzFavoritesControl_PresetDeleted(object sender, UserPresetEventArgs e)
 {
     try
     {
         if (client != null)
         {
             client.DeletePreset(e.Item.Preset.ID);
         }
     }
     catch (Exception ex)
     {
         ErrorLogger.DumpToDebug(ex);
     }
 }
示例#4
0
        private void presets_RestorePreset(object sender, UserPresetEventArgs e)
        {
            try
            {
                client.RestorePreset(e.Item.Preset.ID);

                UpdateBusyStatus(0);
                UpdateBusyStatus(BusyFlags.Complete & ~BusyFlags.Tuning & ~BusyFlags.LQ);

                snapshotTimer.TakeSnapshot(e.Item, StreamViewerControl);
            }
            catch (Exception ex)
            {
                FCMessageBox.Show("Could not set restore preset", "There was an error while attempting to restore the preset.", this);
                ErrorLogger.DumpToDebug(ex);
            }
        }
示例#5
0
        /// <summary>
        /// Called when a favorite needs to be restored
        /// </summary>
        /// <param name="sender">the sending object</param>
        /// <param name="restore">the PTZFavorite to restore. It is passed by reference in case any updates need to be done to it.</param>
        private void ptzFavoritesControl_RestorePreset(object sender, UserPresetEventArgs update)
        {
            try
            {
                if (client != null)
                {
                    client.RestorePreset(update.Item.Preset.ID);

                    _snapshotTimer.TakeSnapshot(update.Item, StreamViewerControl);

                    ptzFavoritesControl.Refresh();
                }
            }
            catch (Exception ex)
            {
                ErrorLogger.DumpToDebug(ex);
            }
        }