Example #1
0
        /// <summary>
        /// 按钮状态外观刷新函数:传入参数为对应按钮结构体,按钮在结构体中对应ID
        /// </summary>
        void Update_buttons_color(ROBOT_Info robotinfo, ROBOT_Type robot_index)
        {
            switch (robot_index)
            {
            case ROBOT_Type.Robot1:
            {
                button_color_set(btnRobot1State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot2:
            {
                button_color_set(btnRobot2State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot3:
            {
                button_color_set(btnRobot3State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot4:
            {
                button_color_set(btnRobot4State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot5:
            {
                button_color_set(btnRobot5State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot6:
            {
                button_color_set(btnRobot6State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot7:
            {
                button_color_set(btnRobot7State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot8:
            {
                button_color_set(btnRobot8State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot9:
            {
                button_color_set(btnRobot9State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot10:
            {
                button_color_set(btnRobot10State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot11:
            {
                button_color_set(btnRobot11State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot12:
            {
                button_color_set(btnRobot12State, robotinfo.On_line_state);
                break;
            }

            default:
            {
                break;
            }
            }
        }
Example #2
0
        }//

        /// <summary>
        /// 按钮使能状态刷新函数:传入参数为对应按钮结构体,按钮在结构体中对应ID,该函数可以在值刷新时才调用
        /// </summary>
        private void Update_buttonsEnabled_andText(ROBOT_Info robotinfo, ROBOT_Type robot_index)
        {
            switch (robot_index)
            {
            case ROBOT_Type.Robot1:
            {
                button_Enabled_Text_Set(btnRobot1State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot2:
            {
                button_Enabled_Text_Set(btnRobot2State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot3:
            {
                button_Enabled_Text_Set(btnRobot3State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot4:
            {
                button_Enabled_Text_Set(btnRobot4State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot5:
            {
                button_Enabled_Text_Set(btnRobot5State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot6:
            {
                button_Enabled_Text_Set(btnRobot6State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot7:
            {
                button_Enabled_Text_Set(btnRobot7State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot8:
            {
                button_Enabled_Text_Set(btnRobot8State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot9:
            {
                button_Enabled_Text_Set(btnRobot9State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot10:
            {
                button_Enabled_Text_Set(btnRobot10State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot11:
            {
                button_Enabled_Text_Set(btnRobot11State, robotinfo.On_line_state);
                break;
            }

            case ROBOT_Type.Robot12:
            {
                button_Enabled_Text_Set(btnRobot12State, robotinfo.On_line_state);
                break;
            }

            default:
            {
                break;
            }
            }
        }