private void ApiBackKeyDownEvent(WoxKeyDownEventArgs e) { string query = e.Query; if (Directory.Exists(query)) { if (query.EndsWith("\\")) { query = query.Remove(query.Length - 1); } if (query.Contains("\\")) { int index = query.LastIndexOf("\\"); query = query.Remove(index) + "\\"; } context.API.ChangeQuery(query); } }
private void ApiBackKeyDownEvent(WoxKeyDownEventArgs e) { string query = e.Query; if (Directory.Exists(query)) { if (query.EndsWith("\\")) { query = query.Remove(query.Length - 1); } if (query.Contains("\\")) { int index = query.LastIndexOf("\\"); query = query.Remove(index) + "\\"; } context.API.ChangeQuery(query); } }