public ProductListViewModel(IRegionManager regionManager, IDialogService dialogService, IEventAggregator ea) : base(dialogService)
 {
     _regionManager  = regionManager;
     _ea             = ea;
     OnCreate        = new DelegateCommand(Create);
     SelectedCommand = new DelegateCommand <ProductModel>(ProductSelected);
     OnSearch        = new DelegateCommand(Search);
     //InitList();
 }
        public DataCurveChartViewModel(Prism.Events.IEventAggregator eventAggregator, IDeviceParameterInfoService deviceParameterInfoService)
        {
            _eventAggregator            = eventAggregator;
            _deviceParameterInfoService = deviceParameterInfoService;
            _dateConfig = Mappers.Xy <DateModel>()
                          .X(m => (double)m.DateTime.Ticks / TimeSpan.FromHours(1).Ticks)
                          .Y(m => m.Value);

            SeriesCollection = new SeriesCollection(_dateConfig);

            _eventAggregator.GetEvent <HistoryDataUpdatedEvent>().Subscribe(UpdateHistoryDataSeriesCollection);
            _eventAggregator.GetEvent <SelectedEquipmentChangedEvent>().Subscribe(ResetHistoryDataSeriesCollection);
        }
Exemple #3
0
        public override bool Connect(IApplicationData data, Prism.Events.IEventAggregator eventaggre)
        {
            _data  = data;
            _event = eventaggre;
            _doc   = data.ActiveDocument as IRBuilderDocument;


            IOSelectionChanged = new RelayCommand <object>(IOSelectionChangedHandler);

            _doc.SetSelectiontype(Viewer.SelectionType.IntelligentObject);
            _manager = new R3DIOInterop.RIntelligentObjectManagerInterop(_doc.Tree.GeometryParentNode);

            LoadObjectsFromPlugin();

            LoadInternalObjects();
            //CreateCube();

            // CreateTable();

            return(true);
        }