| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 | using System;using System.Collections.Generic;using System.Linq;using System.Windows.Controls;using Comal.Classes;using System.ComponentModel;using InABox.Core;namespace PRSDesktop{    public partial class JobAssignmentPanel : UserControl, IBasePanel, IJobControl, IDataModelSource    {        public JobAssignmentPanel()        {            InitializeComponent();        }        #region IJobPanel                public Job Job        {            get => Activities.Job;            set            {                Activities.Job = value;                Assignments.Job = value;            }        }                public JobPanelSettings Settings { get; set; }                #endregion                #region IDataModelSource                public event DataModelUpdateEvent? OnUpdateDataModel;        public string SectionName => "Job Assignments";        public DataModel DataModel(Selection selection)        {            var ids = Assignments.ExtractValues(x => x.ID, selection).ToArray();            return new AssignmentDataModel(new Filter<Assignment>(x => x.ID).InList(ids));        }                #endregion        #region IBasePanel                public void Setup()        {            Activities.Refresh(true, false);            Assignments.Refresh(true, false);        }        public void Shutdown(CancelEventArgs? cancel)        {                    }        public void Refresh()        {            Activities.Refresh(false, true);            Assignments.Refresh(false, true);        }        public bool IsReady { get; set; }                public void CreateToolbarButtons(IPanelHost host)        {        }        public Dictionary<string, object[]> Selected()        {            return new Dictionary<string, object[]>();        }        public void Heartbeat(TimeSpan time)        {        }                #endregion    }}
 |