/// <summary>The main form_ shown.</summary> /// <param name="sender">The sender.</param> /// <param name="e">The e.</param> private void MainForm_Shown(object sender, EventArgs e) { _services.InitializePlugIns(); DockContent dbInspectorForm = _dbInspector as DockContent; if (dbInspectorForm != null) { // the activate for "DockContent" is different to that of "Form". dbInspectorForm.Activate(); } _initialized = true; SetPointerState(Cursors.Default); SetStatus(null, string.Empty); // now check for command line args that are "command type names" if (_arguements != null && _arguements.Length > 0) { foreach (string arg in _arguements) { if (arg.StartsWith("/cmd:")) { string cmdName = arg.Substring(5); ICommand cmd = CommandManager.GetCommandInstanceByPartialName(cmdName); if (cmd != null) { cmd.Execute(); } } } } else { CommandManager.GetCommandInstance <NewQueryFormCommand>().Execute(); } }