private void RequestDuplicationOnSelectedStep()
        {
            if (SelectedStep == null)
            {
                return;
            }

            SelectedStep.RequestDuplication();
        }
 private void _addSignalsToStep(SignalTree tree)
 {
     if (tree.Signal != null)
     {
         SelectedStep.AddSignal(tree.Signal);
     }
     else
     {
         foreach (var tr in tree.SignalList)
         {
             _addSignalsToStep(tr);
         }
     }
 }
 private void _removeSignalsFromStep(SignalTree tree)
 {
     if (tree.Signal != null && SelectedStep.InputChannels.Contains(tree.Signal))
     {
         SelectedStep.RemoveSignal(tree.Signal);
     }
     else
     {
         if (tree.SignalList != null && tree.SignalList.Count > 0)
         {
             foreach (var tr in tree.SignalList)
             {
                 _removeSignalsFromStep(tr);
             }
         }
     }
 }
示例#4
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);
        }
示例#5
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);
        }