예제 #1
0
        private void open_btn_Click(object sender, EventArgs e)
        {
            try
            {
                returnCode_open        = axOPOSLineDisplay1.Open(ldn_cb.Text);
                returnCodeOpn_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_open);
                resultCodeOpn_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_open);

                returnCode_claim       = axOPOSLineDisplay1.ClaimDevice(500);
                returnCodeClm_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_claim);
                resultCodeClm_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_claim);

                axOPOSLineDisplay1.DeviceEnabled = true;
                resultCodeEnable_rtb.Text        = OPOS_ErrorConstant.return_ErrorMessage(resultCode_enable);

                if (returnCode_open == OPOS_ErrorConstant.OPOS_SUCCESS && returnCode_claim == OPOS_ErrorConstant.OPOS_SUCCESS)
                {
                    close_btn.Enabled = true;
                }
            }
            catch (System.Windows.Forms.AxHost.InvalidActiveXStateException)
            {
                MessageBox.Show("InvalidActiveXStateException!!");
            }
        }
예제 #2
0
        private void close_btn_Click(object sender, EventArgs e)
        {
            if (sender.Equals(close_btn))
            {
                axOPOSLineDisplay1.DeviceEnabled = false;
                resultCodeDis_rtb.Text           = OPOS_ErrorConstant.return_ErrorMessage(resultCode_disable);

                returnCode_release     = axOPOSLineDisplay1.ReleaseDevice();
                returnCodeRel_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_release);
                resultCodeRel_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_release);

                returnCode_close       = axOPOSLineDisplay1.Close();
                returnCodeCls_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_close);
                resultCodeCls_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_close);

                close_btn.Enabled = false;
            }
            else
            {
                returnCode_close       = axOPOSLineDisplay1.Close();
                returnCodeCls_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_close);
                resultCodeCls_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_close);

                dClaim_btn.Enabled   = false;
                dEnable_btn.Enabled  = false;
                dDisable_btn.Enabled = false;
                dRelease_btn.Enabled = false;
                dClose_btn.Enabled   = false;
            }
        }
예제 #3
0
 private void dEnable_btn_Click(object sender, EventArgs e)
 {
     axOPOSMSR1.DeviceEnabled  = true;
     resultCodeEnable_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_enable);
     track1_rtb.Clear();
     track2_rtb.Clear();
     track3_rtb.Clear();
 }
예제 #4
0
        private void dClaim_btn_Click(object sender, EventArgs e)
        {
            returnCode_claim       = axOPOSLineDisplay1.ClaimDevice(500);
            returnCodeClm_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_claim);
            resultCodeClm_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_claim);

            if (returnCode_claim == OPOS_ErrorConstant.OPOS_SUCCESS)
            {
                dEnable_btn.Enabled  = true;
                dDisable_btn.Enabled = true;
                dRelease_btn.Enabled = true;
            }
        }
예제 #5
0
        private void dOpen_btn_Click(object sender, EventArgs e)
        {
            returnCode_open        = axOPOSLineDisplay1.Open(ldn_cb.Text);
            returnCodeOpn_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_open);
            resultCodeOpn_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_open);


            if (returnCode_open == OPOS_ErrorConstant.OPOS_SUCCESS)
            {
                dClaim_btn.Enabled = true;
                dClose_btn.Enabled = true;
            }
        }
예제 #6
0
        private void dispTest_btn_Click(object sender, EventArgs e)
        {
            string errorMessage;
            int    returnCode;

            if (sender.Equals(oneLineTest_btn))
            {
                string displayText = defaultLineText_rtb.Text;
                returnCode = axOPOSLineDisplay1.DisplayText(displayText, OPOS_Constant.DISP_DT_NORMAL);
            }
            else if (sender.Equals(twoLineTest_btn))
            {
                string displayText1 = firstLineText_rtb.Text;
                string displayText2 = secondLineText_rtb.Text;
                Int32  row1 = 0, column1 = 0;


                returnCode = axOPOSLineDisplay1.DisplayTextAt(row1, column1, displayText1, OPOS_Constant.DISP_DT_NORMAL);
                returnCode = axOPOSLineDisplay1.DisplayTextAt(row1 + 1, column1, displayText2, OPOS_Constant.DISP_DT_NORMAL);
            }
            else if (sender.Equals(clearText_btn) || sender.Equals(clearText2_btn))
            {
                returnCode = axOPOSLineDisplay1.ClearText();
            }
            else
            {
                returnCode = -1;
            }

            errorMessage = OPOS_ErrorConstant.return_ErrorMessage(returnCode);

            if (sender.Equals(oneLineTest_btn))
            {
                returnCode_disp_rtb.Text = errorMessage;
            }
            else if (sender.Equals(twoLineTest_btn))
            {
                returnCode2_disp_rtb.Text = errorMessage;
            }
            else if (sender.Equals(clearText_btn))
            {
                returnCode4_disp_rtb.Text = errorMessage;
            }
            else
            {
                returnCode = -1;
            }
        }
