Exemple #1
0
        public void ReciveCommand(string command, Hfp hfp)
        {
            string[] commands = command.Split(new char[] { ',' });

            if (commands.Length >= 2)
            {
                int SetIndex = int.Parse(commands[0]);
                hfp.PhoneStatusValue.SetStatus(SetIndex, int.Parse(commands[1]));


                BluetoothPhone.Utils.CurrentDispatcher.Dispatch(new Action(() => hfp.DoPhoneStatusUpdate(SetIndex)));
            }
        }
Exemple #2
0
        private void parseStatusCommand(string command)
        {
            int Index = 1;

            string[] commands = command.Split(new char[] { ',' });
            foreach (string value in commands)
            {
                hfp.PhoneStatusValue.SetStatus(Index, int.Parse(value));
                ++Index;
            }


            BluetoothPhone.Utils.CurrentDispatcher.Dispatch(new Action(() => hfp.DoPhoneStatusUpdate(0)));
        }