GetPassword() static private method

static private GetPassword ( string server, string user ) : string
server string
user string
return string
        private void GetUserAndPassword()
        {
            string user = ASEditorBackend.GetUser(this.serverAddress);

            if (user != string.Empty)
            {
                this.userName = user;
            }
            user = ASEditorBackend.GetPassword(this.serverAddress, user);
            if (user != string.Empty)
            {
                this.password = user;
            }
        }
        private void GetUserAndPassword()
        {
            string user = ASEditorBackend.GetUser(this.serverAddress);

            if (user != string.Empty)
            {
                this.userName = user;
            }
            string password = ASEditorBackend.GetPassword(this.serverAddress, user);

            if (!(password != string.Empty))
            {
                return;
            }
            this.password = password;
        }
        public static bool InitializeMaintBinding()
        {
            PListConfig pListConfig = new PListConfig("Library/ServerPreferences.plist");
            string      text        = pListConfig["Maint UserName"];
            string      text2       = pListConfig["Maint Server"];
            string      text3       = pListConfig["Maint project name"];
            string      text4       = pListConfig["Maint database name"];
            string      text5       = pListConfig["Maint port number"];
            int         timeout;

            if (!int.TryParse(pListConfig["Maint Timeout"], out timeout))
            {
                timeout = 5;
            }
            bool result;

            if (text2.Length == 0 || text3.Length == 0 || text4.Length == 0 || text.Length == 0)
            {
                AssetServer.SetProjectName("");
                result = false;
            }
            else
            {
                AssetServer.SetProjectName(string.Format("{0} @ {1}", text3, text2));
                string connectionString = string.Concat(new string[]
                {
                    "host='",
                    text2,
                    "' user='******' password='******' dbname='",
                    text4,
                    "' port='",
                    text5,
                    "' sslmode=disable ",
                    pListConfig["Maint Connection Settings"]
                });
                AssetServer.Initialize(text, connectionString, timeout);
                result = true;
            }
            return(result);
        }
        private void LoadConfig()
        {
            PListConfig pListConfig = new PListConfig("Library/ServerPreferences.plist");

            this.serverAddress = pListConfig["Maint Server"];
            this.userName      = pListConfig["Maint UserName"];
            this.port          = pListConfig["Maint port number"];
            this.projectName   = pListConfig["Maint project name"];
            this.password      = ASEditorBackend.GetPassword(this.serverAddress, this.userName);
            if (this.port != string.Empty && this.port != 10733.ToString())
            {
                this.serverAddress = this.serverAddress + ":" + this.port;
            }
            this.serversList         = InternalEditorUtility.GetEditorSettingsList("ASServer", 20);
            this.serversLv.totalRows = this.serversList.Length;
            if (ArrayUtility.Contains <string>(this.serversList, this.serverAddress))
            {
                this.serversLv.row = ArrayUtility.IndexOf <string>(this.serversList, this.serverAddress);
            }
        }
        public static bool InitializeMaintBinding()
        {
            PListConfig plistConfig = new PListConfig("Library/ServerPreferences.plist");
            string      str1        = plistConfig["Maint UserName"];
            string      server      = plistConfig["Maint Server"];
            string      str2        = plistConfig["Maint project name"];
            string      str3        = plistConfig["Maint database name"];
            string      str4        = plistConfig["Maint port number"];
            int         result;

            if (!int.TryParse(plistConfig["Maint Timeout"], out result))
            {
                result = 5;
            }
            if (server.Length == 0 || str2.Length == 0 || (str3.Length == 0 || str1.Length == 0))
            {
                AssetServer.SetProjectName(string.Empty);
                return(false);
            }
            AssetServer.SetProjectName(string.Format("{0} @ {1}", (object)str2, (object)server));
            string connectionString = "host='" + server + "' user='******' password='******' dbname='" + str3 + "' port='" + str4 + "' sslmode=disable " + plistConfig["Maint Connection Settings"];

            AssetServer.Initialize(str1, connectionString, result);
            return(true);
        }