Example #1
0
        private void Initialize()
        {
            Settings1 s = new Settings1();

            this.growl = new GrowlGNTP();
            this.growl.ApplicationName = ApplicationNameForGrowl;
            this.growl.NotificationName = NotificationNameForGrowl;
            this.growl.RegisterForGrowl(RemoveDoubleQuotations(s.GrowlPassword),
                RemoveDoubleQuotations(s.GrowlHostName),
                RemoveDoubleQuotations(s.GrowlTcpPort));

            this.targetDirs = s.TargetDirs;
            this.targetFiles = s.TargetFiles;
            this.watchingInterval = s.WatchingInterval;

            if (s.ErrorWordsIgnoreCase != string.Empty)
                errorIgnoreCaseReg = new Regex(s.ErrorWordsIgnoreCase, RegexOptions.IgnoreCase);
            if (s.ErrorWords != string.Empty)
                errorReg = new Regex(s.ErrorWords);
            if (s.NormalWordsIgnoreCase != string.Empty)
                normalIgnoreCaseReg = new Regex(s.NormalWordsIgnoreCase, RegexOptions.IgnoreCase);
            if (s.NormalWords != string.Empty)
                normalReg = new Regex(s.NormalWords, RegexOptions.IgnoreCase);
        }
Example #2
0
        private void DisplaySetting()
        {
            Settings1 s = new Settings1();

            Console.WriteLine("Now setting is following:");
            Console.WriteLine(" + WatchingInterval: {0}", this.watchingInterval);
            Console.WriteLine(" + ErrorWordsIgnoreCase: {0}", s.ErrorWordsIgnoreCase);
            Console.WriteLine(" + ErrorWords: {0}", s.ErrorWords);
            Console.WriteLine(" + NormalWordsIgnoreCase: {0}", s.NormalWordsIgnoreCase);
            Console.WriteLine(" + NormalWords: {0}", s.NormalWords);
        }