How to setup navigation.

StatusIDPriorityType
Closed39757MajorQuestion
ProfileReply
BeckyClient

How do you create a custom arm item? Also does your testadapter support the AutoTest command in easytests

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello!

To create a custom arm item you need to follow these steps:
1. Create custom Arm Model node which represents a Custom Arm item. It must inherit the IModelArmItem interface.

	public interface IModelArmItemCustom : IModelArmItem
	{
          //Custom model properties
        }

2. Create custom Arm Item. It must inherit the ArmItem class.

  public class CustomArmItem : ArmItem
{
        //
        /// Exedute ArmItem action.
        /// 
        /// 
        public override void Execute(SingleChoiceActionExecuteEventArgs args)
        {
            base.Execute(args);
           // Custom execution ArmItem logic
        }
}

3. Create Custom Arm Controller, that will create the CustomArmItem for navigation.

 public class CustomArmController : WindowController
    {
        private ArmController _armController;
        public CustomArmController()
        {
            TargetWindowType = WindowType.Main;
        }

        protected override void OnActivated()
        {
            base.OnActivated();
            if ((_armController = Frame.GetController<ArmController>()) != null)
            {
                _armController.CreateCustomArmItem += ArmControllerOnCreateCustomArmItem;
            }
        }

        protected override void OnDeactivated()
        {
            if (_armController != null)
            {
                _armController.CreateCustomArmItem -= ArmControllerOnCreateCustomArmItem;
            }
            base.OnDeactivated();
        }

        private void ArmControllerOnCreateCustomArmItem(object sender, CreateCustomArmItemEventArgs args)
        {
            var model = args.Model as IModelArmItemCustom;
            if (model != null && args.ArmItemInstance == null)
            {
                args.ArmItemInstance = new CustomArmItem(model, args.ArmItemsAction, args.NodeId);
            }
        }
    }

As for the AutoTest command.

Our TestAdapter extends the capabilities of DevExpres, mainly supports the EasyTest testing capability for Xafari controls.
Since this command is for internal use by DevExpress, we have not tested it on Xafari.
This command will work with Xafari, but errors may occur in some cases.

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

BeckyClient

Thanks

× This ticket is closed.

Write US