示例#1
0
        public formFilter(oFunctionList functionList, oTabManager tabManager, oTabFunctionList tab, FILTER_TYPE filterType, oVisPlayBar playBar)
        {
            InitializeComponent();
            this.tabManager = tabManager;
            this.tab = tab;
            this.functionGrid.CellValueNeeded += new System.Windows.Forms.DataGridViewCellValueEventHandler(this.functionGrid_CellValueNeeded);
            this.functionList = functionList;
            this.functionListOutput = functionList.Clone();
            updatePredictedOutput();
            timerRefreshOutput.Enabled = false;
            this.playBar = playBar;

            // Make changes to the interface as determined by the filterType
            this.filterType = filterType;
            switch(filterType)
            {
                case FILTER_TYPE.FUNCTION_LIST_FILTERED:
                    // Do nothing special
                    break;
                case FILTER_TYPE.FUNCTION_LIST_FULL:
                    // We cannot replace this list
                    this.buttonApplyReplace.Visible = false;
                    break;
                case FILTER_TYPE.GENERAL:
                    // We do not want to change any tabs, just provide functionListOutput as the result
                    buttonApplyReplace.Visible = false;
                    buttonApplyNew.Text = "Apply";

                    // We cannot clip data to selection
                    this.radioTimeRangeClip.Enabled = false;

                    break;
            }
        }