public ConnectionTag SilentOpenShortCut(string filename) { XmlReader r = null; try { if (GApp.Frame.WindowState == FormWindowState.Minimized) { GApp.Frame.WindowState = FormWindowState.Normal; } ConfigNode cn = DOMNodeConverter.Read(XMLUtil.FileToDOM(filename).DocumentElement); TerminalParam param = TerminalParam.CreateFromConfigNode(cn); param.FeedLogOption(); return(SilentNewConnection(param)); } catch (Exception ex) { GUtil.Warning(_frame, ex.Message); } finally { if (r != null) { r.Close(); } } return(null); }
public CommandResult OpenShortCut(string filename) { try { if (GApp.Frame.WindowState == FormWindowState.Minimized) { GApp.Frame.WindowState = FormWindowState.Normal; } ConfigNode cn = DOMNodeConverter.Read(XMLUtil.FileToDOM(filename).DocumentElement); TerminalParam param = TerminalParam.CreateFromConfigNode(cn); param.FeedLogOption(); NewConnection(param); return(CommandResult.Success); } catch (Exception ex) { GUtil.Warning(_frame, ex.Message); return(CommandResult.Failed); } }