コード例 #1
0
        public static void mp3Play()
        {
            if (!mMediaControl.isFileOpen())
            {
                string url = gXMLDataConfig.mSystemManager.audioFile;

                mMediaControl.Open(url);
                mLogProc.DebugLog("MP3 Play Open");
            }

            mMediaControl.Play(false);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: chn1002/ChnWatchdog
        public static void initSystem()
        {
            if (gXMLDataConfig.WatchdogConfig.Enable)
            {
                mLogProc.DebugLog("WatchDog Enable");
                mWatchdogManager.startWatchdogManager();
            }
            else
            {
                mLogProc.DebugLog("WatchDog disable");
            }

            if (gXMLDataConfig.SystemConfig.Enable)
            {
                mLogProc.DebugLog("SystemManager Enable");
                mSystemManager.startSystemManager();
            }
            else
            {
                mLogProc.DebugLog("SystemManager disable");
            }

            if (gXMLDataConfig.NetworkConfig.Enable)
            {
                mNetworkProecss.startServer();
                mLogProc.DebugLog("NetworkConfig Enable");
            }
            else
            {
                mNetworkProecss.stopServer();
                mLogProc.DebugLog("NetworkConfig Disable");
            }

            if (gXMLDataConfig.NetworkWatchDogConfig.Enable)
            {
                mNetworkProecss.startNetworkWatchdogManager();
                mLogProc.DebugLog("NetworkWatchdog Enable");
            }
            else
            {
                mLogProc.DebugLog("NetworkWatchdog Disble");
            }

            if (gXMLDataConfig.LogServerConfig.Enable)
            {
                mLogProc.startServer(gXMLDataConfig.LogServerConfig.Port);
                mLogProc.DebugLog("LogServer Enable");
            }
            else
            {
                mLogProc.DebugLog("LogServer Disble");
            }
        }
コード例 #3
0
        static void Main()
        {
            gXMLProcess = new xmlDataProcess();
            xmlConfigStart(false);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            mMainSystemManagerForm = new MainSystemManagerForm();
            mNetworkSystemProcess  = new NetworkSystemProcess(mMainSystemManagerForm,
                                                              gXMLDataConfig.mSystemManager.controlServerPort);
            mNetworkSystemProcess.startServer();
            mNetworkSystemProcess.NetworkDataReceivedHandler += NetworkDataReceivedHandler;
            ntTest = new networkTestUtil();

            mLogProc = new LogProcess(gXMLDataConfig.mSystemManager.saveLogfile, mMainSystemManagerForm);

            listener = new Listener(gXMLDataConfig.mSystemManager.NetworkManagerServerPort);
            listener.SocketAccepted += new Listener.SocketAcceptedHandler(listener_SocketAccepted);

            listener.Start("0.0.0.0");

            mMediaControl = new MediaControl();
            string url = gXMLDataConfig.mSystemManager.audioFile;

            mMediaControl.Open(url);

            mLogProc.DebugLog("System Start");
            Application.Run(mMainSystemManagerForm);
        }