private bool GotoMenu(string address)
{
if (address == "" || _currentAddress.Count < 1)
{
GotoBidMenu();
if (address == "")
return false;
}
var adrStr = address.Split(',');
var adr = new int[adrStr.Length];
for (int i = 0; i < adrStr.Length; i++)
{
adr[i] = int.Parse(adrStr[i]);
}
while (_currentAddress.Count > adr.Length)
{
_currentAddress.Pop();
FFACEInstance.Instance.Windower.SendKeyPress(KeyCode.EscapeKey);
Thread.Sleep((int)CampahStatus.Instance.GlobalDelay);
}
while (_currentAddress.Count > 0 && !IsMenuEqual(_currentAddress.ToArray(), adr))
{
_currentAddress.Pop();
FFACEInstance.Instance.Windower.SendKeyPress(KeyCode.EscapeKey);
Thread.Sleep((int)CampahStatus.Instance.GlobalDelay);
}
for (int i = _currentAddress.Count; i < adr.Length; i++)
{
var helptxt = FFACEInstance.Instance.Menu.Selection;
if (helptxt != "Bid")
{
_currentAddress.Push(adr[i]);
AuctionHouse.MenuIndex = adr[i];
Thread.Sleep((int) CampahStatus.Instance.GlobalDelay);
FFACEInstance.Instance.Windower.SendKeyPress(KeyCode.NP_EnterKey);
Thread.Sleep((int) CampahStatus.Instance.GlobalDelay);
}
else
{
return false;
}
}
return true;
}