コード例 #1
0
ファイル: ListBox.cs プロジェクト: Winster332/GPUGraphics2D
        public override void Draw()
        {
            UIRenderer.ListBox(this);

            Items.ForEach(item => UIRenderer.RectangleComponent(item));

            Childs.ForEach(c => c.Draw());
        }
コード例 #2
0
ファイル: TabLayout.cs プロジェクト: Winster332/GPUGraphics2D
            public override void Draw()
            {
                this.ButtonClose.X = this.Width - this.ButtonClose.Radius * 3;
                this.ButtonClose.Y = this.Hieght / 2 - this.ButtonClose.Radius;
                UIRenderer.RectangleComponent(this);

                Childs.ForEach(c => c.Draw());
            }
コード例 #3
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append($"{Name} ({Items.Count}) -> {{");
            Childs.ForEach(child => sb.Append(child.Value));
            sb.Append("}");
            return(sb.ToString());
        }
コード例 #4
0
        public override void Draw()
        {
            Text.X = this.X + this.Radius;
            Text.Y = this.Y + this.Radius;

            UIRenderer.ButtonCircle(this);
            UIRenderer.TextBlock(Text);

            Childs.ForEach(ui => ui.Draw());
        }
コード例 #5
0
        public override void Draw()
        {
            Text.X = this.X + this.Width / 2;
            Text.Y = this.Y + this.Hieght / 2;

            UIRenderer.ButtonRect(this);
            UIRenderer.TextBlock(Text);

            Childs.ForEach(ui => ui.Draw());
        }
コード例 #6
0
 protected internal override void OnSizeUpdated()
 {
     Childs.ForEach(child =>
     {
         if (child.Type == ViewType.Connection)
         {
             child.OnXYUpdated();
         }
     });
 }
コード例 #7
0
ファイル: Window.cs プロジェクト: Winster332/GPUGraphics2D
        public override void Draw()
        {
            Title.X = this.X + this.Width / 2;
            Title.Y = this.Y + 10;

            UIRenderer.Window(this);
            //  UIRenderer.Layout(Cap);

            //UIRenderer.ButtonCircle(ButtonClose);
            Childs.ForEach(c => c.Draw());
            UIRenderer.TextBlock(Title);
        }
コード例 #8
0
        /// <summary>Creates ordered queryable.</summary>
        /// <typeparam name="TResult">Type of the result.</typeparam>
        /// <param name="originalQuery">The original query.</param>
        /// <returns>The new ordered queryable.</returns>
        public virtual BatchOrderedQueryable <TResult> CreateOrderedQueryable <TResult>(IOrderedQueryable <TResult> originalQuery, bool updateChild = true)
        {
            OwnerBatch.Queries.Remove(this);
            var query = new BatchOrderedQueryable <TResult>(originalQuery);

            query.OwnerBatch = OwnerBatch;
            OwnerBatch.Queries.Add(query);

            if (updateChild)
            {
                Childs.ForEach(x => x.OwnerParent = query);
            }

            return(query);
        }
コード例 #9
0
ファイル: LinearLayout.cs プロジェクト: lanicon/HipsterEngine
        public void AddElement(RectCollision element)
        {
            var next = 0.0f;

            if (Orientation == LinearLayoutOrientation.Horizontal)
            {
                Childs.ForEach(x => next += ((RectCollision)x).Width + StepPosition);
                element.X = next;
            }
            if (Orientation == LinearLayoutOrientation.Vertical)
            {
                Childs.ForEach(x => next += ((RectCollision)x).Height + StepPosition);
                element.Y = next;
            }

            base.AddElement(element);
        }
コード例 #10
0
        public SherlockNode Clone()
        {
            if (Type == NodeType.Leaf)
            {
                return(new SherlockNode(Value)
                {
                    Name = Name,
                    MinNumber = MinNumber,
                    MaxNumber = MaxNumber,
                    Condition = Condition
                });
            }

            SherlockNode retNodeValue = new SherlockNode()
            {
                Name      = Name,
                MinNumber = MinNumber,
                MaxNumber = MaxNumber,
                Condition = Condition
            };

            Childs.ForEach(x => retNodeValue.Childs.Add(x.Clone()));
            return(retNodeValue);
        }
コード例 #11
0
 public override void Draw()
 {
     Childs.ForEach(component => component.Draw());
 }
コード例 #12
0
        public override void Draw()
        {
            UIRenderer.Scroll(this);

            Childs.ForEach(c => c.Draw());
        }
コード例 #13
0
ファイル: BaseView.cs プロジェクト: imagicbell/ublockly
 /// <summary>
 /// called when position is changed
 /// </summary>
 protected internal virtual void OnXYUpdated()
 {
     Childs.ForEach(child => child.OnXYUpdated());
 }
コード例 #14
0
 public override void Draw()
 {
     UIRenderer.Layout(this);
     Childs.ForEach(component => component.Draw());
 }