예제 #1
0
파일: FormMain.cs 프로젝트: cuongpv88/work
        private void LoadUserControlLine()
        {
            
            var linePanels = new List<LineControl>();
            for (int i = 0; i < _lineService.GetLines().Count; i++)
            {
                var mp = new LineControl();
                linePanels.Add(mp);
                var line = _lineService.GetLines().ElementAtOrDefault(i);
                if (line != null)
                {
                    mp.LineName = line.Name_line;
                    mp.Name = "Panel" + line.Id_customer + i;
                }
                mp.Location = new Point(10, 160 * i);
                mp.Dock = DockStyle.Top;

                linePanels.Add(mp);
            }
            foreach (var p in linePanels)
            {
                this.SuspendLayout();
                this.Controls.Add(p);
                this.ResumeLayout();
            }
        } 
예제 #2
0
파일: FormMain.cs 프로젝트: imatary/work
        private void LoadUserControlLine()
        {
            var linePanels = new List <LineControl>();

            for (int i = 0; i < _lineService.GetLines().Count; i++)
            {
                var mp = new LineControl();
                linePanels.Add(mp);
                var line = _lineService.GetLines().ElementAtOrDefault(i);
                if (line != null)
                {
                    mp.LineName = line.Name_line;
                    mp.Name     = "Panel" + line.Id_customer + i;
                }
                mp.Location = new Point(10, 160 * i);
                mp.Dock     = DockStyle.Top;

                linePanels.Add(mp);
            }
            foreach (var p in linePanels)
            {
                this.SuspendLayout();
                this.Controls.Add(p);
                this.ResumeLayout();
            }
        }