public MainWindowViewModel(GroupManagerViewModel _groupManagerViewModel) { ConnectionGroupModel = new ConnectionGroupModel(); ConnectionDetails = new ConnectionDetailsModel(); groupManagerViewModel = _groupManagerViewModel; MainWindowModel = new MainWindowModel(); statusUpdater = new UpdateConnectionStatus(); connectionManager = new ConnectionManager(); groupManagerViewModel.GroupUpdated += GroupManagerViewModel_GroupUpdated; RefreshGroupList(); }
public MainWindowViewModel(GroupManagerViewModel _groupManagerViewModel) { ConnectionGroupModel = new ConnectionGroupModel(); connectionDetails = new ConnectionDetailsModel(); groupManagerViewModel = _groupManagerViewModel; MainWindowModel = new MainWindowModel(); statusUpdater = new UpdateConnectionStatus(); connectionManager = new ConnectionManager(); groupManagerViewModel.GroupUpdated += GroupManagerViewModel_GroupUpdated; MainWindowModel.Groups = GroupManager.LoadGroups(); MainWindowModel.Connections = GetConnections(); if (MainWindowModel.Connections.Count > 0) { SetConnectionDetails(0); UpdateGroupStatus(); } }