本文整理汇总了C#中System.UInt32.Month方法的典型用法代码示例。如果您正苦于以下问题:C# UInt32.Month方法的具体用法?C# UInt32.Month怎么用?C# UInt32.Month使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.UInt32
的用法示例。
在下文中一共展示了UInt32.Month方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Run
private void Run(JulianDay startDate, JulianDay endDate, BackgroundWorker worker, DoWorkEventArgs e)
{
JulianDay profileStartDate = App.Model.ProfileHolder.Profile.StartProfileDate.JulianDay;
JulianDay profileEndDate = App.Model.ProfileHolder.Profile.EndProfileDate.JulianDay;
// profileStartDate and profileEndDate could be 0
if (startDate == 0 && endDate == 0)
{
startDate = profileStartDate;
endDate = profileEndDate;
}
// Clip the passed start date to the document start date
if (startDate < profileStartDate)
startDate = profileStartDate;
// Always run to the end of the document since changes ripple to the end
endDate = profileEndDate;
// From the start date forward, truncate the daily balances
// Don't leave before doing this!
_Accounts.TruncateBalance(startDate);
_Categories.TruncateBalance(startDate);
// If Dates were never set or nothing to do
if ((profileStartDate == 0 && profileEndDate == 0) || startDate > profileEndDate)
{
UpdateBalances(worker, e);
return;
}
#if NOTUSED
Helper.Trace("Calculating account values between {0,2:d2}/{1,2:d2}/{2,2:d2} and {3,2:d2}/{4,2:d2}/{5,2:d2}",
startDate.Month(), startDate.Day(), startDate.Year(), endDate.Month(), endDate.Day(), endDate.Year());
DateTime SystemTime = DateTime.Now;
Helper.Trace("Start: {0,2:d2}:{1,2:d2}:{2,2:d2}:{3,2:d2}", SystemTime.Hour, SystemTime.Minute, SystemTime.Second, SystemTime.Millisecond);
#endif
// Let the packages know we are about to run
IncomeBalances.Clear();
SpendingBalances.Clear();
_Incomes.RunPrepare(this);
_Packages.RunPrepare(this);
// Loop thru all the dates in the running date range
for (JulianDay date = startDate; date <= endDate; date++)
{
if (worker != null && worker.CancellationPending)
{
e.Cancel = true;
return;
}
// Run the packages for the given date
_Incomes.Run(this, date);
_Packages.Run(this, date);
// At the end of each day, handle any negative account balances by putting them on the credit account
_Accounts.BorrowFromCredit(this, date);
// At the end of each month, make credit payments if needed
JulianDay tomorrow = date + 1;
bool bMonthlyRun = (tomorrow.Day() == 1);
if (bMonthlyRun)
_Accounts.PayoffCredit(this, date);
}
// Update the RunCount for anyone listening
RunCount++;
UpdateBalances(worker, e);
#if NOTUSED
SystemTime = DateTime.Now;
Helper.Trace("End: {0,2:d2}:{1,2:d2}:{2,2:d2}:{3,2:d2}", SystemTime.Hour, SystemTime.Minute, SystemTime.Second, SystemTime.Millisecond);
#endif
}