Ejemplo n.º 1
0
 void DefinitionSetEH(object sender, EventArgs e)
 {
     LoggerSAP.Log("Finished entering the definition.");
     _def.DefinitionChangedEvt += new EventHandler(DefinitionSetEH2);
     _def.definicja             = _tb.Text;
     _tb.Dispose();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Displays general introduction of the tool.
 /// </summary>
 private void IntroduceYourself()
 {
     LoggerSAP.Log("{0} ({1})", ExeName, ExeID); //Introduce yourself
     LoggerSAP.Log("Product created on May 2009. Support alias: {0}.", Settings.Default.SupportDetails);
     LoggerSAP.Log("Product specification: {0}", Settings.Default.DocumentationLink);
     LoggerSAP.Log();
 }
Ejemplo n.º 3
0
        void ChangeToDefinitionEH(object sender, EventArgs e)
        {
            LoggerSAP.Log("Changing element ({0},{1}) to definition.", _row, _column);
            BaseCrosswordElement bce = ElementsFactory.SAP.CreateObject(Definition.ObjectType, _crossword, _column, _row);

            _crossword.SubstituteCrosswordElement(bce, _column, _row);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Registers known crossword element types with <see cref="ElementsFactory"/>.
 /// </summary>
 public static void RegisterKnownElementTypes()
 {
     LoggerSAP.Log("Registering known crossword element types.");
     ElementsFactory.SAP.RegisterConstructor(Letter.ObjectType, Letter.ctor);
     ElementsFactory.SAP.RegisterConstructor(EmptyElement.ObjectType, EmptyElement.ctor);
     ElementsFactory.SAP.RegisterConstructor(Definition.ObjectType, Definition.ctor);
 }
Ejemplo n.º 5
0
        void PossibleWordAddedEH(object sender, EventArgs e)
        {
            LoggerSAP.Log("Finished entering a possible word.");
            string newWord = _tb.Text;

            _tb.Dispose();
            AddPossibleWord(newWord);
        }
Ejemplo n.º 6
0
            private void CreateMeshNode(CSVMeshNode.CSVMeshNodeTemplate csvLine)
            {
                CSVMeshNode newNode = new CSVMeshNode(csvLine, _container);

                _container.semaphore.WaitOne();
                _container.nodeList.Add(newNode);
                _container.semaphore.Release();
                LoggerSAP.Log("Created mesh node named {0} (with {1} dimensions) from it's template.", newNode._name, newNode._x.rank);
            }
Ejemplo n.º 7
0
 void AddPossibleWordClickedEH(object sender, EventArgs e)
 {
     LoggerSAP.Log("Adding possible word to ({0},{1}) definition.", _row, _column);
     _tb          = new TextBox();
     _tb.Location = _wControl.Location;
     _tb.Parent   = _wControl.Parent;
     _tb.Leave   += new EventHandler(PossibleWordAddedEH);
     _tb.Focus();
     _tb.BringToFront();
 }
Ejemplo n.º 8
0
 void AssignLetterEH(object sender, EventArgs e)
 {
     LoggerSAP.Log("Assigning letter.");
     _tb           = new TextBox();
     _tb.Parent    = _wControl;
     _tb.Leave    += new EventHandler(LetterSetEH);
     _tb.MaxLength = 1;
     _tb.Focus();
     _tb.Text = letter;
 }
Ejemplo n.º 9
0
 internal Context()
 {
     //Create the context thread that will run until this class is not destroyed.
     LoggerSAP.Log("Creating ALIContext.");
     contextThread = new Thread(new ParameterizedThreadStart(ContextThreadEntryPoint));
     contextThread.IsBackground = true;                       //Set this thread as background
     contextThread.Name         = "ALIContext";               //Name the thread so that we can identify it later.
     contextThread.Priority     = ThreadPriority.BelowNormal; //Lower the priority of the thread.
     contextThread.Start(this);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Sets dimensions for the crossword.
 /// </summary>
 /// <param name="columns">Number of crossword columns.</param>
 /// <param name="rows">Numer of crossword rows.</param>
 public void SetDimensions(int columns, int rows)
 {
     _columns = columns;
     _rows    = rows;
     if (_letters != null)
     {
         LoggerSAP.Log("Array of letter not empty. Deleting it.");
     }
     LoggerSAP.Log("Allocating new array of base crossword elements.");
     _letters = new BaseCrosswordElement[_columns, _rows];
 }
Ejemplo n.º 11
0
 void AssignDefinitionEH(object sender, EventArgs e)
 {
     LoggerSAP.Log("Assigning definition.");
     _tb          = new TextBox();
     _tb.Location = _wControl.Location;
     _tb.Parent   = _wControl.Parent;
     _tb.Leave   += new EventHandler(DefinitionSetEH);
     _tb.Focus();
     _tb.Text = _def.definicja;
     _tb.BringToFront();
 }
Ejemplo n.º 12
0
 /// <summary>
 /// The base constructor takes care of creating the threaded mesh for you.
 /// </summary>
 protected AbstractThreadedMesh()
 {
     //Create the context thread that will run until this class is not destroyed.
     LoggerSAP.Log("Creating abstract mesh.");
     semaphore  = new Semaphore(1, 1, _nextSemaphoreId()); //Unique name for the semaphore.
     meshThread = new Thread(new ParameterizedThreadStart(DefaultSafeThreadStarter));
     meshThread.IsBackground = true;                       //Set this thread as background
     meshThread.Name         = _nextSemaphoreId();         //Name the thread so that we can identify it later.
     meshThread.Priority     = ThreadPriority.BelowNormal; //Lower the priority of the thread.
     meshThread.Start(this);
 }
Ejemplo n.º 13
0
 public override void DrawCrossword()
 {
     LoggerSAP.Log("Drawing crossword.");
     if (_parent != null)
     {
         LoggerSAP.Log("Parent control set. Should draw.");
         LoggerSAP.Log("Parent: {0}, dimensions: [{1}, {2}].", _parent, _columns, _rows);
     }
     else
     {
         LoggerSAP.Log("Parent control not set. Nothing to draw.");
     }
 }
Ejemplo n.º 14
0
        /// <summary>
        /// Processes one entry from the node queue (if the queue is non-empty).
        /// </summary>
        /// <param name="newNodeQueue">Queue that is to be processed.</param>
        /// <returns>True if the queue needs more processing.</returns>
        private bool ProcessNodeQueue(Queue <MeshNode.MeshNodeTemplate> newNodeQueue)
        {
            if (newNodeQueue.Count == 0)
            {
                return(false);                         //Nothing to process
            }
            semaphore.WaitOne();
            MeshNode newNode = new MeshNode(newNodeQueue.Dequeue(), this);

            nodeList.Add(newNode);
            LoggerSAP.Log("Created mesh node named {0} (with {1} dimensions) from it's template.", newNode._name, newNode._x.rank);
            semaphore.Release();
            return(true);
        }
Ejemplo n.º 15
0
 /// <summary>
 /// Shows usage to the command line.
 /// <para/>This is invoked when invalid command line is specified.
 /// </summary>
 private void ShowUsage()
 {
     LoggerSAP.Log("Usage:");
     LoggerSAP.Log("{0} [-l <ll-cc> [-l <ll-cc>[...]]] [-p <project> [-p <project> [...]]] [-m <mode>]", ExeName);
     LoggerSAP.Log("Where ll-cc is a language identfier, for example 'de-DE'");
     LoggerSAP.Log("      project is a project identifier, for example 'word'.");
     LoggerSAP.Log("      mode is one of {'locgroups', 'projects', 'centralized'}.");
     LoggerSAP.Log("         locgroups   - standalone mode with one instance of OSLEBot created per every locgroup.");
     LoggerSAP.Log("         projects    - standalone mode with one instance of OSLEBot created per every project.");
     LoggerSAP.Log("         centralized - same as 'projects' mode, but information about which checks are enabled for each {language, project} is obtained from a database.");
     LoggerSAP.Log("Sample command line: {0} -l fr-FR -l de-DE -p word -p mso", ExeName);
     LoggerSAP.Log("                     {0} -l fr-FR -m centralized", ExeName);
     LoggerSAP.Log("Without parameters, all files in enlistment are scanned and {0} runs in standalone mode.", ExeName);
 }
Ejemplo n.º 16
0
 private void AddPossibleWord(string newWord)
 {
     if (newWord.Length > 0)
     {
         if (_def.propozycje.Contains(newWord.ToLowerInvariant()))
         {
             LoggerSAP.Log("Word {0} is already contained.", newWord);
         }
         else
         {
             _def.propozycje.Add(newWord.ToLowerInvariant());
         }
     }
 }
Ejemplo n.º 17
0
        private void ReadInput()
        {
            //Start reading our file.
            LoggerSAP.Log("Reading in: {0}...", _csvEdbFileName);
            MyStreamReader sr = new MyStreamReader(_csvEdbFileName);
            string         csvLine;
            int            lineCount = 0;

            while (!sr.EndOfStream)
            {
                csvLine = sr.ReadLine(); lineCount++;
                AddNode(new CSVMeshNode.CSVMeshNodeTemplate(csvLine)); //No need to explicitly wait for semaphore, because AddNode() already does this.
                Thread.SpinWait(1);                                    //Give away a little of processor time.
            }
            sr.Close();
            LoggerSAP.Log("Finished reading {0} ({1} entries).", _csvEdbFileName, lineCount);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// The entry point for the context thread.
        /// </summary>
        /// <param name="threadParamObj"></param>
        private void ContextThreadEntryPoint(object threadParamObj)
        {
            LoggerSAP.Log(string.Format("ALIContext thread has started. Thread name: {0}", Thread.CurrentThread.Name));
            Context threadParam = (Context)threadParamObj;

            while (threadParam.isActive) //Message loop
            {
                //Do some useful work here
                LoggerSAP.Log("Context working...");
                Thread.Sleep(5000);
                if (threadParam.meshTest == null)
                {
                    threadParam.meshTest = new Test();
                }
            }
            LoggerSAP.Log(string.Format("ALIContext thread has finished. Thread name: {0}", Thread.CurrentThread.Name));
        }
Ejemplo n.º 19
0
 /// <summary>
 /// Provides catching top-level exceptions from the thread, so that the application doesn't crash
 /// when specific thread doesn't catch all it's exceptions.
 /// </summary>
 /// <param name="threadParamObj">Object from ParametrizedThreadStart. It is ourselves, actually.</param>
 private void DefaultSafeThreadStarter(object threadParamObj)
 {
     try
     {
         string className = GetType().Name;
         LoggerSAP.Log("{0} ({1}) thread was born.", Thread.CurrentThread.Name, className);
         Thread.Sleep(2); //Wait for the framework to initialize 'this' object. Without this wait, members assigned to in constructor may not be initialized.
         AbstractThreadedMesh param = (AbstractThreadedMesh)threadParamObj;
         MeshThreadEntryPoint(param);
         LoggerSAP.Log("{0} ({1}) thread has died.", Thread.CurrentThread.Name, className);
     }
     catch (Exception ex)
     {
         LoggerSAP.Log("The '{0} thread didn't catch its exception. The thread has died. Exception message: {1}.",
                       Thread.CurrentThread.Name,
                       ex.Message);
     }
 }
Ejemplo n.º 20
0
            private void CheckInputQueue()
            {
                _container.semaphore.WaitOne();
                int queueEntries = _container.newNodeQueue.Count;

                _container.semaphore.Release();
                if (queueEntries == 0)
                {
                    LoggerSAP.Log("Nothing to process. Going to sleep.");
                    sleepTime = 5000;
                }
                else
                {
                    LoggerSAP.Log("Wow, {0} csv entries to process! Getting down to it.", queueEntries);
                    _container.semaphore.WaitOne();
                    CSVMeshNode.CSVMeshNodeTemplate csvLine = (CSVMeshNode.CSVMeshNodeTemplate)_container.newNodeQueue.Dequeue();
                    _container.semaphore.Release();
                    CreateMeshNode(csvLine);
                }
            }
Ejemplo n.º 21
0
        /// <summary>
        /// Program's entry point on a program instance. Useful for testing program behavior.
        /// </summary>
        /// <param name="args">Command line arguments</param>
        /// <returns>Success indicator</returns>
        public ProgramReturnValue RunProgram(string[] args)
        {
            Initialize();
            IntroduceYourself();

            var arguments = new Arguments(args);

            foreach (var arg in new[] { "config", "response", "output", "enginelog" })
            {
                if (!arguments.Contains(arg))
                {
                    LoggerSAP.Error("Missing argument: {0}", arg);
                    LoggerSAP.Log();
                    ShowUsage();
                    return(ProgramReturnValue.ErrorInvalidCommandLine);
                }
            }
            // verify arguments are valid
            // check if input files exist
            foreach (var arg in new[] { "config", "response" })
            {
                if (!File.Exists(arguments[arg]))
                {
                    LoggerSAP.Error("Argument \"{0}\" points to a non-existing file:\n{1}", arg, arguments[arg]);
                    return(ProgramReturnValue.ErrorInvalidCommandLine);
                }
            }
            // check if output files are valid file names
            foreach (var arg in new[] { "output", "enginelog" })
            {
                FileInfo fileInfo      = null;
                string   fileNameError = null;
                try{
                    fileInfo = new FileInfo(arguments[arg]);
                }
                catch (ArgumentException)
                {
                    fileNameError = "Filename contains incorrect characters";
                }
                catch (PathTooLongException)
                {
                    fileNameError = "File path is too long";
                }
                catch (NotSupportedException)
                {
                    fileNameError = "Filename contains a colon (:)";
                }
                if (!String.IsNullOrEmpty(fileNameError))
                {
                    LoggerSAP.Error("Argument \"{0}\" contains invalid file name:\n{1}", arg, fileNameError);
                    return(ProgramReturnValue.ErrorInvalidCommandLine);
                }
            }
            LoggerSAP.Log("{0} is starting.", ExeID);

            //OSLEBot engine executes using ThreadPool - each rule is queued separately.
            //since OSLEBot code does block threads, many extra threads will be created by ThreadPool which may impair performance.
            //setting max threadpool threads will limit the number of threadpool threads
            ThreadPool.SetMaxThreads(Environment.ProcessorCount, Environment.ProcessorCount);

            var executor = new OSLEBotExecutor();

            try
            {
                var result = executor.Run(arguments["response"], arguments["config"], arguments["output"], arguments["enginelog"]);
                if (result != OSLEBotExecutor.OSLEBotResult.Success)
                {
                    throw new InvalidOperationException("OSLEBot failed.");
                }
            }
            catch (Exception e)
            {
                LoggerSAP.Critical("OSLEBot execution unsuccessful, because: {0}: {1}", e.ToString(), e.Message);
                return(ProgramReturnValue.InternalFailure);
            }
            return(ProgramReturnValue.Success);
        }
Ejemplo n.º 22
0
 /// <summary>
 /// Registers known crossword implementors with the factory.
 /// </summary>
 public static void RegisterKnownCrosswordTypes()
 {
     LoggerSAP.Log("Registering known crossword types.");
     UniversalFactory <string, Crossword> .SAP.RegisterConstructor("Jolka", Jolka.ctor);
 }
Ejemplo n.º 23
0
        /// <summary>
        /// Runs Asimo (a.k.a. OSLEBot) on the specified input files.
        /// </summary>
        /// <param name="fileSet">Set of files to run Asimo on.</param>
        /// <param name="languageFilter">Collection of languages to filter enlistment by. If empty, no filtering is applied.</param>
        /// <param name="projectFilter">Collection of projects to filter enlistment by. If empty, no filtering is applied.</param>
        public override void Run(IEnumerable <ConfigItem> fileSet, IEnumerable <string> languageFilter, IEnumerable <string> projectFilter)
        {
            if (fileSet == null)
            {
                throw new ArgumentNullException("fileSet");
            }
            if (languageFilter == null)
            {
                throw new ArgumentNullException("languageFilter");
            }
            if (projectFilter == null)
            {
                throw new ArgumentNullException("projectFilter");
            }

            var assemblyResolver = new AssemblyResolver(new[]
            {
                Enlistment.LSBuildToolsPath,
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
            });

            assemblyResolver.Init();

            //Apply language and project filters
            fileSet = ApplyFilters(fileSet, languageFilter, projectFilter);

            //Split executions per language per locgroup to allow finite time of execution
            var distinctLanguages = GetDistinctLanguages(fileSet);
            var distinctProjects  = GetDistinctProjects(fileSet);
            var distinctLocgroups = GetDistinctLocgroups(fileSet);

            //Additional validation for incorrect filter values (e.g. misspelled language or project name)
            ValidateFilterAgainstData(languageFilter, distinctLanguages, "language");
            ValidateFilterAgainstData(projectFilter, distinctProjects, "project");

            var checks = GetCheckFileLocations();

            LoggerSAP.Log("One OSLEBot instance will be run against each locgroup.");
            foreach (var language in distinctLanguages)
            {
                foreach (var project in distinctProjects)
                {
                    foreach (var locgroup in distinctLocgroups)
                    {
                        try
                        {
                            var inputCfg = CreateAsimoConfig(fileSet, checks, language, project, locgroup);
                            if (inputCfg.DataSourcePkgs == null || inputCfg.DataSourcePkgs.Count == 0)
                            {
                                //LoggerSAP.Log("No data sources for {0}, {1}, {2}. Skipping.", language, project, locgroup);
                                continue;
                            }

                            var engine    = new OSLEBotEngine(inputCfg);
                            var engineRan = engine.StartRun();
                            if (engineRan)
                            {
                                LoggerSAP.Trace("Cerberus is waiting for engine activity to complete...");
                                engine.WaitForJobFinish(); //Wait for complete stop of activity.
                                engine.Cleanup();
                            }
                            if (engine.EngineLoggedErrors)
                            {
                                LoggerSAP.Error("Engine reported some execution errors.");
                            }
                        }
                        catch (OperationCanceledException ex)
                        {
                            LoggerSAP.Error("OSLEBot engine failed ({0}) because {1}", ex.GetType().Name, ex.Message);
                        }
                        catch (OSLEBotEngineInitializationException ex)
                        //Thrown when there are no rules to run on the input set.
                        {
                            LoggerSAP.Error("OSLEBot engine failed ({0}) because {1}", ex.GetType().Name, ex.Message);
                        }
                    }
                }
            }
        }
Ejemplo n.º 24
0
        /// <summary>
        /// Runs Asimo (a.k.a. OSLEBot) on the specified input files and database information to control which checks
        /// are enabled for which {languages, projects}
        /// </summary>
        /// <param name="fileSet">Set of files to run Asimo on.</param>
        /// <param name="languageFilter">Collection of languages to filter enlistment by. If empty, no filtering is applied.</param>
        /// <param name="projectFilter">Collection of projects to filter enlistment by. If empty, no filtering is applied.</param>
        public override void Run(IEnumerable <ConfigItem> fileSet, IEnumerable <string> languageFilter, IEnumerable <string> projectFilter)
        {
            var readOnlyDB = new CheckConfiguration();

            LoadDataFromDatabase(readOnlyDB);

            if (fileSet == null)
            {
                throw new ArgumentNullException("fileSet");
            }
            if (languageFilter == null)
            {
                throw new ArgumentNullException("languageFilter");
            }
            if (projectFilter == null)
            {
                throw new ArgumentNullException("projectFilter");
            }

            var assemblyResolver = new AssemblyResolver(new[]
            {
                Enlistment.LSBuildToolsPath,
                Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)
            });

            assemblyResolver.Init();

            //Apply language and project filters
            fileSet = ApplyFilters(fileSet, languageFilter, projectFilter);

            //Split executions per language per locgroup to allow finite time of execution
            var distinctLanguages = GetDistinctLanguages(fileSet);
            var distinctProjects  = GetDistinctProjects(fileSet);

            //Additional validation for incorrect filter values (e.g. misspelled language or project name)
            ValidateFilterAgainstData(languageFilter, distinctLanguages, "language");
            ValidateFilterAgainstData(projectFilter, distinctProjects, "project");

            var physicalChecks = GetCheckFileLocations();

            LoggerSAP.Log("One OSLEBot instance will be run against each project.");
            foreach (var language in distinctLanguages)
            {
                foreach (var project in distinctProjects)
                {
                    try
                    {
                        var checksEnabledForThisLanguageProject = readOnlyDB.GetEnabledChecks(language, project);
                        var availableEnabledChecks = physicalChecks.Select(c => Path.GetFileNameWithoutExtension(c))
                                                     .Intersect(checksEnabledForThisLanguageProject);
                        var phycicalCheckPathsToRun = physicalChecks
                                                      .Where(c => availableEnabledChecks
                                                             .Any(cc => Path.GetFileNameWithoutExtension(c).Equals(cc)));
                        if (availableEnabledChecks.Count() == 0)
                        {
                            LoggerSAP.Trace(@"No checks are enabled for [{0}, {1}]. Skipping.", language, project);
                            continue;
                        }
                        var inputCfg = CreateAsimoConfig(fileSet, phycicalCheckPathsToRun, language, project);
                        if (inputCfg.DataSourcePkgs == null || inputCfg.DataSourcePkgs.Count == 0)
                        {
                            //Skip the execution when there is 0 file matches for the specified {language, project} pair.
                            continue;
                        }

                        var engine    = new OSLEBotEngine(inputCfg);
                        var engineRan = engine.StartRun();
                        if (engineRan)
                        {
                            LoggerSAP.Trace("Cerberus is waiting for engine activity to complete...");
                            engine.WaitForJobFinish(); //Wait for complete stop of activity.
                            engine.Cleanup();
                        }
                        if (engine.EngineLoggedErrors)
                        {
                            LoggerSAP.Error("Engine reported some execution errors.");
                        }
                    }
                    catch (OperationCanceledException ex)
                    {
                        LoggerSAP.Error("OSLEBot engine failed ({0}) because {1}", ex.GetType().Name, ex.Message);
                    }
                    catch (OSLEBotEngineInitializationException ex)
                    //Thrown when there are no rules to run on the input set.
                    {
                        LoggerSAP.Error("OSLEBot engine failed ({0}) because {1}", ex.GetType().Name, ex.Message);
                    }
                }
            }
        }
Ejemplo n.º 25
0
        /// <summary>
        /// Program's entry point on a program instance. Useful for testing program behavior.
        /// </summary>
        /// <param name="args">Command line arguments</param>
        /// <returns>Success indicator</returns>
        public ProgramReturnValue RunProgram(string[] args)
        {
            Initialize();
            IntroduceYourself();

            var input = ArgumentParser.Parse(args);

            if (!input.Correct)
            {
                LoggerSAP.Error("Unexpected argument: {0}", input.InvalidArgument);
                LoggerSAP.Log();
                ShowUsage();
                return(ProgramReturnValue.ErrorInvalidCommandLine);
            }

            LoggerSAP.Log("{0} is starting.", ExeID);
            if (!_enlistment.IsDetected)
            {
                LoggerSAP.Error(
                    "Office 14 enlistment not detected. This program must be run from within Office14 development environment.");
                return(ProgramReturnValue.ErrorNoEnlistment);
            }
            LoggerSAP.Trace("Enlistment detected at {0}", _enlistment.Location);
            var unfilteredFiles = _enlistment.GetFiles("intl", LcxType.Lcl);

            switch (input.RunMode)
            {
            case ProgramRunMode.StandaloneLocGroups:
                _asimo = new StandAloneAsimoLocGroupBreakdown(_enlistment);
                break;

            case ProgramRunMode.StandaloneProjects:
                _asimo = new StandAloneAsimoProjectBreakdown(_enlistment);
                break;

            case ProgramRunMode.DatabaseCentralized:
                _asimo = new DatabaseAsimo(_enlistment);
                break;

            case ProgramRunMode.ShowHelpAndQuit:
                ShowUsage();
                return(ProgramReturnValue.Success);

            default:
                throw new ArgumentOutOfRangeException();
            }
            _asimo.CheckFolderPath = Path.Combine(_enlistment.Location, Settings.Default.ChecksRelativePath);
            try
            {
                if (TestMode)
                {
                    _asimo.Run(unfilteredFiles.Take(10), input.Languages, input.Projects);
                }
                else
                {
                    _asimo.Run(unfilteredFiles, input.Languages, input.Projects);
                }
            }
            catch (DirectoryNotFoundException e)
            {
                LoggerSAP.Error("OSLEBot execution unsuccessful, because: {0}", e.Message);
                return(ProgramReturnValue.ErrorMissingDirectory);
            }
            return(ProgramReturnValue.Success);
        }
Ejemplo n.º 26
0
 /// <summary>
 /// Shows usage to the command line.
 /// <para/>This is invoked when invalid command line is specified.
 /// </summary>
 private void ShowUsage()
 {
     LoggerSAP.Log("Usage:");
     LoggerSAP.Log("{0} -config=<path to Cerberus config> -response=<path to LCL response file> -output=<path to output file> -enginelog=<path to OSLEBot engine log>", ExeName);
 }
Ejemplo n.º 27
0
 void LetterSetEH(object sender, EventArgs e)
 {
     LoggerSAP.Log("Finished entering the letter.");
     letter = _tb.Text.ToUpperInvariant();
     _tb.Dispose();
 }
Ejemplo n.º 28
0
 void DefiniteClickedEH(object sender, EventArgs e)
 {
     fDefinite = !fDefinite;
     LoggerSAP.Log("Letter {0} is now {1}.", letter, fDefinite ? "Definite" : "Not definite");
 }