Example #1
0
        /// <summary>
        /// Stops streaming
        /// </summary>
        /// <param name="localSummit">Summit System</param>
        /// <param name="showErrorMessage">True if you want a popup message on errors or false if show no error popup</param>
        /// <returns>true if success or false if unsuccessful</returns>
        public bool StopStreaming(SummitSystem localSummit, bool showErrorMessage)
        {
            if (localSummit == null)
            {
                return(false);
            }
            bool          success = true;
            APIReturnInfo bufferReturnInfo;

            try
            {
                _log.Info("Stop Streaming");
                bufferReturnInfo = localSummit.WriteSensingDisableStreams(true, true, true, true, true, true, true, true);
                if (!CheckForReturnError(bufferReturnInfo, "Turn off Streaming", showErrorMessage))
                {
                    success = false;
                }
            }
            catch (Exception error)
            {
                _log.Error(error);
                success = false;
            }
            return(success);
        }