| | |
| | | return textBuilder.ToString();
|
| | | }
|
| | |
|
| | | public int GetSurplusTime()
|
| | | {
|
| | | var time = TimeUtility.ServerNow;
|
| | | if (!InTime(time))
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | var seconds = 0;
|
| | | if (allDay)
|
| | | {
|
| | | if (!dayReset)
|
| | | {
|
| | | return GetSurplusTime(time);
|
| | | }
|
| | | if (resetType == 0)
|
| | | {
|
| | | DateTime endOperationTime = new DateTime(TimeUtility.Year, TimeUtility.Month,
|
| | | TimeUtility.Day, 0, 0, 0);
|
| | | endOperationTime = endOperationTime.AddDays(1);
|
| | | seconds = (int)(endOperationTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | }
|
| | | else if (resetType == 1)
|
| | | {
|
| | | DateTime endOperationTime = new DateTime(TimeUtility.Year, TimeUtility.Month,
|
| | | TimeUtility.Day, DayResetHour, 0, 0);
|
| | | if (time.Hour >= DayResetHour)
|
| | | {
|
| | | endOperationTime = endOperationTime.AddDays(1);
|
| | | }
|
| | | seconds = (int)(endOperationTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | for (int i = 0; i < times.Count; i++)
|
| | | {
|
| | | if (times[i].InTime(time))
|
| | | {
|
| | | DateTime endOperationTime = new DateTime(TimeUtility.Year, TimeUtility.Month,
|
| | | TimeUtility.Day, times[i].endHour, times[i].endMinute, 0);
|
| | | seconds = (int)(endOperationTime - TimeUtility.ServerNow).TotalSeconds;
|
| | | break;
|
| | | }
|
| | | }
|
| | | }
|
| | | return seconds;
|
| | | }
|
| | |
|
| | | public void ParsePackage(HAA11_tagMCSpringSaleInfo package)
|
| | | {
|
| | | for (int i = 0; i < package.ShopCount; i++)
|