A thin wrapper on the Greg rest client for performing IO with the Package Manager
Inheritance: Dynamo.Core.NotificationObject
Example #1
0
        public Login(PackageManagerClientViewModel viewModel)
        {
            this.DataContext = viewModel;
            this._viewModel = viewModel;

            InitializeComponent();
        }
Example #2
0
        protected DynamoViewModel(DynamoModel dynamoModel, IWatchHandler watchHandler,
            IVisualizationManager vizManager, string commandFilePath)
        {
            // initialize core data structures
            this.model = dynamoModel;
            this.model.CommandStarting += OnModelCommandStarting;
            this.model.CommandCompleted += OnModelCommandCompleted;
            this.WatchHandler = watchHandler;
            this.VisualizationManager = vizManager;
            this.PackageManagerClientViewModel = new PackageManagerClientViewModel(this, model.PackageManagerClient);
            this.SearchViewModel = new SearchViewModel(this, model.SearchModel);

            // Start page should not show up during test mode.
            this.ShowStartPage = !DynamoModel.IsTestMode;

            //add the initial workspace and register for future 
            //updates to the workspaces collection
            workspaces.Add(new WorkspaceViewModel(model.HomeSpace, this));
            model.Workspaces.CollectionChanged += Workspaces_CollectionChanged;

            SubscribeModelCleaningUpEvent();
            SubscribeModelChangedHandlers();
            SubscribeUpdateManagerHandlers();
       
            InitializeAutomationSettings(commandFilePath);

            InitializeDelegateCommands();

            SubscribeLoggerHandlers();

            DynamoSelection.Instance.Selection.CollectionChanged += SelectionOnCollectionChanged;

            InitializeRecentFiles();

            UsageReportingManager.Instance.PropertyChanged += CollectInfoManager_PropertyChanged;

            WatchIsResizable = false;

            SubscribeDispatcherHandlers();
        }
        /// <summary>
        ///     The class constructor.
        /// </summary>
        public PackageManagerSearchViewModel(PackageManagerClientViewModel client)
        {
            this.PackageManagerClientViewModel = client;

            SearchResults = new ObservableCollection<PackageManagerSearchElement>();
            MaxNumSearchResults = 35;
            SearchDictionary = new SearchDictionary<PackageManagerSearchElement>();
            ClearCompletedCommand = new DelegateCommand(ClearCompleted, CanClearCompleted);
            SortCommand = new DelegateCommand(Sort, CanSort);
            SetSortingKeyCommand = new DelegateCommand<object>(SetSortingKey, CanSetSortingKey);
            SetSortingDirectionCommand = new DelegateCommand<object>(SetSortingDirection, CanSetSortingDirection);
            PackageManagerClientViewModel.Downloads.CollectionChanged += DownloadsOnCollectionChanged;
            SearchResults.CollectionChanged += SearchResultsOnCollectionChanged;
            SearchText = "";
            SortingKey = PackageSortingKey.LAST_UPDATE;
            SortingDirection = PackageSortingDirection.ASCENDING;
        }
 /// <summary>
 ///     The class constructor.
 /// </summary>
 public PackageManagerSearchViewModel(PackageManagerClientViewModel client) : this()
 {
     this.PackageManagerClientViewModel = client;
     PackageManagerClientViewModel.Downloads.CollectionChanged += DownloadsOnCollectionChanged;
 }