本文整理汇总了C#中Status.ReceiveStatus方法的典型用法代码示例。如果您正苦于以下问题:C# Status.ReceiveStatus方法的具体用法?C# Status.ReceiveStatus怎么用?C# Status.ReceiveStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status.ReceiveStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddItems
private void AddItems(Dictionary<string, VersionInfo> RetuDic, List<string> Criteria, Dictionary<string, List<VersionInfo>> Diction, FromTypes fromtypr, Status stat, string statusStr)
{
if (Criteria == null)
{
return;
}
int cn;
string CstatusStr = "";
Stopwatch st = new Stopwatch();
st.Start();
foreach (string item in Criteria)
{
cn = 0;
if (Diction.ContainsKey(item) == true && Diction[item] != null)
{
foreach (VersionInfo vers in Diction[item])
{
cn++;
RetuDic[vers.versionName] = vers;
if (st.ElapsedMilliseconds > 250)
{
CstatusStr = CreateString(cn, fromtypr, item);
CstatusStr += " so far";
stat.ReceiveStatus(CstatusStr + '\n' + statusStr,false);
st.Reset();
st.Start();
}
}
}
statusStr += '\n'+CreateString(cn, fromtypr, item);
}
}
示例2: VersionInfoFromCriteria
public List<VersionInfo> VersionInfoFromCriteria(VersionInfoSearchCriteria crit,Status stat)
{
string statusStr="";
string CstatusStr = "";
int cn=0;
Stopwatch stopw = new Stopwatch();
List<VersionInfo> ReturnListI = new List<VersionInfo>();
List<VersionInfo> ReturnList = new List<VersionInfo>();
List<VersionInfo> util;
Dictionary<string, VersionInfo> RetuDic = new Dictionary<string, VersionInfo>();
stopw.Reset();
stopw.Start();
foreach (DayOfWeek dayofweek in crit.DaysOfWeek)
{
cn = 0;
if (VersionInfoFromDayOfWeek.TryGetValue(dayofweek, out util))
{
foreach (VersionInfo vers in util)
{
cn++;
RetuDic[vers.versionName] = vers;
if (stopw.ElapsedMilliseconds > 250)
{
CstatusStr = "Added "+cn+" versions created on " + dayofweek+ " so far";
stat.ReceiveStatus(CstatusStr + '\n' + statusStr,false);
stopw.Reset();
stopw.Start();
}
}
}
statusStr += '\n'+"Added " + cn + " versions created on " + dayofweek;
}
stopw.Reset();
stopw.Start();
foreach (ChangeType changetype in crit.ChangeTypes)
{
cn = 0;
if (VersionInfoFromChangeType.TryGetValue(changetype, out util))
{
foreach (VersionInfo vers in util)
{
cn++;
RetuDic[vers.versionName] = vers;
if (stopw.ElapsedMilliseconds > 250)
{
CstatusStr = "Added " + cn + " versions created because of a " + changetype + " so far";
stat.ReceiveStatus(CstatusStr + '\n' + statusStr,false);
stopw.Reset();
stopw.Start();
}
}
}
statusStr += '\n'+"Added " + cn + " versions created because of a " + changetype;
}
stopw.Reset();
stopw.Start();
foreach (string changefile in crit.ChangeFile)
{
cn = 0;
if (VersionInfoFromChangeFile[changefile] != null)
{
foreach (VersionInfo vers in VersionInfoFromChangeFile[changefile])
{
cn++;
RetuDic[vers.versionName] = vers;
if (stopw.ElapsedMilliseconds > 250)
{
CstatusStr = "Added " + cn + " versions because of " + changefile + " so far";
stat.ReceiveStatus(CstatusStr + '\n' + statusStr,false);
stopw.Reset();
stopw.Start();
}
}
}
statusStr += '\n'+"Added " + cn + " versions because of " + changefile;
}
VersionInfo outVerIn;
stopw.Reset();
stopw.Start();
foreach (string versionName in crit.VersionName)
{
cn = 0;
if (versionName.Contains("*") == false)
{
if (VersionInfoFromVersionName.TryGetValue(versionName,out outVerIn))
{
cn++;
RetuDic[outVerIn.versionName] = outVerIn;
if (stopw.ElapsedMilliseconds > 250)
//.........这里部分代码省略.........