コード例 #1
0
        public void ShowTableControlActionConfigPage(PlatformInfoBase mPlatform)
        {
            if (mAct.ElementAction == ActUIElement.eElementAction.JEditorPaneElementAction)
            {
                SubElementTypeComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.SubElementType),
                                            mPlatform.GetSubElementType(mAct.ElementType).ToList(), isVENeeded: false);

                operationTypeList = new List <GingerCore.General.ComboItem>();
                ActUIElement.eSubElementType elementType;
                if (Enum.TryParse(mAct.GetInputParamCalculatedValue(ActUIElement.Fields.SubElementType), out elementType))
                {
                }

                SubElementActionComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.SubElementAction),
                                              mPlatform.GetSubElementAction(elementType).ToList(), isVENeeded: false,
                                              UCselectionChange: SubElementActionComboBox_SelectionChanged);
                SubElementDetailsPanel.Visibility = Visibility.Visible;
                ActUIElement.eElementAction selectedSubElementAction;

                if (Enum.TryParse(mAct.GetInputParamCalculatedValue(ActUIElement.Fields.SubElementAction), out selectedSubElementAction))
                {
                    operationTypeList = mPlatform.GetTableControlActions(selectedSubElementAction).Select(x => new GingerCore.General.ComboItem()
                    {
                        Value = x.ToString(), text = x.ToString()
                    }).ToList();
                }
            }
            else
            {
                operationTypeList = mPlatform.GetTableControlActions(mAct.ElementAction).Select(x => new GingerCore.General.ComboItem()
                {
                    Value = x.ToString(), text = x.ToString()
                }).ToList();
            }
            ControlActionComboBox.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ControlAction), operationTypeList, isVENeeded: true, UCselectionChange: ControlActionComboBox_SelectionChanged);

            if (mAct.ElementAction == ActUIElement.eElementAction.TableRowAction || mAct.GetInputParamValue(ActUIElement.Fields.SubElementAction) == ActUIElement.eElementAction.TableRowAction.ToString())
            {
                RowLabelPanel.Visibility         = Visibility.Visible;
                RowSelectorPanel.Visibility      = Visibility.Visible;
                RowSelectorValuePanel.Visibility = Visibility.Visible;
                WhereColumnValue.Visibility      = Visibility.Visible;
                TableActionFieldBinding();
            }
            if (mAct.ElementAction == ActUIElement.eElementAction.TableCellAction || mAct.GetInputParamValue(ActUIElement.Fields.SubElementAction) == ActUIElement.eElementAction.TableCellAction.ToString())
            {
                RowLabelPanel.Visibility            = Visibility.Visible;
                RowSelectorPanel.Visibility         = Visibility.Visible;
                RowSelectorValuePanel.Visibility    = Visibility.Visible;
                WhereColumnValue.Visibility         = Visibility.Visible;
                ColumnLabelPanel.Visibility         = Visibility.Visible;
                cmbColSelectorValuePanel.Visibility = Visibility.Visible;
                cmbColumnValuePanel.Visibility      = Visibility.Visible;
                cmbColSelectorValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ColSelectorValue), typeof(ActUIElement.eTableElementRunColSelectorValue), isVENeeded: false, UCselectionChange: ColSelectorValue_SelectionChanged);
                cmbColumnValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.LocateColTitle), isVENeeded: true, UCselectionChange: ColumnValue_SelectionChanged);
                TableActionFieldBinding();
            }
        }
コード例 #2
0
        private void SubElementActionComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (SubElementActionComboBox.ComboBox.SelectedItem != null)
            {
                operationTypeList.Clear();

                ActUIElement.eElementAction selectedSubElementAction;

                if (Enum.TryParse(((ComboItem)SubElementActionComboBox.ComboBox.SelectedItem).Value.ToString(), out selectedSubElementAction))
                {
                    operationTypeList = mPlatform.GetTableControlActions(selectedSubElementAction).Select(x => new ComboItem()
                    {
                        Value = x.ToString(), text = x.ToString()
                    }).ToList();
                    ControlActionComboBox.UpdateComboItems(operationTypeList);

                    if (selectedSubElementAction == ActUIElement.eElementAction.TableCellAction)
                    {
                        RowLabelPanel.Visibility            = Visibility.Visible;
                        RowSelectorPanel.Visibility         = Visibility.Visible;
                        RowSelectorValuePanel.Visibility    = Visibility.Visible;
                        WhereColumnValue.Visibility         = Visibility.Visible;
                        ColumnLabelPanel.Visibility         = Visibility.Visible;
                        cmbColSelectorValuePanel.Visibility = Visibility.Visible;
                        cmbColumnValuePanel.Visibility      = Visibility.Visible;
                        // cmbColSelectorValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.ColSelectorValue), typeof(ActUIElement.eTableElementRunColSelectorValue), isVENeeded: false, UCselectionChange: ColSelectorValue_SelectionChanged);
                        // cmbColumnValue.Init(mAct.GetOrCreateInputParam(ActUIElement.Fields.LocateColTitle), isVENeeded: true, UCselectionChange: ColumnValue_SelectionChanged);
                        //TableActionFieldBinding();
                    }
                    else if (selectedSubElementAction == ActUIElement.eElementAction.TableRowAction)
                    {
                        RowLabelPanel.Visibility            = Visibility.Collapsed;
                        RowSelectorPanel.Visibility         = Visibility.Collapsed;
                        RowSelectorValuePanel.Visibility    = Visibility.Collapsed;
                        ColumnLabelPanel.Visibility         = Visibility.Collapsed;
                        cmbColumnValuePanel.Visibility      = Visibility.Collapsed;
                        cmbColSelectorValuePanel.Visibility = Visibility.Collapsed;
                        WherePanel.Visibility = Visibility.Collapsed;
                    }
                    else if (selectedSubElementAction == ActUIElement.eElementAction.TableAction)
                    {
                        RowLabelPanel.Visibility            = Visibility.Collapsed;
                        RowSelectorPanel.Visibility         = Visibility.Collapsed;
                        RowSelectorValuePanel.Visibility    = Visibility.Collapsed;
                        ColumnLabelPanel.Visibility         = Visibility.Collapsed;
                        cmbColumnValuePanel.Visibility      = Visibility.Collapsed;
                        cmbColSelectorValuePanel.Visibility = Visibility.Collapsed;
                        WherePanel.Visibility = Visibility.Collapsed;
                    }
                }
            }
        }