示例#1
0
 private void NewXML()
 {
     uipp = new UIpp();
     _actionsViewModel       = new Menus.ActionsViewModel(_eventAggregator, uipp);
     _settingsViewModel      = new Menus.SettingsViewModel();
     _configurationViewModel = new Menus.ConfigurationViewModel(_eventAggregator, uipp);
     _softwareViewModel      = new Menus.SoftwareViewModel(uipp, _settingsViewModel);
     _statusMessageViewModel = new Menus.StatusMessageViewModel(uipp);
     _settingsViewModel.svm  = _softwareViewModel;
     _configurationViewModel.RefreshConfiguration();
     _softwareViewModel.RefreshSoftwareList();
 }
示例#2
0
        private void LoadXML(string path)
        {
            // Load XML
            XmlDocument load = new XmlDocument();

            load.Load(path);

            // Convert XML to UIpp
            uipp = XMLToClassModel.GenerateUIpp(load, path);

            // Reload Children
            _actionsViewModel         = new Menus.ActionsViewModel(_eventAggregator, uipp);
            _configurationViewModel   = new Menus.ConfigurationViewModel(_eventAggregator, uipp);
            _softwareViewModel        = new Menus.SoftwareViewModel(uipp, _settingsViewModel);
            Globals.SoftwareViewModel = _softwareViewModel;
            _statusMessageViewModel   = new Menus.StatusMessageViewModel(uipp);
            _softwareViewModel.RefreshSoftwareList();
            _configurationViewModel.RefreshConfiguration();
            Globals.EventAggregator.BeginPublishOnUIThread(new ChangeUI("ImportComplete", null));
            Globals.EventAggregator.BeginPublishOnUIThread(new ChangeUI("SoftwareChange", null));
            Globals.EventAggregator.BeginPublishOnUIThread(new ChangeUI("AppTreeChange", null));
        }