예제 #1
0
        private void App_OnStartup(object sender, StartupEventArgs e)
        {
            StatisticsCollector.GetInstance();
            LoggingModel.GetInstance();

            var mainWindow = new MainWindow();

            mainWindow.Show();

            _bot = new Bot("<your-slack-api-token-comes-here>");
            _bot.Start();
        }
예제 #2
0
        public string RunAction(string[] args)
        {
            var sb = new StringBuilder();

            string[] history = LoggingModel.GetInstance().History;

            sb.AppendLine("Az utolsó " + history.Length + " elem a naplóból:");

            foreach (string s in history)
            {
                sb.AppendLine(s);
            }

            return(sb.ToString());
        }
예제 #3
0
        public static LoggingModel GetInstance()
        {
            if (_instance == null)
            {
                lock (_lock)
                {
                    if (_instance == null)
                    {
                        _instance = new LoggingModel();
                    }
                }
            }

            return(_instance);
        }
예제 #4
0
        public static LoggingModel GetInstance()
        {
            if (_instance == null)
            {
                lock (_lock)
                {
                    if (_instance == null)
                        _instance = new LoggingModel();
                }
            }

            return _instance;
        }