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();
        }
예제 #2
0
        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();
            }
        }