Example #1
0
        public ProteinSelectionView(IProteinExpressionToolTipCreator toolTipCreator)
        {
            _toolTipCreator = toolTipCreator;
            InitializeComponent();

            btnSearch.Enabled = false;

            btnSearch.Click         += (s, e) => doProteinSearch();
            txtSearchCriteria.Leave += (s, e) =>
            {
                if (btnSearch.Enabled)
                {
                    doProteinSearch();
                }
            };
            txtSearchCriteria.Properties.ValidateOnEnterKey = true;
            txtSearchCriteria.Validating += (s, e) =>
            {
                if (btnSearch.Enabled)
                {
                    doProteinSearch();
                }
            };
            txtSearchCriteria.EditValueChanged += onSearchCriteriaChanged;

            grdSelection.DoubleClick      += (s, e) => doProteinSelection();
            grdSelection.ToolTipController = new ToolTipController();
            grdSelection.ToolTipController.GetActiveObjectInfo += onGetActiveObjectInfo;
            var view = grdSelection.FocusedView as ColumnView;

            if (view != null)
            {
                view.FocusedRowChanged += onFocusedRowChanged;
            }

            var gridView = grdSelection.FocusedView as GridView;

            if (gridView != null)
            {
                gridView.RowStyle += OnGridViewRowStyle;
            }
        }