// Get Data from hidden file if exists private int CheckHideFile() { string[] HideInfo; HideInfo = FileReadWrite.ReadFile(_HideFilePath).Split(';'); long DiffDays; int DaysToEnd; if (_BaseString == HideInfo[3]) { DaysToEnd = Convert.ToInt32(HideInfo[1]); if (DaysToEnd <= 0) { _Runed = 0; _DefDays = 0; return(0); } DateTime dt = new DateTime(Convert.ToInt64(HideInfo[0])); DiffDays = DateAndTime.DateDiff(DateInterval.Day, dt.Date, DateTime.Now.Date, FirstDayOfWeek.Saturday, FirstWeekOfYear.FirstFullWeek); DaysToEnd = Convert.ToInt32(HideInfo[1]); _Runed = Convert.ToInt32(HideInfo[2]); _Runed -= 1; DiffDays = Math.Abs(DiffDays); _DefDays = DaysToEnd - Convert.ToInt32(DiffDays); } return(_DefDays); }
// Control Registeration file for password // if password saved correctly return true else false private bool CheckRegister() { string Password = FileReadWrite.ReadFile(_RegFilePath); if (_Password == Password) { return(true); } else { return(false); } }