Esempio n. 1
0
        public Size LayoutNode()
        {
            List <Size> childSizes = ChildNodes.Select(node => node.LayoutNode()).ToList();

            _childrenSize.Height = childSizes.Sum(size => size.Height);
            _childrenSize.Width  = childSizes.Max(size => size.Width);
            labelNodeName.Text   = NodeName;
            ApplyExpandedCollapsed();
            ChildNodes.ForEach(node => flowLayoutPanel.Controls.Add((UserControl)node));
            return(Size);
        }
Esempio n. 2
0
        private void CheckBoxSelected_CheckStateChanged(object sender, EventArgs e)
        {
            RaiseCheckedChangedEvent();

            EnableActionLinks(CheckState != CheckState.Unchecked);

            if (CheckState == CheckState.Indeterminate)
            {
                return;
            }

            _ignoreCheckedChangedEvents = true;
            ChildNodes.ForEach(node => node.Check(CheckState == CheckState.Checked));
            _ignoreCheckedChangedEvents = false;
        }
Esempio n. 3
0
File: Stmts.cs Progetto: baban/lp
 protected override object DoEvaluate(ScriptThread thread)
 {
     try {
         Object.LpObject result = Object.LpNl.initialize();
         thread.CurrentNode = this;
         ChildNodes.ForEach((node) => result = (Object.LpObject)node.Evaluate(thread));
         thread.CurrentNode = Parent;
         return(result);
     }
     catch (System.Exception e)
     {
         var traces   = thread.GetStackTrace();
         var location = thread.CurrentNode.Location;
         System.Console.WriteLine(e.Message);
         System.Console.WriteLine(location);
         return(null);
     }
 }
Esempio n. 4
0
 public void TakeAction(ActionType type)
 {
     ChildNodes.ForEach(node => node.TakeAction(type));
 }
Esempio n. 5
0
 public void ForceWidth(int width)
 {
     Size = new Size(width, Size.Height);
     ChildNodes.ForEach(node => node.ForceWidth(flowLayoutPanel.Size.Width));
 }
Esempio n. 6
0
 public void Clear()
 {
     ChildNodes.ForEach(o => o.Dispose());
     ChildNodes.Clear();
 }