Пример #1
0
        public bool CheckRegister()
        {
            string str = FileReadWrite.ReadFile(this._RegFilePath);

            return(this._Password == str);
            //return false;
        }
Пример #2
0
        private void MakeHideFile()
        {
            object obj2 = DateTime.Now.Ticks + ";";
            string data = string.Concat(new object[] { obj2, this._DefDays, ";", this._Runed, ";", this._BaseStringOld, ";", this._BaseString });

            FileReadWrite.WriteFile(this._HideFilePath, data);
        }
Пример #3
0
        private int CheckHideFile()
        {
            long days;
            int  num2;

            string[] strArray = FileReadWrite.ReadFile(this._HideFilePath).Split(new char[] { ';' });
            this._BaseStringOld = strArray[3];
            if ((strArray.Length == 5) && (this._BaseString == strArray[4]))
            {
                if (Convert.ToInt32(strArray[1]) <= 0)
                {
                    this._DefDays = 0;
                    return(0);
                }
                DateTime time = new DateTime(Convert.ToInt64(strArray[0]));
                if (time == DateTime.Now)
                {
                    this._DefDays = 0;
                    return(this._DefDays);
                }
                TimeSpan span = (TimeSpan)(DateTime.Now.Date - time.Date);
                days          = span.Days;
                num2          = Convert.ToInt32(strArray[1]);
                this._Runed   = Convert.ToInt32(strArray[2]);
                days          = Math.Abs(days);
                this._DefDays = num2 - Convert.ToInt32(days);
            }
            else if (strArray.Length == 4)
            {
                if (Convert.ToInt32(strArray[1]) <= 0)
                {
                    this._DefDays = 0;
                    return(0);
                }
                DateTime time2 = new DateTime(Convert.ToInt64(strArray[0]));
                if (time2 == DateTime.Now)
                {
                    this._DefDays = 0;
                    return(this._DefDays);
                }
                TimeSpan span2 = (TimeSpan)(DateTime.Now.Date - time2.Date);
                days          = span2.Days;
                num2          = Convert.ToInt32(strArray[1]);
                this._Runed   = Convert.ToInt32(strArray[2]);
                days          = Math.Abs(days);
                this._DefDays = num2 - Convert.ToInt32(days);
            }
            return(this._DefDays);
        }
Пример #4
0
 private void MakeRegFile()
 {
     FileReadWrite.WriteFile(this._RegFilePath, this._Password);
 }