示例#1
0
        private void InitialUserControl()
        {
            loginLevelMessage          = new LabelNameAndValue("LoginLevel", true);
            loginLevelMessage.Location = new Point(10, 40);
            this.Controls.Add(loginLevelMessage);

            login_Account          = new LabelAndTextBox("帳號");
            login_Account.Location = new Point(300, 35);
            this.Controls.Add(login_Account);

            login_Password          = new LabelAndTextBox("密碼", true);
            login_Password.Location = new Point(550, 35);
            this.Controls.Add(login_Password);

            #region 台車資訊.
            soc          = new LabelNameAndValue("SOC");
            soc.Location = new Point(1216, 180);
            this.Controls.Add(soc);

            charge          = new LabelNameAndValue("Charge");
            charge.Location = new Point(1216, 220);
            this.Controls.Add(charge);

            loading          = new LabelNameAndValue("Loading");
            loading.Location = new Point(1216, 260);
            this.Controls.Add(loading);

            cstID          = new LabelNameAndValue("CstID");
            cstID.Location = new Point(1216, 300);
            this.Controls.Add(cstID);
            #endregion

            #region 位置資訊.
            lastAddress          = new LabelNameAndValue("Address");
            lastAddress.Location = new Point(1446, 180);
            this.Controls.Add(lastAddress);

            sectionID          = new LabelNameAndValue("Section");
            sectionID.Location = new Point(1446, 220);
            this.Controls.Add(sectionID);

            sectionDistance          = new LabelNameAndValue("Distance");
            sectionDistance.Location = new Point(1446, 260);
            this.Controls.Add(sectionDistance);

            real          = new LabelNameAndValue("Real");
            real.Location = new Point(1446, 300);
            this.Controls.Add(real);
            #endregion

            #region 移動/取放 資訊.
            moveControlCommand          = new LabelNameAndValue("移動命令");
            moveControlCommand.Location = new Point(1216, 360);
            this.Controls.Add(moveControlCommand);

            moveControlStatus          = new LabelNameAndValue("移動狀態");
            moveControlStatus.Location = new Point(1446, 360);
            this.Controls.Add(moveControlStatus);

            loadUnloadCommand          = new LabelNameAndValue("取放命令");
            loadUnloadCommand.Location = new Point(1216, 400);
            this.Controls.Add(loadUnloadCommand);

            loadUnloadStatus          = new LabelNameAndValue("取放狀態");
            loadUnloadStatus.Location = new Point(1446, 400);
            this.Controls.Add(loadUnloadStatus);
            #endregion

            #region 停止/降速 資訊.
            stopSingal          = new LabelNameAndValue("停車訊號", true);
            stopSingal.Location = new Point(1216, 450);
            this.Controls.Add(stopSingal);

            lowSpeedSingal          = new LabelNameAndValue("降速訊號", true);
            lowSpeedSingal.Location = new Point(1216, 490);
            this.Controls.Add(lowSpeedSingal);
            #endregion
        }
示例#2
0
        private void InitialCreateCommmnadForm()
        {
            #region CreateCommand.
            rB_SettingSpeed.Checked = true;

            lineSpeed          = new LabelAndTextBox("直線速度");
            lineSpeed.Location = new Point(500, 60);
            tP_CreateMoveCommand.Controls.Add(lineSpeed);
            lineSpeed.ValueString = "400";

            otherSpeed          = new LabelAndTextBox("非直線速度");
            otherSpeed.Location = new Point(500, 120);
            tP_CreateMoveCommand.Controls.Add(otherSpeed);
            otherSpeed.ValueString = "400";

            moveControlCommandStauts          = new LabelNameAndValue("Command");
            moveControlCommandStauts.Location = new Point(920, 350);
            tP_CreateMoveCommand.Controls.Add(moveControlCommandStauts);

            moveControlReady          = new LabelNameAndValue("Status");
            moveControlReady.Location = new Point(920, 410);
            tP_CreateMoveCommand.Controls.Add(moveControlReady);

            moveControlError          = new LabelNameAndValue("Error");
            moveControlError.Location = new Point(920, 380);
            tP_CreateMoveCommand.Controls.Add(moveControlError);

            motionControlStatus          = new LabelNameAndValue("Motion");
            motionControlStatus.Location = new Point(820, 60);
            tP_CreateMoveCommand.Controls.Add(motionControlStatus);

            locateControlStatus          = new LabelNameAndValue("Locate");
            locateControlStatus.Location = new Point(820, 100);
            tP_CreateMoveCommand.Controls.Add(locateControlStatus);
            #endregion

            #region CommandList.
            agvVelocity          = new LabelNameAndValue("Velocity");
            agvVelocity.Location = new Point(780, 410);
            tP_MoveCommand.Controls.Add(agvVelocity);

            commandStatus          = new LabelNameAndValue("Command");
            commandStatus.Location = new Point(320, 448);
            tP_MoveCommand.Controls.Add(commandStatus);

            moveStatus          = new LabelNameAndValue("Status");
            moveStatus.Location = new Point(550, 448);
            tP_MoveCommand.Controls.Add(moveStatus);

            commandEncoder          = new LabelNameAndValue("Encoder");
            commandEncoder.Location = new Point(550, 410);
            tP_MoveCommand.Controls.Add(commandEncoder);

            real          = new LabelNameAndValue("Real");
            real.Location = new Point(320, 410);
            tP_MoveCommand.Controls.Add(real);

            sensorStatus          = new LabelNameAndValue("Sensor");
            sensorStatus.Location = new Point(90, 448);
            tP_MoveCommand.Controls.Add(sensorStatus);
            #endregion
        }
