Skip to content

Commit

Permalink
Merge pull request #114 from BalaVigneshRaviChandran/ES-910258-AsyncM…
Browse files Browse the repository at this point in the history
…ethods

911261: Depreciated methods changed with replaced Async methods
  • Loading branch information
Keerthivasan-Ramamoorthy authored Sep 24, 2024
2 parents a7bf0b3 + 8f4bde1 commit 014fad1
Show file tree
Hide file tree
Showing 18 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions KB-Samples/BPMNSample/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@
sfDiagram.StartGroupAction();
sfDiagram.BeginUpdate();
sfDiagram.Nodes.Remove(deleteObject);
_ = sfDiagram.EndUpdate();
_ = sfDiagram.EndUpdateAsync();
sfDiagram.EndGroupAction();
}
base.OnMouseUp(args);
Expand Down Expand Up @@ -2710,7 +2710,7 @@
}
private async Task Load()
{
await Diagram.LoadDiagram(data);
await Diagram.LoadDiagramAsync(data);
}
public void Dispose()
{
Expand Down
2 changes: 1 addition & 1 deletion KB-Samples/DragDrop/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
TargetID = draggingNode.ID,
};
diagram.Connectors.Add(connector);
diagram.DoLayout();
diagram.DoLayoutAsync();
}
}

Expand Down
2 changes: 1 addition & 1 deletion KB-Samples/ParentChild/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{
args.Cancel = true;
}
diagram.DoLayout();
diagram.DoLayoutAsync();
}
}

Expand Down
4 changes: 2 additions & 2 deletions KB-Samples/SaveAndLoad/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
sfDiagram.StartGroupAction();
sfDiagram.BeginUpdate();
sfDiagram.Nodes.Remove(deleteObject);
_ = sfDiagram.EndUpdate();
_ = sfDiagram.EndUpdateAsync();
sfDiagram.EndGroupAction();
}
base.OnMouseUp(args);
Expand Down Expand Up @@ -317,7 +317,7 @@
//Method to load the diagram
public async Task LoadDiagram()
{
await Diagram.LoadDiagram(data);
await Diagram.LoadDiagramAsync(data);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,12 @@
{
UpdateLayout(edges, targetNode);
}
_ = diagram.EndUpdate();
await diagram.DoLayout();
_ = diagram.EndUpdateAsync();
await diagram.DoLayoutAsync();
}
else { _ = diagram.DoLayout(); }
else { _ = diagram.DoLayoutAsync(); }
diagram.EndGroupAction();
_ = diagram.EndUpdate();
_ = diagram.EndUpdateAsync();
}


Expand Down Expand Up @@ -260,7 +260,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
mindmapData.Add(childNode);
diagram.ClearSelection();
diagram.Select(new ObservableCollection<IDiagramObject>() { diagram.Nodes[diagram.Nodes.Count - 1] });
Expand Down Expand Up @@ -304,7 +304,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
mindmapData.Add(childNode);
diagram.ClearSelection();
diagram.Select(new ObservableCollection<IDiagramObject>() { diagram.Nodes[diagram.Nodes.Count - 1] });
Expand All @@ -322,8 +322,8 @@
diagram.BeginUpdate();
RemoveData(deleteObject, diagram);
diagram.Nodes.Remove(deleteObject);
_ = diagram.EndUpdate();
_ = diagram.RefreshDataSource();
_ = diagram.EndUpdateAsync();
_ = diagram.RefreshDataSourceAsync();
}
}
}
Expand Down Expand Up @@ -474,7 +474,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
mindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand All @@ -495,7 +495,7 @@
TargetID = node.ID,
SourceID = diagram.SelectionSettings.Nodes[0].ID
};
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { node, connector });
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { node, connector });
Node sourceNode = diagram.GetObject(connector.SourceID) as Node;
Node targetNode = diagram.GetObject(connector.TargetID) as Node;
if (targetNode != null && targetNode.Data != null)
Expand All @@ -512,7 +512,7 @@
connector.TargetPortID = targetNode.Ports[0].ID;
}
}
await diagram.DoLayout();
await diagram.DoLayoutAsync();
}

