private void DebugBtnFindUiClick(object sender, EventArgs e) { WriteLine("Going to try and find: " + DebugTBUIName.Text); DebugTBLog.Clear(); if (DebugTBUIName.Text != "") { try { _item = InterfaceHelper.GetFrameByName(DebugTBUIName.Text); if (_item != null) { WriteLine("Found the item, dumping info"); WriteLine("Visible: " + _item.IsVisible); WriteLine("Text: " + _item.GetText); foreach (Frame child in _item.GetChilds) { WriteLine("Name: " + child.GetName); WriteLine("Visible: " + child.IsVisible); WriteLine("Text: " + child.GetText); } } else { WriteLine("Could not find the item"); } } catch (Exception d) { WriteLine("Error when trying to log interface item: " + d); } } }
private void WriteLine(string text) { DebugTBLog.AppendText(text + Environment.NewLine); }