コード例 #1
0
        private void AddKebabControls(List <KebabItem> kebabs)
        {
            KebabControl lastControl = null;

            foreach (KebabItem kebab in kebabs)
            {
                KebabControl orderControl = new KebabControl(kebab);
                orderControl.Left = lbTime.Right;
                if (lastControl == null)
                {
                    orderControl.Top = lbOrderId.Top;
                }
                else
                {
                    orderControl.Top = lastControl.Bottom;
                }
                orderControl.setDoubleClickListener(changeOrderColor);
                lastControl = orderControl;
                this.Controls.Add(orderControl);
            }
            lbOrderId.Height = lastControl.Bottom - lbOrderId.Top;
            lbTime.Height    = lbOrderId.Height;
            lbState.Height   = lbTime.Height + 10;
            this.Height      = lbState.Height;
        }
コード例 #2
0
ファイル: HistoryOrderControl.cs プロジェクト: isysoi3/Doners
        private void AddKebabControls(List <KebabItem> kebabs)
        {
            KebabControl lastControl = null;

            foreach (KebabItem kebab in kebabs)
            {
                KebabControl orderControl = new KebabControl(kebab);
                orderControl.setWidth(Width - lbTime.Right);
                orderControl.Left = lbTime.Right;
                if (lastControl == null)
                {
                    orderControl.Top = lbDate.Top;
                }
                else
                {
                    orderControl.Top = lastControl.Bottom;
                }
                lastControl = orderControl;
                this.Controls.Add(orderControl);
            }
            lbDate.Height = lastControl.Bottom - lbDate.Top;
            lbTime.Height = lbDate.Height;
            this.Height   = lbDate.Height;
        }