Ejemplo n.º 1
0
        public override void WriteToTerminalScreen(string input)
        {
            CurserLine = 4;
            byte[] value;
            ClearScreen();
            if (input.Equals(string.Empty))
            {
                value      = Encoding.ASCII.GetBytes(FIRST_LINE_DISPLAY + BSelection[_bIndex].ToString() + Environment.NewLine + SECOND_LINE_DISPLAY + MSelection[_mIndex].ToString() + Environment.NewLine + THIRD_LINE_DISPLAY + SelectedStep.ToString() + Environment.NewLine + "Confirm ?");
                CurserLine = 4;
                tempSocket.BeginSend(value, 0, value.Length, 0, new AsyncCallback(SendCallback), tempSocket);
                AdjustCurserLocation();
                IsConfirmed = false;
            }
            else if (input.ToLower().Equals("confirm"))
            {
                value = Encoding.ASCII.GetBytes(FIRST_LINE_DISPLAY + BSelection[_bIndex].ToString() + Environment.NewLine + SECOND_LINE_DISPLAY + MSelection[_mIndex].ToString() + Environment.NewLine + THIRD_LINE_DISPLAY + SelectedStep.ToString() + Environment.NewLine);
                tempSocket.BeginSend(value, 0, value.Length, 0, new AsyncCallback(SendCallback), tempSocket);
                CurserLine = 4;

                IsConfirmed = true;
            }
            else
            {
                value = Encoding.ASCII.GetBytes(FIRST_LINE_DISPLAY + BSelection[_bIndex].ToString() + Environment.NewLine + SECOND_LINE_DISPLAY + MSelection[_mIndex].ToString() + Environment.NewLine + THIRD_LINE_DISPLAY + SelectedStep.ToString() + Environment.NewLine + input);
                tempSocket.BeginSend(value, 0, value.Length, 0, new AsyncCallback(SendCallback), tempSocket);
            }
            //if (TerminalClickRecive != null)
            //    TerminalClickRecive(value, null);
        }
Ejemplo n.º 2
0
        public override void WriteToTerminalScreen(string input)
        {
            string value;

            ClearScreen();
            if (input.Equals(string.Empty))
            {
                value      = FIRST_LINE_DISPLAY + BSelection[_bIndex].ToString() + Environment.NewLine + SECOND_LINE_DISPLAY + MSelection[_mIndex].ToString() + Environment.NewLine + THIRD_LINE_DISPLAY + SelectedStep.ToString() + Environment.NewLine + "Confirm ?";
                CurserLine = 4;
                _mySerialPort.Write(value);
                AdjustCurserLocation();
                IsConfirmed = false;
            }
            else if (input.ToLower().Equals("confirm"))
            {
                value = FIRST_LINE_DISPLAY + BSelection[_bIndex].ToString() + Environment.NewLine + SECOND_LINE_DISPLAY + MSelection[_mIndex].ToString() + Environment.NewLine + THIRD_LINE_DISPLAY + SelectedStep.ToString() + Environment.NewLine;
                _mySerialPort.Write(value);
                CurserLine  = 4;
                IsConfirmed = true;
            }
            else
            {
                value = FIRST_LINE_DISPLAY + BSelection[_bIndex].ToString() + Environment.NewLine + SECOND_LINE_DISPLAY + MSelection[_mIndex].ToString() + Environment.NewLine + THIRD_LINE_DISPLAY + SelectedStep.ToString() + Environment.NewLine + input;
                _mySerialPort.Write(value);
            }
            //if (TerminalClickRecive != null)
            //    TerminalClickRecive(value, null);
        }