// Custom tool to add the node.
Expand Down Expand Up @@ -560,7 +560,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
mindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand Down Expand Up @@ -589,8 +589,8 @@
sfDiagram.BeginUpdate();
RemoveData(deleteObject, sfDiagram);
sfDiagram.Nodes.Remove(deleteObject);
_ = sfDiagram.EndUpdate();
_ = sfDiagram.RefreshDataSource();
_ = sfDiagram.EndUpdateAsync();
_ = sfDiagram.RefreshDataSourceAsync();
}
base.OnMouseUp(args);
this.InAction = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
MindmapData.Add(childNode);
diagram.ClearSelection();
diagram.Select(new ObservableCollection<IDiagramObject>() { diagram.Nodes[diagram.Nodes.Count - 1] });
Expand Down Expand Up @@ -213,7 +213,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
MindmapData.Add(childNode);
diagram.ClearSelection();
diagram.Select(new ObservableCollection<IDiagramObject>() { diagram.Nodes[diagram.Nodes.Count - 1] });
Expand All @@ -231,8 +231,8 @@
diagram.BeginUpdate();
RemoveData(deleteObject, diagram);
diagram.Nodes.Remove(deleteObject);
_ = diagram.EndUpdate();
_ = diagram.RefreshDataSource();
_ = diagram.EndUpdateAsync();
_ = diagram.RefreshDataSourceAsync();
}
}
}
Expand Down Expand Up @@ -374,7 +374,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
MindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand All @@ -395,7 +395,7 @@
TargetID = node.ID,
SourceID = diagram.SelectionSettings.Nodes[0].ID
};
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { node, connector });
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { node, connector });
Node sourceNode = diagram.GetObject(connector.SourceID) as Node;
Node targetNode = diagram.GetObject(connector.TargetID) as Node;
if (targetNode != null && targetNode.Data != null)
Expand All @@ -412,7 +412,7 @@
connector.TargetPortID = targetNode.Ports[0].ID;
}
}
await diagram.DoLayout();
await diagram.DoLayoutAsync();
}

// Custom tool to add the node.
Expand Down Expand Up @@ -460,7 +460,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
MindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand Down Expand Up @@ -489,8 +489,8 @@
sfDiagram.BeginUpdate();
RemoveData(deleteObject, sfDiagram);
sfDiagram.Nodes.Remove(deleteObject);
_ = sfDiagram.EndUpdate();
_ = sfDiagram.RefreshDataSource();
_ = sfDiagram.EndUpdateAsync();
_ = sfDiagram.RefreshDataSourceAsync();
}
base.OnMouseUp(args);
this.InAction = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
MindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand All @@ -200,7 +200,7 @@
TargetID = node.ID,
SourceID = diagram.SelectionSettings.Nodes[0].ID
};
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { node, connector });
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { node, connector });
Node sourceNode = diagram.GetObject(connector.SourceID) as Node;
Node targetNode = diagram.GetObject(connector.TargetID) as Node;
if (targetNode != null && targetNode.Data != null)
Expand All @@ -217,7 +217,7 @@
connector.TargetPortID = targetNode.Ports[0].ID;
}
}
await diagram.DoLayout();
await diagram.DoLayoutAsync();
}

// Custom tool to add the node.
Expand Down Expand Up @@ -267,7 +267,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
MindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand Down Expand Up @@ -296,8 +296,8 @@
sfDiagram.BeginUpdate();
RemoveData(deleteObject, sfDiagram);
sfDiagram.Nodes.Remove(deleteObject);
_ = sfDiagram.EndUpdate();
_ = sfDiagram.RefreshDataSource();
_ = sfDiagram.EndUpdateAsync();
_ = sfDiagram.RefreshDataSourceAsync();
}
base.OnMouseUp(args);
this.InAction = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
mindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand All @@ -308,7 +308,7 @@
TargetID = node.ID,
SourceID = diagram.SelectionSettings.Nodes[0].ID
};
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { node, connector });
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { node, connector });
Node sourceNode = diagram.GetObject(connector.SourceID) as Node;
Node targetNode = diagram.GetObject(connector.TargetID) as Node;
if (targetNode != null && targetNode.Data != null)
Expand All @@ -325,7 +325,7 @@
connector.TargetPortID = targetNode.Ports[0].ID;
}
}
await diagram.DoLayout();
await diagram.DoLayoutAsync();
}

// Custom tool to add the node.
Expand Down Expand Up @@ -373,7 +373,7 @@
};
diagram.BeginUpdate();
await UpdatePortConnection(childNode, diagram);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
mindmapData.Add(childNode);
diagram.ClearSelection();
base.OnMouseDown(args);
Expand Down Expand Up @@ -402,8 +402,8 @@
sfDiagram.BeginUpdate();
RemoveData(deleteObject, sfDiagram);
sfDiagram.Nodes.Remove(deleteObject);
_ = sfDiagram.EndUpdate();
_ = sfDiagram.RefreshDataSource();
_ = sfDiagram.EndUpdateAsync();
_ = sfDiagram.RefreshDataSourceAsync();
}
base.OnMouseUp(args);
this.InAction = true;
Expand Down
Loading

0 comments on commit 014fad1

Please sign in to comment.