Esempio n. 1
0
        /// <summary>
        ///     Sends a reset command to a window
        /// </summary>
        internal static async Task ClickReset(uint number)
        {
            if (number >= 2)
            {
                throw new ArgumentOutOfRangeException();
            }

            if (IsOpen && !SD.Reset)
            {
                await Close();
            }

            if (DeepDungeonMenu.IsOpen)
            {
                await DeepDungeonMenu.OpenResetMenu();
            }


            Logger.Info("Clicking Reset slot {0} // {1}", number + 1, SD.Reset);
            await Coroutine.Wait(5000, () => IsOpen);

            var window = RaptureAtkUnitManager.GetWindowByName(WindowNames.DDsave);

            window.SendAction(2, 3, number, 3, 2);
            await Coroutine.Wait(500, () => SelectYesno.IsOpen);

            //confirm that we want to delete this data.
            if (SelectYesno.IsOpen)
            {
                SelectYesno.ClickYes();
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     clicks a save slot. number should be greater than 0
        /// </summary>
        /// <param name="number"></param>
        internal static async Task ClickSaveSlot(uint number)
        {
            if (number >= 2)
            {
                throw new ArgumentOutOfRangeException();
            }

            if (IsOpen && SD.Reset)
            {
                await Close();
            }

            if (DeepDungeonMenu.IsOpen)
            {
                await DeepDungeonMenu.OpenSaveMenu();
            }

            Logger.Info("Clicking Save slot {0} // {1}", number + 1, SD.Reset);


            await Coroutine.Wait(5000, () => IsOpen);

            var window = RaptureAtkUnitManager.GetWindowByName(WindowNames.DDsave);

            window.SendAction(1, 3, number);

            await Coroutine.Yield();
        }