コード例 #1
0
        public GlobalSat(string portName = "COM1", int baudRate = 115200)
        {
            Logger = new SimpleLogger();

            PortName = portName;
            BaudRate = baudRate;
        }
コード例 #2
0
        private void LoggerEventLog(string message, SimpleLogger.MessageLevel messagelevel)
        {
            switch (messagelevel)
            {
                case SimpleLogger.MessageLevel.None:
                    AddItemToConsole(message, Color.Black);
                    Log.Trace(message);
                    break;
                case SimpleLogger.MessageLevel.Success:
                    AddItemToConsole(message, Color.Green);
                    Log.Trace(message);
                    break;
                case SimpleLogger.MessageLevel.Information:
                    AddItemToConsole(message, Color.Blue);
                    Log.Info(message);
                    break;

                case SimpleLogger.MessageLevel.Error:
                    AddItemToConsole(message, Color.Red);
                    Log.Error(message);
                    break;
            }

            Update();
        }