C2025-024
Fix merge conflict
This commit is contained in:
@@ -22,8 +22,8 @@ namespace Volian.Controls.Library
|
||||
public delegate void vlnTreeViewEvent(object sender, vlnTreeEventArgs args);
|
||||
public delegate void vlnTreeViewTimeEvent(object sender, vlnTreeTimeEventArgs args);
|
||||
public delegate void vlnTreeViewStatusEvent(object sender, vlnTreeStatusEventArgs args);
|
||||
public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args);
|
||||
public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args);
|
||||
public delegate ItemInfo vlnTreeViewClipboardStatusEvent(object sender, vlnTreeEventArgs args);
|
||||
public delegate void vlnTreeViewItemInfoEvent(object sender, vlnTreeItemInfoEventArgs args);
|
||||
public delegate bool vlnTreeViewBoolEvent(object sender, vlnTreeEventArgs args);
|
||||
public delegate bool vlnTreeViewItemInfoDeleteEvent(object sender, vlnTreeItemInfoEventArgs args);
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace Volian.Controls.Library
|
||||
#endregion
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("Node={0},Destination={1},Index={2},Unit={3},UnitIndex={4}", NodePath(this.Node), this.Destination, this.Index, this.Unit, this.UnitIndex);
|
||||
return string.Format("Node={0},Destination={1},Index={2},Unit={3},UnitIndex={4}", NodePath(this.Node), this.Destination, this.Index, this.Unit, this.UnitIndex);
|
||||
}
|
||||
|
||||
private string NodePath(TreeNode node)
|
||||
@@ -603,11 +603,11 @@ namespace Volian.Controls.Library
|
||||
|
||||
|
||||
|
||||
public event vlnTreeViewEvent ExportImportProcedureSets;
|
||||
private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args);
|
||||
}
|
||||
public event vlnTreeViewEvent ExportImportProcedureSets;
|
||||
private void OnExportImportProcedureSets(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
if (ExportImportProcedureSets != null) ExportImportProcedureSets(sender, args);
|
||||
}
|
||||
public event vlnTreeViewEvent PrintTransitionReport;
|
||||
private void OnPrintTransitionReport(object sender, vlnTreeEventArgs args)
|
||||
{
|
||||
@@ -736,7 +736,7 @@ namespace Volian.Controls.Library
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(fi))// && fi.MyParent == null) //VEPROMS level
|
||||
{
|
||||
if (fi.HasWorkingDraft)
|
||||
{
|
||||
{
|
||||
cm.MenuItems.Add("Export Procedure Set", new EventHandler(mi_Click));
|
||||
//AddEPExport(cm.MenuItems, 0, null);
|
||||
}
|
||||
@@ -773,10 +773,10 @@ namespace Volian.Controls.Library
|
||||
//_MyLog.WarnFormat("Context Menu 1c - {0}", GC.GetTotalMemory(true));
|
||||
DocVersionInfo dvi = tn.VEObject as DocVersionInfo;
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi))
|
||||
{
|
||||
cm.MenuItems.Add("Import Procedure", mi_Click);
|
||||
}
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi))
|
||||
{
|
||||
cm.MenuItems.Add("Import Procedure", mi_Click);
|
||||
}
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(dvi) || ui.IsWriter(dvi))
|
||||
{
|
||||
OwnerInfoList.Reset();
|
||||
oil = OwnerInfoList.GetByVersionID(dvi.VersionID);
|
||||
@@ -874,9 +874,9 @@ namespace Volian.Controls.Library
|
||||
oi = OwnerInfo.GetByItemID(pri.ItemID, CheckOutType.Procedure);
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion))
|
||||
{
|
||||
cm.MenuItems.Add("Export Procedure", mi_Click);
|
||||
//C2025-024 Proms XML Output - if have any EP Format files, add dropdown menu for exporting EP formats
|
||||
if (pri.ActiveFormat.PlantFormat.EPFormatFiles.Count > 0)
|
||||
cm.MenuItems.Add("Export Procedure", mi_Click);
|
||||
//C2025-024 Proms XML Output - if have any EP Format files, add dropdown menu for exporting EP formats
|
||||
if (pri.ActiveFormat.PlantFormat.EPFormatFiles.Count > 0)
|
||||
AddEPExport(cm.MenuItems, pri.MyDocVersion.MultiUnitCount, pri.MyDocVersion.UnitNames, pri.ActiveFormat.PlantFormat.EPFormatFiles);
|
||||
}
|
||||
if (ui.IsAdministrator() || ui.IsSetAdministrator(pri.MyDocVersion) || ui.IsWriter(pri.MyDocVersion))
|
||||
@@ -1168,29 +1168,29 @@ namespace Volian.Controls.Library
|
||||
|
||||
|
||||
|
||||
{
|
||||
// Add delete to the menu unless at the very 'top' node, on a grouping (partinfo)
|
||||
// node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items.
|
||||
PartInfo pi = tn.VEObject as PartInfo;
|
||||
if (pi == null && tn.Parent != null) // it's not a part and it's not the top....
|
||||
{
|
||||
// Add delete to the menu unless at the very 'top' node, on a grouping (partinfo)
|
||||
// node (RNOs, Steps, Cautions, Notes) or Folder/DocVersion that contains any items.
|
||||
PartInfo pi = tn.VEObject as PartInfo;
|
||||
if (pi == null && tn.Parent != null) // it's not a part and it's not the top....
|
||||
fi = tn.VEObject as FolderInfo;
|
||||
if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children
|
||||
{
|
||||
fi = tn.VEObject as FolderInfo;
|
||||
if (fi == null || tn.Nodes.Count == 0) // it's not a folder or it has no children
|
||||
DocVersionInfo di = tn.VEObject as DocVersionInfo;
|
||||
if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children
|
||||
{
|
||||
DocVersionInfo di = tn.VEObject as DocVersionInfo;
|
||||
if (di == null || tn.Nodes.Count == 0) // it's not a docversion or it has no children
|
||||
{
|
||||
// if it's an enhanced step that was linked from a source, don't allow delete
|
||||
bool canDoDel = true;
|
||||
ItemInfo iienh = tn.VEObject as ItemInfo;
|
||||
if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false;
|
||||
if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false;
|
||||
if (iienh != null && iienh.IsEnhancedStep) canDoDel = false;
|
||||
if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click));
|
||||
}
|
||||
// if it's an enhanced step that was linked from a source, don't allow delete
|
||||
bool canDoDel = true;
|
||||
ItemInfo iienh = tn.VEObject as ItemInfo;
|
||||
if (iienh != null && iienh.IsProcedure && iienh.IsEnhancedProcedure) canDoDel = false;
|
||||
if (iienh != null && iienh.IsSection && iienh.IsEnhancedSection && !iienh.IsEnhancedSectionTitleOnly) canDoDel = false;
|
||||
if (iienh != null && iienh.IsEnhancedStep) canDoDel = false;
|
||||
if (canDoDel) cm.MenuItems.Add("Delete", new EventHandler(mi_Click));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
//_MyLog.WarnFormat("Context Menu 6 - {0}", GC.GetTotalMemory(true));
|
||||
@@ -1395,7 +1395,7 @@ namespace Volian.Controls.Library
|
||||
// if has an Electronic procedure
|
||||
// then loop through and add an Export for each EP Viewer
|
||||
private void AddEPExport(Menu.MenuItemCollection menuItems, int MultiUnitCount, string[] UnitNames, EPFormatFiles EPFiles)
|
||||
{
|
||||
{
|
||||
//add outer menu
|
||||
MenuItem mi = menuItems.Add("Electronic Procedure Viewer Export");
|
||||
foreach (EPFormatFile epAnnType in EPFiles)
|
||||
@@ -1419,7 +1419,7 @@ namespace Volian.Controls.Library
|
||||
multiunit_mv.Click += new EventHandler(miEP_Click);
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
mv.Tag = $"{epAnnType.AnnotationTypeID},0";
|
||||
mv.Click += new EventHandler(miEP_Click);
|
||||
@@ -1427,7 +1427,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
|
||||
private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri)
|
||||
private void AddApprovedRevisionsMultiUnit(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri)
|
||||
{
|
||||
_currentPri = pri;
|
||||
RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID);
|
||||
@@ -1478,11 +1478,11 @@ namespace Volian.Controls.Library
|
||||
ril = null;
|
||||
}
|
||||
}
|
||||
public void AddNewNode(IVEDrillDownReadOnly o)
|
||||
{
|
||||
VETreeNode tn = new VETreeNode(o);
|
||||
SelectedNode.Nodes.Add(tn);
|
||||
}
|
||||
public void AddNewNode(IVEDrillDownReadOnly o)
|
||||
{
|
||||
VETreeNode tn = new VETreeNode(o);
|
||||
SelectedNode.Nodes.Add(tn);
|
||||
}
|
||||
private void AddApprovedRevisions(Menu.MenuItemCollection menuItemCollection, ProcedureInfo pri)
|
||||
{
|
||||
try
|
||||
@@ -1491,7 +1491,7 @@ namespace Volian.Controls.Library
|
||||
_currentPri = pri;
|
||||
using (RevisionInfoList ril = RevisionInfoList.GetByItemID(pri.ItemID))
|
||||
{
|
||||
//_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true));
|
||||
//_MyLog.WarnFormat("Context Menu 1 After GET - {0}", GC.GetTotalMemory(true));
|
||||
if (ril.Count == 0) return; // no versions to list
|
||||
MenuItem mi = menuItemCollection.Add("Versions");
|
||||
int lastApprovedRevisionID = 0;
|
||||
@@ -1625,7 +1625,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
vlnTreeViewPdfArgs args = new vlnTreeViewPdfArgs(Volian.Base.Library.TmpFile.CreateFileName(ProcedureInfo.Get(ri.ItemID).PDFNumber), ri.LatestVersion.PDF, superceded ? "Superceded" : "");
|
||||
OnViewPDF(sender, args);
|
||||
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
|
||||
// System.Diagnostics.Process pp = System.Diagnostics.Process.Start(GetDocPdf(ri, superceded));
|
||||
}
|
||||
void MultiUnitApprovedRevision_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -1769,7 +1769,7 @@ namespace Volian.Controls.Library
|
||||
if (iiClipboard.IsRtfRaw) canPaste = false; // never paste an equation.
|
||||
if (canPaste) cm.MenuItems.Add("Paste Procedure", new EventHandler(mi_Click));
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2068,7 +2068,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
ItemInfo lprc = ItemInfo.Get(ed.ItemID);
|
||||
bool hasValidConnectingProc = CheckForValidEnhLink(lprc);
|
||||
// if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure.
|
||||
// if there is a valid connection, unlink both. Otherwise, just unlink this selected procedure.
|
||||
if (hasValidConnectingProc)
|
||||
lprc.DoUnlinkEnhanced(lprc, ed.Type, !hasValidConnectingProc);
|
||||
else
|
||||
@@ -2092,11 +2092,11 @@ namespace Volian.Controls.Library
|
||||
OnNodeSI(this, new vlnTreeEventArgs(tn, null, 0));
|
||||
return;
|
||||
}
|
||||
if (mi.Text.StartsWith("Collapse"))
|
||||
{
|
||||
if (mi.Text.StartsWith("Collapse"))
|
||||
{
|
||||
CollapseProcedures();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (mi.Text == "Print Transition Report")
|
||||
{
|
||||
OnPrintTransitionReport(this, new vlnTreeEventArgs(SelectedNode as VETreeNode));
|
||||
@@ -2112,17 +2112,17 @@ namespace Volian.Controls.Library
|
||||
|
||||
|
||||
|
||||
if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure")
|
||||
{
|
||||
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
|
||||
return;
|
||||
}
|
||||
if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure")
|
||||
{
|
||||
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1));
|
||||
return;
|
||||
}
|
||||
if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to"))
|
||||
if (mi.Text == "Export Procedure Set" || mi.Text == "Export Procedure")
|
||||
{
|
||||
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
|
||||
return;
|
||||
}
|
||||
if (mi.Text == "Import Procedure Set" || mi.Text == "Import Procedure")
|
||||
{
|
||||
OnExportImportProcedureSets(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 1));
|
||||
return;
|
||||
}
|
||||
if (mi.Text.StartsWith("Procedure Checked Out to") || mi.Text.StartsWith("Document Checked Out to"))
|
||||
{
|
||||
OnProcedureCheckedOutTo(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
|
||||
return;
|
||||
@@ -2192,7 +2192,7 @@ namespace Volian.Controls.Library
|
||||
tv_NodeCopy();
|
||||
break;
|
||||
// lots of paste options:
|
||||
case "Paste Procedure":
|
||||
case "Paste Procedure":
|
||||
case "Paste Procedure Before":
|
||||
case "Paste Procedure After":
|
||||
case "Paste Section":
|
||||
@@ -2294,12 +2294,12 @@ namespace Volian.Controls.Library
|
||||
case "Create Continuous Action Summary":
|
||||
OnCreateContinuousActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
|
||||
break;
|
||||
// F2022-024 Time Critical Action Summary
|
||||
// F2022-024 Time Critical Action Summary
|
||||
case "Create Time Critical Action Summary":
|
||||
OnCreateTimeCriticalActionSummary(this, new vlnTreeEventArgs(SelectedNode as VETreeNode, null, 0));
|
||||
break;
|
||||
// B2017-243 added the following two Cannot Paste items when dealing with enhanced documents
|
||||
// when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted
|
||||
// B2017-243 added the following two Cannot Paste items when dealing with enhanced documents
|
||||
// when then user selects these menu items a message box will appear giving more information as to why it cannot be pasted
|
||||
case "CANNOT PASTE HERE. Click for more information...":
|
||||
FlexibleMessageBox.Show("You have copied a document that is linked to an Enhanced Document.\n\n" +
|
||||
"It can only be pasted before or after another document, within the set, that is linked to an Enhanced Document.", "Cannot Paste Here");
|
||||
@@ -2358,7 +2358,7 @@ namespace Volian.Controls.Library
|
||||
foreach (VETreeNode tnc in tn.Nodes)
|
||||
CollapseProcedures(tnc);
|
||||
if (tn.VEObject as DocVersionInfo == null && tn.VEObject as FolderInfo == null)
|
||||
tn.Collapse();
|
||||
tn.Collapse();
|
||||
_doingCollapseNode = true; // B2016-058 this will prevent a Drag Node error when collapsing an RNOs, Cautions, or Notes tree node
|
||||
}
|
||||
private void tv_RemoveChgIds()
|
||||
@@ -2418,7 +2418,7 @@ namespace Volian.Controls.Library
|
||||
using (DocVersion dv = DocVersion.Get(MyDVI.VersionID))
|
||||
{
|
||||
swROUpdate = new System.IO.StreamWriter(ROFstInfo.ROUpdateResultsPath(MyDVI)); // RO changes placed in file in the Documents\VEPROMS folder
|
||||
// B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo
|
||||
// B2022-026 RO Memory Reduction code - first load the new ro.fst so that we can assign the ROTableUpdate event to the correct roFstInfo
|
||||
if (dv.ROfstLoadingFigures || dv.NewerRoFst) // B2017-125 see if loading figures was completed
|
||||
{
|
||||
// only load the RO.fst
|
||||
@@ -2669,7 +2669,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
|
||||
//if (p.IndexOf("Replace") <= -1)
|
||||
this.Cursor = Cursors.Default;
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
|
||||
public void PasteAsDocVersionChild(VETreeNode tn, int copyStartID)
|
||||
@@ -2801,7 +2801,7 @@ namespace Volian.Controls.Library
|
||||
SelectedNode.Nodes.Add(tn1); // add tree node to end of list.
|
||||
SelectedNode = tn1;
|
||||
}
|
||||
private void tv_NodeCopy()
|
||||
private void tv_NodeCopy()
|
||||
{
|
||||
if (SelectedNode == null) return;
|
||||
VETreeNode tn = SelectedNode as VETreeNode;
|
||||
@@ -2839,7 +2839,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
using (Folder folder = folderInfo.Get())
|
||||
{
|
||||
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig));
|
||||
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} Properties", folder.FolderConfig.Name), folder.FolderConfig));
|
||||
}
|
||||
}
|
||||
private void OpenProperties(DocVersionInfo dvInfo)
|
||||
@@ -2853,7 +2853,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
using (Procedure proc = procInfo.Get())
|
||||
{
|
||||
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig));
|
||||
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(string.Format("{0} {1} Properties", proc.ProcedureConfig.Number, proc.ProcedureConfig.Title), proc.ProcedureConfig));
|
||||
}
|
||||
}
|
||||
private void OpenProperties(SectionInfo sectInfo)
|
||||
@@ -2866,7 +2866,7 @@ namespace Volian.Controls.Library
|
||||
title = string.Format("{0} {1} Properties", sectInfo.SectionConfig.Number, sectInfo.SectionConfig.Title);
|
||||
else
|
||||
title = string.Format("{0} Properties", sectInfo.SectionConfig.Title);
|
||||
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig));
|
||||
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig));
|
||||
}
|
||||
}
|
||||
private void OpenProperties(StepInfo stpinfo)
|
||||
@@ -3004,7 +3004,7 @@ namespace Volian.Controls.Library
|
||||
procedure.Save();
|
||||
tn = new VETreeNode(_LastProcedureInfo);
|
||||
SelectedNode.Nodes.Add(tn); // add tree node to end of list.
|
||||
// The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034)
|
||||
// The following line will allow for a refresh of the procedure list on the Working Draft's treenodes docversion (B2016-034)
|
||||
if (((SelectedNode as VETreeNode).VEObject as DocVersionInfo) != null) ((SelectedNode as VETreeNode).VEObject as DocVersionInfo).ResetProcedures();
|
||||
if (procedure.MyProcedureInfo.CreateEnhanced)
|
||||
{
|
||||
@@ -3056,11 +3056,11 @@ namespace Volian.Controls.Library
|
||||
string message = string.Empty;
|
||||
if (_LastProcedureInfo != null)
|
||||
if (!MySessionInfo.CanCheckOutItem(_LastProcedureInfo.ItemID, CheckOutType.Procedure, ref message))
|
||||
{
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
{
|
||||
FlexibleMessageBox.Show(this, message, "Item Already Checked Out", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||
OnUnPauseRefresh(this, null);
|
||||
return;
|
||||
}
|
||||
int s1 = -1;
|
||||
if (!(_LastProcedureInfo == null) || !(_LastSectionInfo == null))
|
||||
{
|
||||
@@ -3113,8 +3113,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
tn = new VETreeNode(_LastSectionInfo);
|
||||
SelectedNode.Nodes.Add(tn); // add tree node to end of list.
|
||||
// if the new section was flagged as either having an enhanced link for Title or Contents, create the
|
||||
// Enhanced section:
|
||||
// if the new section was flagged as either having an enhanced link for Title or Contents, create the
|
||||
// Enhanced section:
|
||||
Section sectiontmp = Section.Get(section.ItemID); // need to do this because of 'caching' problem.
|
||||
if (sectiontmp.SectionConfig.LinkEnhanced == "T" || sectiontmp.SectionConfig.LinkEnhanced == "Y")
|
||||
CreateEnhancedForSection(newtype, sectiontmp, savLastSectionInfo, sectiontmp.DisplayNumber, sectiontmp.MyContent.Text);
|
||||
@@ -3142,7 +3142,7 @@ namespace Volian.Controls.Library
|
||||
if (s1 != -1)
|
||||
{
|
||||
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
||||
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
||||
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
||||
_LastTreeNode.ChildrenLoaded = false;
|
||||
_LastTreeNode.RefreshNode();
|
||||
_LastTreeNode.Collapse();
|
||||
@@ -3189,7 +3189,7 @@ namespace Volian.Controls.Library
|
||||
if (s2 != -1)
|
||||
{
|
||||
DeleteItemInfoAndChildren(_LastSectionInfo);// Delete Item and reset Previous and Next
|
||||
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
||||
// B2020-087 refresh the tree node after canceling the creation of the subsection
|
||||
_LastTreeNode.ChildrenLoaded = false;
|
||||
_LastTreeNode.RefreshNode();
|
||||
_LastTreeNode.Collapse();
|
||||
@@ -4131,7 +4131,7 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
return;
|
||||
}
|
||||
//if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("Line at {0} Node {1}[{2}] {3}", _location, _dropNode.Text, _index, _position.ToString());
|
||||
//if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("Line at {0} Node {1}[{2}] {3}", _location, _dropNode.Text, _index, _position.ToString());
|
||||
// Changed the color of the drag indicator to always be red
|
||||
Color lc = (_position == DropPosition.After ? Color.Red : Color.Red);
|
||||
Brush lb = (_position == DropPosition.After ? Brushes.Red : Brushes.Red);
|
||||
@@ -4158,12 +4158,12 @@ namespace Volian.Controls.Library
|
||||
//if (e.Effect == DragDropEffects.None) return;
|
||||
if (_dropNode != null)
|
||||
{
|
||||
// if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("ShowLocation1 {0} {1}", e.Effect.ToString(), DateTime.Now.Millisecond);
|
||||
// if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("ShowLocation1 {0} {1}", e.Effect.ToString(), DateTime.Now.Millisecond);
|
||||
DragHelper.ImageList_DragShowNolock(false);
|
||||
TreeView tv = _dropNode.TreeView;
|
||||
TreeNode tmp = tv.GetNodeAt(tv.PointToClient(new Point(e.X, e.Y)));
|
||||
// if (!ScrollOnly)
|
||||
// {
|
||||
// if (!ScrollOnly)
|
||||
// {
|
||||
if (ScrollTreeView(tmp) || !ScrollOnly)
|
||||
{
|
||||
//if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("ShowLocation2 {0} {1}", e.Effect.ToString(), DateTime.Now.Millisecond);
|
||||
@@ -4176,8 +4176,8 @@ namespace Volian.Controls.Library
|
||||
if (_position != DropPosition.Child) InsertPointer(tmp, g);
|
||||
}
|
||||
}
|
||||
// }
|
||||
// else ScrollTreeView(tmp);
|
||||
// }
|
||||
// else ScrollTreeView(tmp);
|
||||
DragHelper.ImageList_DragShowNolock(true);
|
||||
}
|
||||
}
|
||||
@@ -4200,10 +4200,10 @@ namespace Volian.Controls.Library
|
||||
tn.NextVisibleNode.EnsureVisible();// Make sure that the next node is visible
|
||||
else
|
||||
if (tn.PrevVisibleNode != null && tn.PrevVisibleNode.PrevVisibleNode != null && tn.PrevVisibleNode.PrevVisibleNode.IsVisible == false)
|
||||
tn.PrevVisibleNode.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible }
|
||||
else
|
||||
tn.PrevVisibleNode.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible }
|
||||
else
|
||||
if (tn.PrevVisibleNode != null && tn.PrevVisibleNode.IsVisible == false)
|
||||
tn.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible
|
||||
tn.PrevVisibleNode.EnsureVisible();// Make sure that the previous node is visible
|
||||
retval = (top != tn.Bounds.Top);
|
||||
// if (retval) if(_MyLog.IsInfoEnabled)_MyLog.Info("Scroll");
|
||||
}
|
||||
@@ -4432,28 +4432,28 @@ namespace Volian.Controls.Library
|
||||
if (_MyLog.IsErrorEnabled) _MyLog.Error("tv_DragDrop", ex);
|
||||
}
|
||||
}
|
||||
// private void DumpMembers(object o)
|
||||
// {
|
||||
// Type t = o.GetType();
|
||||
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("\r\n\r\nMembers for type {0}", t.ToString());
|
||||
// MemberInfo[] mis = t.GetMembers();
|
||||
// int i = 0;
|
||||
// foreach (MemberInfo mi in mis)
|
||||
// {
|
||||
// i++;
|
||||
// try
|
||||
// {
|
||||
// //if(mi.MemberType != MemberTypes.Method)
|
||||
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("{0} {1} {2}", i, mi.Name, mi.MemberType);
|
||||
//// if (fi.Name == "TreeView")
|
||||
//// fi.SetValue(o, null);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// if(_MyLog.IsErrorEnabled)_MyLog.Error("DumpMembers", ex);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// private void DumpMembers(object o)
|
||||
// {
|
||||
// Type t = o.GetType();
|
||||
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("\r\n\r\nMembers for type {0}", t.ToString());
|
||||
// MemberInfo[] mis = t.GetMembers();
|
||||
// int i = 0;
|
||||
// foreach (MemberInfo mi in mis)
|
||||
// {
|
||||
// i++;
|
||||
// try
|
||||
// {
|
||||
// //if(mi.MemberType != MemberTypes.Method)
|
||||
// //if(_MyLog.IsInfoEnabled)_MyLog.InfoFormat("{0} {1} {2}", i, mi.Name, mi.MemberType);
|
||||
//// if (fi.Name == "TreeView")
|
||||
//// fi.SetValue(o, null);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// if(_MyLog.IsErrorEnabled)_MyLog.Error("DumpMembers", ex);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
private TreeNode Clone(TreeNode tn)
|
||||
{
|
||||
|
||||
|
Reference in New Issue
Block a user