public void WriteFile( )
        {
            RecentComputerList computers = new RecentComputerList();
            computers.Add( new ComputerName( "1.1.1.1", "alias", true ) );
            computers.Add( new ComputerName( "work", null, false ) );

            StringWriter writer = new StringWriter();
            ComputerListFile serializer = new ComputerListFile();
            serializer.Write( writer, computers );

            Assert.AreEqual(
                "1.1.1.1\talias\tTrue\r\n" +
                "work\t\tFalse\r\n",
                writer.ToString() );
        }
        public void MstscConnect( MstscSettings settings )
        {
            var mstscApp = new MstscApp();
            #if DEBUG
            mstscApp.TestMode = true;
            #endif
            try
            {
                mstscApp.Run( settings );
            }
            catch ( Exception ex )
            {
                Logger.LogException( ex );
            }

            OnMstscAppExited();

            // It is important to read before we write in case we have two instances of RemoteDesktopPlus open.
            // However RemoteDesktop doesn't have special logic for adding an IP address to the list like we
            // do so we need to do an integrate step.
            m_RecentComputerList = LoadRecentComputerList();

            // We use our own logic to determine what the recent computer list should be after a
            // connection was made.
            m_RecentComputerList.Push( settings.Computer );

            ComputerListFile serializer = new ComputerListFile();
            serializer.Write( m_RecentComputerList );

            OnComputerListUpdated();
        }