public static bool ShowModal(IWin32Window Owner, PerforceConnection DefaultConnection, ref string ServerAndPortOverride, ref string UserNameOverride, TextWriter Log)
        {
            ConnectWindow Connect = new ConnectWindow(DefaultConnection, ServerAndPortOverride, UserNameOverride, Log);

            if (Connect.ShowDialog() == DialogResult.OK)
            {
                ServerAndPortOverride = Connect.ServerAndPortOverride;
                UserNameOverride      = Connect.UserNameOverride;
                return(true);
            }
            return(false);
        }
Example #2
0
        public static bool ShowModal(IWin32Window Owner, string ServerAndPort, string UserName, out string NewServerAndPort, out string NewUserName)
        {
            ConnectWindow Connect = new ConnectWindow(ServerAndPort, UserName);

            if (Connect.ShowDialog() == DialogResult.OK)
            {
                NewServerAndPort = Connect.ServerAndPort;
                NewUserName      = Connect.UserName;
                return(true);
            }
            else
            {
                NewServerAndPort = null;
                NewUserName      = null;
                return(false);
            }
        }