Пример #1
0
        public static MyFilter GetInstanceDrivers()
        {
            if (_instanceDrivers == null)
                _instanceDrivers = new MyFilter();

            return _instanceDrivers;
        }
Пример #2
0
        public static MyFilter GetInstanceDrivers()
        {
            if (_instanceDrivers == null)
            {
                _instanceDrivers = new MyFilter();
            }

            return(_instanceDrivers);
        }
Пример #3
0
        public formDriversList()
        {
            InitializeComponent();

            driverList = DriverList.getInstance();

            btnAdd.Visible = User.IsFullAccess();
            btnDelete.Visible = User.IsFullAccess();

            _searcher = new SearchInDgv(_dgvDrivers);

            _myStatusStrip = new MyStatusStrip(_dgvDrivers, statusStrip1);

            _myFilter = MyFilter.GetInstanceDrivers();
            _myFilter.Fill(_dgvDrivers, _myStatusStrip, this);
        }
Пример #4
0
        public formDriversList()
        {
            InitializeComponent();

            driverList = DriverList.getInstance();

            btnAdd.Visible    = User.IsFullAccess();
            btnDelete.Visible = User.IsFullAccess();

            _searcher = new SearchInDgv(_dgvDrivers);

            _myStatusStrip = new MyStatusStrip(_dgvDrivers, statusStrip1);

            _myFilter = MyFilter.GetInstanceDrivers();
            _myFilter.Fill(_dgvDrivers, _myStatusStrip, this);
        }
Пример #5
0
        public mainForm()
        {
            InitializeComponent();

            carList    = CarList.getInstance();
            mainStatus = MainStatus.getInstance();
            mainStatus.StatusChanged += statusChanged;
            mainStatus.StatusChanged += SetWindowHeaderText;
            mainStatus.StatusChanged += ConfigContextMenu;

            _dgvMain = new MainDGV(_dgvCar);

            _seacher = new SearchInDgv(_dgvCar);

            _myStatusStrip = new MyStatusStrip(_dgvCar, statusStrip1);

            _myFilter = MyFilter.GetInstanceCars();
            _myFilter.Fill(_dgvCar, _myStatusStrip, this);
        }
Пример #6
0
        public mainForm()
        {
            InitializeComponent();

            carList = CarList.getInstance();
            mainStatus = MainStatus.getInstance();
            mainStatus.StatusChanged += statusChanged;
            mainStatus.StatusChanged += SetWindowHeaderText;
            mainStatus.StatusChanged += ConfigContextMenu;

            _dgvMain = new MainDGV(_dgvCar);

            _seacher = new SearchInDgv(_dgvCar);

            _myStatusStrip = new MyStatusStrip(_dgvCar, statusStrip1);

            _myFilter = MyFilter.GetInstanceCars();
            _myFilter.Fill(_dgvCar, _myStatusStrip, this);
        }
Пример #7
0
        private ToolStripMenuItem CreateFilter()
        {
            ToolStripMenuItem item = CreateItem("Фильтр по значению этого поля");

            item.Click += delegate
            {
                DataGridView dgv = _dgvMain.GetDGV();

                if (dgv.CurrentCell == null)
                {
                    return;
                }

                string columnName = dgv.Columns[dgv.CurrentCell.ColumnIndex].HeaderText;

                Point point = new Point(dgv.CurrentCell.ColumnIndex, dgv.CurrentCell.RowIndex);

                MyFilter myFilter = (dgv.Name == "_dgvCar") ? MyFilter.GetInstanceCars() : MyFilter.GetInstanceDrivers();
                myFilter.SetFilterValue(string.Concat(columnName, ":"), point);
            };
            return(item);
        }