public ContainerControl()
		{
			InitializeComponent();
			Dock = DockStyle.Fill;

			_userFilterControl = new UserFilter();
			_userFilterControl.FilterChanged += (o, e) =>
			{
				_groupFilterControl.EnableFilter = _userFilterControl.EnableFilter;
				_groupFilterControl.SelectedGroups.Clear();
				_groupFilterControl.SelectedGroups.AddRange(_userFilterControl.SelectedGroups);
				_groupFilterControl.UpdateDataSource(_userFilterControl.AllGroups.ToArray(), false);
				ApplyData();
			};
			_userFilterControl.ColumnsChanged += (o, e) =>
			{
				_groupFilterControl.ShowNumber = _userFilterControl.ShowNumber;
				_groupFilterControl.ShowPercent = _userFilterControl.ShowPercent;
			};

			_groupFilterControl = new GroupFilter();
			_groupFilterControl.FilterChanged += (o, e) =>
			{
				_userFilterControl.EnableFilter = _groupFilterControl.EnableFilter;
				_userFilterControl.SelectedGroups.Clear();
				_userFilterControl.SelectedGroups.AddRange(_groupFilterControl.SelectedGroups);
				_userFilterControl.UpdateDataSource(_groupFilterControl.AllGroups.ToArray(), false);
				ApplyData();
			};
			_groupFilterControl.ColumnsChanged += (o, e) =>
			{
				_userFilterControl.ShowNumber = _groupFilterControl.ShowNumber;
				_userFilterControl.ShowPercent = _groupFilterControl.ShowPercent;
			};
		}
Пример #2
0
		public void ApplyColumns(GroupFilter filter)
		{
			gridColumnGroupLoginNumber.Visible = filter.ShowNumber;
			gridColumnGroupLoginPercent.Visible = filter.ShowPercent;

			gridColumnGroupDocsNumber.Visible = filter.ShowNumber;
			gridColumnGroupDocsPercent.Visible = filter.ShowPercent;

			gridColumnGroupVideosNumber.Visible = filter.ShowNumber;
			gridColumnGroupVideosPercent.Visible = filter.ShowPercent;

			gridColumnGroupTotalNumber.Visible = filter.ShowNumber;
			gridColumnGroupTotalPercent.Visible = filter.ShowPercent;
		}