Ejemplo n.º 1
0
        // Login to the server and connect to the specified repository
        public bool ConnectToServer(int orgId, string user, string password, string repo)
        {
            sawObject = new SAWSAppObject();

            long             ResultValue;
            Enum_EncryptType EncryptType;
            // SAWSGlobalMessageSet GlobalMessageSet;
            string PlanName;
            bool   Cancelled;
            string ResultDescription;

            sawObject.SetConnectionType(Enum_ConnectionType.Enum_BroadBandConnection);

            //ResultValue = sawObject.ConnectToServer(

            //    );

            // TODO: connect to server
            ResultValue       = 0;
            ResultDescription = string.Empty;

            //ResultValue = sawObject.ConnectToServer(
            //	orgId,
            //	false,
            //	true,
            //	"",
            //	0,
            //	Enum_ProxyType.Enum_NOPROXY,
            //	"",
            //	0,
            //	"",
            //	"",
            //	out EncryptType,
            //	out GlobalMessageSet,
            //	out PlanName,
            //	out Cancelled,
            //	out ResultDescription);

            Console.WriteLine("Result: {0}, {1}", ResultValue, ResultDescription);
            if (ResultValue == 0)
            {
                bool   MustChangePassword;
                int    DaysOfExpiration;
                bool   Cancelled1;
                string ResultDescription1;

                //sawObject.Login(user, password, repo, out MustChangePassword, out DaysOfExpiration, out Cancelled1, out ResultDescription1);
                sawObject.Login("", "", "", "", new SAWSKeyFileSet(), out MustChangePassword, out DaysOfExpiration, out Cancelled1, out ResultDescription1);

                Console.WriteLine("Login: {0}", ResultDescription1);

                return(true);
            }

            return(false);
        }