Пример #1
0
    public void SendClick()
    {
        string to   = Singleton <WhatsAppModel> .Instance.To;
        string body = Singleton <WhatsAppModel> .Instance.Message;

        //string returned = Sender.Send(to, body);
        try
        {
            string returned = Sender.Send(to, body);
        }
        catch (Excepction error)
        {
            OnMessageSent(false, error.message);
        }
    }
Пример #2
0
    public void SendClick()
    {
        string to   = Singleton <WhatsAppModel> .Instance.To;
        string body = Singleton <WhatsAppModel> .Instance.Message;

        try
        {
            Sender.Send(to, body, OnMessageSent);
        }
        catch (NumberException numExc)
        {
            Text text = this.Result.GetComponent <Text> ();
            text.text = numExc.Message;
        }
    }
Пример #3
0
    public void SendClick()
    {
        string to   = Singleton <WhatsAppModel> .Instance.To;
        string body = Singleton <WhatsAppModel> .Instance.Message;

        //string returned = Sender.Send(to, body, OnMessageSent);
        try
        {
            Sender.Send(to, body, OnMessageSent);
        }
        catch (ExceptionPhone e)
        {
            Text text = this.Result.GetComponent <Text>();
            text.text = e.Message;
        }

        /* if (returned != null)
         * {
         *      Text text = this.Result.GetComponent<Text>();
         *      text.text = returned;
         * } */
    }