Exemplo n.º 1
0
        //Cerramos aplicación y GPS
        private void cerrandoAplicacion()
        {
            try
            {
                cerrar = true;
                Cliente cierracliente = new Cliente(this, "9050");//,"127.0.0.1","bye");
                cierracliente.respuesta("01", Server.myPseudonimo, "-", "127.0.0.1");//,
                 string _appFolder = Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
                 string dirSonido = _appFolder + @"\Sounds\apagando.wav";
                dirSonido = "\\Tarjeta de almacenamiento\\FLEET_MOBILE_14d\\MisSonidos\\apagando.wav";//parking.wav";

                WSounds ws = new WSounds();
                ws.Play(dirSonido, ws.SND_FILENAME | ws.SND_ASYNC);

                DriveHandler.EndApplication(0);
                DriveHandler.CloseApi();
                Hardware detect = new Hardware();
                detect.WifiOff();

            }
            catch
            {
                //    Formulario.Invoke(Formulario.myDelegate, new Object[] { "Error software GPS: " + e.Message });
            }
        }