예제 #1
0
        public ExpressionConditionNode(ConditionDesigner designer, CompoudConditionNode parent)
            : base(designer, parent)
        {
            LeftExpr = new ConditionExpressionDesigner(this, true);
            m_disposeList.Add(LeftExpr);
            Operator = new ComboBox();
            m_disposeList.Add(Operator);
            Designer.Parent.Controls.Add(Operator);
            string lastgrp = null;

            foreach (var edef in ConditionOperatorDef.CreateConditions(this))
            {
                if (lastgrp == null || edef.Factory.Group != lastgrp)
                {
                    lastgrp = edef.Factory.Group;
                    Operator.Items.Add(Texts.Get(lastgrp));
                }
                Operator.Items.Add(edef);
                m_disposeList.Add(edef);
                edef.Hide();
            }
            Operator.SelectedIndex         = 1;
            Operator.DropDownStyle         = ComboBoxStyle.DropDownList;
            Operator.SelectedIndexChanged += new EventHandler(Operator_SelectedIndexChanged);
        }
예제 #2
0
 public override void AssignFrom(ConditionOperatorDef src)
 {
     if (src is ValueListExprDef)
     {
         Values.Text = ((ValueListExprDef)src).Values.Text;
     }
 }
예제 #3
0
 public override void AssignFrom(ConditionOperatorDef src)
 {
     if (src is SingleValueExprDef)
     {
         Expr.Edit.Text = ((SingleValueExprDef)src).Expr.Edit.Text;
     }
 }
예제 #4
0
 public override void AssignFrom(ConditionOperatorDef src)
 {
     if (src is DoubleValueExprDef)
     {
         Expr1.Edit.Text = ((DoubleValueExprDef)src).Expr1.Edit.Text;
         Expr2.Edit.Text = ((DoubleValueExprDef)src).Expr2.Edit.Text;
     }
 }
예제 #5
0
        protected override void UpdatePlacements_Specific(ref int actx, int acty, ref int linehi, string namePrefix)
        {
            LeftExpr.UpdatePlacement(ref actx, acty);
            Operator.Width = 200;
            Operator.Top   = acty;
            Operator.Left  = actx;
            actx          += Operator.Width;
            if (m_lastExpr != Operator.SelectedItem && m_lastExpr != null)
            {
                m_lastExpr.Hide();
            }
            var newexpr = (ConditionOperatorDef)Operator.SelectedItem;

            if (m_lastExpr != null && newexpr != null)
            {
                newexpr.AssignFrom(m_lastExpr);
            }
            m_lastExpr = newexpr;
            if (m_lastExpr != null)
            {
                m_lastExpr.UpdatePlacements(ref actx, acty, ref linehi);
            }
        }
예제 #6
0
 public override void AssignFrom(ConditionOperatorDef src)
 {
 }
예제 #7
0
 public abstract void AssignFrom(ConditionOperatorDef src);