示例#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;
        }