public void ClickToolboxItem(ToolType tool)
        {
            var   theControl = FindControl(tool.GetDescription());
            Point p          = new Point(theControl.BoundingRectangle.X + 50, theControl.BoundingRectangle.Y + 5);

            Mouse.Click(p);
        }
Exemple #2
0
        public static bool Validate(Tool tool, ToolType toolType)
        {
            string message = null;

            if (tool == null)
            {
                message = "Выберите инструмент";
            }
            else if (tool.Type != toolType)
            {
                message = $"Выберите инструмент типа {toolType.GetDescription()}";
            }
            else
            {
                if (tool.Type == ToolType.Disk)
                {
                    if (tool.Diameter == 0)
                    {
                        message = $"Не указан диаметр инструмента";
                    }
                    if (tool.Thickness.GetValueOrDefault() == 0)
                    {
                        message = $"Не указана толщина инструмента";
                    }
                }
            }
            if (message != null)
            {
                Acad.Alert(message);
            }

            return(message == null);
        }
        public UITestControl FindToolboxItemByAutomationId(ToolType tool, string properSearchTerm = "")
        {
            var theTerm = tool.GetToolboxName();

            if (!string.IsNullOrEmpty(properSearchTerm))
            {
                theTerm = properSearchTerm;
            }

            SearchForControl(theTerm);

            UITestControl theControl = FindControl(tool.GetDescription());

            return(theControl);
        }
Exemple #4
0
 public void ClickToolboxItem(ToolType tool)
 {
     var theControl = FindControl(tool.GetDescription());
     Point p = new Point(theControl.BoundingRectangle.X + 50, theControl.BoundingRectangle.Y + 5);
     Mouse.Click(p);
 }
Exemple #5
0
        public UITestControl FindToolboxItemByAutomationId(ToolType tool, string properSearchTerm = "")
        {
            var theTerm = tool.GetToolboxName();
            if(!string.IsNullOrEmpty(properSearchTerm))
            {
                theTerm = properSearchTerm;
            }

            SearchForControl(theTerm);

            UITestControl theControl = FindControl(tool.GetDescription());
            return theControl;
        }