/// <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); } }