Beispiel #1
0
        private void setDevice()
        {
            SetNICForm nicform = null;

            try
            {
                nicform = new SetNICForm(configCtrl);

                if (nicform != null)
                {
                    nicform.LogWriteHandler += this.OnLogWrite;


                    if (nicform.ShowDialog() == DialogResult.OK)
                    {
                        LogWrite("서버설정 완료");
                        startServer();
                    }
                    else
                    {
                        LogWrite("서버설정 취소");
                    }
                    nicform.LogWriteHandler -= this.OnLogWrite;
                    nicform.Dispose();
                }

                
            }
            catch (Exception ex)
            {
                LogWrite(ex.ToString());
            }
        }
Beispiel #2
0
        private void setDevice()
        {
            try
            {
                nicform = new SetNICForm();

                if (com_code.Length > 0)
                {
                    nicform.tbx_com_code.Text = com_code;
                }

                if (server_type != null && server_type.Length > 0)
                {
                    switch (server_type)
                    {
                        case ConstDef.NIC_SIP:
                            nicform.rbt_type_sip.Checked = true;

                            break;

                        case ConstDef.NIC_LG_KP:
                            nicform.rbt_type_lg.Checked = true;
                            break;

                        case ConstDef.NIC_CID_PORT1:
                            nicform.rbt_type_cid1.Checked = true;
                            break;
                        case ConstDef.NIC_CID_PORT2:
                            nicform.rbt_type_cid2.Checked = true;
                            break;
                        case ConstDef.NIC_CID_PORT4:
                            nicform.rbt_type_cid4.Checked = true;
                            break;
                        case ConstDef.NIC_SS_KP:
                            nicform.rbt_type_ss.Checked = true;
                            break;
                    }
                }

                if (server_device != null && server_device.Length > 0)
                {
                    nicform.comboBox1.SelectedItem = server_device;
                }

                nicform.btn_comfirm.MouseClick += new MouseEventHandler(btn_comfirm_MouseClick);
                nicform.btn_cancel.MouseClick += new MouseEventHandler(btn_cancel_MouseClick);
                nicform.rbt_type_cid1.CheckedChanged += new EventHandler(rbt_type_CheckedChanged);
                nicform.rbt_type_cid2.CheckedChanged += new EventHandler(rbt_type_CheckedChanged);
                nicform.rbt_type_cid4.CheckedChanged += new EventHandler(rbt_type_CheckedChanged);
                nicform.rbt_type_lg.CheckedChanged += new EventHandler(rbt_type_CheckedChanged);
                nicform.rbt_type_ss.CheckedChanged += new EventHandler(rbt_type_CheckedChanged);
                nicform.rbt_type_sip.CheckedChanged += new EventHandler(rbt_type_CheckedChanged);
                nicform.Show();
                nicform.Activate();
            }
            catch (Exception ex)
            {
                logWrite(ex.ToString());
            }
        }