public void TableActionFieldBinding() { RowSelectorPanelInit(); WhereColumn.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.WhereColSelector, mAct.GetInputParamValue(ActUIElement.Fields.WhereColSelector)), typeof(ActUIElement.eTableElementRunColSelectorValue), isVENeeded: false, UCselectionChange: WhereColumn_SelectionChanged); WhereColumnTitle.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.WhereColumnTitle, mAct.GetInputParamValue(ActUIElement.Fields.WhereColumnTitle)), isVENeeded: true, UCselectionChange: WhereColumnTitle_SelectionChanged, context: Context.GetAsContext(mAct.Context)); WhereProperty.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.WhereProperty, mAct.GetInputParamValue(ActUIElement.Fields.WhereProperty)), typeof(ActUIElement.eTableElementRunColPropertyValue), isVENeeded: false, UCselectionChange: WhereProperty_SelectionChanged); WhereOperator.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.WhereOperator, mAct.GetInputParamValue(ActUIElement.Fields.WhereOperator)), typeof(ActUIElement.eTableElementRunColOperator), isVENeeded: false, UCselectionChange: WhereOperator_SelectionChanged); WhereColumnValue.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActUIElement.Fields.WhereColumnValue, mAct.GetInputParamValue(ActUIElement.Fields.WhereColumnValue))); RowSelectorValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.LocateRowValue), isVENeeded: true, UCselectionChange: RowSelectorValue_SelectionChanged, context: Context.GetAsContext(mAct.Context)); }
private void SetComponents() { ControlActionComboBox.Visibility = Visibility.Collapsed; ControlActionComboBox.Visibility = Visibility.Collapsed; OperationTypeRow.Height = new GridLength(0); cmbColumnValue.Items.Clear(); WhereColumnTitle.Items.Clear(); for (int i = 0; i < mColNames.Count; i++) { cmbColumnValue.Items.Add(mColNames[i].ToString()); WhereColumnTitle.Items.Add(mColNames[i].ToString()); } cmbColumnValue.SelectedIndex = 0; WhereColumnTitle.SelectedIndex = 0; for (int i = 0; i < mRowCount; i++) { RowSelectorValue.Items.Add(i.ToString()); } RowSelectorValue.SelectedIndex = 0; ActTableElement ACJT = new ActTableElement(); GingerCore.General.FillComboFromEnumObj(cmbColSelectorValue, ACJT.ColSelectorValue); if (cmbColSelectorValue.SelectedIndex == -1) { cmbColSelectorValue.SelectedIndex = 0; } GingerCore.General.FillComboFromEnumObj(WhereColumn, ACJT.ColSelectorValue); if (WhereColumn.SelectedIndex == -1) { WhereColumn.SelectedIndex = 0; } GingerCore.General.FillComboFromEnumObj(WhereProperty, ACJT.WhereProperty); if (WhereProperty.SelectedIndex == -1) { WhereProperty.SelectedIndex = 0; } GingerCore.General.FillComboFromEnumObj(WhereOperator, ACJT.WhereOperator); if (WhereOperator.SelectedIndex == -1) { WhereOperator.SelectedIndex = 0; } WherePanel.Visibility = Visibility.Collapsed; WhereDataRow.Height = new GridLength(0); WhereColumnValue.Init(Context.GetAsContext(mAct.Context), ACJT.GetOrCreateInputParam(ActTableElement.Fields.WhereColumnValue)); }
public ActTableEditPage(ActTableElement Act = null) { eBaseWindow = BaseWindow.ActEditPage; mAct = Act; InitializeComponent(); GingerCore.General.FillComboFromEnumObj(cmbColSelectorValue, mAct.ColSelectorValue); GingerCore.General.FillComboFromEnumObj(WhereColumn, mAct.ColSelectorValue); GingerCore.General.FillComboFromEnumObj(WhereProperty, mAct.WhereProperty); GingerCore.General.FillComboFromEnumObj(WhereOperator, mAct.WhereOperator); GingerCore.General.FillComboFromEnumObj(ControlActionComboBox, mAct.ControlAction); SetDescriptionDetails(); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(cmbColSelectorValue, ComboBox.SelectedValueProperty, mAct, ActTableElement.Fields.ColSelectorValue); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(cmbColumnValue, ComboBox.TextProperty, mAct, ActTableElement.Fields.LocateColTitle); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(RowNum, CheckBox.IsCheckedProperty, mAct, ActTableElement.Fields.ByRowNum); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(AnyRow, CheckBox.IsCheckedProperty, mAct, ActTableElement.Fields.ByRandRow); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(BySelectedRow, CheckBox.IsCheckedProperty, mAct, ActTableElement.Fields.BySelectedRow); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(Where, CheckBox.IsCheckedProperty, mAct, ActTableElement.Fields.ByWhere); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(RowSelectorValue, ComboBox.TextProperty, mAct, ActTableElement.Fields.LocateRowValue); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(WhereColumn, ComboBox.SelectedValueProperty, mAct, ActTableElement.Fields.WhereColSelector); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(WhereColumnTitle, ComboBox.TextProperty, mAct, ActTableElement.Fields.WhereColumnTitle); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(WhereProperty, ComboBox.SelectedValueProperty, mAct, ActTableElement.Fields.WhereProperty); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(WhereOperator, ComboBox.SelectedValueProperty, mAct, ActTableElement.Fields.WhereOperator); WhereColumnValue.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActTableElement.Fields.WhereColumnValue)); GingerCore.GeneralLib.BindingHandler.ObjFieldBinding(ControlActionComboBox, ComboBox.SelectedValueProperty, mAct, ActTableElement.Fields.ControlAction); if (WhereColumn.SelectedIndex == -1) { WhereColumn.SelectedIndex = 0; } if (cmbColSelectorValue.SelectedIndex == -1) { cmbColSelectorValue.SelectedIndex = 0; } if (WhereProperty.SelectedIndex == -1) { WhereProperty.SelectedIndex = 0; } if (WhereOperator.SelectedIndex == -1) { WhereOperator.SelectedIndex = 0; } }