Ejemplo n.º 1
0
        private void SetSharedRepositoryMark()
        {
            ObservableList <Activity> srActivities = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Activity>();

            SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)mBusinessFlow.Activities, (IEnumerable <object>)srActivities);
            ObservableList <ActivitiesGroup> sharedActivitiesGroups = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <ActivitiesGroup>();

            SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)mBusinessFlow.ActivitiesGroups, (IEnumerable <object>)sharedActivitiesGroups);
        }
Ejemplo n.º 2
0
 private void RefreshActivitiesGrid()
 {
     if (mBusinessFlow != null)
     {
         grdActivities.Title = "'" + mBusinessFlow.Name + "' - " + GingerDicser.GetTermResValue(eTermResKey.Activities);
         ObservableList <Activity> activities = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Activity>();
         SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)mBusinessFlow.Activities, (IEnumerable <object>)activities);
         grdActivities.DataSourceList = mBusinessFlow.Activities;
     }
     else
     {
         grdActivities.DataSourceList = new ObservableList <Activity>();
     }
 }
Ejemplo n.º 3
0
        private void RefreshActivitiesGroupsGrid()
        {
            if (mBusinessFlow != null)
            {
                grdActivitiesGroups.Title = GingerDicser.GetTermResValue(eTermResKey.ActivitiesGroups);

                ObservableList <ActivitiesGroup> sharedActivitiesGroups = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <ActivitiesGroup>();
                SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)mBusinessFlow.ActivitiesGroups, (IEnumerable <object>)sharedActivitiesGroups);

                UpdateActivitiesGroupsGridViewTestSuiteColumn();
                grdActivitiesGroups.DataSourceList = mBusinessFlow.ActivitiesGroups;
            }
            else
            {
                grdActivitiesGroups.DataSourceList = new ObservableList <Activity>();
            }
        }
