コード例 #1
0
ファイル: InteractionNode.cs プロジェクト: naver/protonow
 internal WidgetNode(InteractionTabVM tabVM, IUniqueObject target, ObjectType type, bool isSelected)
 {
     _targetObject = target as IRegion;
     _tabVM        = tabVM;
     _objectType   = type;
     _isSelected   = isSelected;
 }
コード例 #2
0
        internal CheckAllTargetCommand(InteractionTabVM tabVM, Guid targetWidgetGuid, bool checkAll)
        {
            _tabVM    = tabVM;
            _checkAll = checkAll;

            if (_checkAll)
            {
                _list = new List <Guid>();
                // Only store target list if check all is checked.
                foreach (WidgetNode node in _tabVM.WidgetList)
                {
                    if (node.IsSelected)
                    {
                        _list.Add(node.TargetObject.Guid);
                    }
                }
            }

            ISelectionService selectionService = ServiceLocator.Current.GetInstance <SelectionServiceProvider>();

            if (selectionService != null)
            {
                _pageVM = selectionService.GetCurrentPage();
                if (_pageVM != null)
                {
                    IWidgetPropertyData widgetVM = _pageVM.GetSelectedwidgets().FirstOrDefault(x => x.WidgetID == targetWidgetGuid);
                    _widgetVM = widgetVM as WidgetViewModBase;
                }
            }
        }
コード例 #3
0
ファイル: DeleteTargetCommand.cs プロジェクト: naver/protonow
        internal DeleteTargetCommand(InteractionTabVM tabVM, Guid targetValue, Guid targetWidgetGuid)
        {
            _tabVM       = tabVM;
            _targetValue = targetValue;

            ISelectionService selectionService = ServiceLocator.Current.GetInstance <SelectionServiceProvider>();

            if (selectionService != null)
            {
                _pageVM = selectionService.GetCurrentPage();
                if (_pageVM != null)
                {
                    IWidgetPropertyData widgetVM = _pageVM.GetSelectedwidgets().FirstOrDefault(x => x.WidgetID == targetWidgetGuid);
                    _widgetVM = widgetVM as WidgetViewModBase;
                }
            }
        }
コード例 #4
0
ファイル: UrlChangeCommand.cs プロジェクト: naver/protonow
        internal UrlChangeCommand(InteractionTabVM tabVM, string oldUrl, string newUrl, Guid targetWidgetGuid)
        {
            _tabVM  = tabVM;
            _oldUrl = oldUrl;
            _newUrl = newUrl;

            ISelectionService selectionService = ServiceLocator.Current.GetInstance <SelectionServiceProvider>();

            if (selectionService != null)
            {
                _pageVM = selectionService.GetCurrentPage();
                if (_pageVM != null)
                {
                    IWidgetPropertyData widgetVM = _pageVM.GetSelectedwidgets().FirstOrDefault(x => x.WidgetID == targetWidgetGuid);
                    _widgetVM = widgetVM as WidgetViewModBase;
                }
            }
        }
コード例 #5
0
        internal ExternalLinkCommand(InteractionTabVM tabVM, bool oldValue, bool newValue, Guid targetWidgetGuid, string externalLink)
        {
            _tabVM        = tabVM;
            _oldValue     = oldValue;
            _newValue     = newValue;
            _externalLink = externalLink;

            ISelectionService selectionService = ServiceLocator.Current.GetInstance <SelectionServiceProvider>();

            if (selectionService != null)
            {
                _pageVM = selectionService.GetCurrentPage();
                if (_pageVM != null)
                {
                    IWidgetPropertyData widgetVM = _pageVM.GetSelectedwidgets().FirstOrDefault(x => x.WidgetID == targetWidgetGuid);
                    _widgetVM = widgetVM as WidgetViewModBase;
                }
            }
        }