Exemple #1
0
        static void Main()
        {
            var logger     = new LoggerManager();
            var model      = new LogModel();
            var controller = new LogViewController(logger, model);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new LogViewerForm(logger, model, controller));
        }
Exemple #2
0
        public LogViewerForm(ILoggerManager logger, LogModel model, LogViewController logViewController)
        {
            InitializeComponent();
            this.logger   = logger;
            this.model    = model;
            logController = logViewController;

            // initialise comboBox value of log attribute
            LogAttributeComboBox.DataSource = Enum.GetValues(typeof(LogAttributesEnum));

            // subscribe
            model.logChanged += update;
        }
Exemple #3
0
 internal void processNewRawMsg(string rawMsg, string sourceip)
 {
     if (LogViewController.wantReceive)
     {
         SysLogMessageVO msgVo;
         if (useKiwi)
         {
             msgVo = kiwiConvertToSysLogMessageVo(rawMsg, sourceip);
         }
         else
         {
             msgVo = syslogConvertToSysLogMessageVo(rawMsg, sourceip);
         }
         LogViewController controller = new LogViewController();
         controller.addLogToList(msgVo);
     }
 }