Exemplo n.º 1
0
        // ---------------------------------------------------------- BaseForm override - init, set data ...
        //
        override protected void initDlgObjects()
        {
            if (null == m_config_list)
            {
                m_config_list = new PoolConfigPrintOutput(Kons.ShopCallpass.AppMain.AppCore.PRINT_OUTPUT_CONFIG_COUNT);
                m_config_list.loadObjectAll();
            }

            // control containser
            m_controls_config_unit_list = new Controls_ConfigUnit[m_config_list.COUNT];

            // connectin config container
            for (int i = 0; i < m_config_list.COUNT; i++)
            {
                // 편의성을 위해 컨트롤 참조를 담아 둔다
                m_controls_config_unit_list[i] = new Controls_ConfigUnit();
                switch (i)
                {
                case 0:
                    m_controls_config_unit_list[i].chk_is_use             = ctr_chk_use_print_ouput_0;
                    m_controls_config_unit_list[i].cbx_print_connect_type = ctr_cbx_print_connect_type_0;
                    m_controls_config_unit_list[i].cbx_print_port_num     = ctr_cbx_print_port_num_0;
                    m_controls_config_unit_list[i].cbx_print_port_baud    = ctr_cbx_print_port_baud_0;
                    break;

                case 1:
                    m_controls_config_unit_list[i].chk_is_use             = ctr_chk_use_print_ouput_1;
                    m_controls_config_unit_list[i].cbx_print_connect_type = ctr_cbx_print_connect_type_1;
                    m_controls_config_unit_list[i].cbx_print_port_num     = ctr_cbx_print_port_num_1;
                    m_controls_config_unit_list[i].cbx_print_port_baud    = ctr_cbx_print_port_baud_1;
                    break;

                case 2:
                    m_controls_config_unit_list[i].chk_is_use             = ctr_chk_use_print_ouput_2;
                    m_controls_config_unit_list[i].cbx_print_connect_type = ctr_cbx_print_connect_type_2;
                    m_controls_config_unit_list[i].cbx_print_port_num     = ctr_cbx_print_port_num_2;
                    m_controls_config_unit_list[i].cbx_print_port_baud    = ctr_cbx_print_port_baud_2;
                    break;

                case 3:
                    m_controls_config_unit_list[i].chk_is_use             = ctr_chk_use_print_ouput_3;
                    m_controls_config_unit_list[i].cbx_print_connect_type = ctr_cbx_print_connect_type_3;
                    m_controls_config_unit_list[i].cbx_print_port_num     = ctr_cbx_print_port_num_3;
                    m_controls_config_unit_list[i].cbx_print_port_baud    = ctr_cbx_print_port_baud_3;
                    break;
                }
            }
        }
Exemplo n.º 2
0
        // controls enable or disable
        private void setDlgControlEnableState()
        {
            Controls_ConfigUnit des_controls = null;

            for (int i = 0; i < m_controls_config_unit_list.Length; i++)
            {
                des_controls = m_controls_config_unit_list[i];
                if (null != des_controls)
                {
                    if (des_controls.chk_is_use.Checked)
                    {
                        des_controls.setEnable(true);
                    }
                    else
                    {
                        des_controls.setEnable(false);
                    }
                }
            }
        }
Exemplo n.º 3
0
 // control -> object
 override protected void setDlgControlDataToObjects()
 {
     for (int i = 0; i < m_controls_config_unit_list.Length; i++)
     {
         Controls_ConfigUnit sel_ctr = m_controls_config_unit_list[i];
         if (null != sel_ctr)
         {
             ObjConfigPrintOutput sel_obj = m_config_list.getObject(i);
             if (null != sel_ctr)
             {
                 sel_obj.m_is_use             = (sel_ctr.chk_is_use.Checked ? 1 : 0);
                 sel_obj.m_print_connect_type = KnDevexpressFunc.ComboBoxGetSelectedItemKey(sel_ctr.cbx_print_connect_type);
                 sel_obj.m_print_port_num     = KnDevexpressFunc.ComboBoxGetSelectedItemKey(sel_ctr.cbx_print_port_num);
                 sel_obj.m_print_port_baud    = KnUtil.parseInt32(KnDevexpressFunc.ComboBoxGetSelectedItemKey(sel_ctr.cbx_print_port_baud));
             }
             else
             {
                 sel_obj.m_is_use = 0;
             }
         }
     }
 }
Exemplo n.º 4
0
        override protected void initDlgControls()
        {
            for (int i = 0; i < m_controls_config_unit_list.Length; i++)
            {
                Controls_ConfigUnit des_controls = m_controls_config_unit_list[i];
                if (null != des_controls)
                {
                    KnDevexpressFunc.setComboboxCommonStyle(des_controls.cbx_print_connect_type);
                    KnDevexpressFunc.setComboboxCommonStyle(des_controls.cbx_print_port_num);
                    KnDevexpressFunc.setComboboxCommonStyle(des_controls.cbx_print_port_baud);

                    ObjConfigPrintOutput sel_object = m_config_list.getObject(i);
                    if (null != sel_object)
                    {
                        des_controls.chk_is_use.Checked = (0 == sel_object.m_is_use ? false : true);
                        setSerialPortComboboxConnectType(des_controls.cbx_print_connect_type, sel_object.m_print_connect_type);
                        setSerialPortComboboxPortItems(des_controls.cbx_print_port_num, sel_object.m_print_port_num);
                        setSerialPortComboboxBaudItems(des_controls.cbx_print_port_baud, sel_object.m_print_port_baud.ToString());
                    }
                }
            }
        }