Пример #1
0
        public SingleChoiceActionSelectionDependencyController()
        {
            TargetObjectType = typeof(DemoItem);
            targetProperty   = "SelectionDependency";

            SingleChoiceAction singleChoiceAction = new SingleChoiceAction(this, "SingleChoiceActionIndependent", PredefinedCategory.Edit);

            singleChoiceAction.Execute += new SingleChoiceActionExecuteEventHandler(SingleChoiceActionRootObject.singleChoiceAction_Execute);
            singleChoiceAction.SelectionDependencyType = SelectionDependencyType.Independent;
            singleChoiceAction.ItemType = SingleChoiceActionItemType.ItemIsOperation;
            singleChoiceAction.Caption  = singleChoiceAction.SelectionDependencyType.ToString();
            singleChoiceAction.ToolTip  = ActionsDemoStrings.SelectionDependencyIndependentTooltip;
            SingleChoiceActionRootObject.CreateDefaultItems(singleChoiceAction);

            singleChoiceAction          = new SingleChoiceAction(this, "SingleChoiceActionRequireMultipleObjects", PredefinedCategory.Edit);
            singleChoiceAction.Execute += new SingleChoiceActionExecuteEventHandler(SingleChoiceActionRootObject.singleChoiceAction_Execute);
            singleChoiceAction.SelectionDependencyType = SelectionDependencyType.RequireMultipleObjects;
            singleChoiceAction.ItemType = SingleChoiceActionItemType.ItemIsOperation;
            singleChoiceAction.Caption  = singleChoiceAction.SelectionDependencyType.ToString();
            singleChoiceAction.ToolTip  = ActionsDemoStrings.SelectionDependencyRequireMultipleObjectsTooltip;
            SingleChoiceActionRootObject.CreateDefaultItems(singleChoiceAction);

            singleChoiceAction          = new SingleChoiceAction(this, "SingleChoiceActionRequireSingleObject", PredefinedCategory.Edit);
            singleChoiceAction.Execute += new SingleChoiceActionExecuteEventHandler(SingleChoiceActionRootObject.singleChoiceAction_Execute);
            singleChoiceAction.SelectionDependencyType = SelectionDependencyType.RequireSingleObject;
            singleChoiceAction.ItemType = SingleChoiceActionItemType.ItemIsOperation;
            singleChoiceAction.Caption  = singleChoiceAction.SelectionDependencyType.ToString();
            singleChoiceAction.ToolTip  = ActionsDemoStrings.SelectionDependencyRequireSingleObjectTooltip;
            SingleChoiceActionRootObject.CreateDefaultItems(singleChoiceAction);
        }
Пример #2
0
        public ItemTypeModeController()
        {
            SingleChoiceAction singleChoiceAction = new SingleChoiceAction(this, "ItemIsMode", PredefinedCategory.Edit);

            singleChoiceAction.Execute += new SingleChoiceActionExecuteEventHandler(SingleChoiceActionRootObject.singleChoiceAction_Execute);
            SingleChoiceActionRootObject.CreateDefaultItems(singleChoiceAction, false);
            singleChoiceAction.ItemType = SingleChoiceActionItemType.ItemIsMode;
            singleChoiceAction.ToolTip  = ActionsDemoStrings.SingleChoiceActionItemIsModeTooltip;
        }
        public SingleChoiceActionController()
        {
            SingleChoiceAction singleChoiceAction = new SingleChoiceAction(this, "SingleChoiceDemoAction", PredefinedCategory.Edit);

            singleChoiceAction.Execute  += new SingleChoiceActionExecuteEventHandler(SingleChoiceActionRootObject.singleChoiceAction_Execute);
            singleChoiceAction.ImageName = ActionsDemoStrings.SingleChoiceActionImageName;
            singleChoiceAction.ToolTip   = ActionsDemoStrings.SingleChoiceActionTooltip;
            singleChoiceAction.ItemType  = SingleChoiceActionItemType.ItemIsOperation;
            SingleChoiceActionRootObject.CreateDefaultItems(singleChoiceAction);
        }
        public SingleChoiceActionConfirmationMessageIsEmptyController()
        {
            targetProperty = "ConfirmationMessageIsEmpty";
            SingleChoiceAction singleChoiceAction = new SingleChoiceAction(this, "SingleChoiceAction" + targetProperty, PredefinedCategory.Edit);

            singleChoiceAction.Execute += new SingleChoiceActionExecuteEventHandler(SingleChoiceActionRootObject.singleChoiceAction_Execute);
            SingleChoiceActionRootObject.CreateDefaultItems(singleChoiceAction);
            singleChoiceAction.ItemType = SingleChoiceActionItemType.ItemIsOperation;
            singleChoiceAction.Caption  = ActionsDemoStrings.ConfirmationMessageIsEmpty;
            singleChoiceAction.ToolTip  = ActionsDemoStrings.ConfirmationMessageIsEmptyTooltip;
        }