예제 #1
0
파일: CLIP.cs 프로젝트: ayumax/WpfBluetooth
        public void ReciveCommand(string command, Hfp hfp)
        {
            string[] commands = command.Split(new char[] { ',' });
            if (commands.Length > 1)
            {
                string phoneNumber = commands[0].Trim(new char[] { '\"' });

                BluetoothPhone.Utils.CurrentDispatcher.Dispatch(new Action(() => hfp.DoRing(phoneNumber)));
            }
        }
예제 #2
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)));
            }
        }
예제 #3
0
        public void ReciveCommand(string command, Hfp hfp)
        {
            this.hfp = hfp;

            if (command.IndexOf('(') >= 0)
            {
                parseInitCommand(command);
            }
            else
            {
                parseStatusCommand(command);
            }
        }