Esempio n. 1
0
        static void Main(string[] args)
        {
            ConsoleWriter.Instance.BaseWriter = Console.Out;
            Console.SetOut(ConsoleWriter.Instance);

            var    ver   = Assembly.GetExecutingAssembly().GetName().Version;
            string title = String.Format("ScriptDev2 Script Checker v{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);

            Console.Title = title;
            Console.WriteLine(title);
            Console.WriteLine();

            if (!File.Exists("system/ScriptLoader.cpp"))
            {
                Console.WriteLine("Error: 'system/ScriptLoader.cpp' file not found");
                Console.ReadLine();
                return;
            }

            if (!Directory.Exists("scripts"))
            {
                Console.WriteLine("Error: 'scripts' directory not found");
                Console.ReadLine();
                return;
            }

            try
            {
                // Load all script files into memory
                LoadScriptFiles();

                // Check ScriptLoader.cpp and loaders consistency
                CheckScriptLoader();

                // Check clearing gossip menus on add new items or sending menu again
                CheckClearGossipMenu();
            }
            catch (Exception ex)
            {
                Console.WriteLine("Error: An exception occured while running checks: " + ex.ToString());
            }

            /*********** SUMMARY ***********/

            Console.WriteLine();
            Console.WriteLine("Total Warnings: {0}", Warnings);
            Console.WriteLine("Total Errors: {0}", Errors);

            ConsoleWriter.Instance.Close();
            ScriptFiles.Clear();
            ScriptLoaders.Clear();

            Console.ReadLine();
        }
Esempio n. 2
0
 public void Reset()
 {
     this.Text = $"{Program.AssemblyTitle} {Program.Version} - ";
     FileTree.Nodes.Clear();
     ScriptFiles.Clear();
     Viewport.TabPages.Clear();
     ParamFile   = null;
     Manager     = new WorkspaceManager();
     MotionTable = null;
     IDEMode     = IDE_MODE.NONE;
 }