private void presets_PresetDeleted(object sender, UserPresetEventArgs e) { try { client.DeletePreset(e.Item.Preset.ID); } catch (Exception ex) { ErrorLogger.DumpToDebug(ex); } }
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); } }
private void ptzFavoritesControl_PresetDeleted(object sender, UserPresetEventArgs e) { try { if (client != null) { client.DeletePreset(e.Item.Preset.ID); } } catch (Exception ex) { ErrorLogger.DumpToDebug(ex); } }
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); } }
/// <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); } }