Change RTF token \line to \pard\line so that text displays properly.
Pause timer to refresh the treeview while items are being added.
This commit is contained in:
parent
c159a9889f
commit
f02cce2ced
@ -312,6 +312,8 @@ namespace VEPROMS.CSLA.Library
|
||||
// save portion of this code for an explanation.
|
||||
text = text.Replace(@"\~", @"\u160?");
|
||||
text = text.Replace("\r\n", @"\line "); // replace a \r\n with a \line instead of a \par
|
||||
text = text.Replace(@"\line", @"\pard\line");
|
||||
text = text.Replace(@"\pard\pard\line", @"\pard\line");
|
||||
//if (text.IndexOf(@"\line") > -1)
|
||||
// MessageBox.Show("Found rtf line");
|
||||
//text = text.Replace(@"\line", @"\par"); // we don't want to replace the \line part of bug fix B2015-140
|
||||
|
@ -548,6 +548,16 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
if (SectionShouldClose != null) SectionShouldClose(sender, args);
|
||||
}
|
||||
public event vlnTreeViewSectionInfoEvent PauseRefresh;
|
||||
private void OnPauseRefresh(object sender, vlnTreeSectionInfoEventArgs args)
|
||||
{
|
||||
if (PauseRefresh != null) PauseRefresh(sender, args);
|
||||
}
|
||||
public event vlnTreeViewSectionInfoEvent UnPauseRefresh;
|
||||
private void OnUnPauseRefresh(object sender, vlnTreeSectionInfoEventArgs args)
|
||||
{
|
||||
if (UnPauseRefresh != null) UnPauseRefresh(sender, args);
|
||||
}
|
||||
public event WordSectionDeletedEvent WordSectionDeleted;
|
||||
internal void OnWordSectionDeleted(object sender, WordSectionEventArgs args)
|
||||
{
|
||||
@ -2090,6 +2100,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
VETreeNode tn = null;
|
||||
if (SelectedNode == null) return;
|
||||
OnPauseRefresh(this, null);
|
||||
SetLastValues((VETreeNode)SelectedNode);
|
||||
|
||||
#region InsertFolderOrDocVersion
|
||||
@ -2226,6 +2237,7 @@ namespace Volian.Controls.Library
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
int s1 = -1;
|
||||
@ -2332,6 +2344,7 @@ namespace Volian.Controls.Library
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastSectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
int tvindex = SelectedNode.Index;
|
||||
@ -2373,6 +2386,7 @@ namespace Volian.Controls.Library
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastSectionInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
tn = InsertChildStep((VETreeNode)SelectedNode);
|
||||
@ -2383,6 +2397,7 @@ namespace Volian.Controls.Library
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastStepInfo.MyProcedure.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
MessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
tn = InsertBeforeOrAfter(newtype, (VETreeNode)SelectedNode);
|
||||
@ -2396,6 +2411,7 @@ namespace Volian.Controls.Library
|
||||
Refresh();
|
||||
OnNodeInsert(this, new vlnTreeEventArgs(SelectedNode));
|
||||
}
|
||||
OnUnPauseRefresh(this, null);
|
||||
}
|
||||
private void CreateEnhancedForProcedure(MenuSelections typ, Procedure sourceProc, ProcedureInfo lastProcedureInfo)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user