Esempio n. 1
0
    protected override string ReadLine(int autoIndentSize)
    {
        Qs.Scripting.QsScriptCode.LastLine = base.ReadLine(autoIndentSize);

        if (!string.IsNullOrEmpty(Qs.Scripting.QsScriptCode.LastLine))
        {
            QsCommands.Engine = this.Engine;

            QsCommands.ScriptScope = this.ScriptScope;


            QsCommands.CheckCommand(Qs.Scripting.QsScriptCode.LastLine);

            if (QsCommands.CommandProcessed)
            {
                QsCommands.CommandProcessed = false;
                return(string.Empty);
            }
        }

        return(Qs.Scripting.QsScriptCode.LastLine);
    }
Esempio n. 2
0
    public static int Main(string[] args)
    {
        if (Environment.GetEnvironmentVariable("TERM") == null)
        {
            Environment.SetEnvironmentVariable("TERM", "dumb");
        }

        //Console.BackgroundColor = QsCommands.BackgroundColor;
        //Console.ForegroundColor = QsCommands.ForegroundColor;
        //Console.Clear();

        //Console.WindowWidth = 110;
        //Console.WindowHeight = 34;

        //Console.BufferWidth = 110;

        QsCommands.StartConsole();


        QuantitySystem.DynamicQuantitySystem.AddDynamicUnitConverterFunction("Currency", QsRoot.Currency.CurrencyConverter);


        return(new QsHost().Run(args));
    }