Exemple #1
0
 public static void SelectItemInContextMenu(int fromPanel, string itemName, string option)
 {
     foreach (var listBoxItem in MainView.ListBoxPanel(fromPanel).Items)
     {
         if (!listBoxItem.Name.Contains(itemName))
         {
             continue;
         }
         LoggerUtil.Info($"List Item {itemName} is found");
         MouseInteractionUtil.SelectOptionInContextMenu(Scope.DefaultWindow,
                                                        new Point(listBoxItem.Bounds.X, listBoxItem.Bounds.Y), option);
         break;
     }
 }
Exemple #2
0
        public static void MoveFile(int fromPanel, string filename, int toPanel)
        {
            Point fileCoordinates = new Point();
            var   item            = MainView.ListBoxPanel(fromPanel).Items;

            foreach (var listBoxItem in item)
            {
                if (!listBoxItem.Name.Contains(filename))
                {
                    continue;
                }
                LoggerUtil.Info($"List Item {filename} is found, getting clickable point");
                listBoxItem.Click();
                fileCoordinates = new Point(listBoxItem.Bounds.BottomRight.X - 2,
                                            listBoxItem.Bounds.BottomRight.Y - 2);
                break;
            }

            LoggerUtil.Info("Performing drag and drop");
            MouseInteractionUtil.DragAndDropByLocation(fileCoordinates, new Point(
                                                           MainView.ListBoxPanel(toPanel).Bounds.BottomRight.X - 10,
                                                           MainView.ListBoxPanel(toPanel).Bounds.BottomRight.Y - 10));
        }
Exemple #3
0
 public static void SelectItemInContextMenu(int panel, string option)
 {
     MouseInteractionUtil.SelectOptionInContextMenu(Scope.DefaultWindow,
                                                    new Point(MainView.ListBoxPanel(panel).Bounds.BottomLeft.X + 10,
                                                              MainView.ListBoxPanel(panel).Bounds.BottomLeft.Y - 10), option);
 }