/// <summary>
        ///
        /// </summary>
        protected virtual void OnFilterApplying()
        {
            try
            {
                if (ReloadForDate != null)
                {
                    if (DateAsOfFilterAppliance && dateAsOfChanged)
                    {
                        ReloadForDate(dateTimePicker.Value);
                    }
                    else if (!DateAsOfFilterAppliance && dateTimePicker.Value < DateTime.Today)
                    {
                        ReloadForDate(DateTime.Today);
                    }
                }
            }
            catch (Exception ex)
            {
                Program.Provider.Logger.Log("Error while loading data", ex);
                return;
            }

            DetailCollectionFilter newFilters = GetDetailCollectionFilter();

            if (!newFilters.Equals(lastAppliedFilters))
            {
                lastAppliedFilters = newFilters;
                if (ApplyFilter != null)
                {
                    ApplyFilter(this, new EventArgs());
                }
            }
        }
        /// <summary>
        ///
        /// </summary>
        protected virtual void OnFilterApplying()
        {
            DetailCollectionFilter newFilters = GetDetailCollectionFilter();

            if (!newFilters.Equals(lastAppliedFilters))
            {
                lastAppliedFilters = newFilters;
                if (ApplyFilter != null)
                {
                    ApplyFilter(this, new EventArgs());
                }
            }
        }
Beispiel #3
0
        /// <summary>
        /// Checks whether represented data equals to corresponding data of object
        /// </summary>
        /// <param name="obj">Compared object</param>
        /// <returns></returns>
        public bool ContainedDataEquals(IDisplayingEntity obj)
        {
            if (!(obj is DispatcheredComponentStatusControl))
            {
                return(false);
            }
            if (!(obj.ContainedData is Aircraft))
            {
                return(false);
            }
            DispatcheredComponentStatusControl dispatcheredComponentStatusControl = obj as DispatcheredComponentStatusControl;

            return(detailContainer == dispatcheredComponentStatusControl.detailContainer &&
                   initialFilter.Equals(dispatcheredComponentStatusControl.initialFilter) &&
                   AdditionalFilter.Equals(dispatcheredComponentStatusControl.AdditionalFilter));
        }