예제 #7
0
        /// <summary>
        /// Test Print Button Click Event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void printTest_btn_Click(object sender, EventArgs e)
        {
            int ret       = 0;
            int repeatNum = int.Parse(repeatNum_tb.Text);

            if (isDefaultText)
            {
                printText = defaultReciptText;
            }
            for (int i = 0; i < repeatNum; i++)
            {
                ret = axOPOSPOSPrinter1.PrintNormal(OPOS_Constant.PTR_S_RECEIPT,
                                                    OPOS_Constant.ESC + "|cA" + printText + OPOS_Constant.FEEDCUT);
            }
            returnCodePrint_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(ret);
        }
예제 #8
0
        /// <summary>
        /// Printer Error Event function
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void axOPOSPOSPrinter1_ErrorEvent(object sender, AxOposPOSPrinter_1_5_Lib._IOPOSPOSPrinterEvents_ErrorEventEvent e)
        {
            if (sender.Equals(open_btn))
            {
                MessageBox.Show("open");
            }
            if (sender.Equals(close_btn))
            {
                MessageBox.Show("close");
            }
            if (sender.Equals(dOpen_btn))
            {
                MessageBox.Show("open2");
            }
            if (sender.Equals(dClaim_btn))
            {
                MessageBox.Show("claim");
            }
            if (sender.Equals(dEnable_btn))
            {
                MessageBox.Show("enable");
            }
            if (sender.Equals(dDisable_btn))
            {
                MessageBox.Show("disable");
            }
            if (sender.Equals(dRelease_btn))
            {
                MessageBox.Show("release");
            }
            if (sender.Equals(dClose_btn))
            {
                MessageBox.Show("close2");
            }

            MessageBox.Show(sender.ToString() + "Error Message Box");

            OPOS_ErrorConstant.return_ErrorMessage(e.resultCode);

            resultCode_open    = 0;
            resultCode_claim   = 0;
            resultCode_enable  = 0;
            resultCode_release = 0;
            resultCode_close   = 0;
            resultCode_disable = 0;
        }
예제 #9
0
        private void open_btn_Click(object sender, EventArgs e)
        {
            returnCode_open        = axOPOSCashDrawer1.Open(ldn_cb.Text);
            returnCodeOpn_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_open);
            resultCodeOpn_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_open);

            returnCode_claim       = axOPOSCashDrawer1.ClaimDevice(500);
            returnCodeClm_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_claim);
            resultCodeClm_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_claim);

            axOPOSCashDrawer1.DeviceEnabled = true;
            resultCodeEnable_rtb.Text       = OPOS_ErrorConstant.return_ErrorMessage(resultCode_enable);

            if (returnCode_open == OPOS_ErrorConstant.OPOS_SUCCESS && returnCode_claim == OPOS_ErrorConstant.OPOS_SUCCESS)
            {
                close_btn.Enabled = true;
            }
        }
예제 #10
0
        private void axOPOSMSR1_ErrorEvent(object sender, AxOposMSR_CCO._IOPOSMSREvents_ErrorEventEvent e)
        {
            int    res;
            int    resCE;
            int    errL;
            string resStr;
            string resCEStr;
            string errLStr;

            res   = e.resultCode;
            resCE = e.resultCodeExtended;
            errL  = e.errorLocus;

            resStr   = OPOS_ErrorConstant.return_ErrorMessage(res);
            resCEStr = OPOS_ErrorConstant.return_ErrorMessage(resCE);
            errLStr  = OPOS_ErrorConstant.return_ErrorMessage(errL);

            msrResultCode_rtb.Text = resStr;
            msrRCExtended_rtb.Text = resCEStr;
            msrErrorLocus_rtb.Text = errLStr;

            MessageBox.Show("Error Event!!");
        }
예제 #11
0
 private void dRelease_btn_Click(object sender, EventArgs e)
 {
     returnCode_release     = axOPOSLineDisplay1.ReleaseDevice();
     returnCodeRel_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(returnCode_release);
     resultCodeRel_rtb.Text = OPOS_ErrorConstant.return_ErrorMessage(resultCode_release);
 }
예제 #12
0
 private void dDisable_btn_Click(object sender, EventArgs e)
 {
     axOPOSLineDisplay1.DeviceEnabled = false;
     resultCodeDis_rtb.Text           = OPOS_ErrorConstant.return_ErrorMessage(resultCode_disable);
 }
예제 #13
0
 private void dEnable_btn_Click(object sender, EventArgs e)
 {
     axOPOSCashDrawer1.DeviceEnabled = true;
     resultCodeEnable_rtb.Text       = OPOS_ErrorConstant.return_ErrorMessage(resultCode_enable);
 }