public void Redo() { // Add the group to document _pageVM.PageEditorModel.AddClonedGroup2Dom(_group); // Add child widgetVM foreach (WidgetViewModBase widgetVM in _childWidgetVMs) { _pageVM.AddWidgetItem(widgetVM); List <Guid> placedPageViewGuids = _placedPageViewGuidsMap[widgetVM.WidgetID]; foreach (Guid guid in placedPageViewGuids) { IPageView pageView = _pageVM.PageEditorModel.PageViews[guid]; if (pageView != null) { pageView.PlaceWidget(widgetVM.WidgetModel.WdgDom.Guid); } } } // Create new GroupViewModel with same group _pageVM.CreateGroupRender(_group); }
public void Undo() { _pageVM.AddWidgetItem(_widgetVM); _widgetVM.IsSelected = true; foreach (Guid guid in _placedPageViewGuids) { IPageView pageView = _pageVM.PageEditorModel.PageViews[guid]; if (pageView != null) { pageView.PlaceWidget(_widgetVM.WidgetModel.WdgDom.Guid); } } }
public void PlaceWidget2View(IRegion target) { if (target == null) { return; } Guid wdgGID = target.Guid; if (_activeView != null) { IsDirty = true; if (target is IWidget) { _activeView.PlaceWidget(wdgGID); } else if (target is IMaster) { _activeView.PlaceMaster(wdgGID); } } }
public void Undo() { _pageVM.AddWidgetItem(_widgetVM); foreach (Guid guid in _placedPageViewGuids) { IPageView pageView = _pageVM.PageEditorModel.PageViews[guid]; if (pageView != null) { pageView.PlaceWidget(_widgetVM.WidgetModel.WdgDom.Guid); } } if (_parentGroupInDOM != null) { // Add the widget parent group to page. If the group was removed when the widget was deleted, // this will restore the group and the group tree. _pageVM.PageEditorModel.AddClonedGroup2Dom(_parentGroupInDOM); } _pageVM.CreateGroupRender(_parentGroupInVM); }