示例#1
0
        /// <summary>
        /// Closes all bags.
        /// </summary>
        public static void CloseAllBags()
        {
            for (int i = 1; i <= 5; i++)
            {
                Frame containerFrame            = InterfaceHelper.GetFrameByName("ContainerFrame" + i);
                Frame containerFrameCloseButton = InterfaceHelper.GetFrameByName("ContainerFrame" + i + "CloseButton");

                if (containerFrame == null &&
                    containerFrameCloseButton == null)
                {
                    continue;
                }
                if (containerFrame != null)
                {
                    if (containerFrame.IsVisible)
                    {
                        containerFrameCloseButton.LeftClick();
                        Thread.Sleep(1500);
                    }
                }
            }
        }