modcenter.cs

来自「一个农村管理系统的程序 数据库那部分可能不全 大家可以」· CS 代码 · 共 73 行

CS
73
字号
using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using DataFieldClass;
using System.Threading;

namespace MsgSystem
{
    static class ModCenter
    {
        public static ArrayList inCenter = null,
                                                  outCenter = null;

        //把inCenter中收到的消息解析并发到相应的模块的data pool中
        public static void centerThreadMethod( )
        {
            RawInfo info = new RawInfo( );
            MsgInfo msg = null;

            PersonInfo person = new PersonInfo();
            while (true)
            {

                lock (inCenter)
                {
                    if (inCenter.Count > 0)
                    {
                        info = (RawInfo)inCenter[0];
                        inCenter.Remove(info);

                    }
                    person = Util.getPersonByPhone(info.from);
                    if (person == null)
                    {
                        //just discard it here, in future we shall do something with it.

                    }
                    else
                    {
                        msg = info.getInfo( );

                        //switch (person.getGroup())
                        //{
                        //    case 1:



                        //}


                    }
                }

                
            }

        }

        public static int getMod( string heading)
        {
            int rtn = 0;




            return rtn;

        }

    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?