/// <summary> /// set entire enable or not status /// </summary> /// <param name="sts"></param> private void setEntireEnabledStatus(bool sts) { TraverseChildrenControls tchildrens = new TraverseChildrenControls(); foreach (object o in tchildrens.GetChildren(eqGrid, 1)) { if (o.GetType() == typeof(SpinnerControl)) { SpinnerControl spinControl = (SpinnerControl)o; spinControl.IsEnabled = sts; } if (o.GetType() == typeof(CheckBox)) //bypass or nots { var cbx = (CheckBox)o; cbx.IsEnabled = sts; } if (o.GetType() == typeof(TComboBox)) //combobox filter { var cbox = (TComboBox)o; cbox.IsEnabled = sts; } } //xover highfilter pass and low filter pass spinFreq_8.IsEnabled = sts; spinFreq_9.IsEnabled = sts; // cbxeqType8.IsEnabled = sts; cbxeqType9.IsEnabled = sts; bypasAllBtn.IsSelected = !sts; }
/// <summary> /// /// </summary> /// <param name="sgrid"></param> private void retrieve_setMatrixProperty() { TraverseChildrenControls tchildrens = new TraverseChildrenControls(); foreach (object o in tchildrens.GetChildren(RootGrid, 1)) { if (o.GetType() == typeof(CSwitcher)) { CSwitcher cBtn = (CSwitcher)o; // cBtn.Content = cBtn.iTag.ToString(); cBtn.Click += matrixButton_Switch; switcherList.Add(cBtn); } } }
private void initializeParameter() { if (m_eqEdit == null) { m_eqEdit = new EQEdit[CFinal.NormalEQMax]; } for (int i = 0; i < CFinal.NormalEQMax; i++) { m_eqEdit[i] = new EQEdit(); } setEQFlat();//reset EQ parameters // strHL_FILTER cbxeqType8.ItemsSource = CFinal.strHL_FILTER; cbxeqType8.setSelectindex(0); //spinFreq_8 cbxeqType9.ItemsSource = CFinal.strHL_FILTER; cbxeqType9.setSelectindex(0); //set and initialize controls below TraverseChildrenControls tchildrens = new TraverseChildrenControls(); foreach (object o in tchildrens.GetChildren(eqGrid, 1)) { if (o.GetType() == typeof(SpinnerControl)) { SpinnerControl spinControl = (SpinnerControl)o; spinControl.onSpinValueClickChangeEvent += new SpinnerControl.spinValueClickChange(onSpinChangeHandle); } if (o.GetType() == typeof(CheckBox)) //bypass or nots { var cbx = (CheckBox)o; cbx.Click += checkBypas_Click; } if (o.GetType() == typeof(TComboBox)) //combobox filter { var cbox = (TComboBox)o; cbox.SelectionChanging += new SelectionChangingEventHandler(eqcombox_SelectionChanging); } } //xover highfilter pass and low filter pass spinFreq_8.onSpinValueClickChangeEvent += new SpinnerControl.spinValueClickChange(onSpinChangeHandle); spinFreq_9.onSpinValueClickChangeEvent += new SpinnerControl.spinValueClickChange(onSpinChangeHandle); // cbxeqType8.SelectionChanging += eqcombox_SelectionChanging; cbxeqType9.SelectionChanging += eqcombox_SelectionChanging; }
/// <summary> /// search switcher button /// </summary> /// <param name="index"></param> /// <returns></returns> private CSwitcher findButonWith_iTag(int index) //RootGrid { TraverseChildrenControls tchildrens = new TraverseChildrenControls(); CSwitcher sbtn = null; foreach (object o in tchildrens.GetChildren(RootGrid, 1)) { if (o.GetType() == typeof(CSwitcher)) { sbtn = (CSwitcher)o; if (sbtn != null && sbtn.iTag == index) { break; } } } return(sbtn); }