コード例 #1
0
        // LOG GUI LOW LEVEL
        private void writeTextBox(AbstractExtendedRichTexBox box, string text)
        {
            box.BeginUpdate();

            box.AppendText(text);
            box.AppendText("\r\n");

            if (FrameworkTesterRepository.Instance.Logger.InteractiveLogging)
            {
                box.SelectionStart = box.Text.Length;
                box.ScrollToCaret();
            }

            box.EndUpdate();

            box.Invalidate();

            if (FrameworkTesterRepository.Instance.Logger.InteractiveLogging)
            {
                Application.DoEvents();
            }
        }
コード例 #2
0
 private void writeID(AbstractExtendedRichTexBox box, string text)
 {
     if (box != null)
     {
         writeTextBox(box, text);
     }
     else
     {
         writeError("ID" + " : " + text);
     }
 }
コード例 #3
0
        private void TextBoxSave(string fileNameBase, AbstractExtendedRichTexBox box)
        {
            saveFileDialog.FileName = fileNameBase + ".txt";

            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                Stream myStream = saveFileDialog.OpenFile();
                StreamWriter wText = new StreamWriter(myStream);
                wText.Write(box.Text);
                wText.Flush();
                myStream.Close();
            }
        }
コード例 #4
0
        private AbstractExtendedRichTexBox[] findAllTextBox()
        {
            IList list = new ArrayList();
            AbstractExtendedRichTexBox box;

            foreach (Control control in tabControlAll.Controls)
            {
                if (control.Tag != null)
                {
                    box = findControTextBox(control.Controls);
                    if (box != null) { list.Add(box); }
                }
            }

            AbstractExtendedRichTexBox[] result = new AbstractExtendedRichTexBox[list.Count];
            list.CopyTo(result, 0);
            return result;
        }
コード例 #5
0
 public void TextBoxClose(AbstractExtendedRichTexBox box)
 {
     Control tabPage = box.Parent;
     tabControlAll.Controls.Remove(tabPage);
     _hastTable.Remove(box.Tag);
 }
コード例 #6
0
 public void TextBoxClear(AbstractExtendedRichTexBox box)
 {
     box.Text = "";
 }