using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Comal.Classes; using Xamarin.Forms; using Xamarin.Forms.Xaml; namespace PRS.Mobile { [XamlCompilation(XamlCompilationOptions.Compile)] public partial class KanbanEditFormsView { public KanbanEditFormsView() { InitializeComponent(); } public override void Refresh() { _formlist.DataModel = ViewModel?.Forms; _formlist.AppliesTo = "Kanban"; _formlist.Property = model => ViewModel?.Forms.Items.OfType().ToArray(); _formlist.RefreshData(false,true); } private void _formlist_OnFormTapped(object sender, ExistingFormTappedEventArgs args) { if (args.Shell is KanbanFormShell shell) { var model = new DigitalFormHostModel(); model.LoadItems(ViewModel.Item.Entity, shell.FormID, shell.ID, null); var host = new DigitalFormHost(model); host.OnClosing += (o, args) => { if (args.Changed) { //instance.Completed = !model.DigitalFormDataModel.Instance.FormCompleted.IsEmpty(); } }; Navigation.PushAsync(host); } } } }