Example #1
0
        public void AddWidget(string creatorName)
        {
            var widget = WidgetCreatorRegistry.CreateWidgetFor(creatorName);

            _entityService.AddWidgetToEntityScreen(SelectedEntityScreen.Name, widget);
            widget.Height      = 100;
            widget.Width       = 100;
            widget.AutoRefresh = true;
            Widgets.Add(WidgetCreatorRegistry.CreateWidgetViewModel(widget, _applicationState));
        }
Example #2
0
        public void AddWidget(string creatorName)
        {
            var widget = WidgetCreatorRegistry.CreateWidgetFor(creatorName);

            _resourceService.AddWidgetToResourceScreen(SelectedResourceScreen.Name, widget);
            widget.Height      = 100;
            widget.Width       = 100;
            widget.AutoRefresh = true;
            Widgets.Add(WidgetCreatorRegistry.CreateWidgetViewModel(widget));
        }
Example #3
0
 public void LoadTrackableEntityScreenItems()
 {
     IsDesignModeActive = true;
     Widgets            = new ObservableCollection <IDiagram>(_entityService.LoadWidgets(SelectedEntityScreen.Name).Select(x => WidgetCreatorRegistry.CreateWidgetViewModel(x, _applicationState)));
     Widgets.ToList().ForEach(x => x.DesignMode = true);
     RaisePropertyChanged(() => Widgets);
 }
Example #4
0
 public void Refresh(EntityScreen entityScreen, OperationRequest <Entity> currentOperationRequest)
 {
     _entityService.UpdateEntityScreen(entityScreen);
     if (_currentEntityScreen != entityScreen || Widgets == null)
     {
         _currentEntityScreen = entityScreen;
         Widgets = new ObservableCollection <IDiagram>(entityScreen.Widgets.Select(x => WidgetCreatorRegistry.CreateWidgetViewModel(x, _applicationState)));
     }
     Widgets.Where(x => x.AutoRefresh).ToList().ForEach(x => x.Refresh());
     RaisePropertyChanged(() => Widgets);
     RaisePropertyChanged(() => SelectedEntityScreen);
 }