示例#1
0
 public IOThread(IDataLog dataLog, ref Session session)
 {
     _dataLog  = dataLog;
     _commands = new Queue <Command>();
     _waitingForAcknowledment = new Dictionary <byte, Acknowledgement>();
     _session = session;
 }
示例#2
0
        private void LoadFlights(IDataLog data)
        {
            UiDispatcher.RunOnUIThread(() =>
            {
                // add flights
                Flight entireLog = new Flight()
                {
                    Name      = "Log " + logs.Count,
                    StartTime = data.StartTime,
                    Duration  = data.Duration
                };
                allFlights.Add(entireLog);

                foreach (var flight in data.GetFlights())
                {
                    flight.Name = "Flight " + allFlights.Count;
                    allFlights.Add(flight);
                    AppendMessage("Motor started at {0} and ran for {1} ", flight.StartTime, flight.Duration);
                }

                if (myMap.Visibility == Visibility.Visible)
                {
                    ShowMap();
                }
            });
        }
示例#3
0
 /// <summary>
 /// 初始化log服务
 /// </summary>
 private void InitLogService()
 {
     try
     {
         _dataLog = DependencyInjection.Current.ScopeContainer.Resolve <IDataLog>();
     }
     catch (Exception e)
     {
     }
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MessageLogViewModel"/> class.
        /// </summary>
        public MessageLogViewModel(IDataLog iocDataLog)

        {
            BaseTitle = "Message Log";

            BaseTitleIcon = CommonConstants.IconLog;

            Contract.Assert(iocDataLog != null);
            _iocDataLog = iocDataLog;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CommonNotifications"/> class.
        /// </summary>
        /// <param name="iocCommonLogging">
        /// Common Logging routines
        /// </param>
        /// <param name="iocEventAggregator">
        /// The event aggregator.
        /// </param>
        public CommonNotifications(ICommonLogging iocCommonLogging,
                                   IEventAggregator iocEventAggregator, IDataLog iocDataLog)
        {
            if (iocEventAggregator is null)
            {
                throw new ArgumentNullException(nameof(iocEventAggregator));
            }

            _iocEventAggregator = iocEventAggregator;

            _iocCommonLogging = iocCommonLogging;

            _DataLog = iocDataLog;
        }
示例#6
0
 public LogThread(IDataLog dataLog)
 {
     _dataLog = dataLog;
 }