Exemple #1
0
        public void chooseContact(string arguments)
        {
            var task = new PickContactTask();

            task.Completed += delegate(Object sender, PickContactTask.PickResult e)
            {
                if (e.TaskResult == TaskResult.OK)
                {
                    string strResult = e.Contact.ToJson();
                    var    result    = new PluginResult(PluginResult.Status.OK)
                    {
                        Message = strResult
                    };
                    DispatchCommandResult(result);
                }
                if (e.TaskResult == TaskResult.Cancel)
                {
                    DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Operation cancelled."));
                }
            };

            task.Show();
        }
        public void chooseContact(string arguments)
        {
            var task = new PickContactTask();

            task.Completed += delegate(Object sender, PickContactTask.PickResult e)
                {
                    if (e.TaskResult == TaskResult.OK)
                    {
                        string strResult = e.Contact.ToJson();
                        var result = new PluginResult(PluginResult.Status.OK)
                            {
                                Message = strResult
                            };
                        DispatchCommandResult(result);
                    }
                    if (e.TaskResult == TaskResult.Cancel)
                    {
                        DispatchCommandResult(new PluginResult(PluginResult.Status.ERROR, "Operation cancelled."));
                    }
                };

            task.Show();
        }