Ejemplo n.º 1
0
        private void OptionSettingRuttin()
        {
            DialogForm   dialog = new DialogForm(m_ControlBoard, m_settingValues, m_memoryManger);
            DialogResult dr     = dialog.ShowDialog();

            if (dr == DialogResult.OK)
            {
                //MessageBox.Show(settingData.value_conveyorSpeed + " "
                //    + settingData.value_XAxisDistance
                //    + settingData.value_ConvererRollerSpeed);

                // initFile에 저장
                IniFileManager.SetSetting_ConveyerSpeed(m_settingValues.value_conveyorSpeed);
                IniFileManager.SetSetting_XXaisDistance(m_settingValues.value_XAxisDistance);
                IniFileManager.SetSetting_ConverterRollerSpeed(m_settingValues.value_ConvererRollerSpeed);

                // 저장메시지 전송
                // SendSettingValues(settingData);
            }
            else if (dr == DialogResult.Cancel)
            {
                ;
            }
            m_ControlBoard.SendMessage(MessageGenerator.Meesage_Infom(MessageProtocol.CMD_INFORM_SETTING_CLOSE));
        }
Ejemplo n.º 2
0
        private void Form1_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
            {
                //MessageBox.Show("enter");// Enter key pressed

                if (m_inputBuffer == "")
                {
                    return;
                }


                if (m_inputBuffer.Equals(m_insertedItem) == true)
                {
                    // AddLog("(duplicated) " + m_insertedItem);
                    ClearInputBuffer();
                    return; //  Do not action, When Duplicated before Input value. (중복시 아무것도 하지 않음
                }
                else
                {
                    m_scanCount++;
                    m_ControlBoard.SendMessage(MessageGenerator.Meesage_Infom(MessageProtocol.CMD_INFORM_SCANNED));
                    InsertBufferStrToLogFile();
                }
            }
            else
            {
                AppendInputBuffer(e.KeyChar.ToString());
            }
        }
Ejemplo n.º 3
0
        private void comboBox_converterRollerSpeed_SelectedIndexChanged(object sender, EventArgs e)
        {
            // m_values.value_ConvererRollerSpeed = comboBox_converterRollerSpeed.SelectedIndex + 1;
            int selectValue = comboBox_converterRollerSpeed.SelectedIndex + 1;

            m_ControlBoard.SendMessage(MessageGenerator.Meesage_Write(MessageProtocol.CMD_WRITE_ROLLERSPEED, (short)selectValue));
        }
Ejemplo n.º 4
0
        private void comboBox_xXaisDistance_SelectedIndexChanged(object sender, EventArgs e)
        {
            // m_values.value_XAxisDistance = comboBox_xXaisDistance.SelectedIndex + 1;
            int selectValue = comboBox_xXaisDistance.SelectedIndex + 1;

            m_ControlBoard.SendMessage(MessageGenerator.Meesage_Write(MessageProtocol.CMD_WRITE_XXAISDISTANCE, (short)selectValue));
        }
Ejemplo n.º 5
0
        private void btn_start_Click(object sender, EventArgs e)
        {
            SendSettingValues(m_settingValues);     // setting값 보냄

            m_ControlBoard.SendMessage(MessageGenerator.Meesage_DeviceStart(m_isBarcodeReadMode_On, m_isAutoStopMode_On));
            setIndicatorColor(Color.Green);
            btn_barcodeOnEnable(false);
            btn_barcodeOffEnable(false);
            btn_autoStopModeOnEnable(false);
            btn_autoStopModeOffEnable(false);
            btn_SettingsEnable(false);
            m_isOnError = false;
        }
Ejemplo n.º 6
0
        private void btn_stop_Click(object sender, EventArgs e)
        {
            m_ControlBoard.SendMessage(MessageGenerator.Meesage_DeviceStop());
            btn_barcodeOnEnable(true);
            btn_barcodeOffEnable(true);
            btn_autoStopModeOnEnable(true);
            btn_autoStopModeOffEnable(true);
            btn_SettingsEnable(true);

            m_isOnError = false;
            doStop();

//            MessageBox.Show("isOpen :" + m_barcodeSender.isOpen());
//            bool ret = m_barcodeSender.SendMessage(Encoding.UTF8.GetBytes("Test"));
//            MessageBox.Show("send ret :" + ret);
        }
Ejemplo n.º 7
0
        public void showRestartDialog()
        {
            restartDialog = new RestartDialogForm();
            DialogResult result = restartDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                m_ControlBoard.SendMessage(MessageGenerator.Meesage_DeviceReStart());
                setIndicatorColor(Color.Green);
                btn_barcodeOnEnable(false);
                btn_barcodeOffEnable(false);
                btn_autoStopModeOnEnable(false);
                btn_autoStopModeOffEnable(false);
                btn_SettingsEnable(false);
                m_isOnError = false;
            }
            m_isShowRestart = false;
            restartDialog   = null;
        }
Ejemplo n.º 8
0
 private void SendPing()
 {
     m_ControlBoard.SendMessage(MessageGenerator.Meesage_Ping());
 }
Ejemplo n.º 9
0
 private void SendSettingValues(SettingValues valueData)
 {
     m_ControlBoard.SendMessage(MessageGenerator.Meesage_Write(MessageProtocol.CMD_WRITE_BELTSPEED, (short)valueData.value_conveyorSpeed));
     m_ControlBoard.SendMessage(MessageGenerator.Meesage_Write(MessageProtocol.CMD_WRITE_XXAISDISTANCE, (short)valueData.value_XAxisDistance));
     m_ControlBoard.SendMessage(MessageGenerator.Meesage_Write(MessageProtocol.CMD_WRITE_ROLLERSPEED, (short)valueData.value_ConvererRollerSpeed));
 }