Example #1
0
        private void Render()
        {
            if (Input == null)
            {
                return;
            }
            if (Action.ActionType == ActionType.IFElse || Action.ActionType == ActionType.IFEnd)
            {
                ActionName = $"{Action.ActionName}";
                Loaded    += (e, c) =>
                {
                    OnRenderDone?.Invoke(this, null);
                };
            }
            else
            {
                ActionName                      = $"[{Action.ID}] {Action.ActionName}";
                Icon                            = Action.Icon;
                ActionForm.DataContext          = Builder.GetInputModelData();
                ActionForm.LineInputGroups      = Builder.GetBaseActionInputModels();
                ActionForm.MultiLineInputGroups = Builder.GetDetailActionInputModels();
                ActionForm.Action               = Action;

                ActionForm.ActionContainer = ActionContainer;
                ActionForm.OnRenderDone   += (e, c) =>
                {
                    OnRenderDone?.Invoke(this, null);
                };
            }
            if (Action.ActionType == ActionType.IFElse || Action.ActionType == ActionType.IFEnd)
            {
                ButtonRemove.Visibility = Visibility.Collapsed;
            }
        }
Example #2
0
 private void Render()
 {
     inputBoxes.Clear();
     RenderLineInputGroups();
     RenderMultiLineInputGroups();
     MultiLineContainer.Loaded += (e, c) =>
     {
         MultiLineBorder.Visibility = Visibility.Collapsed;
         OnRenderDone?.Invoke(this, null);
     };
     BindingActionResults();
     UpdateVariableAction();
     if (ActionContainer != null)
     {
         ActionContainer.ItemIndexChanged += ActionContainer_ItemIndexChanged;
     }
     RenderGlobalVariable();
     //添加操作结果变量
     AddActionResultBtn.Click += (e, c) =>
     {
         if (VariableActionComboBox.SelectedItem != null && VariableActionResultsComboBox.SelectedItem != null)
         {
             var action   = VariableActionComboBox.SelectedItem as ComBoxModel;
             var variable = VariableActionResultsComboBox.SelectedItem as ComBoxModel;
             KeyboradFocusInputBox.AppendText($"{{{action.ID}.{variable.ID}}}");
         }
     };
     //渲染事件变量
     RenderEventVariable();
     //验证输入
     Valid();
 }
        private void Render()
        {
            if (Input == null)
            {
                return;
            }
            if (specialTypes.Contains(Action.ActionType))
            {
                ActionName = $"{Action.ActionName}";
                Loaded    += (e, c) =>
                {
                    OnRenderDone?.Invoke(this, null);
                };
                IDBorder.Visibility = Visibility.Collapsed;
                //查找父级
                var parent = ActionContainer.ActionItems.Where(m => m.Action.ID == Action.ParentID).FirstOrDefault();
                ToolTip = $"属于 [{parent.Action.ID}] {parent.Action.ActionName}";
                Cursor  = Cursors.No;
            }
            else
            {
                ActionName                      = Action.ActionName;
                Icon                            = Action.Icon;
                ActionForm.DataContext          = Builder.GetInputModelData();
                ActionForm.LineInputGroups      = Builder.GetBaseActionInputModels();
                ActionForm.MultiLineInputGroups = Builder.GetDetailActionInputModels();
                ActionForm.Action               = Action;

                ActionForm.ActionContainer = ActionContainer;
                ActionForm.OnRenderDone   += (e, c) =>
                {
                    OnRenderDone?.Invoke(this, null);
                };
            }
            if (specialTypes.Contains(Action.ActionType))
            {
                ButtonRemove.Visibility = Visibility.Collapsed;
            }
        }