示例#3
0
        private void InitialMoveControlPage()
        {
            panel_MoveControlMap.AutoScroll = true;
            pB_MoveControlMap.Size          = mainForm.GetMapSize;
            pB_MoveControlMap.Image         = mainForm.GetMapImage;

            //panel_MoveControlMap = mainForm.GetPanel;

            PictureBox temp;

            foreach (AddressPicture picture in mainForm.GetAllAddressPicture.Values)
            {
                temp           = new PictureBox();
                temp.Size      = picture.Size;
                temp.Image     = picture.Bitmap_Address;
                temp.Location  = picture.Location;
                temp.BackColor = Color.White;
                pB_MoveControlMap.Controls.Add(temp);
            }

            //panel_MoveControlMap.Controls.Add(mainForm.GetMapImage);
            //pB_MoveControlMap = mainForm.GetMapImage;
            //pB_MoveControlMap.Visible = false;// = mainForm.GetMapImage;


            #region AxisData.
            int startX;
            int startY;

            Label tempLabel;

            for (int i = 0; i < axisList.Count; i++)
            {
                startY = label_AxisData_AxisID.Location.Y + (i + 1) * (label_AxisData_AxisID.Size.Height - 1);

                #region AxisID.
                startX    = label_AxisData_AxisID.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_AxisID");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_AxisID.Size;
                tempLabel.Text        = axisList[i].ToString();
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisID.Add(axisList[i], tempLabel);
                #endregion

                #region AxisName.
                startX    = label_AxisData_AxisName.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_AxisName");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_AxisName.Size;
                tempLabel.Text        = ((EnumDefaultAxisNameChinese)(int)axisList[i]).ToString();
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisName.Add(axisList[i], tempLabel);
                #endregion

                #region Encoder.
                startX    = label_AxisData_Encoder.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_Encoder");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_Encoder.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisEncoder.Add(axisList[i], tempLabel);
                #endregion

                #region RPM
                startX    = label_AxisData_RPM.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_RPM");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_RPM.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisRPM.Add(axisList[i], tempLabel);
                #endregion

                #region ServoOnOff.
                startX    = label_AxisData_ServoOnOff.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_ServoOnOff");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_ServoOnOff.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisServoOnOff.Add(axisList[i], tempLabel);
                #endregion

                #region EC.
                startX    = label_AxisData_EC.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_EC");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_EC.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisEC.Add(axisList[i], tempLabel);
                #endregion

                #region MF.
                startX    = label_AxisData_MF.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_MF");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_MF.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisMF.Add(axisList[i], tempLabel);
                #endregion

                #region V.
                startX    = label_AxisData_V.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_V");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_V.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisV.Add(axisList[i], tempLabel);
                #endregion

                #region DA.
                startX    = label_AxisData_DA.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_DA");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_DA.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisDA.Add(axisList[i], tempLabel);
                #endregion

                #region QA.
                startX    = label_AxisData_QA.Location.X;
                tempLabel = new Label();

                tempLabel.AutoSize    = false;
                tempLabel.Font        = new System.Drawing.Font("Times New Roman", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                tempLabel.Location    = new System.Drawing.Point(startX, startY);
                tempLabel.Name        = String.Concat(axisList[i], "_QA");
                tempLabel.TextAlign   = System.Drawing.ContentAlignment.MiddleCenter;
                tempLabel.BorderStyle = BorderStyle.FixedSingle;
                tempLabel.Size        = label_AxisData_QA.Size;
                tempLabel.Text        = "";
                tP_MoveControl_AxisData.Controls.Add(tempLabel);
                allAxisQA.Add(axisList[i], tempLabel);
                #endregion
            }
            #endregion

            #region MoveControlSensorData.
            sensorData_Address          = new LabelNameAndValue("Address");
            sensorData_Address.Location = new Point(30, 20);
            tP_MoveControl_SensorData.Controls.Add(sensorData_Address);

            sensorData_Section          = new LabelNameAndValue("Section");
            sensorData_Section.Location = new Point(280, 20);
            tP_MoveControl_SensorData.Controls.Add(sensorData_Section);

            sensorData_Distance          = new LabelNameAndValue("Distance");
            sensorData_Distance.Location = new Point(530, 20);
            tP_MoveControl_SensorData.Controls.Add(sensorData_Distance);


            sensorData_Real          = new LabelNameAndValue("Real");
            sensorData_Real.Location = new Point(30, 70);
            sensorData_Real.SetLabelValueBigerr(100);
            tP_MoveControl_SensorData.Controls.Add(sensorData_Real);


            sensorData_MIPCAGVPosition          = new LabelNameAndValue("MIPC");
            sensorData_MIPCAGVPosition.Location = new Point(400, 70);
            sensorData_MIPCAGVPosition.SetLabelValueBigerr(100);
            tP_MoveControl_SensorData.Controls.Add(sensorData_MIPCAGVPosition);

            sensorData_CommandID          = new LabelNameAndValue("CommandID", false, 12);
            sensorData_CommandID.Location = new Point(30, 120);
            sensorData_CommandID.SetLabelValueBigerr(100);
            tP_MoveControl_SensorData.Controls.Add(sensorData_CommandID);

            sensorData_LocationAGVPosition          = new LabelNameAndValue("Locate");
            sensorData_LocationAGVPosition.Location = new Point(400, 120);
            sensorData_LocationAGVPosition.SetLabelValueBigerr(100);
            tP_MoveControl_SensorData.Controls.Add(sensorData_LocationAGVPosition);



            sensorData_CommandStartTime          = new LabelNameAndValue("StartTime");
            sensorData_CommandStartTime.Location = new Point(280, 170);
            tP_MoveControl_SensorData.Controls.Add(sensorData_CommandStartTime);

            sensorData_CommandStstus          = new LabelNameAndValue("CmdStatus", false, 12);
            sensorData_CommandStstus.Location = new Point(30, 170);
            tP_MoveControl_SensorData.Controls.Add(sensorData_CommandStstus);


            sensorData_MoveStatus          = new LabelNameAndValue("MoveStatus", false, 12);
            sensorData_MoveStatus.Location = new Point(30, 220);
            tP_MoveControl_SensorData.Controls.Add(sensorData_MoveStatus);

            sensorData_CommandEncoder          = new LabelNameAndValue("CmdEncoder", false, 12);
            sensorData_CommandEncoder.Location = new Point(280, 220);
            tP_MoveControl_SensorData.Controls.Add(sensorData_CommandEncoder);

            sensorData_Velocity          = new LabelNameAndValue("Velocity");
            sensorData_Velocity.Location = new Point(530, 220);
            tP_MoveControl_SensorData.Controls.Add(sensorData_Velocity);
            #endregion

            #region LocateDriver.
            TabPage            tempTabPage;
            JogPitchLocateData tempJogPitchLocateData;

            for (int i = 0; i < mainFlow.MoveControl.LocateControl.LocateControlDriverList.Count; i++)
            {
                tempJogPitchLocateData      = new JogPitchLocateData(mainFlow.MoveControl.LocateControl.LocateControlDriverList[i]);
                tempJogPitchLocateData.Size = new Size(800, 400);

                tempTabPage      = new TabPage();
                tempTabPage.Text = mainFlow.MoveControl.LocateControl.LocateControlDriverList[i].DriverConfig.Device;

                tempTabPage.Controls.Add(tempJogPitchLocateData);

                tC_LocateDriverList.TabPages.Add(tempTabPage);
                jogPitchLocateDataList.Add(tempJogPitchLocateData);
            }

            //tC_LocateDriverList

            #endregion
        }