| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 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<IDigitalFormInstanceShell>().ToArray();
- _formlist.RefreshData(false,true);
- }
-
- private void _formlist_OnFormTapped(object sender, ExistingFormTappedEventArgs args)
- {
- if (args.Shell is KanbanFormShell shell)
- {
- var model = new DigitalFormHostModel<Kanban, KanbanLink, KanbanForm>();
- 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);
- }
- }
- }
- }
|