예제 #1
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;
             }
         }
     }
 }
예제 #2
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());
                    }
                }
            }
        }