Network list window opens with click on the menu item
This commit is contained in:
parent
e1f9f7b6dc
commit
7cf3d2caa1
8 changed files with 57 additions and 42 deletions
|
@ -19,7 +19,8 @@ namespace WinUI
|
|||
|
||||
private string url = null;
|
||||
|
||||
private static APIHandler instance;
|
||||
private static volatile APIHandler instance;
|
||||
private static object syncRoot = new Object();
|
||||
|
||||
public static APIHandler Instance
|
||||
{
|
||||
|
@ -27,7 +28,16 @@ namespace WinUI
|
|||
{
|
||||
if (instance == null)
|
||||
{
|
||||
|
||||
lock (syncRoot)
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
if (!initHandler())
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return instance;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue