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 void Load(ConfigNode parent)
        {
            ConfigNode node = parent.FindChildConfigNode("connection-history");

            if (node != null)
            {
                foreach (ConfigNode ch in node.Children)
                {
                    _history.Add(TerminalParam.CreateFromConfigNode(ch));
                }
            }
        }
 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);
     }
 }
Esempio n. 4
0
        private void ImportConnectionSettings(Hashtable values)
        {
            ConfigNode cn = ConfigNode.CreateIndirect("", values);

            GApp.ConnectionHistory.Append(TerminalParam.CreateFromConfigNode(cn));
        }