Fixed code to initialize MS Word sections if Document Style does not specify font.
Added code to handle refreshing the Edit Screen when a section is moved. Added code to refresh the Edit Screen when a section is moved.
This commit is contained in:
parent
5588328899
commit
e063da6198
@ -220,8 +220,8 @@ namespace Volian.Controls.Library
|
|||||||
if (MyDocumentInfo.Config == null || MyDocumentInfo.Config == "")
|
if (MyDocumentInfo.Config == null || MyDocumentInfo.Config == "")
|
||||||
{
|
{
|
||||||
DocStyle ds = MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].MyDocStyle;
|
DocStyle ds = MyDocumentInfo.DocumentEntries[0].MyContent.ContentItems[0].MyDocStyle;
|
||||||
doc.Application.Selection.Font.Name = ds.Font.Family;
|
if (ds.Font.Family != null) doc.Application.Selection.Font.Name = ds.Font.Family;
|
||||||
doc.Application.Selection.Font.Size = (float)ds.Font.Size;
|
if (ds.Font.Size != null) doc.Application.Selection.Font.Size = (float)ds.Font.Size;
|
||||||
doc.Application.Selection.ParagraphFormat.SpaceBefore = 0;
|
doc.Application.Selection.ParagraphFormat.SpaceBefore = 0;
|
||||||
doc.Application.Selection.ParagraphFormat.SpaceAfter = 0;
|
doc.Application.Selection.ParagraphFormat.SpaceAfter = 0;
|
||||||
doc.Application.Selection.ParagraphFormat.LineSpacingRule = LBWdLineSpacing.wdLineSpaceExactly;
|
doc.Application.Selection.ParagraphFormat.LineSpacingRule = LBWdLineSpacing.wdLineSpaceExactly;
|
||||||
|
@ -413,7 +413,12 @@ namespace Volian.Controls.Library
|
|||||||
ExpandAsNeeded(itemInfo);
|
ExpandAsNeeded(itemInfo);
|
||||||
if (_SelectedItemInfo == null) _SelectedItemInfo = itemInfo;
|
if (_SelectedItemInfo == null) _SelectedItemInfo = itemInfo;
|
||||||
//if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset();
|
//if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset();
|
||||||
if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset(itemInfo);
|
if (itemInfo.Moving)
|
||||||
|
{
|
||||||
|
Reset(itemInfo);
|
||||||
|
itemInfo.Moving = false;
|
||||||
|
}
|
||||||
|
else if ( !_LookupEditItems.ContainsKey(itemInfo.ItemID)) Reset(itemInfo);
|
||||||
if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) return null;
|
if (!_LookupEditItems.ContainsKey(itemInfo.ItemID)) return null;
|
||||||
return _LookupEditItems[itemInfo.ItemID];
|
return _LookupEditItems[itemInfo.ItemID];
|
||||||
}
|
}
|
||||||
|
@ -1946,7 +1946,7 @@ namespace Volian.Controls.Library
|
|||||||
{
|
{
|
||||||
DragDropEffects ee = e.Effect;
|
DragDropEffects ee = e.Effect;
|
||||||
if ((e.KeyState & 8) == 8)
|
if ((e.KeyState & 8) == 8)
|
||||||
ee = DragDropEffects.Copy; // Copy it
|
ee = DragDropEffects.None; // Don't allow copy this way - Copy it
|
||||||
else
|
else
|
||||||
ee = DragDropEffects.Move; // Move it
|
ee = DragDropEffects.Move; // Move it
|
||||||
if (IsChild(dragNode, dl.DropNode)) // Don't copy or move to a child node
|
if (IsChild(dragNode, dl.DropNode)) // Don't copy or move to a child node
|
||||||
@ -2081,9 +2081,11 @@ namespace Volian.Controls.Library
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pdropi = ((VETreeNode)_LastDropLocation.DropNode).VEObject as ProcedureInfo;
|
pdropi = ((VETreeNode)_LastDropLocation.DropNode).VEObject as ProcedureInfo;
|
||||||
if (pdropi != null && sdragi.MyParent.ItemID == pdropi.ItemID)
|
if (pdropi != null && ((ItemInfo)(sdragi.ActiveParent)).ItemID == pdropi.ItemID)
|
||||||
{
|
{
|
||||||
sdragi.MoveSection(pdropi, myIndex);
|
sdragi.MoveSection(pdropi, myIndex);
|
||||||
|
sdragi.Moving = true;
|
||||||
|
OnNodeSelect(dragNode, new vlnTreeEventArgs(dragNode));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user