OSDN Git Service
(root)
/
radegast
/
radegast.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecec5ff
)
Allow text printer to work from different threads... patch by nephrael
author
Latif Khalifa
<latifer@streamgrid.net>
Thu, 23 Jul 2009 23:57:55 +0000
(23:57 +0000)
committer
Latif Khalifa
<latifer@streamgrid.net>
Thu, 23 Jul 2009 23:57:55 +0000
(23:57 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@121
f7a694da
-4d33-11de-9ad6-
1127a62b9fcd
Radegast/Core/RichTextBoxPrinter.cs
patch
|
blob
|
history
diff --git
a/Radegast/Core/RichTextBoxPrinter.cs
b/Radegast/Core/RichTextBoxPrinter.cs
index
97122be
..
8496f34
100644
(file)
--- a/
Radegast/Core/RichTextBoxPrinter.cs
+++ b/
Radegast/Core/RichTextBoxPrinter.cs
@@
-47,12
+47,17
@@
namespace Radegast
\r
public void PrintText(string text)
\r
{
\r
+ if (rtb.InvokeRequired)
\r
+ {
\r
+ rtb.Invoke(new MethodInvoker(() => rtb.AppendText(text)));
\r
+ return;
\r
+ }
\r
rtb.AppendText(text);
\r
}
\r
\r
public void PrintTextLine(string text)
\r
{
\r
-
rtb.Append
Text(text + Environment.NewLine);
\r
+
Print
Text(text + Environment.NewLine);
\r
}
\r
\r
public void PrintTextLine(string text, Color color)
\r