Esempio n. 1
0
        private void Window_Initialized(object sender, EventArgs e)
        {
            _adk = new ADKFramework();
            //ADK Initial
            _adk.Initialize();


            //Register Text message service
            ServiceBase servicebase = _adk.GetService(ServiceType.TMP);

            if (servicebase != null)
            {
                //Application Text message event handle.When receive text message data, it will be invoked.
                servicebase.Register(EventHandler_TMP);
                servicebase.SetTimeOut(20000, TimeoutType.RECEIVE_STATUS_FROM_DISPATCHER_STATION);
                servicebase.SetTimeOut(20000, TimeoutType.RECEIVE_ACK_FROM_TARGET_RADIO);
            }

            //Register system service(online/offline)
            servicebase = _adk.GetService(ServiceType.SYSTEM);
            if (servicebase != null)
            {
                try
                {
                    servicebase.Register(EventHandler_SYS);
                }
                catch (Exception exception)
                {
                }
            }
        }