当前位置: 首页>>代码示例>>C#>>正文


C# Status.ReceiveStatus方法代码示例

本文整理汇总了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);
            }
        }
开发者ID:LucindaInc,项目名称:FolderTrack,代码行数:33,代码来源:DataManager.cs

示例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)
//.........这里部分代码省略.........
开发者ID:LucindaInc,项目名称:FolderTrack,代码行数:101,代码来源:DataManager.cs


注:本文中的Status.ReceiveStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。