Skip to content

Commit

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

910258: Depreciated methods changed with replaced Async methods
  • Loading branch information
Keerthivasan-Ramamoorthy authored Sep 19, 2024
2 parents e88eb04 + b7a2ae1 commit a7bf0b3
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
Diagram.Nodes[0].Annotations[0].Style.Bold = false;
Diagram.Nodes[0].Annotations[0].Style.TextDecoration = TextDecoration.None;
Diagram.Nodes[0].Annotations[0].Style.Color = "Red";
Diagram.EndUpdate();
Diagram.EndUpdateAsync();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
Diagram.BeginUpdate();
Diagram.Connectors[0].SourcePoint.X = 50;
Diagram.Connectors[0].SourcePoint.Y = 50;
Diagram.EndUpdate();
Diagram.EndUpdateAsync();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
connector.ID = RandomId();
connector.SourcePoint = new DiagramPoint { X = 100, Y = 100 };
connector.TargetPoint = new DiagramPoint { X = 200, Y = 100 };
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { connector });
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { connector });

}
internal string RandomId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
(node4 as NodeGroup).Children = array;
node4.OffsetX += 25;
node4.OffsetY += 25;
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { node2, node3, node4 });
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { node2, node3, node4 });
}

internal string RandomId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
groupNode.OffsetX += 25;
groupNode.OffsetY += 25;
}
diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { groupNode });
diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { groupNode });
return groupNode.ID;
}
public string CloneNode(Node node, bool isChild)
Expand All @@ -173,7 +173,7 @@
nodeChild.OffsetX += 25;
nodeChild.OffsetY += 25;
}
diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { nodeChild });
diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { nodeChild });
diagram.EndGroupAction();
return nodeChild.ID;
}
Expand All @@ -187,7 +187,7 @@
connectorChild.SourcePoint = new DiagramPoint() { X = connectorChild.SourcePoint.X + 25, Y = connectorChild.SourcePoint.Y + 25 };
connectorChild.TargetPoint = new DiagramPoint() { X = connectorChild.TargetPoint.X + 25, Y = connectorChild.TargetPoint.Y + 25 };
}
diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { connectorChild });
diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { connectorChild });
diagram.EndGroupAction();
return connectorChild.ID;
}
Expand Down
2 changes: 1 addition & 1 deletion UG-Samples/Methods/AddDiagramElements/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@
NodeCollection.Add(node1);
NodeCollection.Add(node2);
NodeCollection.Add(Connector);
await Diagram.AddDiagramElements(NodeCollection);
await Diagram.AddDiagramElementsAsync(NodeCollection);
}
}
2 changes: 1 addition & 1 deletion UG-Samples/Methods/BeginAndEndUpdate/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
diagram.BeginUpdate();
diagram.Nodes[0].Height = 150;
diagram.Nodes[0].Width = 150;
diagram.EndUpdate();
diagram.EndUpdateAsync();

}
}
2 changes: 1 addition & 1 deletion UG-Samples/Methods/GetCustomTool/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
{
sfDiagram.EndGroupAction();
}
_ = sfDiagram.EndUpdate();
_ = sfDiagram.EndUpdateAsync();
base.OnMouseUp(args);
this.InAction = true;
}
Expand Down
2 changes: 1 addition & 1 deletion UG-Samples/Methods/RefereshDataSource/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,6 @@
new MindMapDetails() { Id= "4", Label="Sessions", ParentId ="2", Branch = "subRight" },
new MindMapDetails() { Id= "5", Label="Complementing", ParentId ="2", Branch = "subRight" },
};
await Diagram.RefreshDataSource();
await Diagram.RefreshDataSourceAsync();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
Diagram.BeginUpdate();
Diagram.Nodes[0].Width = 50;
Diagram.Nodes[0].Height = 50;
await Diagram.EndUpdate();
await Diagram.EndUpdateAsync();
}
}
2 changes: 1 addition & 1 deletion UG-Samples/Nodes/CloneNode/CloneNode/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
node.ID = RandomId();
node.OffsetX += 25;
node.OffsetY += 25;
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { node });
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { node });
}

internal string RandomId()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@
diagram.BeginUpdate();
nodes[0].Ports[0].Offset.X = 1;
nodes[0].Ports[0].Offset.Y = 1;
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
}
}
2 changes: 1 addition & 1 deletion UG-Samples/Serialization/SaveAndLoad/Pages/Index.razor
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
diagram.BeginUpdate();
ExtensionType = ".json";
await FileUtil.Click(jsRuntime);
await diagram.EndUpdate();
await diagram.EndUpdateAsync();
}

public async Task OnUploadFileSelected(UploadingEventArgs args)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
//Method to show tooltip
private void show()
{
diagram.ShowTooltip(diagram.Connectors[2] as NodeBase);
diagram.ShowTooltipAsync(diagram.Connectors[2] as NodeBase);
}
//Method to hide tooltip
private void hide()
{
diagram.HideTooltip(diagram.Connectors[2] as NodeBase);
diagram.HideTooltipAsync(diagram.Connectors[2] as NodeBase);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,11 @@
//Method to show tooltip
private void show()
{
diagram.ShowTooltip(diagram.Nodes[2] as NodeBase);
diagram.ShowTooltipAsync(diagram.Nodes[2] as NodeBase);
}
//Method to hide tooltip
private void hide()
{
diagram.HideTooltip(diagram.Nodes[2] as NodeBase);
diagram.HideTooltipAsync(diagram.Nodes[2] as NodeBase);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
{
sfDiagram.EndGroupAction();
}
_ = sfDiagram.EndUpdate();
_ = sfDiagram.EndUpdateAsync();
base.OnMouseUp(args);
this.InAction = true;
}
Expand Down

0 comments on commit a7bf0b3

Please sign in to comment.