Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the FilterContainer class
        /// </summary>
        /// <param name="owningSelector">The view that will own this FilterContainer</param>
        /// <param name="filter">The filter to hold on this FilterContainer</param>
        public FilterContainer(FilterSelector owningSelector, FilterControl filter)
        {
            InitializeComponent();

            _containerState = FilterContainerState.Expanded;
            _mouseDown      = false;
            _owningSelector = owningSelector;
            _filterEnabled  = true;

            LoadFilter(filter);
        }
Exemple #2
0
        /// <summary>
        /// Loads the given FilterControl on this FilterContainer
        /// </summary>
        /// <param name="filter">The FilterControl to hold on this FilterContainer</param>
        public void LoadFilter(FilterControl filter)
        {
            _filterControl = filter;

            lbl_filterName.Text = filter.FilterName;

            pnl_container.Controls.Add(filter);
            pnl_container.Height = filter.Height;

            filter.Width = pnl_container.Width;
            filter.Dock  = DockStyle.Top;

            pb_filterIcon.Image = FilterStore.Instance.GetIconForFilter(filter.FilterName);

            ClientSize = new Size(Width, pnl_container.Bounds.Bottom);
        }