Ejemplo n.º 1
0
        /// <summary>
        /// Set the mode of the chart recorder to the specified mode.
        /// </summary>
        /// <param name="chartMode">The requested chart recorder mode.</param>
        private void SetChartMode(ChartMode chartMode)
        {
            ICommunicationWatch communicationInterface;
            if (MainWindow.CommunicationInterface.CommunicationSetting.Protocol == Protocol.SIMULATOR)
            {
                communicationInterface = new CommunicationWatchOffline(MainWindow.CommunicationInterface);
            }
            else
            {
                communicationInterface = new CommunicationWatch(MainWindow.CommunicationInterface);
            }

            PauseCommunication<ICommunicationWatch>(communicationInterface, true);
            communicationInterface.SetChartMode(chartMode);
            PauseCommunication<ICommunicationWatch>(communicationInterface, false);
            return;
        }