Status | ID | Priority | Type |
Closed | 39757 | Major | Question |
Profile | Reply |
BeckyClient | How do you create a custom arm item? Also does your testadapter support the AutoTest command in easytests |
User | Description | Posted On |
MariyaVoytovichAgent | Hello! To create a custom arm item you need to follow these steps: 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. Feel free to contact us if you need further assistance or have additional questions. Regards, | |
BeckyClient | Thanks |