Ejemplo n.º 4
0
        private void LoadGridData()
        {
            if (mVariablesParentObj != null)
            {
                ObservableList <VariableBase> variables = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <VariableBase>();
                switch (mVariablesLevel)
                {
                case eVariablesLevel.Solution:
                    grdVariables.DataSourceList = ((Solution)mVariablesParentObj).Variables;
                    break;

                case eVariablesLevel.BusinessFlow:
                    if (mEditMode != General.eRIPageViewMode.Automation)
                    {
                        grdVariables.Title = GingerDicser.GetTermResValue(eTermResKey.Variables);
                    }
                    else
                    {
                        grdVariables.Title = "'" + ((BusinessFlow)mVariablesParentObj).Name + "' - " + GingerDicser.GetTermResValue(eTermResKey.Variables);
                    }
                    SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)((BusinessFlow)mVariablesParentObj).Variables, (IEnumerable <object>)variables);
                    grdVariables.DataSourceList = ((BusinessFlow)mVariablesParentObj).Variables;
                    break;

                case eVariablesLevel.Activity:
                    if (mEditMode != General.eRIPageViewMode.Automation)
                    {
                        grdVariables.Title = GingerDicser.GetTermResValue(eTermResKey.Variables);
                    }
                    else
                    {
                        grdVariables.Title = "'" + ((Activity)mVariablesParentObj).ActivityName + "' - " + GingerDicser.GetTermResValue(eTermResKey.Variables);
                    }
                    SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)((Activity)mVariablesParentObj).Variables, (IEnumerable <object>)variables);
                    grdVariables.DataSourceList = ((Activity)mVariablesParentObj).Variables;
                    break;
                }

                if (grdVariables.DataSourceList != null)
                {
                    grdVariables.DataSourceList.CollectionChanged -= VariablesPage_CollectionChanged;
                    grdVariables.DataSourceList.CollectionChanged += VariablesPage_CollectionChanged;
                }
            }
        }
        //private void ClearListViewBindings()
        //{
        //    if (mVariabelListHelper != null)
        //    {
        //        mVariabelListHelper.VariabelListItemEvent -= MVariabelListItemInfo_VariabelListItemEvent;
        //        mVariabelListHelper = null;
        //    }

        //    if (mVariabelsListView != null)
        //    {
        //        mVariabelsListView.PreviewDragItem -= ListVars_PreviewDragItem;
        //        mVariabelsListView.ItemDropped -= ListVars_ItemDropped;
        //        mVariabelsListView.List.MouseDoubleClick -= VariabelsListView_MouseDoubleClick;
        //        mVariabelsListView.ClearBindings();
        //        mVariabelsListView.DataSourceList = null;
        //        mVariabelsListView = null;
        //    }
        //}

        //public void ClearBindings()
        //{
        //    xMainFrame.Content = null;
        //    xMainFrame.NavigationService.RemoveBackEntry();

        //    ClearListViewBindings();

        //    BindingOperations.ClearAllBindings(xSelectedItemTitleText);
        //    BindingOperations.ClearAllBindings(xResetValueBtn);
        //    BindingOperations.ClearAllBindings(xAutoValueBtn);
        //    this.ClearControlsBindings();
        //}

        private void SetListView()
        {
            if (mVariabelsListView == null)
            {
                mVariabelsListView               = new UcListView();
                mVariabelsListView.Title         = GingerDicser.GetTermResValue(eTermResKey.Variables);
                mVariabelsListView.ListImageType = Amdocs.Ginger.Common.Enums.eImageType.Variable;

                mVariabelListHelper = new VariablesListViewHelper(GetVariablesList(), mVariabelsParent, mVariablesLevel, mContext, mPageViewMode);
                mVariabelListHelper.VariabelListItemEvent += MVariabelListItemInfo_VariabelListItemEvent;
                mVariabelsListView.SetDefaultListDataTemplate(mVariabelListHelper);

                mVariabelsListView.ListSelectionMode = SelectionMode.Extended;

                mVariabelsListView.PreviewDragItem += ListVars_PreviewDragItem;
                mVariabelsListView.ItemDropped     += ListVars_ItemDropped;

                mVariabelsListView.List.MouseDoubleClick += VariabelsListView_MouseDoubleClick;

                mVariabelsListView.List.SetValue(ScrollViewer.CanContentScrollProperty, true);

                if (mPageViewMode == Ginger.General.eRIPageViewMode.View)
                {
                    mVariabelsListView.IsDragDropCompatible = false;
                }
            }

            if (mVariabelsParent != null)
            {
                mVariabelListHelper.VariablesParent = mVariabelsParent;
                mVariabelListHelper.VariablesLevel  = mVariablesLevel;
                mVariabelListHelper.Variables       = GetVariablesList();
                mVariabelsListView.DataSourceList   = GetVariablesList();
                if (mVariablesLevel != eVariablesLevel.Solution)
                {
                    SharedRepositoryOperations.MarkSharedRepositoryItems(GetVariablesList(), WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <VariableBase>());
                }
            }
            else
            {
                mVariabelListHelper.VariablesParent = null;
                mVariabelListHelper.Variables       = null;
                mVariabelsListView.DataSourceList   = null;
            }
        }
Ejemplo n.º 6
0
 public void UpdateActionGrid()
 {
     if (mBusinessFlow != null && mBusinessFlow.CurrentActivity != null)
     {
         if (mCurrentActivity != mBusinessFlow.CurrentActivity)
         {
             mCurrentActivity = (Activity)mBusinessFlow.CurrentActivity;
             mCurrentActivity.PropertyChanged      += Activity_PropertyChanged;
             mCurrentActivity.Acts.PropertyChanged += ActsPropChanged;
         }
         grdActions.Title = "'" + mCurrentActivity.ActivityName + "' - Actions";
         ObservableList <Act> SharedActions = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Act>();
         SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)mCurrentActivity.Acts, (IEnumerable <object>)SharedActions);
         grdActions.DataSourceList = mCurrentActivity.Acts;
     }
     else
     {
         mCurrentActivity          = null;
         grdActions.DataSourceList = new ObservableList <Act>();
         grdActions.Title          = "Actions";
     }
 }
Ejemplo n.º 7
0
        private void SetSharedRepositoryMark()
        {
            ObservableList <Act> sharedActions = WorkSpace.Instance.SolutionRepository.GetAllRepositoryItems <Act>();

            SharedRepositoryOperations.MarkSharedRepositoryItems((IEnumerable <object>)mActivity.Acts, (IEnumerable <object>)sharedActions);
        }