예제 #1
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            //if (((FormMain)this.Owner).ToRepeater!=null)
            //if(this.atk.Id !=((FormMain)this.Owner).ToRepeater.Id)
            //  this.LoadRequest(((FormMain)this.Owner).ToRepeater);
            if (ReqChanged)
            {
                RtxbxRequest.HighlightNo((this.ChbxColors.Checked) ? Color.Black : Color.White);
                RtxbxRequest.HighlightText(txbxPaternRequest_.Text, Color.Red);
                ReqChanged = false;
            }
            if (ResChanged)
            {
                rtxbx_response.HighlightNo((this.ChbxColors.Checked) ? Color.Black : Color.White);
                rtxbx_response.HighlightText(txbxPaternResponse.Text, Color.Red);
                ResChanged = false;
            }
            timer1.Stop();
            //if (RtxbxRequest.Text == lastText)
            //    return;

            //if (RtxbxRequest.Text == "" || txChangingnow)
            //    return;

            //txtChanged();
            //lastText = RtxbxRequest.Text;
        }
예제 #2
0
        private void txtChanged()
        {
            return;

            txChangingnow = true;
            Color BackingColor = Color.FromKnownColor(KnownColor.GrayText);

            string [] doc = RtxbxRequest.Lines;
            RtxbxRequest.Text = "";

            bool DocStarted = false;

            for (int i = 0; i < doc.Length - 1; i++)
            {
                AddBColoredLine(RtxbxRequest, (i % 2 == 0) ? BackingColor : RtxbxRequest.ForeColor, doc[i] + Environment.NewLine, DocStarted);
                i++;
                RtxbxRequest.AppendText(doc[i] + Environment.NewLine);
                //if (doc[i] == "")
                //    DocStarted = true;
            }
            //  RtxbxRequest.ForeColor=Color.White;

            txChangingnow = false;
        }