예제 #1
0
 public void AddFunction()
 {
     SelectedFunctions.Add(SelectedFunctionToAdd);
     AvailableFunctions.Remove(SelectedFunctionToAdd);
     NotifyOfPropertyChange(() => SelectedFunctions);
     NotifyOfPropertyChange(() => CanPrint);
     NotifyOfPropertyChange(() => CanReset);
 }
예제 #2
0
        private void AddOperations(HashSet <IEdmAction> allActions, HashSet <IEdmFunction> allFunctions, OperationSegment operationSegment)
        {
            foreach (IEdmOperation operation in operationSegment.Operations)
            {
                IEdmAction action = operation as IEdmAction;
                if (action != null && allActions.Contains(action))
                {
                    SelectedActions.Add(action);
                }

                IEdmFunction function = operation as IEdmFunction;
                if (function != null && allFunctions.Contains(function))
                {
                    SelectedFunctions.Add(function);
                }
            }
        }
예제 #3
0
        //选中
        /// <summary>
        /// 选中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSelect_Click(object sender, EventArgs e)
        {
            if (gridViewUnSel.RowCount <= 0 || gridViewUnSel.SelectedRows.Count <= 0)
            {
                return;
            }

            var rightFunction = gridViewUnSel.SelectedRows[0].DataBoundItem as RightFunction;

            if (rightFunction == null)
            {
                return;
            }

            NotSelectedFunctions.Remove(rightFunction);
            SelectedFunctions.Add(rightFunction);
            BindingGridView();
            CurrentOperationStatus = OperationStatus.Edit;
        }