示例#1
0
        public override Control CreateControlPane()
        {
            var host = new ConsoleRepl(new SynchronusExecutor(Autodesk.Navisworks.Api.Application.ActiveDocument));


            //ClojureInit.ExecuteInNs.invoke(@" (load-string (slurp ""C:\\dev\\RevitClojureRepl\\NavisworksClojureRepl\\wrapper.clj"")) ");

            host.Dock = DockStyle.Fill;
            host.CreateControl();
            return(host);
        }
示例#2
0
        public bool Run(params string[] args)
        {
            if (!Console.IsInputRedirected && !Console.IsOutputRedirected && ConsoleHelper.HasInteractiveConsole)
            {
                Repl = new ConsoleRepl();
                HasInteractiveConsole = true;

                InitializeRepl();

                try
                {
                    if (ConsoleRepl.IsSelf())
                    {
                        Console.Title = $"kalk {Version}";
                    }
                }
                catch
                {
                    // ignore
                }
            }

            // Directory.CreateDirectory(KalkUserFolder);

            if (DisplayVersion)
            {
                ShowVersion();
                WriteHighlightLine("# Type `help` for more information and at https://github.com/xoofx/kalk");
            }

            // Load user config file after showing the version
            LoadUserConfigFile();

            if (Repl != null)
            {
                return(RunInteractive());
            }
            else
            {
                return(RunNonInteractive());
            }
        }