Exemplo n.º 1
0
        public static void Output(this object value, int lineNumber = -1)
        {
            if (Program.CommandLineMode)
            {
                Info(string.Format(lineNumber != -1 ? "Script output line #{0}: {1}" : "Script output: {1}", lineNumber, value));
                return;
            }

            if (ScriptOutputForm.DontShow)
            {
                return;
            }

            var caption = string.Format("Script output{0}", lineNumber > 0 ? " at line " + lineNumber : "");

            var isHourglass = Hourglass.Enabled;

            if (isHourglass)
            {
                Hourglass.Enabled = false;
            }
            ScriptOutputForm.ShowObject(value, caption);
            if (isHourglass)
            {
                Hourglass.Enabled = true;
            }
        }
Exemplo n.º 2
0
        public static void OutputErrors(IEnumerable <TabularNamedObject> items)
        {
            if (ScriptOutputForm.DontShow)
            {
                return;
            }

            var caption = string.Format("Objects with errors ({0})", items.Count());

            ScriptOutputForm.ShowObject(items, caption, true);
        }
Exemplo n.º 3
0
        public static void Output(this object value, int lineNumber = -1)
        {
            // TODO: Make this output to the console, when running in command-line mode

            if (ScriptOutputForm.DontShow)
            {
                return;
            }

            var caption = string.Format("Script output{0}", lineNumber > 0 ? " at line " + lineNumber : "");

            var isHourglass = Hourglass.Enabled;

            if (isHourglass)
            {
                Hourglass.Enabled = false;
            }
            ScriptOutputForm.ShowObject(value, caption);
            if (isHourglass)
            {
                Hourglass.Enabled = true;
            }
        }