Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        protected ConditionNodeBase(ConditionDesigner designer, CompoudConditionNode parent)
        {
            Designer = designer;
            Parent   = parent;

            CtrlButton        = new Button();
            CtrlButton.Click += new EventHandler(CtrlButton_Click);
            m_disposeList.Add(CtrlButton);
            Designer.Parent.Controls.Add(CtrlButton);

            RemoveButton       = new Button();
            RemoveButton.Width = RemoveButton.Height;
            RemoveButton.Image = CoreIcons.close;
            m_disposeList.Add(RemoveButton);
            Designer.Parent.Controls.Add(RemoveButton);
            RemoveButton.Click  += new EventHandler(RemoveButton_Click);
            RemoveButton.Enabled = RemoveConditionEnabled();

            EnabledCheck = new CheckBox();
            m_disposeList.Add(EnabledCheck);
            EnabledCheck.AutoSize = true;
            Designer.Parent.Controls.Add(EnabledCheck);
            IsEnabled = true;
            EnabledCheck.CheckedChanged += new EventHandler(EnabledCheck_CheckedChanged);
        }
Ejemplo n.º 3
0
 public CompoudConditionNode(ConditionDesigner designer, CompoudConditionNode parent)
     : base(designer, parent)
 {
     CompoudType       = new ComboBox();
     CompoudType.Width = 200;
     CompoudType.Items.Add(Texts.Get("s_all_conditions_must_match"));
     CompoudType.Items.Add(Texts.Get("s_any_condition_must_match"));
     CompoudType.Items.Add(Texts.Get("s_none_condition_must_match"));
     CompoudType.Items.Add(Texts.Get("s_any_condition_mus_not_match"));
     CompoudType.DropDownStyle = ComboBoxStyle.DropDownList;
     CompoudType.SelectedIndex = 0;
     m_disposeList.Add(CompoudType);
     Designer.Parent.Controls.Add(CompoudType);
 }
Ejemplo n.º 4
0
        public static ConditionNodeBase Load(ConditionDesigner designer, XmlElement xml, CompoudConditionNode parent)
        {
            string            type = xml.GetAttribute("type");
            ConditionNodeBase res  = null;

            switch (type)
            {
            case "expr":
                res = new ExpressionConditionNode(designer, parent);
                break;

            case "compoud":
                res = new CompoudConditionNode(designer, parent);
                break;
            }
            res.LoadFromXml(xml);
            return(res);
        }
Ejemplo n.º 5
0
 public QueryDesignFrame(QueryFrame queryFrame)
 {
     InitializeComponent();
     m_queryFrame = queryFrame;
     m_condDesign = new ConditionDesigner(tabFilter, this);
 }