Esempio n. 1
0
        /// <summary>
        /// 讀取文件
        /// </summary>
        public void LoadDecryptFile()
        {
            //Load File
            DesFile des = new DesFile();
            string  s   = null;

            s = des.DecryptFile(FileName);

            if (string.IsNullOrEmpty(s))
            {
                return;
            }

            string[] ary = s.Split(new char[] { ';' });

            int i = 0;

            for (i = 0; i <= ary.Length - 1; i++)
            {
                s = ary[i];
                switch (i)
                {
                case 0:
                    this.SetingPath = s;
                    break;

                case 1:
                    this.LogPath = s;
                    break;
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 儲存文件
        /// </summary>
        public void CreateEncrypt()
        {
            string s = string.Empty;

            //第0位置SetingPath
            //第1位置LogPath
            s += this.SetingPath;
            s += ";" + this.LogPath;

            DesFile des = new DesFile();

            des.EncryptFile(s, FileName);
        }
Esempio n. 3
0
        /// <summary>
        /// 讀取文件
        /// </summary>
        public void LoadDecryptFile()
        {
            //Load File
            DesFile des = new DesFile();
            string  s   = null;

            s = des.DecryptFile(FileName);

            if (string.IsNullOrEmpty(s))
            {
                return;
            }

            string[] ary = s.Split(new char[] { ';' });

            int i = 0;

            for (i = 0; i <= ary.Length - 1; i++)
            {
                s = ary[i];
                switch (i)
                {
                case 0:
                    this.LoginID = s;
                    break;

                case 1:
                    this.Passward = s;
                    break;

                case 2:
                    this.AutoLogin = bool.Parse(s);
                    break;

                case 3:
                    this.StationNo = s;
                    break;

                case 4:
                    this.StationName = s;
                    break;

                case 5:
                    this.LoginName = s;
                    break;
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 儲存文件
        /// </summary>
        public void CreateEncrypt()
        {
            //server=10.204.121.8;database=ReportServer;User ID=sa;Pwd=ecudn08ccg3m/45k3
            string s = string.Empty;

            //第0位置Server
            //第1位置DataBase
            //第2位置Sa
            //第3位置Password
            s += this.Server;
            s += ";" + this.DataBase;
            s += ";" + this.Sa;
            s += ";" + this.Password;

            DesFile des = new DesFile();

            des.EncryptFile(s, FileName);
        }
Esempio n. 5
0
        /// <summary>
        /// 讀取文件
        /// </summary>
        public void LoadDecryptFile()
        {
            //Load File
            DesFile des = new DesFile();
            string  s   = null;

            s = des.DecryptFile(FileName);

            if (string.IsNullOrEmpty(s))
            {
                return;
            }

            string[] ary = s.Split(new char[] { ';' });
            int      i   = 0;

            for (i = 0; i <= ary.Length - 1; i++)
            {
                s = ary[i];
                switch (i)
                {
                case 0:
                    this.LicenseServer = s;
                    break;

                case 1:
                    this.DataBaseType = System.Convert.ToInt32(s);
                    break;

                case 2:
                    this.UserName = s;
                    break;

                case 3:
                    this.Password = s;
                    break;

                case 4:
                    this.UseTrusted = bool.Parse(s);
                    break;
                }
            }
        }
Esempio n. 6
0
        /// <summary>
        /// 儲存文件
        /// </summary>
        public void CreateEncrypt()
        {
            string s = string.Empty;

            //第0位置LicenseServer
            //第1位置DataBaseType
            //第2位置UserName
            //第3位置Password
            //第4位置UseTrusted
            s += this.LicenseServer;
            s += ";" + this.DataBaseType.ToString();
            s += ";" + this.UserName;
            s += ";" + this.Password;
            s += ";" + this.UseTrusted.ToString();

            DesFile des = new DesFile();

            des.EncryptFile(s, FileName);
        }
Esempio n. 7
0
        /// <summary>
        /// 儲存文件
        /// </summary>
        public void CreateEncrypt()
        {
            string s = string.Empty;

            //第0位置UserID
            //第1位置Passward
            //第2位置AutoLogin
            //第3位置OCLSType
            s += this.LoginID;
            s += ";" + this.Passward;
            s += ";" + this.AutoLogin.ToString();
            s += ";" + this.StationNo;
            s += ";" + this.StationName;
            s += ";" + this.LoginName;

            DesFile des = new DesFile();

            des.EncryptFile(s, FileName);
        }