本文整理汇总了C#中QueuedTextWrite类的典型用法代码示例。如果您正苦于以下问题:C# QueuedTextWrite类的具体用法?C# QueuedTextWrite怎么用?C# QueuedTextWrite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
QueuedTextWrite类属于命名空间,在下文中一共展示了QueuedTextWrite类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteError
public void WriteError (string text)
{
var w = new QueuedTextWrite (text, errorTag);
addQueuedUpdate (w);
}
示例2: WriteConsoleLogText
public void WriteConsoleLogText (string text)
{
lock (updates) {
if (lastTextWrite != null && lastTextWrite.Tag == consoleLogTag) {
lastTextWrite.Write (text);
return;
}
}
var w = new QueuedTextWrite (text, consoleLogTag);
addQueuedUpdate (w);
}
示例3: WriteText
public void WriteText (string text)
{
//raw text has an extra optimisation here, as we can append it to existing updates
lock (updates) {
if (lastTextWrite != null) {
if (lastTextWrite.Tag == null) {
lastTextWrite.Write (text);
return;
}
}
}
var qtw = new QueuedTextWrite (text, null);
addQueuedUpdate (qtw);
}
示例4: addQueuedUpdate
void addQueuedUpdate (QueuedUpdate update)
{
lock (updates) {
updates.Enqueue (update);
if (!outputDispatcherRunning) {
GLib.Timeout.Add (50, outputDispatcher);
outputDispatcherRunning = true;
}
lastTextWrite = update as QueuedTextWrite;
}
}
示例5: WriteTask_II
public void WriteTask_II(object task, string name, string status, List<TaskMessage> error, bool clearOutput)
{
if (clearOutput)
Clear();
TaskResult tr = new TaskResult(name, status, error);
//raw text has an extra optimisation here, as we can append it to existing updates
/*lock (updates) {
if (lastTextWrite != null) {
if (lastTextWrite.Tag == null) {
lastTextWrite.Write(tr);
return;
}
}
}*/
QueuedTextWrite qtw = new QueuedTextWrite(tr);
AddQueuedUpdate(qtw);
}
示例6: WriteTask
public void WriteTask(object task, string name, string status, List<TaskMessage> error, bool clearOutput)
{
if (clearOutput)
Clear();
QueuedTextWrite qtw = new QueuedTextWrite(error);
AddQueuedUpdate(qtw);
}
示例7: Clear
public void Clear()
{
lock (updates) {
updates.Clear();
lastTextWrite = null;
outputDispatcherRunning = false;
}
outputModel.Clear();
}
示例8: OnDestroyed
protected override void OnDestroyed ()
{
base.OnDestroyed ();
lock (updates) {
updates.Clear ();
lastTextWrite = null;
}
IdeApp.Preferences.CustomOutputPadFont.Changed -= HandleCustomFontChanged;
}
示例9: outputDispatchHandler
//mechanism to to batch copy text when large amounts are being dumped
bool outputDispatchHandler ()
{
lock (updates) {
lastTextWrite = null;
if (updates.Count == 0) {
outputDispatcherRunning = false;
return false;
}
if (!outputDispatcherRunning) {
updates.Clear ();
return false;
}
while (updates.Count > 0) {
var up = updates.Dequeue ();
up.Execute (this);
}
}
return true;
}
示例10: OnDestroyed
protected override void OnDestroyed()
{
base.OnDestroyed();
lock (updates) {
updates.Clear();
lastTextWrite = null;
}
//IdeApp.Preferences.CustomOutputPadFontChanged -= HandleCustomFontChanged;
if (customFont != null) {
customFont.Dispose();
customFont = null;
}
}