コード例 #1
0
        protected SocketHostInfo AddNewConnection()
        {
            SocketHostInfo tcpHostInfo = null;

            AddNewConnectionDialog dialog = new AddNewConnectionDialog();

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                tcpHostInfo = new SocketHostInfo(this, dialog.Host, dialog.Port);

                mBookmarkedHosts.Add(tcpHostInfo);

                string[] hostList   = mBookmarkedHosts.ConvertAll <string>(delegate(SocketHostInfo value) { return(value.ToString()); }).ToArray();
                string   hostString = String.Join(",", hostList);
                if (mDebugger.Manager.Project != null)
                {
                    mDebugger.Manager.Project.SetUserConfiguration("TCPHosts", hostString);
                }
            }

            return(tcpHostInfo);
        }
コード例 #2
0
ファイル: SocketTransport.cs プロジェクト: zcnet4/lua-tilde
		protected SocketHostInfo AddNewConnection()
		{
			SocketHostInfo tcpHostInfo = null;

			AddNewConnectionDialog dialog = new AddNewConnectionDialog();
			if (dialog.ShowDialog() == DialogResult.OK)
			{
				tcpHostInfo = new SocketHostInfo(this, dialog.Host, dialog.Port);

				mBookmarkedHosts.Add(tcpHostInfo);

				string[] hostList = mBookmarkedHosts.ConvertAll<string>(delegate(SocketHostInfo value) { return value.ToString(); }).ToArray();
				string hostString = String.Join(",", hostList);
				if (mDebugger.Manager.Project != null)
				{
					mDebugger.Manager.Project.SetUserConfiguration("TCPHosts", hostString);
				}

			}

			return tcpHostInfo;
		}