public void InitializePlugin(string description, DataModelPluginConfiguration dm, ViewModelPlugin parent) { if (!IsInitialized) { _parent = parent; //for speed if (parent != null) { if (parent.Service != null) { _log = parent.Service.Log; _service = parent.Service; } } DisplayName = description; ReloadDataModel(dm); IsInitialized = true; //Apply catalogitem.items to load plugins AfterInitialize(); //if (AutoLoad) // CommandLoad.Execute(null); } }
/// <summary> /// Sets the viewmodel's data. /// </summary> /// <param name="data">The data.</param> /// <remarks></remarks> protected virtual void SetSpeedDataModel(DataModelPluginConfiguration data) { }
protected void ReloadDataModel(DataModelPluginConfiguration dm) { _dataModel = dm; SetSpeedDataModel(dm); OnPropertyChanged("DataModel"); }