コード例 #1
0
        private void LoadUserControlProcesss()
        {
            int lineId = 0;

            if (!string.IsNullOrEmpty(LineName))
            {
                lineId = _lineService.GetLineByName(LineName).Id_line;
            }
            var processPanels      = new List <ProcessControl>();
            var getProcessByLineId = _processService.GetAllProcesseses(lineId);

            for (int i = 0; i < getProcessByLineId.Count; i++)
            {
                var    processes    = getProcessByLineId.ElementAtOrDefault(i);
                var    processFirst = getProcessByLineId.ElementAtOrDefault(i - 1);
                var    mp           = new ProcessControl();
                string processName  = null;
                int    x            = 209;
                int    y            = 32;

                if (processes != null)
                {
                    processName = processes.Id_process;
                    processPanels.Add(mp);
                    mp.ProcessName = processName;
                    mp.Name        = "Panel" + processName + i;
                    mp.Location    = new Point(x * i, y);
                }

                if (processFirst != null)
                {
                    ////mp.Location = new Point(209 * (i - 1), 32);
                    //mp.Location = new Point(x * i, y);
                    if (processName == processFirst.Id_process)
                    {
                        //this.Size = new Size(900, 170*i);
                        mp.Location = new Point(x * (i - 1), y);
                        //mp.Location = new Point(x * i, y);
                        //mp.Location = new Point(x * (i-2), y);
                    }
                    else
                    {
                        mp.Location = new Point(x * (i - 1), y);
                        //mp.Location = new Point(x * i, y);
                    }
                }

                processPanels.Add(mp);
            }

            foreach (var p in processPanels)
            {
                panelControl1.SuspendLayout();
                panelControl1.Controls.Add(p);
                panelControl1.ResumeLayout();
            }
        }
コード例 #2
0
ファイル: FormLineDetails.cs プロジェクト: imatary/work
        public FormLineDetails(string lineId)
        {
            InitializeComponent();
            _lineService       = new LineService();
            _customerService   = new CustomerService();
            _processService    = new ProcessService();
            _modelService      = new ModelService();
            _showResultService = new ShowResultService();
            _shiftService      = new ShiftService();


            _line       = _lineService.GetLineByName(lineId);
            _lineStatus = _modelService.GetLineStatusByLineAndCustomer(_line.Id_line, _line.Id_customer);
        }
コード例 #3
0
 private void FormLineDetails_Load(object sender, EventArgs e)
 {
     _line       = _lineService.GetLineByName("RM2-8050/51");
     _lineStatus = _modelService.GetLineStatusByLineAndCustomer(_line.Id_line, _line.Id_customer);
     LoadData();
 }