private async void findConnectionButton_Click(object sender, EventArgs e) { if (!validateTextBoxes()) { return; } bool res = await fetchUserInfo(); if (!res) { return; } VKConnectionFinder connFind = new VKConnectionFinder(_startUser, _targetUser); statusLabel.Text = "Search the path"; List<VKUserViewData> path = await connFind.getConnection(); statusLabel.Text = "Path is found"; await validatePath(connFind, path); }
private async Task validatePath(VKConnectionFinder finder, List<VKUserViewData> path) { if (finder.Status == FetchResult.ConnectionError) { MessageBox.Show("There is no connection to vk servers"); } if (finder.Status == FetchResult.BadData) { MessageBox.Show("VK servers returned error. Try again"); } statusLabel.Text = "Downloading user info"; ResultForm newForm = new ResultForm(path); await newForm.prepareView(); newForm.Show(); statusLabel.Text = "Ready"; //await newForm.prepareView(); }
private async void findConnectionButton_Click(object sender, EventArgs e) { if (!validateTextBoxes()) { return; } bool res = await fetchUserInfo(); if (!res) { return; } VKConnectionFinder connFind = new VKConnectionFinder(_startUser, _targetUser); statusLabel.Text = "Search the path"; List <VKUserViewData> path = await connFind.getConnection(); statusLabel.Text = "Path is found"; await validatePath(connFind, path); }
private async Task validatePath(VKConnectionFinder finder, List <VKUserViewData> path) { if (finder.Status == FetchResult.ConnectionError) { MessageBox.Show("There is no connection to vk servers"); } if (finder.Status == FetchResult.BadData) { MessageBox.Show("VK servers returned error. Try again"); } statusLabel.Text = "Downloading user info"; ResultForm newForm = new ResultForm(path); await newForm.prepareView(); newForm.Show(); statusLabel.Text = "Ready"; //await newForm.prepareView(); }