public override GShare.ErrorCode InitialInstance()
        {
            //Initial Log
            m_log = Log.GetInstance(GShare.cstServiceRoundingAnalyse);

            //Initial UDP Listener
            m_udpListener = UDPListener.GetInstance(GShare.cnPortForRoundingAnalyse);
            m_udpListener.MsgRecved += new UDPListener.MessageReceivedHandler(UdpMessageReceived);
            m_udpListener.InitialListener();

            return GShare.ErrorCode.eSuccess;
        }
        public static UDPListener GetInstance(int nPort)
        {
            if (m_Instance == null)
            {
                lock (_lock)
                {
                    if (m_Instance == null)
                    {
                        m_Instance = new UDPListener(nPort);
                    }
                }
            }

            return m_Instance;
        }
        public MainWindow()
        {
            InitializeComponent();

            //Initial UDP listener
            m_udpListener = UDPListener.GetInstance(GShare.cnPortForUI);
            m_udpListener.MsgRecved += new UDPListener.MessageReceivedHandler(UdpMessageReceived);
            m_udpListener.InitialListener();

            m_strRec = "";

            //Watching Thread
            m_bQuitThread = false;
            m_eQuitThreadEvent = new ManualResetEvent(false);
        }
        public override GShare.ErrorCode InitialInstance()
        {
            //Read config
            //for hard code right now

            //Initial Log
            m_log = Log.GetInstance(GShare.cstServiceTaskManager);

            //Pull up Service ParseData and RoundingAnalyse
            if (!CommonFunction.SvrOperate(GShare.cstServiceParseData, true) || !CommonFunction.SvrOperate(GShare.cstServiceRoundingAnalyse, true))
                return GShare.ErrorCode.eServiceStartFailed;

            //Initial UDP listener
            m_udpListener = UDPListener.GetInstance(GShare.cnPortForTaskManager);
            m_udpListener.MsgRecved += new UDPListener.MessageReceivedHandler(UdpMessageReceived);
            m_udpListener.InitialListener();

            return GShare.ErrorCode.eSuccess;
        }