72
75
lock (SystemConnections) {
73
76
SystemConnections.Clear ();
74
foreach (string con in SystemConnectionManager.BusObject.ListConnections ())
76
NetworkConnection connection = new NetworkConnection (SystemBus, con, ConnectionOwner.System);
77
if (connection.Settings.ContainsKey ("802-11-wireless"))
78
connection = new WirelessConnection (SystemBus, con, ConnectionOwner.System);
79
else if (connection.Settings.ContainsKey ("802-3-ethernet"))
80
connection = new WiredConnection (SystemBus, con, ConnectionOwner.System);
83
//connection.ConnectionRemoved += OnNetworkConnectionRemoved;
84
SystemConnections.Add (connection);
78
foreach (string con in SystemConnectionManager.BusObject.ListConnections ())
80
NetworkConnection connection = new NetworkConnection (SystemBus, con, ConnectionOwner.System);
81
if (connection.Settings.ContainsKey ("802-11-wireless"))
82
connection = new WirelessConnection (SystemBus, con, ConnectionOwner.System);
83
else if (connection.Settings.ContainsKey ("802-3-ethernet"))
84
connection = new WiredConnection (SystemBus, con, ConnectionOwner.System);
87
//connection.ConnectionRemoved += OnNetworkConnectionRemoved;
88
SystemConnections.Add (connection);
90
} catch (Exception e) {
91
Log<ConnectionManager>.Error (e.Message);
92
Log<ConnectionManager>.Debug (e.StackTrace);
88
96
lock (UserConnections) {
89
97
UserConnections.Clear ();
90
foreach (string con in UserConnectionManager.BusObject.ListConnections ())
92
NetworkConnection connection = new NetworkConnection (UserBus, con, ConnectionOwner.User);
93
if (connection.Settings.ContainsKey ("802-11-wireless"))
94
connection = new WirelessConnection (UserBus, con, ConnectionOwner.User);
95
else if (connection.Settings.ContainsKey ("802-3-ethernet"))
96
connection = new WiredConnection (UserBus, con, ConnectionOwner.User);
100
//connection.ConnectionRemoved += OnNetworkConnectionRemoved;
101
UserConnections.Add (connection);
99
foreach (string con in UserConnectionManager.BusObject.ListConnections ())
101
NetworkConnection connection = new NetworkConnection (UserBus, con, ConnectionOwner.User);
102
if (connection.Settings.ContainsKey ("802-11-wireless"))
103
connection = new WirelessConnection (UserBus, con, ConnectionOwner.User);
104
else if (connection.Settings.ContainsKey ("802-3-ethernet"))
105
connection = new WiredConnection (UserBus, con, ConnectionOwner.User);
109
//connection.ConnectionRemoved += OnNetworkConnectionRemoved;
110
UserConnections.Add (connection);
112
} catch (Exception e) {
113
Log<ConnectionManager>.Error (e.Message);
114
Log<ConnectionManager>.Debug (e.StackTrace);