Ejemplo n.º 1
0
        private void OnFormChanged(View v)
        {
            ThreadPool.QueueUserWorkItem(delegate
            {
                Console.WriteLine("Thread working in formchanged event!");
                try
                {
                    FormChanged?.Invoke(null, new XFormChangedEventArgs()
                    {
                    });

                    //handle group show/hide
                    foreach (Groups g in FormGroups)
                    {
                        View groupView = MainFormLayout.FindViewWithTag(g.id);
                        if (groupView != null)
                        {
                            Bindings binding = DLL.GetBindingByReference(g.reference);
                            if (binding != null && binding.relevant != null)
                            {
                                var eval = XForm.Evaluate(binding.relevant);
                                if (eval != null)
                                {
                                    RunOnUiThread(() => { groupView.Visibility = (bool)eval ? ViewStates.Visible : ViewStates.Gone; });
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.ToString());
                }
            });
        }
Ejemplo n.º 2
0
 private void OnFormChanged(View v)
 {
     FormChanged?.Invoke(null, new XFormChangedEventArgs()
     {
     });
 }
        protected async Task OnFormSubmit()
        {
            await FormChanged.InvokeAsync(Form);

            await OnSubmit.InvokeAsync(Form);
        }