Example #1
0
        private void ParseArguments(string commandLine)
        {
            var args = CommandLineUtil.Parse(commandLine);

            foreach (string arg in args.Skip(1))
            {
                if (File.Exists(arg) && Path.HasExtension(arg))
                {
                    switch (Path.GetExtension(arg).ToLowerInvariant())
                    {
                    case ".js":
                        EnsureJavaScriptForm();
                        _javaScriptForm.OpenEditor(arg);
                        break;

                    case ".weproj":
                        EnsureJavaScriptForm();
                        _javaScriptForm.OpenProject(arg);
                        break;

                    case ".wqpkg":
                    case ".wqreport":
                    case ".wqexport":
                        AddFile(arg);
                        return;
                    }
                }
            }
        }